/* Goba Secondary School - Alumni RSVP Festival */
/* css/style.css */

/* ------------------- */
/* 1. Root Variables & Global Styles
/* ------------------- */
:root {
    --primary-color: #0a2342; /* Dark Blue */
    --secondary-color: #d4af37; /* Gold */
    --accent-color: #fca311; /* Vibrant Gold/Orange */
    --light-color: #ffffff; /* White */
    --dark-color: #1a1a1a; /* Near Black */
    --text-color: #333;
    --text-color-light: #f0f0f0;
    --background-color: #f9f9f9;
    --border-radius: 12px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;

    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ------------------- */
/* 2. Utility & Helper Classes
/* ------------------- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0); /* Start scaled to 0 */
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1); /* Smooth transition */
}

/* Add this class with JS when the section is in view */
.in-view .section-title::after {
    transform: translateX(-50%) scaleX(1); /* Scale to full width */
}


.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ------------------- */
/* 3. Loading Screen
/* ------------------- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--light-color);
}

.loading-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.loading-content h2 {
    color: var(--light-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* ------------------- */
/* 4. Navigation
/* ------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: background-color var(--transition-speed), padding var(--transition-speed), box-shadow var(--transition-speed);
}

.navbar.scrolled {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between; /* Distribute items */
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-color);
}

.nav-menu {
    position: fixed; /* Always fixed for responsive menu */
    left: -100%; /* Hidden by default */
    top: 0;
    flex-direction: column;
    justify-content: center;
    background-color: var(--primary-color);
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: 0.3s;
    gap: 2rem;
    list-style: none; /* Ensure list style is removed for menu */
    display: flex; /* Always flex to arrange items vertically */
    z-index: 99; /* Below hamburger */
}

.nav-menu.active {
    left: 0; /* Slide in when active */
}

.nav-item {
    margin: 1rem 0;
}

.nav-link {
    color: var(--light-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color var(--transition-speed);
    font-size: 1.5rem; /* Larger font for mobile/hamburger menu */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed);
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Language Toggle Button (Text based) - now always visible and centered */
.lang-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    display: flex; /* Always flex */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
    width: fit-content;
    /* Positioning for middle */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.lang-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
}

.lang-toggle span {
    color: var(--light-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity var(--transition-speed);
}

.lang-toggle span:not(.active-lang) {
    opacity: 0.6;
}

.hamburger {
    display: block; /* Always display hamburger for all screen sizes */
    z-index: 101; /* Above nav menu */
    cursor: pointer;
    /* Pushed to the far right by justify-content: space-between; */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--light-color);
    transition: all 0.3s ease-in-out;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ------------------- */
/* 5. Hero Section
/* ------------------- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-color);
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    transform: scale(1.1); /* Start slightly zoomed in */
}

.hero-slideshow .slide.active {
    opacity: 1;
    animation: kenBurns 15s infinite; /* NEW: Ken Burns Effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Increased opacity (less transparency) to make overlay more prominent */
    background: linear-gradient(to bottom, rgba(10, 35, 66, 0.8), rgba(10, 35, 66, 0.9)); /* Higher opacity for more prominence */
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--light-color);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

/* NEW: Staggered Title Animation */
.hero-title span {
    display: block;
    opacity: 0;
    transform: translateY(30px) blur(5px);
    animation: titleReveal 1s forwards;
}

.title-main {
    font-size: 3rem;
    letter-spacing: 2px;
    animation-delay: 0.2s !important;
}

.title-sub {
    font-size: 4.5rem;
    color: var(--secondary-color);
    animation-delay: 0.4s !important;
}

.title-year {
    font-size: 3.5rem;
    animation-delay: 0.6s !important;
}


.hero-details {
    margin-bottom: 2.5rem;
}

.hero-details p {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem;
}

.event-tagline {
    font-style: italic;
    margin-top: 1rem;
    opacity: 0.9;
    display: block !important;
}

/* Countdown Timer */
.countdown-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.countdown-title {
    font-family: var(--font-secondary);
    color: var(--light-color);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 2rem; /* Increased gap */
}

.countdown-item {
    text-align: center;
}

.countdown-number {
    font-family: var(--font-primary);
    font-size: 4rem; /* Increased font size */
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    /* Added animation for modern look */
    animation: fadeAndScale 1s ease-out;
}

