@font-face {
    font-family: 'Artlab';
    src: url('./fonts/artlab-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Artlab';
    src: url('./fonts/artlab-semibolditalic.ttf') format('truetype');
    font-weight: 600;
    font-style: italic;
}

:root {
    --primary-gold: #eebb4d;
    --primary-blue: #1a2b4c;
    --text-light: #f4f4f4;
    --text-dark: #333;
    --font-heading: 'Artlab', 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --section-spacing: 100px;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-light);
    background-color: #050505;
    /* Fallback for Three.js */
    overflow-x: hidden;
}

/* Three.js Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Logo */
#hero-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    max-width: 600px;
    z-index: 100;
    transition: all 0.5s ease-out;
    /* Fallback if GSAP fails */
}

/* Side Menu */
#side-menu {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

#side-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#side-menu a {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

#side-menu a.active,
#side-menu a:hover {
    background-color: var(--primary-gold);
    transform: scale(1.2);
}

#side-menu a::before {
    content: attr(data-label);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-gold);
    font-size: 0.8rem;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#side-menu a:hover::before {
    opacity: 1;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(238, 187, 77, 0.2);
}

h1 {
    font-size: 5.5rem;
    text-align: center;
}

h2 {
    font-size: 4rem;
}

p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Layout */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 10%;
    position: relative;
}

.hero-section {
    justify-content: flex-end;
    padding-bottom: 50px;
}

.scroll-indicator {
    text-align: center;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.arrow {
    font-size: 1.5rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.section-split {
    flex-direction: row;
    gap: 5%;
    align-items: center;
}

.section-split.reverse {
    flex-direction: row-reverse;
}

.text-content,
.image-content {
    flex: 1;
}

.image-content img {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    /* Slightly larger max height */
    object-fit: cover;
    /* Ensure image covers the area proportionally */
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(238, 187, 77, 0.4);
}

.text-block {
    text-align: center;
    max-width: 900px;
}

.video-container {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary-gold);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-container .image-content img {
    max-width: 300px;
    display: block;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
}

.footer-section {
    min-height: 20vh;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
.fade-in,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    /* Initial state for GSAP */
}

/* --- Top Navigation --- */
#top-menu {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#top-menu ul {
    list-style: none;
    display: flex;
    gap: 4rem;
    pointer-events: auto;
    background: rgba(10, 10, 10, 0.6);
    padding: 1rem 3rem;
    border-radius: 100px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(238, 187, 77, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(238, 187, 77, 0.1);
    transition: all 0.3s ease;
}

#top-menu:hover ul {
    background: rgba(10, 10, 10, 0.8);
    border-color: rgba(238, 187, 77, 0.6);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(238, 187, 77, 0.2);
}

#top-menu .nav-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    padding: 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#top-menu .nav-link.active,
#top-menu .nav-link:hover {
    color: var(--primary-gold);
    text-shadow: 0 0 10px rgba(238, 187, 77, 0.4);
}

#top-menu .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
    transition: width 0.4s ease;
}

#top-menu .nav-link.active::after,
#top-menu .nav-link:hover::after {
    width: 100%;
}

/* --- Views Management --- */
.view-section {
    width: 100%;
    min-height: 100vh;
}

/* Logo Fixed State (for non-home views) */
.logo-header-fixed {
    top: 30px !important;
    left: auto !important;
    right: 30px !important;
    width: 80px !important;
    transform: none !important;
    position: fixed !important;
    opacity: 1 !important;
}

/* --- Timeline View --- */
.timeline-container {
    padding-top: 150px;
    padding-bottom: 50px;
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-light);
    padding-left: 20px;
    padding-right: 20px;
}

.timeline-container h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.timeline-container .subtitle {
    font-size: 2rem;
    text-align: center;
    color: var(--primary-gold);
    margin-bottom: 3rem;
    font-style: italic;
}

.timeline-container .note {
    font-size: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-top: -2rem;
    margin-bottom: 4rem;
}

.timeline-era {
    margin-bottom: 5rem;
    border-left: 2px solid rgba(238, 187, 77, 0.3);
    padding-left: 2rem;
    position: relative;
}

.timeline-era h2 {
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.timeline-era .era-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    font-style: italic;
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 6px;
    width: 12px;
    height: 12px;
    background-color: var(--primary-blue);
    border: 2px solid var(--primary-gold);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-item:hover::before {
    background-color: var(--primary-gold);
    transform: scale(1.3);
}

.timeline-item .year {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.timeline-item p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: none;
    margin-bottom: 0;
}

.footer-spacer {
    height: 100px;
}

/* --- Photos View --- */
.photos-container {
    padding-top: 150px;
    padding-bottom: 50px;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-light);
    padding-left: 20px;
    padding-right: 20px;
}

