/* --- CSS VARIABLES & RESET --- */
:root {
    /* FONT SETTINGS: Restored to Montserrat */
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Colors */
    --color-main: #926974; 
    --color-main-dim: rgba(146, 105, 116, 0.8);
    --color-white: #ffffff;
    
    /* Backgrounds */
    --bg-color-1: #F3F3F3;
    --bg-color-2: #fcf5ed;
    --bg-color-3: #fffefe;

    /* --- TYPOGRAPHY SYSTEM (Desktop) --- */
    --fs-hero: 8rem;
    --fs-section-title: 3.5rem; 
    --fs-sub-header: 2.7rem;    
    --fs-card-title: 1.2rem;
    --fs-body-text: 1.2rem;     
    --fs-small-text: 1rem;
    
    /* Spacing */
    --section-padding: 0 8%;
    --section-height: 100vh;
}

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

html {
    /* ENABLES THE SCROLL SNAPPING (Desktop) */
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    font-size: 18px; 
}

body {
    font-family: var(--font-body); /* Set global body font */
    color: var(--color-main);
    background: linear-gradient(180deg, 
        var(--bg-color-1) 0%, 
        var(--bg-color-2) 25%, 
        var(--bg-color-3) 50%, 
        var(--bg-color-2) 75%, 
        var(--bg-color-1) 100%);
    overflow-x: hidden;
    line-height: 1.6; /* Restored looser line height for Montserrat */
}

/* --- TYPOGRAPHY BASE --- */
h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 400; /* Restored lighter weight for headers */
    color: var(--color-main);
    text-wrap: balance; 
}

p {
    font-family: var(--font-body);
    font-weight: 300; /* Restored lighter weight for body */
    font-size: var(--fs-body-text);
    color: var(--color-main-dim);
    text-wrap: pretty; 
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SECTIONS COMMON --- */
section, header, footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: var(--section-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative; 
    padding: var(--section-padding);
}

/* --- HERO NAV --- */
.hero-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.5rem 2rem;
    padding: 24px 8% 24px 4%;
    z-index: 2;
}

.hero-nav a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
}

.hero-nav a:hover {
    opacity: 0.85;
}

/* --- IMAGE OPTIMIZATION (Retina/Mobile) --- */
/* GPU compositing for sharper rendering on HiDPI devices */
.hero,
.hero-bg-mobile,
.spectators-image,
.pre-footer,
.pre-footer-image,
.footer-bg-mobile {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.card-image,
.calendar-card-image {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.card-image img,
.calendar-card-image img {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* --- HERO SECTION --- */
.hero {
    width: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.1) 70%, rgba(0,0,0,0.6)), url('hero_pic.jpeg');
    background-size: cover;
    background-position: center 65%;
    background-attachment: scroll;
    background-repeat: no-repeat;
    justify-content: space-between;
    align-items: flex-start;
    padding: 60px 8% 60px 4%;
    color: var(--color-white);
    position: relative;
}

.hero h1, .hero p {
    color: var(--color-white);
}

/* Mobile BG div hidden by default */
.hero-bg-mobile, .footer-bg-mobile {
    display: none;
}

@media (min-width: 1024px) {
    .hero, footer, .pre-footer {
        background-attachment: fixed !important;
    }
}

.hero-header {
    max-width: 700px;
    margin-top: 15vh;
    position: relative;
    z-index: 1;
}

.hero-header h1 {
    font-family: var(--font-title);
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 0.9;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -2px;
    word-wrap: break-word;
}

/* Unified style for Hero Subtitle and Hero Footer text */
.hero-header p, .hero-footer p {
    font-family: var(--font-body);
    font-size: 1.2rem; 
    line-height: 1.6; 
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
}

.hero-adventures {
    margin-bottom: 0;
}

.hero-spacer {
    margin: 0.8em 0;
    padding: 0;
    height: 0;
    visibility: hidden;
}

@media (min-width: 768px) {
    .hero-polunina {
        white-space: nowrap;
        font-size: 1.1rem;
    }
}

.hero-footer p {
    margin-bottom: 0.5em;
}

.hero-footer p:last-child {
    margin-bottom: 0;
}

/* Mobile: break after "художественные" and after "Мельнице" — 3 lines, no orphan */
/* Desktop: break after "форматы" only — 2 lines */
.hero-mobile-br-1,
.hero-mobile-br-2 {
    display: none;
}

.hero-desktop-br {
    display: inline;
}

.hero-footer {
    margin-bottom: 5vh;
    position: relative;
    z-index: 1;
}

/* --- ФИЛОСОФИЯ ПРИКЛЮЧЕНИЙ --- */
.philosophy-section {
    align-items: flex-start;
    text-align: left;
    min-height: auto;
    padding: 80px 8%;
    justify-content: flex-start;
}

.philosophy-section h2 {
    font-size: var(--fs-section-title);
    text-transform: uppercase;
    margin-bottom: 40px;
    align-self: flex-start;
}

.philosophy-content {
    max-width: 700px;
    list-style: disc;
    padding-left: 1.4em;
    margin: 0;
    margin-right: auto;
    align-self: flex-start;
    text-align: left;
}

.philosophy-content li {
    margin-bottom: 1.2rem;
    font-family: var(--font-body);
    font-size: var(--fs-body-text);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-main-dim);
}

