:root {
    --primary-color: #645E2A;
    /* rgb(100, 94, 42) extracted from photo */
    --hover-color: #8c8541;
    --text-color: #f8f8f8;
    --header-bg: rgba(100, 94, 42, 0.90);
    --font-heading: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
    --font-body: 'Chiron GoRound TC', 'Inter', 'Segoe UI', sans-serif;

    --bg-light: #F8F7F2;
    /* Soft earthy off-white for scrolling content */
    --text-dark: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
    display: flex;
    align-items: center;
}

.logo-stack {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color);
    align-items: center;
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

html[lang="ru"] .logo-main {
    font-size: 1.80rem;
}

html[lang="ru"] .logo-city {
    font-size: 0.70rem;
}

nav>ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav>ul>li {
    position: relative;
    padding: 1rem 0;
}

nav>ul>li>a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

nav>ul>li>a:hover {
    color: #e0d9b4;
}

/* Dropdown */
nav ul li ul {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--primary-color);
    list-style: none;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

nav ul li:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

nav ul li ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

nav ul li ul li a:hover {
    background: var(--hover-color);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
}

.lang-toggle a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.3s ease, text-shadow 0.3s ease;
}

.lang-toggle a.active,
.lang-toggle a:hover {
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Page content */
.fullscreen-bg {
    height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    position: relative;
    background-attachment: fixed;
    /* Parallax effect */
}

.hero-buttons {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--hover-color);
    border-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 90%;
        max-width: 320px;
    }
    
    .btn {
        width: 100%;
    }
}

/* Replaces the background image approach with a real img tag */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    /* dark overlay for text readability */
    z-index: 1;
}

.page-title {
    position: relative;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    padding: 0 20px;
}

/* Scrolling Content Section */
.content-section {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 6rem 12vw;
    min-height: 50vh;
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
}

.content-section h2 {
    font-family: var(--font-body);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.content-section p {
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: #4a4a4a;
}

.content-section h3 {
    margin-top: 1rem;
    margin-bottom: 0.2rem;
    font-size: 1.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 3rem 1rem;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    margin: 0.5rem 0;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.site-footer a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Teacher Profiles */
.teachers-grid {
    display: grid;
    gap: 4rem;
    grid-template-columns: 1fr;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.teacher-profile {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-areas:
        "photo name"
        "photo role"
        "photo bio";
    gap: 0 3rem;
    align-items: start;
    text-align: left;
}

.teacher-photo {
    grid-area: photo;
    width: 250px;
    height: 250px;
    border-radius: 50% !important; /* Forces override of generic rules */
    object-fit: cover !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 0 !important; /* Override */
    border: 4px solid var(--bg-light);
    outline: 2px solid var(--primary-color);
}

.teacher-name {
    grid-area: name;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.teacher-role {
    grid-area: role;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #645E2A;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.teacher-bio {
    grid-area: bio;
}

@media (max-width: 768px) {
    .teacher-profile {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "name"
            "role"
            "bio";
        gap: 1rem 0;
        justify-items: center;
        text-align: center;
    }
    
    .teacher-bio {
        text-align: left;
    }
    
    .teacher-photo {
        margin-bottom: 1rem !important;
    }
}

.teacher-bio {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a4a4a;
}/* FAQ Accordion Styles */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: #faf9f5;
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background-color: #fff;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #4a4a4a;
    line-height: 1.6;
}

.faq-answer-content ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

.faq-answer-content li {
    margin-bottom: 0.25rem;
}

.faq-category {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Homepage Links */
.inline-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(100, 94, 42, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.inline-link:hover {
    color: var(--hover-color);
    text-decoration-color: var(--hover-color);
}

/* Mobile Navigation Styles */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1000;
}

.menu-toggle .bar {
    height: 2px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    header {
        position: relative;
        flex-wrap: nowrap;
        align-items: center;
    }

    .brand {
        order: 1;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        order: 2;
        display: flex;
        align-items: center;
    }

    .lang-toggle {
        order: 3;
    }

    nav > ul {
        display: none;
        gap: 0;
        flex-direction: column;
        position: absolute;
        top: 100%; /* just below header */
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 0;
        margin: 0;
        z-index: 999;
    }

    nav > ul.active {
        display: flex;
    }

    nav > ul > li {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    nav > ul > li > a {
        padding: 0.8rem 1.5rem;
        display: block;
        border-bottom: 1px solid #eee;
        color: #333 !important;
    }
    
    nav > ul > li > a:hover,
    nav > ul > li > a:active {
        color: var(--primary-color) !important;
        background: transparent !important;
    }

    /* Dropdowns on mobile */
    nav > ul > li > ul {
        position: static !important;
        display: none !important;
        box-shadow: none !important;
        background: #fafafa !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        transform: none !important;
        border-radius: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    nav > ul > li.active > ul {
        display: block !important;
    }

    nav > ul > li:hover > ul {
        display: none; 
    }
    nav > ul > li.active:hover > ul {
        display: block !important;
    }

    nav > ul > li > ul li a {
        padding: 0.6rem 1.5rem 0.6rem 2.5rem !important;
        border-bottom: 1px solid #eee !important;
        display: block !important;
        color: #555 !important;
        text-decoration: none !important;
        background: transparent !important;
    }
    
    nav > ul > li > ul li a:hover {
        background: transparent !important;
        color: var(--primary-color) !important;
    }
    
    /* Hamburger animation */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(9.5px) rotate(45deg);
    }
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-9.5px) rotate(-45deg);
    }
}

/* Mission Values Accordion */
.value-item {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.value-item summary {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Hide default arrow */
    outline: none;
}
.value-item summary::-webkit-details-marker {
    display: none;
}
.value-item summary h3 {
    margin: 0 !important;
    font-size: 1.35rem;
    color: var(--primary-color);
}
.dropdown-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    line-height: 1;
    transition: transform 0.3s ease;
}
.value-item[open] .dropdown-icon {
    transform: rotate(45deg);
}
.value-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #4a4a4a;
    line-height: 1.6;
}

/* Safari Flexbox Fix */
.value-item summary {
    display: block !important; 
}
.value-item summary::-webkit-details-marker {
    display: none !important;
}
.value-item summary::marker {
    display: none;
    content: ""; 
}
.summary-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}


/* --- Mobile Viewport Anti-Stretch Polish --- */
.content-section p {
    /* Prevent long URLs like the citations in why_forest from stretching the display */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 768px) {
    html, body {
        /* Ultimate safeguard to trap any rogue elements inflating the DOM horizontally */
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .content-section {
        /* Prevent 12vw side-padding from choking out the remaining screen width on small phones */
        padding: 3rem 1.5rem !important; 
    }
    
    .content-section h2 {
        /* Drop from 3rem to 2rem and heavily enforce break-words for long Russian text */
        font-size: 2rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
    }
    
    .page-title {
        /* Elevate slightly as 5vw is very small natively on phones */
        font-size: 8vw !important; 
    }
}