.photos-container h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.photos-container .subtitle {
    font-size: 2rem;
    text-align: center;
    color: var(--primary-gold);
    margin-bottom: 3rem;
    font-style: italic;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 4rem;
    padding: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    /* aspect-ratio: 4/3;  Removed to allow content to dictate height if needed, but for images it's usually good. Keeping it flexible. */
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(238, 187, 77, 0.3);
    transition: all 0.4s ease;
    background: rgba(26, 43, 76, 0.4);
    backdrop-filter: blur(10px);
    padding: 15px;
    /* Added padding like magazine card */
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(238, 187, 77, 0.2);
    border-color: var(--primary-gold);
    background: rgba(26, 43, 76, 0.6);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    /* Fixed height for uniformity */
    object-fit: cover;
    border-radius: 12px;
    /* Inner radius */
    transition: transform 0.6s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item .overlay {
    position: static;
    /* Changed from absolute to static for "card" feel */
    background: transparent;
    padding: 15px 0 0 0;
    transform: none;
    color: var(--primary-gold);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Lightbox Styles */
#lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

#lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border: 2px solid var(--primary-gold);
    box-shadow: 0 0 30px rgba(238, 187, 77, 0.3);
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#lightbox-modal.active #lightbox-img {
    transform: scale(1);
}

#lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
}

#lightbox-close:hover {
    color: var(--primary-gold);
}

/* --- Donations View --- */
.donations-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.donation-card {
    background: rgba(26, 43, 76, 0.4);
    backdrop-filter: blur(10px);
    padding: 4rem;
    border-radius: 20px;
    border: 1px solid var(--primary-gold);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
}

.donation-text {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.account-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary-gold);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    font-weight: 700;
    user-select: all;
}

.bank-name {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
}

/* --- Magazines View --- */
.magazines-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.magazines-container h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.magazines-container .subtitle {
    font-size: 2rem;
    text-align: center;
    color: var(--primary-gold);
    margin-bottom: 3rem;
    font-style: italic;
}

.magazines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    width: 100%;
    margin-top: 2rem;
}

.magazine-card {
    background: rgba(26, 43, 76, 0.4);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(238, 187, 77, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s ease;
}

.magazine-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(238, 187, 77, 0.2);
    border-color: var(--primary-gold);
    background: rgba(26, 43, 76, 0.6);
}

.magazine-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.magazine-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.magazine-card p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.magazine-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.btn-view,
.btn-download {
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-view {
    background-color: transparent;
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.btn-view:hover {
    background-color: var(--primary-gold);
    color: var(--primary-blue);
}

.btn-download {
    background-color: var(--primary-gold);
    color: var(--primary-blue);
}

.btn-download:hover {
    background-color: #fff;
    color: var(--primary-blue);
    transform: scale(1.05);
}

/* Responsive at the end to prevent issues */
/* --- Mobile Navigation & Responsive Styles --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 10002;
    /* Above everything */
    pointer-events: auto;
}

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

/* Mobile Menu Active State */
#top-menu ul.nav-list.active {
    transform: translateX(0);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 900px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    p {
        font-size: 1.1rem;
    }

    .section {
        padding: 0 20px;
    }

    .hero-section {
        justify-content: center;
        padding-bottom: 20px;
    }

    #hero-logo {
        width: 80vw;
        max-width: 400px;
    }

    /* Stack split sections */
    .section-split,
    .section-split.reverse {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding-top: 80px;
        /* Space for fixed header */
    }

    .image-content img {
        max-height: 50vh;
    }

    .logo-container .image-content img {
        max-width: 200px;
    }

    /* Navigation */
    #side-menu {
        display: none;
    }

    #top-menu {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        justify-content: space-between;
        padding: 20px;
        background: transparent;
        /* Let the menu background handle it */
    }

    #top-menu ul.nav-list {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        border-radius: 0;
        border-left: 1px solid var(--primary-gold);
        margin: 0;
        padding: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .menu-toggle {
        display: flex;
        position: fixed;
        top: 25px;
        right: 25px;
    }

    #top-menu .nav-link {
        font-size: 1.5rem;
    }

    /* Views adjustments */
    .timeline-container,
    .photos-container,
    .donations-container,
    .magazines-container {
        padding-top: 100px;
    }

    /* Timeline Mobile */
    .timeline-era {
        border-left: none;
        /* Combine with item border or change style */
        padding-left: 0;
    }

    .timeline-era h2 {
        text-align: center;
        font-size: 2rem;
    }

    .timeline-item {
        padding-left: 20px;
        border-left: 2px solid rgba(238, 187, 77, 0.3);
        margin-left: 10px;
    }

    .timeline-item::before {
        left: -7px;
        width: 12px;
        height: 12px;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 20px;
    }

    /* Donation Card */
    .donation-card {
        padding: 2rem;
    }

    .account-number {
        font-size: 2rem;
        word-break: break-all;
    }

    /* Magazines */
    .magazines-grid {
        grid-template-columns: 1fr;
    }
}