.philosophy-content li:last-child {
    margin-bottom: 0;
}

/* --- MISSION SECTION --- */
.mission {
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(180deg, transparent 0%, rgba(146, 105, 116, 0.05) 100%);
}

.mission-header {
     margin-bottom: 40px;
}

.mission-header h2 {
    font-size: var(--fs-section-title);
    text-transform: uppercase;
    white-space: normal; 
}

.mission-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.vertical-line {
    width: 2px;
    height: 140px;
    background-color: var(--color-main);
    flex-shrink: 0;
}

.mission-text p {
    max-width: 700px;
    margin-bottom: 1.2rem;
    font-size: var(--fs-body-text);
}

/* --- NEW SPECTATORS BREAK SECTION (RESTRUCTURED) --- */
.spectators-break {
    background: transparent;
    padding: 0;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Spectators Image */
.spectators-image {
    width: 100%;
    height: 40vh;
    min-height: 350px;
    background: url('zrpic.jpeg') center/cover no-repeat;
}

/* Spectators Text */
.spectators-text {
    width: 100%;
    padding: 80px 8%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.spectators-break h2 {
    font-family: var(--font-title);
    font-size: var(--fs-section-title); 
    line-height: 1.1;
    margin-bottom: 30px;
    text-transform: uppercase;
    word-wrap: break-word;
    color: var(--color-main) !important;
}

.spectators-break p {
    font-family: var(--font-body);
    font-size: var(--fs-body-text);
    color: var(--color-main-dim);
    font-weight: 300;
    line-height: 1.4;
    max-width: 800px;
    letter-spacing: 0.5px;
}

/* --- PRINCIPLES (PRINCIPY) --- */
.principles {
    display: grid;
    align-content: center;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    background: linear-gradient(180deg, transparent 0%, rgba(146, 105, 116, 0.05) 100%);
}

/* --- TRAVEL CALENDAR 2026 --- */
.calendar-section {
    background: var(--bg-color-2);
    justify-content: center;
    padding: 50px 8% 55px;
    min-height: auto;
}

.calendar-header {
    margin-bottom: 32px;
    text-align: left;
    width: 100%;
}

.calendar-header h2 {
    font-size: var(--fs-section-title);
    text-transform: uppercase;
    color: var(--color-main);
}

.calendar-scroll-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0 56px; /* Space for arrows - they sit here, not on cards */
}

.calendar-cards {
    display: flex;
    flex-direction: row;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-stop: always;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.calendar-cards::-webkit-scrollbar {
    display: none;
}

.calendar-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 0 0 8px;
}

.calendar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(146, 105, 116, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.calendar-dot:hover {
    background: rgba(146, 105, 116, 0.5);
}

.calendar-dot.active {
    background: var(--color-main);
}

.calendar-arrow {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    z-index: 100;
    border-radius: 50%;
    border: 1px solid rgba(146, 105, 116, 0.4);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-main);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    align-items: center;
    justify-content: center;
}

.calendar-arrow:hover {
    background: var(--color-main);
    color: var(--color-white);
    border-color: var(--color-main);
}

.calendar-arrow-left {
    left: 0;
}

.calendar-arrow-right {
    right: 0;
}


.calendar-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.calendar-card-link:hover {
    color: inherit;
}

.calendar-card {
    flex: 0 0 calc((100% - 72px) / 4);
    min-width: calc((100% - 72px) / 4);
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(146, 105, 116, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start;
}

.calendar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(146, 105, 116, 0.18);
}

.calendar-card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.calendar-card-image picture {
    display: block;
    width: 100%;
    height: 100%;
}

.calendar-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.5s ease;
}

