:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #3e2723;
    color: #f4ecd8;
    padding-top: 140px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header Styles */
.header {
    background: #3e2723;
    border-bottom: 4px solid #5d4037;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
}

.header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #3e2723, #ffd700, #3e2723);
    opacity: 0.3;
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    margin-right: 8px;
}

.brand:hover .brand-title {
    color: #fff8e1;
}

.brand-icon {
    display: none;
}

@media (min-width: 768px) {
    .brand-icon {
        display: grid;
        width: 40px;
        height: 40px;
        background: #5d4037;
        border: 2px solid #8d6e63;
        border-radius: 8px;
        place-items: center;
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
        transition: background 0.3s;
    }

    .brand-icon:hover {
        background: #4e342e;
    }
}

.brand-title {
    font-family: 'Merriweather', serif;
    font-weight: 900;
    letter-spacing: 0.04em;
    font-size: 18px;
    line-height: 1.2;
    color: #f4ecd8;
    transition: color 0.3s;
}

@media (min-width: 768px) {
    .brand-title {
        font-size: 24px;
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #5d4037;
    border: 2px solid #8d6e63;
    border-radius: 999px;
    padding: 2px 4px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .nav-right {
        gap: 4px;
        padding: 4px 8px;
    }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #a1887f;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-button:hover {
    color: #f4ecd8;
    background: rgba(78, 52, 46, 0.5);
}

.nav-button.active {
    color: #f4ecd8;
    background: #4e342e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .nav-button {
        width: auto;
        padding: 0 12px;
    }
}

.nav-button svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 768px) {
    .nav-button svg {
        width: 16px;
        height: 16px;
    }
}

.nav-button-text {
    display: none;
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px;
}

@media (min-width: 768px) {
    .nav-button-text {
        display: inline;
    }
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: #8d6e63;
    margin: 0 4px;
    opacity: 0.5;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s;
}

.lang-button:hover {
    background: rgba(78, 52, 46, 0.5);
}

.lang-button img {
    width: 24px;
    height: auto;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lang-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 192px;
    background: #f4ecd8;
    border: 2px solid #8d6e63;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 50;
    overflow: hidden;
    display: none;
}

.lang-dropdown.open {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.lang-option:hover {
    background: #ffe0b2;
}

.lang-option.active {
    background: #ffe0b2;
    font-weight: 700;
    color: #3e2723;
}

.lang-option:not(.active) {
    color: #5d4037;
}

.lang-option img {
    width: 24px;
    height: auto;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lang-option-text {
    font-family: 'Merriweather', serif;
}

/* Page Navigation */
.page-nav {
    background: #2d1b18;
    border-bottom: 2px solid #3e2723;
    padding: 12px 16px;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 99;
    width: 100%;
}

.page-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-nav-link {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    color: #a1887f;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.page-nav-link:hover {
    color: #f4ecd8;
    background: rgba(78, 52, 46, 0.5);
}

.page-nav-link.active {
    color: #f4ecd8;
    background: #4e342e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .page-nav-link {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.page-title {
    font-family: 'Merriweather', serif;
    font-size: 30px;
    margin: 0 0 12px;
}

.page-desc {
    color: #d7ccc8;
    margin: 0 0 24px;
}

.section {
    margin-bottom: 24px;
    padding: 16px 18px;
    background: rgba(45, 27, 24, 0.7);
    border: 1px solid #5d4037;
    border-radius: 14px;
}

.section h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-family: 'Merriweather', serif;
}

.section p {
    margin: 0;
    color: #d7ccc8;
    line-height: 1.6;
}

.section p + p {
    margin-top: 12px;
}

.section ul {
    margin: 8px 0;
    padding-left: 20px;
    color: #d7ccc8;
    line-height: 1.8;
}

.section li {
    margin: 4px 0;
}

/* Footer */
.footer {
    background: #2d1b18;
    border-top: 2px solid #3e2723;
    padding: 24px 16px;
    color: #8d6e63;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}

.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.5;
    margin-bottom: 16px;
}

.footer-divider span {
    display: inline-block;
    height: 1px;
    width: 28px;
    background: #8d6e63;
}

.divider-text {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1.4;
}

.footer-copy {
    font-size: 10px;
    margin: 0 0 6px;
    color: #8d6e63;
}

.footer-tagline {
    font-size: 9px;
    color: #5d4037;
    margin: 0 0 6px;
}

.footer-updated {
    font-size: 9px;
    margin: 6px 0 0;
    color: #5d4037;
}

@media (max-width: 600px) {
    body {
        padding-top: 120px;
    }
    
    .page-nav {
        top: 60px;
        padding: 8px 12px;
    }

    .page-title {
        font-size: 24px;
    }

    .section {
        padding: 14px 14px;
    }
}
