/* Modern CSS Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f5f7fa; /* Fallback for older browsers */
    background: -webkit-linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background: -o-linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}

a {
    color: #2563eb;
    text-decoration: none;
    -webkit-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Container Styles */
header,
footer,
div.page {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    background: #ffffff; /* Fallback for older browsers */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    -webkit-box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 30px 40px;
    margin-bottom: 20px;
}

/* Header Styles */
header {
    margin-top: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

header h1 {
    color: #1f2937;
    margin: 0;
    font-weight: 600;
    font-size: 2.5rem;
    letter-spacing: -0.025em;
}

.header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 20px;
}

.header img {
    width: 85px;
    height: auto;
    margin-right: 20px;
    border-radius: 8px;
}

.header h1 {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

/* Navigation Styles */
header nav {
    margin-top: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 20px;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px;
}

/* Language Switcher Styles */
header nav ul.language-switcher {
    background: #e2e8f0;
    margin-left: auto;
    gap: 4px;
}

header nav ul.language-switcher li a {
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

header nav ul.language-switcher li.active a {
    background: #10b981;
    color: white;
}

header nav ul.language-switcher li.active a:hover {
    background: #059669;
}

header nav ul li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

header nav ul li a {
    display: block;
    padding: 16px 28px;
    color: #64748b;
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: 6px;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

header nav ul li a:hover {
    background: #e2e8f0;
    color: #1e293b;
    text-decoration: none;
}

header nav ul li.active a {
    background: #2563eb;
    color: white;
}

header nav ul li.active a:hover {
    background: #1d4ed8;
}

/* Page Content */
div.page {
    background: rgba(255, 255, 255, 0.98);
    min-height: 400px;
}

div.page h2 {
    color: #1f2937;
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

div.page h3 {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

div.page p {
    margin-bottom: 1.25rem;
    color: #4b5563;
}

div.page ul,
div.page ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

div.page li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Footer Styles */
footer {
    background: rgba(249, 250, 251, 0.95);
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

footer a {
    color: #6b7280;
    margin-left: 20px;
}

footer a:hover {
    color: #374151;
}

/* Blog Post Styles */
.blog-post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post h3 {
    margin-top: 0;
}

.blog-post-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0 10px;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    header,
    footer,
    div.page {
        padding: 15px 20px;
        margin-bottom: 15px;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    header h1 {
        font-size: 1.75rem;
    }

    .header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        gap: 15px;
        position: relative;
    }

    .header img {
        margin-right: 0;
        width: 60px;
    }

    header nav {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        position: relative;
    }

    header nav ul {
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        padding: 4px;
    }

    header nav ul.language-switcher {
        position: absolute;
        top: -45px;
        right: 0;
        margin-left: 0;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        width: auto;
        min-width: 80px;
        -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        padding: 4px;
        background: #e2e8f0;
        border-radius: 6px;
        gap: 2px;
    }

    header nav ul li {
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
        min-width: 0;
    }

    header nav ul li a {
        padding: 14px 12px;
        font-size: 0.9rem;
        min-height: 44px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    header nav ul.language-switcher li a {
        padding: 8px 12px;
        font-size: 0.8rem;
        font-weight: 600;
        min-height: 36px;
    }

    footer {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 15px;
    }

    footer a {
        margin-left: 0;
    }
}

/* Chrome mobile specific fixes */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 1) {
    header nav ul li a {
        -webkit-appearance: none;
        appearance: none;
        border: none;
        background-clip: padding-box;
    }

    header nav ul li a:active {
        -webkit-transform: scale(0.98);
        transform: scale(0.98);
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    header,
    footer,
    div.page {
        padding: 12px 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .header img {
        width: 50px;
    }

    header nav ul li a {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
}
</thinking>


/* Subtle animations */
header,
footer,
div.page {
    -webkit-transition: box-shadow 0.3s ease;
    -o-transition: box-shadow 0.3s ease;
    transition: box-shadow 0.3s ease;
}

header:hover,
div.page:hover {
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    -webkit-box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Focus states for accessibility */
a:focus,
header nav ul li a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Pagination Styles */
.pagination {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 15px;
    margin-top: 3rem;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.pagination a {
    display: inline-block;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #374151;
    font-weight: 500;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-color: #2563eb;
}

.pagination .disabled {
    display: inline-block;
    padding: 10px 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #9ca3af;
    font-weight: 500;
    cursor: not-allowed;
}