.calendar-card:hover .calendar-card-image img {
    transform: translateZ(0) scale(1.03);
}


.calendar-card-content {
    padding: 20px 20px;
    text-align: left;
}

.calendar-card-content h3 {
    font-size: var(--fs-card-title);
    font-weight: 600;
    color: var(--color-main);
    margin-bottom: 12px;
    line-height: 1.3;
}

.calendar-card-separator {
    width: 100%;
    height: 1px;
    background: rgba(146, 105, 116, 0.3);
    margin-bottom: 12px;
}

.calendar-meta {
    font-size: 0.8rem;
    color: var(--color-main-dim);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-meta:last-child {
    margin-bottom: 0;
}

.calendar-meta i {
    font-size: 0.8rem;
    opacity: 0.8;
    min-width: 16px;
}

/* --- ВИДЕОДНЕВНИКИ --- */
.videodiaries-section {
    background: var(--bg-color-2);
    justify-content: center;
    padding: 80px 8%;
    min-height: auto;
}

.videodiaries-header {
    margin-bottom: 50px;
    text-align: left;
    width: 100%;
}

.videodiaries-header h2 {
    font-family: var(--font-title);
    font-size: var(--fs-section-title);
    text-transform: uppercase;
    color: var(--color-main);
    margin-bottom: 24px;
}

.videodiaries-intro {
    font-family: var(--font-body);
    font-size: var(--fs-body-text);
    color: var(--color-main-dim);
    line-height: 1.6;
    max-width: 700px;
}

.videodiaries-videos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .videodiaries-videos {
        grid-template-columns: 1fr 1fr;
        max-width: 1100px;
    }
}

.videodiaries-video-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.videodiaries-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(146, 105, 116, 0.3);
    box-shadow: 0 4px 20px rgba(146, 105, 116, 0.08);
}

.videodiaries-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.videodiaries-video-title {
    font-family: var(--font-title);
    font-size: var(--fs-card-title);
    font-weight: 500;
    color: var(--color-main);
    text-transform: none;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .videodiaries-section {
        padding: 60px 20px;
    }
    .videodiaries-header {
        margin-bottom: 30px;
    }
    .videodiaries-videos {
        gap: 36px;
    }
    .videodiaries-video-title {
        font-size: 1rem;
    }
}

/* --- GALLERY GRID (PODHOD) --- */
.gallery-section {
    justify-content: center;
}

.gallery-header {
    margin-bottom: 40px;
    text-align: left;
    width: 100%;
}