.countdown-label {
    font-size: 1.1rem; /* Increased font size */
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow i {
    font-size: 1.5rem;
    color: var(--light-color);
}

/* ------------------- */
/* 6. RSVP Section
/* ------------------- */
.rsvp-section {
    padding: 0;
    margin-top: -200px; /* Adjusted to pull the form up further */
    position: relative;
    z-index: 10;
}

.rsvp-card {
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.rsvp-card .card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.rsvp-card .card-title {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.rsvp-card .card-subtitle {
    font-size: 1.1rem;
    color: #666;
}

.rsvp-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.rsvp-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem; /* Add margin to all form groups */
}

.rsvp-form .form-group:last-of-type {
    margin-bottom: 0;
}

.rsvp-form .full-width {
    grid-column: 1 / -1;
}

.rsvp-form label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    position: relative; /* For pseudo-element border */
}

/* NEW: Animated border on focus */
.rsvp-form input,
.rsvp-form select {
    background-image: linear-gradient(var(--secondary-color), var(--secondary-color)), linear-gradient(#ccc, #ccc);
    background-size: 0 2px, 100% 1px;
    background-repeat: no-repeat;
    background-position: center bottom;
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    transition: background-size 0.3s ease;
}

.rsvp-form input:focus,
.rsvp-form select:focus {
    outline: none;
    background-size: 100% 2px, 100% 1px;
}


.rsvp-form textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative; /* For shimmer effect */
    overflow: hidden; /* For shimmer effect */
    margin-top: 1.5rem; /* ADDED MARGIN */
}

/* NEW: Shimmer effect on hover */
.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}


.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(252, 163, 17, 0.3);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    padding: 0.8rem;
    border-radius: 8px;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ------------------- */
/* 7. Main Content Sections
/* ------------------- */
main {
    padding-top: 6rem; /* Space after RSVP card */
}

section {
    padding: 6rem 0;
}

/* Programs Section */
.programs-section {
    background-color: var(--light-color);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 200px); /* Three cards per row on desktop */
    justify-content: center;
    gap: 2rem;
}

.program-card {
    width: 200px;
    height: 260px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.program-card .card-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.program-card .card-icon i {
    font-size: 2rem;
    color: var(--light-color);
}

.program-card:hover .card-icon {
    transform: scale(1.1);
    animation: iconPop 0.5s ease;
}

.program-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.program-card .card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* Attendees Section */
.attendees-section {
    background-color: var(--background-color);
}

.attendees-count {
    margin-top: 2rem;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.attendees-count .count-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    min-width: 40px; /* Give space for number to change without layout shift */
    text-align: center;
}

/* NEW: Styles for filter */
.filter-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.filter-container label {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-color);
}

.filter-container select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: var(--font-secondary);
    font-size: 1rem;
    background-color: var(--light-color);
    cursor: pointer;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.filter-container select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.attendees-loading, .attendees-empty {
    text-align: center;
    padding: 4rem 0;
    color: #666;
}

.attendees-loading p {
    margin-top: 1rem;
}

.attendees-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.attendees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
    justify-content: center;
}

.attendee-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    min-height: 120px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    padding-top: 2rem;
}

.attendee-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.attendee-year {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-bottom-left-radius: var(--border-radius);
}

.attendee-name {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
}

.attendee-comment {
    font-size: 0.85rem;
    font-style: italic;
    color: #555;
    line-height: 1.5;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
    width: 100%;
    word-wrap: break-word;
}

/* Gallery Section */
.gallery-section {
    background-color: var(--light-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 35, 66, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    color: var(--light-color);
    transform: translateY(20px);
    transition: transform var(--transition-speed);
}

.gallery-item:hover .gallery-content {
    transform: translateY(0);
}

.gallery-content h4 {
    color: var(--light-color);
    font-size: 1.2rem;
}

.gallery-content p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.gallery-content i {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--light-color);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity var(--transition-speed), transform var(--transition-speed);
}

.gallery-item:hover .gallery-content i {
    opacity: 1;
    transform: scale(1);
}

/* ------------------- */
/* 8. Footer
/* ------------------- */
.footer {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    justify-content: center; /* Center footer sections */
    align-items: start;
}

.footer-section {
    text-align: center; /* Center content within footer sections */
}