.gallery-header h2 {
    font-size: var(--fs-section-title);
    text-transform: uppercase;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(146, 105, 116, 0.3);
    background: rgba(146, 105, 116, 0.03);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card:hover {
    background: rgba(146, 105, 116, 0.08);
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    margin-bottom: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: translateZ(0) scale(1.05);
}

.card-content {
    border: none;
    padding: 30px 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start;
    background: transparent;
    backdrop-filter: none;
}

.card-content h3 {
    font-family: var(--font-title); /* Title font for card headers */
    font-size: var(--fs-card-title);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(146, 105, 116, 0.4);
    display: inline-block;
    color: var(--color-main);
}

.card-content p {
    font-size: 1.5rem; /* Matched body text size */
    color: var(--color-main-dim);
}

/* --- NO SPECTATORS (UCHASTIE) --- */
.no-spectators {
    align-items: flex-start; 
    /* Reduced vertical padding here for desktop */
    min-height: auto; 
    padding-top: 100px;
    padding-bottom: 100px;
}

.no-spectators h2 {
    font-size: var(--fs-section-title);
    line-height: 1;
    margin-bottom: 20px;
    text-transform: uppercase;
    word-wrap: break-word;
}

.participation-subtitle {
    font-size: var(--fs-body-text);
    letter-spacing: 0.5px;
    max-width: 800px;
    line-height: 1.4;
    margin-bottom: 50px;
}

.participation-details {
    display: flex;
    align-items: center;
    gap: 30px;
}

.vertical-line-small {
    width: 2px;
    height: 80px;
    background-color: var(--color-main);
    flex-shrink: 0;
}

.participation-details p {
    font-size: var(--fs-body-text);
    letter-spacing: 0.5px;
    max-width: 800px;
    line-height: 1.4;
}

/* --- AUDIENCE (DLYA KOGO) --- */
.audience {
    justify-content: center;
}

.audience-header {
    margin-bottom: 40px;
    text-align: left;
    width: 100%;
}

.audience-header h2 {
    font-family: var(--font-title);
    font-size: var(--fs-section-title);
    text-transform: uppercase;
}

.principles h2 {
    font-family: var(--font-title);
    font-size: var(--fs-section-title);
    line-height: 1.1;
    text-transform: uppercase;
}

.principles-description {
    margin-top: 30px;
    font-size: var(--fs-body-text);
    font-style: normal; 
    opacity: 0.9;
    line-height: 1.4;
    color: var(--color-main-dim);
}

.principles-list {
    list-style: none;
}

.principles-list li {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.7rem; 
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
    color: var(--color-main);
}

.principles-list li i {
    margin-right: 25px;
    font-size: 1.2rem;
    opacity: 0.7;
}

/* --- PRE-FOOTER (O PRISUTSTVII) --- */
.pre-footer {
    background-color: #2a2a2a;
    /* Strong dark gradient at top so text sits on dark part of image */
    background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.5) 25%, rgba(0,0,0,0.2) 55%, rgba(0,0,0,0.5) 100%), url('pre-footer.jpeg');
    background-size: cover;
    background-attachment: fixed; 
    background-position: center top;
    
    color: var(--color-white);
    padding: 60px 8% 50px 8%; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.pre-footer h3 {
    font-family: var(--font-title);
    font-size: var(--fs-section-title); 
    line-height: 1.3;
    margin-bottom: 40px;
    text-transform: uppercase;
    color: var(--color-white) !important;
    max-width: 1000px;
}

.pre-footer-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.pre-footer .vertical-line {
    background-color: var(--color-white);
    height: 100px;
    width: 2px;
}

.pre-footer p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: var(--fs-body-text);
    max-width: 900px;
    line-height: 1.5;
}

/* --- CONTACT FORM --- */
.contact-form-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 8%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.4) 100%), url('contact-us.jpeg') center/cover no-repeat;
}

.contact-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.contact-form-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-main);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(146, 105, 116, 0.25);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(146, 105, 116, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-main);
    box-shadow: 0 0 0 2px rgba(146, 105, 116, 0.15);
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-btn {
    width: 100%;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: #6b8e6b;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 8px;
}

.contact-form-btn:hover {
    background: #5a7d5a;
    transform: translateY(-1px);
}

.contact-form-disclaimer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.5;
    margin-top: 8px;
}

.contact-form-disclaimer a {
    color: #e85a5a;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.contact-form-disclaimer a:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .contact-form-section {
        padding: 60px 20px;
    }
    .contact-form input,
    .contact-form textarea {
        padding: 14px 18px;
    }
}

/* --- FOOTER (CONTACT) --- */
footer {
    background: linear-gradient(180deg, 
        var(--bg-color-2) 0%, 
        var(--bg-color-1) 100%);
    color: var(--color-main);
    padding: 100px 8% 50px 8%;
    min-height: 100vh;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
}

footer h3, footer p, footer a {
    color: var(--color-main) !important;
}

.footer-content {
    max-width: 1200px;
    margin-top: 10vh;
}

.footer-content p {
    color: var(--color-main);
    margin-bottom: 3.5rem;
    font-size: 2.8rem;
    font-weight: 500;
    line-height: 1.3;
}

.btn-contact {
    display: inline-block;
    border: 1px solid var(--color-main);
    padding: 18px 60px;
    border-radius: 50px;
    color: var(--color-main);
    text-decoration: none;
    letter-spacing: 2px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-bottom: 40px;
    font-family: var(--font-body);
    font-weight: 600;
}

.btn-contact:hover {
    background: var(--color-main);
    color: white !important;
}

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