.footer-section h3, .footer-section h4 {
    color: var(--light-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block; /* For centering ::after pseudo-element */
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%; /* Center the underline */
    transform: translateX(-50%); /* Center the underline */
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center; /* Center logo */
}

.footer-logo-img {
    width: 50px;
}

.footer-description {
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center; /* Center social icons */
}

.social-link {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light-color);
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-item, .event-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    justify-content: center; /* Center contact/event items */
    text-align: left; /* Align text left within item */
}

.contact-item i, .event-item i {
    color: var(--secondary-color);
    margin-top: 5px;
}

.visitor-count-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-color-light);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-credits .fa-heart {
    color: var(--accent-color);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity var(--transition-speed), visibility var(--transition-speed), transform var(--transition-speed);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ------------------- */
/* 9. Lightbox Modal
/* ------------------- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox-modal.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox-modal.open .lightbox-content {
    transform: scale(1);
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--border-radius);
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: var(--light-color);
    border: none;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    background: var(--secondary-color);
}

.lightbox-close {
    top: -15px;
    right: -15px;
}

.lightbox-prev {
    top: 50%;
    left: -60px;
    transform: translateY(-50%);
}

.lightbox-next {
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
}

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--light-color);
    padding: 3rem 1.5rem 1.5rem;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* ------------------- */
/* 10. Toast Notifications
/* ------------------- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: var(--light-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

/* ------------------- */
/* 11. Animations
/* ------------------- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeAndScale {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- NEW WORLD-CLASS ANIMATIONS --- */

@keyframes titleReveal {
    to {
        opacity: 1;
        transform: translateY(0) blur(0);
    }
}

@keyframes kenBurns {
    0% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes iconPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(-15deg); }
    100% { transform: scale(1) rotate(0); }
}

/* CORRECTED: Base animation for scroll-triggered elements */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.animate-on-scroll[data-delay="100"] { transition-delay: 0.1s; }
.animate-on-scroll[data-delay="200"] { transition-delay: 0.2s; }
.animate-on-scroll[data-delay="300"] { transition-delay: 0.3s; }
.animate-on-scroll[data-delay="400"] { transition-delay: 0.4s; }
.animate-on-scroll[data-delay="500"] { transition-delay: 0.5s; }

/* ------------------- */
/* 12. Responsive Design
/* ------------------- */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        justify-content: center;
        background-color: var(--primary-color);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        gap: 2rem;
        list-style: none;
        display: flex;
        z-index: 99;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
        z-index: 101;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 3.5rem;
    }
    .title-sub {
        font-size: 3.5rem;
    }
    .title-year {
        font-size: 2.8rem;
    }

    .lang-toggle {
        position: static;
        transform: none;
        margin-left: auto;
        margin-right: 15px;
    }
    
    .programs-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 3rem;
    }
    .title-sub {
        font-size: 3rem;
    }
    .title-year {
        font-size: 2.5rem;
    }

    .hero-details p {
        display: block;
        margin: 0.5rem 0;
    }

    .rsvp-section {
        margin-top: -100px;
        padding: 0 1rem;
    }

    .rsvp-card {
        padding: 1.5rem;
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }

    .rsvp-form .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .rsvp-form .form-group {
        margin-bottom: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-logo, .social-links, .contact-item, .event-item {
        justify-content: center;
    }

    .lightbox-prev, .lightbox-next {
        top: auto;
        bottom: -60px;
        left: 50%;
        transform: translateX(-120%);
    }

    .lightbox-next {
        transform: translateX(20%);
    }

    /* UPDATED: Mobile styles for program cards */
    .programs-grid {
        gap: 1.5rem;
    }

    .program-card {
        width: 160px;
        height: 220px;
        padding: 1.2rem;
    }

    .program-card .card-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 1rem;
    }

    .program-card .card-icon i {
        font-size: 1.6rem;
    }

    .program-card .card-title {
        font-size: 1.1rem;
    }

    .program-card .card-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .countdown-timer {
        gap: 0.5rem;
    }
    .countdown-number {
        font-size: 2.5rem;
    }
    .countdown-label {
        font-size: 0.8rem;
    }

    .attendees-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .programs-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .program-card {
        width: 100%; /* Allow cards to take full width in a single column */
    }

    .rsvp-card {
        max-width: 95%;
    }
}