.socials a {
    color: var(--color-main);
    font-size: 1.5rem;
    margin: 0 30px 0 0;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.socials a:hover {
    opacity: 1;
}

.footer-logo {
    position: relative;
    align-self: flex-end;
    text-align: right;
    font-size: 1.2rem;
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 50px;
    font-family: var(--font-body);
}

/* --- ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.card, .audience-item, .principles-list li, .audience-header, .mission-header, .gallery-header, .spectators-break h2, .spectators-break p, .pre-footer h3, .pre-footer-content, .calendar-header, .calendar-card,
.videodiaries-header, .videodiaries-video-item,
.contact-form-wrapper {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

/* FIXED SELECTORS */
section.active .card, 
section.active .audience-item,
section.active .principles-list li,
section.active .audience-header,
section.active .mission-header,
section.active .gallery-header,
.pre-footer.active h3, 
section.active .pre-footer-content,
section.active .calendar-header,
section.active .calendar-card,
section.active .videodiaries-header,
section.active .videodiaries-video-item,
section.active .contact-form-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.spectators-break.active h2,
.spectators-break.active p {
    opacity: 1;
    transform: translateY(0);
}

section.active .audience-header { transition-delay: 0.1s; }
section.active .card:nth-child(1) { transition-delay: 0.2s; }
section.active .card:nth-child(2) { transition-delay: 0.4s; }
section.active .card:nth-child(3) { transition-delay: 0.6s; }

section.active .calendar-header { transition-delay: 0.1s; }
section.active .calendar-card:nth-child(1) { transition-delay: 0.15s; }
section.active .calendar-card:nth-child(2) { transition-delay: 0.2s; }
section.active .calendar-card:nth-child(3) { transition-delay: 0.25s; }
section.active .calendar-card:nth-child(4) { transition-delay: 0.3s; }
section.active .calendar-card:nth-child(5) { transition-delay: 0.35s; }
section.active .calendar-card:nth-child(6) { transition-delay: 0.4s; }
section.active .calendar-card:nth-child(7) { transition-delay: 0.45s; }
section.active .calendar-card:nth-child(8) { transition-delay: 0.5s; }
section.active .calendar-card:nth-child(9) { transition-delay: 0.55s; }
section.active .calendar-card:nth-child(10) { transition-delay: 0.6s; }
section.active .calendar-card:nth-child(11) { transition-delay: 0.65s; }

section.active .audience-item:nth-child(2) { transition-delay: 0.2s; }
section.active .audience-item:nth-child(3) { transition-delay: 0.4s; }
section.active .audience-item:nth-child(4) { transition-delay: 0.6s; }

section.active .principles-list li:nth-child(1) { transition-delay: 0.1s; }
section.active .principles-list li:nth-child(2) { transition-delay: 0.2s; }
section.active .principles-list li:nth-child(3) { transition-delay: 0.3s; }
section.active .principles-list li:nth-child(4) { transition-delay: 0.4s; }
section.active .principles-list li:nth-child(5) { transition-delay: 0.5s; }

.spectators-break.active p { transition-delay: 0.3s; }

section.active .videodiaries-header { transition-delay: 0.1s; }
section.active .videodiaries-video-item:nth-child(1) { transition-delay: 0.2s; }
section.active .videodiaries-video-item:nth-child(2) { transition-delay: 0.3s; }
section.active .videodiaries-video-item:nth-child(3) { transition-delay: 0.4s; }
section.active .videodiaries-video-item:nth-child(4) { transition-delay: 0.5s; }
/* Adjusted selector for new structure */
.pre-footer-text.reveal.active h3, 
.pre-footer-text.reveal.active .pre-footer-content {
     opacity: 1;
     transform: translateY(0);
}

/* --- MOBILE & TABLET OPTIMIZATION --- */
@media (max-width: 1024px) {
    :root {
        /* Slightly scale down on tablets but keep ratio */
        --fs-hero: 6rem; 
    }
    .hero, footer, .pre-footer, .spectators-break {
        background-attachment: scroll !important; /* Disable fixed bg on tablets */
    }
}

@media (max-width: 700px) {
    .calendar-card { flex: 0 0 calc((100% - 24px) / 2); min-width: calc((100% - 24px) / 2); }
    .calendar-scroll-wrapper { padding: 0 48px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .principles { grid-template-columns: 1fr; }
    .no-spectators h2 { font-size: var(--fs-section-title); } /* Consistent size */
    .footer { text-align: left; }
    .footer-logo { position: relative; bottom: auto; right: auto; text-align: left; margin-top: 50px; }
    .mission { align-items: flex-start; }
    .mission-content { flex-direction: column; gap: 20px; }
    .vertical-line { width: 100px; height: 2px; }
    
    .hero-header { margin-top: 10vh; }
    .hero-footer { margin-bottom: 8vh; }
    
    .pre-footer h3 { font-size: var(--fs-section-title); }
    
    .footer-content p { font-size: 1.8rem; }
}

/* Tablet: calendar fits in one viewport */
@media (min-width: 601px) and (max-width: 1024px) {
    .calendar-section {
        padding: 30px 5% 40px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .calendar-header {
        margin-bottom: 24px;
    }
    .calendar-header h2 {
        font-size: var(--fs-section-title);
    }
    .calendar-card {
        flex: 0 0 calc((100% - 20px) / 2);
        min-width: calc((100% - 20px) / 2);
    }
    .calendar-card-image {
        height: 160px;
    }
    .calendar-card-content {
        padding: 16px 18px;
    }
    .calendar-card-content h3 {
        font-size: var(--fs-card-title);
        margin-bottom: 10px;
    }
    .calendar-card-separator {
        margin-bottom: 10px;
    }
    .calendar-meta {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    .calendar-dots {
        margin-top: 16px;
        padding: 0 0 8px;
    }
    .calendar-cards {
        gap: 20px;
        padding: 8px 0 12px;
    }
}

@media (max-width: 600px) {
    :root {
        /* UNIFIED MOBILE FONTS */
        /* Scale text down dynamically to fit narrow screens */
        --fs-section-title: clamp(1.8rem, 8vw, 2.5rem); 
        
        /* Every paragraph becomes the same size */
        --fs-body-text: 1.1rem;
        
        /* Adjust Hero specific - SMALLER ON MOBILE ONLY */
        --fs-hero: 3rem; /* Increased to 3rem from 2.5rem */
        --fs-sub-header: 2rem;
        
        /* Layout */
        --section-padding: 80px 20px;
        --section-height: auto; /* Disable 100vh for flow */
    }

    html { 
        /* Enable scroll snapping for mobile readability */
        scroll-snap-type: y proximity; /* Better for tall content */
    } 
    
    body {
        overflow-x: hidden;
    }
    
    section, header, footer { 
        justify-content: flex-start; 
        height: auto;
        min-height: 100vh;
        scroll-snap-align: start;
        scroll-snap-stop: normal;
        padding: 40px 20px; 
    }
    
    /* --- HERO FIX FOR MOBILE PARALLAX --- */
    .hero { 
        min-height: 100vh; /* Keep hero full height */
        justify-content: space-between;
        padding: 40px 20px 40px 16px;
        /* Remove background from container */
        background: transparent !important;
        /* Create clipping context for fixed child */
        clip-path: inset(0);
        position: relative;
        z-index: 1;
    }
    
    .hero-bg-mobile {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        background-image: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.1) 70%, rgba(0,0,0,0.6)), url('hero_pic.jpeg');
        background-size: cover;
        background-position: center 65%;
    }
    
    .hero-nav { padding: 20px 20px 20px 16px; justify-content: flex-start; gap: 1rem 1.5rem; }
    .hero-nav a { font-size: 0.85rem; }
    .hero-header h1 { letter-spacing: -1px; }
    .hero-mobile-br-1,
    .hero-mobile-br-2 { display: inline; }
    .hero-desktop-br { display: none; } 
    
    /* HERO TEXT MOBILE FIX */
    /* Match the size of hero-header p and hero-footer p on mobile */
    .hero-header p, .hero-footer p {
        font-size: 1.1rem; /* Matched size */
        line-height: 1.5;
    }
    
    /* PHILOSOPHY SECTION MOBILE */
    .philosophy-section {
        padding: 60px 20px;
    }
    .philosophy-section h2 {
        margin-bottom: 32px;
    }
    .philosophy-content li {
        margin-bottom: 1rem;
    }

    /* MISSION SECTION MOBILE TWEAKS */
    .mission-header {
        margin-bottom: 15px; 
    }
    
    .mission-content {
        gap: 40px; 
    }
    
    .mission-text p {
        font-size: 0.9rem; /* Smaller text to fit in 2-3 lines */
        margin-bottom: 1.5rem;
    }

    /* --- SPECTATORS BREAK MOBILE (FIXED) --- */
    .spectators-break {
        padding: 0 !important;
        background: transparent !important;
        min-height: auto;
    }

    .spectators-image {
        height: 200px;
        min-height: auto;
        background-attachment: scroll;
    }
    
    .spectators-text {
        padding: 40px 20px;
    }

    .calendar-section {
        padding: 60px 20px;
    }
    .calendar-card {
        flex: 0 0 calc(100% - 8px);
        min-width: calc(100% - 8px);
    }
    .calendar-scroll-wrapper {
        padding: 0 40px;
    }
    .calendar-card-image {
        height: 220px;
    }

    /* --- Reduced Padding for Specific Sections on Mobile --- */
    .no-spectators {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    
    .participation-subtitle { margin-bottom: 30px; }
    .participation-details { flex-direction: row; gap: 20px; }

    .principles-description { 
        margin-top: 15px; 
        font-size: 1rem; 
        max-width: 100%; 
    }
    .principles-list li { 
        margin-bottom: 20px; 
        font-size: var(--fs-body-text); 
    }
    .principles-list li i {
        font-size: var(--fs-body-text); 
        margin-right: 15px;
    }
    
    .audience-item i { margin-bottom: 20px; }
    
    /* CARD CONTENT MOBILE CONSISTENCY */
    .card-content p {
         /* Override desktop inherited small-text to match mission/body size */
         font-size: 0.9rem; 
    }
    
    .btn-contact { padding: 15px 40px; width: 100%; text-align: center; }
    
    .footer-logo { align-self: center; text-align: center; margin-top: 40px; }
    .footer-content p { font-size: 1.8rem; }
    
    .card-image { height: 200px; } 
    
    /* PRE FOOTER MOBILE */
    /* Force full screen overlay layout for mobile */
    .pre-footer {
         padding: 0 !important; /* No padding on container */
         display: block; /* Break flex column */
         position: relative;
         min-height: 100vh;
         height: 100vh;
         background: transparent !important;
         clip-path: inset(0); /* Crucial for parallax fix */
    }
    
    /* 1. Make image full screen - dark part at top */
    .pre-footer-image {
        position: fixed; /* Fixed for parallax */
        top: 0; 
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: -1;
        background: url('pre-footer.jpeg') center/cover no-repeat;
        background-position: center top;
    }
    
    /* 2. Position text on top - strong dark overlay so text stays on dark area */
    .pre-footer-text {
         position: relative;
         z-index: 1;
         padding: 60px 20px 0;
         min-height: 100vh;
         display: flex;
         flex-direction: column;
         justify-content: flex-start;
         align-items: flex-start;
         /* Strong dark gradient at top so text sits on dark part of picture */
         background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 30%, rgba(0,0,0,0.2) 70%, transparent 100%);
    }

    /* 3. White text colors for contrast */
    .pre-footer h3 { 
        font-size: var(--fs-section-title); 
        margin-bottom: 10px; /* Reduced margin to bring closer to line */
        color: var(--color-white) !important;
    }
    .pre-footer p { 
        font-size: 0.95rem; 
        max-width: 100%;
        color: rgba(255,255,255,0.95) !important;
    }
    .pre-footer .vertical-line {
         background-color: var(--color-white);
    }

    .pre-footer-content { 
        flex-direction: column; 
        gap: 15px; /* Reduced gap between line and text */
    }
    
    /* Make line horizontal on mobile */
    .pre-footer .vertical-line { 
        width: 100px; 
        height: 2px; 
    }

    /* Centered Socials on Mobile with Removed FB */
    .socials {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }
    .socials a {
        margin: 0 15px; /* Even spacing */
    }
    .social-fb {
        display: none; /* Hide Facebook on mobile */
    }
    
    /* --- FOOTER MOBILE FIX --- */
    footer {
        background: transparent !important;
        clip-path: inset(0);
        position: relative;
    }
    
    .footer-bg-mobile {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.5)), url('footer.jpeg');
        background-size: cover;
        background-position: center;
    }
}
