:root {
    
    --ted-red: #E62B1F;
    --dark-bg: #0A0A0A;
    --black: #000000; /* Black color identity [cite: 19] */
    --white: #ffffff;
    --text-light: #FFFFFF;
    --text-faded: #AAAAAA;
    --hero-padding-y: 120px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif; 
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utility Container */
.container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensures logo and nav are far apart */
}

.header {
    background-color: var(--dark-bg); 
    position: sticky; 
    top: 0; 
    /* FIX 1: Ensure the header is always on top of everything */
    z-index: 2000; 
    
    /* Background treatment to simulate the dark, blurred backdrop */
    background-color: #0A0A0A; 
    
    /* Layered Background: Gradients (for color hints) + Image (for texture) */
    background-image: 
        /* 1. Gradient 1 (Red hint - Increased opacity for visibility) */
        radial-gradient(at 15% 15%, rgba(230, 43, 31, 0.3) 0%, transparent 40%),
        /* 2. Gradient 2 (Blue hint - Increased opacity for visibility) */
        radial-gradient(at 85% 85%, rgba(0, 70, 100, 0.3) 0%, transparent 40%),
        /* 3. Repeating Pattern Image */
        url('../images/ted\ talk\(1\).jpg'); /* <<< CHECK THIS FILE NAME >>> */
    
    /* Control how the layers are sized and repeated */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* Gradients don't repeat, pattern does */
    
    /* Blend the layers */
    background-blend-mode: overlay;
    padding: 15px 0;
}
/* No compensating padding is needed for position: sticky */
.header .container {
    justify-content: space-between;
}
.logo {
    font-size: 40px;
    font-weight: 700;
    color: var(--ted-red);
}

.x{
   color: white;
}
.navbar ul { 
    list-style: none; 
    display: flex; 
    gap: 30px; 
}
.navbar a { 
    text-decoration: none; 
    color: var(--text-faded); 
    font-size: 20px; 
    font-weight: 600; 
    transition: color 0.3s; 
}
.navbar a:hover { color: var(--text-light); }
.navbar a.active { color: var(--ted-red);}

/* Desktop Login Button */
.login-btn { 
    text-decoration: none; 
    color: var(--ted-red); 
    font-size: 20px; /* Matched to other links */
    font-weight: 600;
    display: flex; 
    align-items: center; 
    gap: 5px; 
}

/* Mobile Toggle Icon (Hidden on Desktop) */
.menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    cursor: pointer;
    z-index: 2001;
}

.menu-toggle i {
    color: var(--ted-red); 
    font-size: 30px;
}



/* ================== Responsive Adjustments ================== */

@media (max-width: 992px) {


    .desktop-nav { display: none; } 
    
    /* Show the toggle button */
    .menu-toggle { display: block; }
    
    /* 1. Mobile Menu Container (Initial State) */
    .navbar {
        position: absolute; 
        top: 100%; /* Position right below the header */
        left: 0;
        width: 100%;
        
        /* Max-height transition setup */ 
        max-height: 0;
        overflow: hidden; 
        transition: max-height 0.5s ease-in-out; 
        
        background-color: var(--dark-bg); 
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
        /* FIX 2: Z-index just below the header, but above content */
        z-index: 1999; 
    }


/* 2. Mobile Menu (Active State) */
    .navbar.active-nav {
        /* Fix for menu cutoff */
        max-height: 600px; 
        overflow-y: auto;
    }

    /* 3. Vertical Stack for Links */
    .navbar ul {
        display: flex;
        flex-direction: column; 
        padding: 20px 0;
        gap: 0; 
    }

    .navbar ul li {
        text-align: center;
        margin: 0;
        padding: 15px 0;
        border-bottom: 1px solid #1a1a1a; 
    }
    
    .navbar ul li:last-child {
        border-bottom: none;
    }
    .navbar a {
        font-size: 20px; /* Large, tappable size */
        padding: 0; /* Padding is on the <li> element now */
        display: block; 
    }
    /* 4. Login Item Styling */
    .mobile-login-item {
        /* FIX 3: Force display if it was hidden elsewhere */
        display: block !important; 
        margin-top: 10px; 
        padding: 15px 0 20px 0; 
        border-top: 1px solid #1a1a1a; /* Divider above login */
        border-bottom: none; 
    }
    .navbar a.login-btn {
        display: flex; 
        justify-content: center; 
        align-items: center;
        color: var(--ted-red) !important; 
        font-weight: 700;
        font-size: 20px;
    }
    .logo {
    font-size: 30px;
    font-weight: 700;
    color: var(--ted-red);
}
}



/* ############################################################################################################################################################################################# */

/* Red Glow Animation for Hero Title */
@keyframes red-glow {
    0% { text-shadow: 0 0 5px rgba(230, 43, 30, 0.4); }
    50% { text-shadow: 0 0 15px rgba(230, 43, 30, 0.8), 0 0 25px rgba(230, 43, 30, 0.4); }
    100% { text-shadow: 0 0 5px rgba(230, 43, 30, 0.4); }
}

/* Fade-In and Slide-Up for Captions */
@keyframes slide-fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.main{
        background-image: 
        /* 1. Gradient 1 (Red hint - Increased opacity for visibility) */
        radial-gradient(at 15% 15%, rgba(230, 43, 31, 0.3) 0%, transparent 40%),
        /* 2. Gradient 2 (Blue hint - Increased opacity for visibility) */
        radial-gradient(at 85% 85%, rgba(0, 70, 100, 0.3) 0%, transparent 40%),
        /* 3. Repeating Pattern Image */
        url('/images/event\ background.png'); /* <<< CHECK THIS FILE NAME >>> */
        background-color: #0A0A0A; 
    /* background-size: cover; */
    background-position: center;
    background-repeat: no-repeat; /* Gradients don't repeat, pattern does */
    /* background-blend-mode: overlay; */


}

/* --- 2. HERO / INTRODUCTION BANNER --- */
.hero-banner {
        background-image: 
        /* 1. Gradient 1 (Red hint - Increased opacity for visibility) */
        radial-gradient(at 15% 15%, rgba(230, 43, 31, 0.3) 0%, transparent 40%),
        /* 2. Gradient 2 (Blue hint - Increased opacity for visibility) */
        radial-gradient(at 85% 85%, rgba(0, 70, 100, 0.3) 0%, transparent 40%),
        /* 3. Repeating Pattern Image */
        url('/images/ted\ talk\(1\).jpg'); /* <<< CHECK THIS FILE NAME >>> */
        background-color: #0A0A0A; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* Gradients don't repeat, pattern does */
    /* Blend the layers */
    background-blend-mode: overlay;

    color: var(--white);
    padding: 100px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    /* font-family: var(--font-heading); */
    font-size: 3.5rem; /* Large and commanding */
    font-weight: 900;

    margin-bottom: 10px;
    display: inline-block; /* Allows the red line to follow the text width */
    position: relative;
    padding-bottom: 15px; /* Space for the underline */
    animation: red-glow 3s infinite alternate; 
    transition: all 0.3s ease-out; /* Smooth transition for text shadow */
}

/* Red Underline Style */
.hero-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 60%; /* Shorter line for a refined look */
    height: 4px;
    background-color: var(--tedx-red);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 300;
    color: #ccc; /* Light gray for contrast */
    margin-top: 15px;
    opacity: 0;
    animation: slide-fade-in 1s ease-out 0.5s forwards; /* 0.5s delay after title */
}

/* --- 3. EVENT HIGHLIGHT – POSTER LAUNCH (Main Card) --- */
.event-highlight {
    padding-top: 80px;
    padding-bottom: 40px; /* Reduced from 80px to 40px */

    color: var(--white); 
    text-align: center; /* Center everything in the section */
}
/* Update the general container for wider content */
.event-header-container, 
.event-card-container .container {
    /* Increase width from 900px to 1100px for a bigger feel */
    max-width: 1300px; 
    margin: 0 auto;
    padding: 0 20px;
    display: block !important;
}

/* Container for the Title/Tagline only */
.event-header-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    /* Remove Flexbox to allow stacking */
    display: block; 
    margin-bottom: 20px;
}

.event-name {
    /* font-family: var(--font-heading); */
    font-size: 3.5rem; 
    font-weight: 900;
    color: var(--tedx-red); 
    line-height: 1;
    margin: 0;
    text-align: center; /* Main title is centered */
}

.event-tagline {
   font-family: var(--font-body);
    font-size: 1.5rem; /* Large size */
    font-weight: 500;
    color: var(--white); 
    margin: 10px 0 0 0; 
    letter-spacing: 1px;
    
    /* NEW METHOD FOR OFFSET: Use relative positioning and transform */
    display: inline-block; /* Treat it as an inline block to size content correctly */
    text-align: left; /* Keep text left-aligned within its block */
    max-width: 90%; /* Prevent it from being too wide on giant screens */
    
    /* Center the block first (since the parent is text-align: center) */
    /* Then shift it right by a fixed amount (e.g., 80px) */
    position: relative;
    left: 40px; /* Adjust this fixed pixel value (e.g., 40px or 80px) to control the offset amount */
    
    /* Ensure taglines align beautifully on small screens */
    transition: left 0.3s ease;
}

/* Container for the actual card content */
.event-card-container {
    /* No need for extra padding here, managed by .event-highlight */
    padding-bottom: 40px; 
}

.event-card {
    background-color: var(--black);
    color: var(--white);
    border-radius: 8px;
    
    display: block; 
    text-align: left; /* Text content is left-aligned */
    max-width: 100%; 
    padding: 70px 100px; /* Centers the card */
    box-shadow: 0 0 15px rgba(230, 43, 30, 0.15); /* Subtle inner red glow */
    margin-bottom: 30px; /* Add vertical space between the two cards */
    /* Stronger red border */
    border: 3px solid rgba(230, 43, 30, 0.4); /* Thicker border line */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;

}

/* Make the hover effect glow stronger */
.event-card:hover {
    transform: translateY(-5px); 
    /* Increased glow intensity */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 40px rgba(230, 43, 30, 0.6); 
    border-color: var(--tedx-red); 
}

.event-description p {
    font-size: 1.15rem; 
    margin-bottom: 25px;
    color: #ffffff; 
        text-align: justify; /* This is the property that aligns both sides */
    text-justify: inter-word; /* Optional: Helps with spacing between words */
    
    /* ADDED: Slightly increase font weight for better visibility on black */
    font-weight: 400; /* Use a medium weight, if available in your font stack */
    /* If 400 doesn't look different, try 500 or 600 */
    
    line-height: 1.7; /* Ensures excellent vertical spacing */
    letter-spacing: 0.2px; /* Subtle spacing improvement */
}

/* Poster and Video Styling */
.visual-media {
    margin: 40px 0;
    text-align: center;
}

.event-poster {
   max-width: 100%;
    height: auto;
    border: none; 
    box-shadow: none; 
    /* Ensures large images stay within the container */
    display: block; 
    margin: 0 auto;
    transition: transform 0.3s ease;
}
.event-poster:hover {
    transform: scale(1.03);
    cursor: pointer;
}

.video-title {
    /* font-family: var(--font-heading); */
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 700;
    text-align: center;
}

/* Responsive Video Embed - 16:9 Aspect Ratio */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: var(--black);
    border-radius: 5px;
}

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

.caption {
    font-size: 1rem; /* Increased size for better readability */
    color: var(--tedx-red); 
    margin-top: 15px;
    font-style: normal;

}

/* --- 4. REFLECTION / CLOSING LINE --- */
.reflection-section {
    /* Changed background to Black to match the Event Highlight section */
    background-color: var(--black); 
    padding-top: 40px; 
    padding-bottom: 100px; /* Increased vertical padding for prominence */
    text-align: center;
}

/* --- 4. REFLECTION / CLOSING LINE (MODIFIED FOR SCROLL-TRIGGER) --- */
.reflection-quote {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 40px; 
    font-style: italic;

    
    font-size: 2rem; 
    font-weight: 700; 
    line-height: 1.6;
    
    color: var(--white); 
    border: 1px solid var(--tedx-red); 
    box-shadow: 0 0 20px rgba(230, 43, 30, 0.5); 
    
    /* 1. INITIAL (HIDDEN) STATE: Starts invisible and slightly scaled down */
    opacity: 0;
    transform: scale(0.95);
    
    /* 2. TRANSITION: Defines how the change to the 'is-visible' state occurs */
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

/* 3. FINAL (VISIBLE) STATE: This class is added by JavaScript when scrolled to */
.reflection-quote.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* New Keyframe for Quote Reveal */
@keyframes quote-reveal {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .reflection-section {
        padding: 60px 15px;
    }
    .reflection-quote {
        font-size: 1.5rem;
        padding: 20px;
    }
    .caption {
    font-size: 0.5rem; /* Increased size for better readability */
   

}
}

/* --- 5. RESPONSIVENESS (Mobile Adjustments) --- */
@media (max-width: 768px) {
    .hero-banner {
        padding: 80px 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    .event-highlight {
        padding: 50px 0;
    }
    .event-header-container {
        flex-direction: column; /* Stack titles vertically on small screens */
        align-items: flex-start;
        padding-bottom: 10px;
    }

    .event-name {
        font-size: 2.5rem;
    }
    .event-tagline {
        font-size: 1rem;
        margin-top: 5px;
        /* On smaller screens, remove the offset completely to center it */
        left: 0; 
        text-align: center;
        max-width: 100%;

    }
    .event-card {
        padding: 30px 20px;
    }
    

    .event-description p {
        font-size: 1rem;
    }

    .video-title {
        font-size: 1.5rem;
    }

}

@media (max-width: 480px) {
    .event-tagline {
        font-size: 1rem;
        margin-top: 5px;
        text-align: left;
        margin-left: 10%;
    }
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title::after {
        width: 80%;
    }
}

/* ################################################################################################################# */
/* ================== Footer Section Styles ================== */
/* ================== General Variables (Ensure consistency with your site) ================== */

:root {
    --footer-bg: #000;
    --text-light: #fff;
    --text-faded: #ccc;
    --tedx-red: #E62B1F;
    --social-icon-bg: #333;
}

.main-footer {
    background-color: var(--footer-bg);
    color: var(--text-faded);
    padding: 60px 0 20px 0; /* Padding top, bottom */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 40px; /* Separates main footer from sub-footer */
    border-bottom: 1px solid #1a1a1a;
    text-align: left;
}

/* --- Column Proportions Fix (Desktop Alignment) --- */
.footer-col {
    min-width: 0; 
    /* Ensures the text within the column flows correctly */
    text-align: left; 
}

/* Column 1: Logo & Branding (Takes the majority of the available space) */
.branding-col {
    /* FIX: Takes double the space compared to the smallest column */
    flex: 2; 
    max-width: 400px; /* Optional: Sets an upper limit for large screens */
}

/* Column 2: Useful Links (Content-sized) */
.links-col {
    /* FIX: Fixed width based on content size */
    flex: 0 0 160px; 
}

/* Column 3: Contact Info (Content-sized) */
.contact-col {
    /* FIX: Fixed width based on content size (slightly wider due to email) */
    flex: 0 0 280px; 
}

/* --- Branding Column Styles --- */
.footer-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}
.tedx-red { color: var(--tedx-red); }
.tagline {
    font-size: 12px;
    color: #ffffff;
    margin-top: 5px;
}

/* --- Links & Contact Headings --- */
.footer-heading {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* --- Links Column --- */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: var(--text-faded);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--tedx-red); }
.footer-links i {
    font-size: 10px;
    margin-right: 10px;
    color: #555;
}

/* --- Contact Column --- */
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
}

/* Organizer Label Styling (The red button) */
.organizer {
    background-color: var(--tedx-red);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.contact-item i {
    color: var(--text-faded);
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

.contact-item a {
    color: var(--text-faded);
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--tedx-red);
}

/* Social Links */
.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    background-color: var(--social-icon-bg);
    color: var(--text-faded);
    border-radius: 5px;
    font-size: 16px;
    margin-right: 10px;
    transition: background-color 0.2s, color 0.2s;
}

.social-links a:hover {
    background-color: var(--tedx-red);
    color: var(--text-light);
}


/* ================== Sub-Footer (Copyright) ================== */

.sub-footer {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.sub-footer-links a {
    color: var(--text-faded);
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.2s;
}

.sub-footer-links a:hover {
    color: var(--tedx-red);
}

.copyright .tedx-red {
    font-weight: 600;
}

/* ================== Responsive Adjustments (Mobile/Tablet) ================== */

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 30px;
        text-align: center; 
    }

    .footer-col {
        min-width: 100%;
        flex: none; /* Override desktop flex proportions */
        max-width: 100%;
        text-align: center; 
    }
    
    .footer-col.branding-col {
        padding-bottom: 20px;
        border-bottom: 1px solid #1a1a1a;
    }
    
    /* FIX: Center the content block of links/contact info */
    .links-col,
    .contact-col {
        text-align: center; /* Ensures the headings are centered */
    }

    /* FIX: Ensure lists and contact items are properly contained/centered */
    .footer-links {
        /* This centers the entire <ul> block */
        margin: 0 auto; 
        max-width: 250px; 
        text-align: left; /* Aligns the link text left within the centered block */
    }

    /* Center the organizer button */
    .organizer {
        margin: 0 auto 20px auto; 
        display: block; /* Ensures margin: auto works */
        width: fit-content;
    }
    
    /* Center text/icon items that were 'display: flex' on desktop */
    .contact-item {
        /* Use margin auto on the contact item container */
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 10px;
        width: fit-content; /* Only take the space needed */
        display: flex;
        justify-content: flex-start;
    }

    /* Social links center the block */
    .social-links {
        text-align: center;
        margin-top: 20px;
    }

    .sub-footer {
        flex-direction: column;
        text-align: center;
    }

    .sub-footer-links {
        order: 2; /* Move links below copyright on mobile */
        margin-top: 15px;
    }

    .sub-footer-links a {
        display: block;
        margin: 5px 0;
    }
}

/* --- 1. BASE FADE IN UP CLASS (Add this to any element you want to animate) --- */
.fade-in-up {
    /* Initial state: Invisible and moved down */
    opacity: 0;
    transform: translateY(40px);
    
    /* Animation speed and type */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    
    /* You can add a delay here if you want elements to animate sequentially */
    /* transition-delay: 0.1s; */
}

/* --- 2. VISIBLE STATE CLASS (Added by JavaScript) --- */
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0); /* Move up to final position */
}

/* --- Event Gallery Section Styling --- */
#event-gallery-section {
background-color: black; 
    
    /* ENFORCING MAXIMUM VERTICAL SEPARATION */
    /* This creates 120px of buffer space ABOVE the "Poster Releasing Event Highlights" title */
    padding-top: 120px;
    
    padding-bottom: 60px; /* Keep bottom padding generous */
    padding-left: 20px;
    padding-right: 20px;
    
    text-align: center;
    
    /* This can help prevent issues if a section uses negative margins: */
    position: relative; 
    z-index: 10;
}

.gallery-header h2 {
    color: var(--tedx-white);
    font-size: 2.5em;
    margin-bottom: 5px;
}

.gallery-header .red-line {
    width: 80px;
    height: 4px;
    background-color: var(--tedx-red);
    margin: 0 auto 50px auto;
}

/* --- Photo Grid Layout --- */
#photo-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    /* 4-column layout for the gallery */
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2); /* Red shadow accent */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* --- NEW CSS FOR ASPECT RATIO FIX --- */
    position: relative; 
    padding-top: 100%; /* Creates a perfect square (1:1 aspect ratio) */
    height: 0; /* Ensures padding-top controls the height */
}

.gallery-item:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5); /* Stronger red shadow */
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the container without distortion */
    display: block;
    transition: opacity 0.3s ease;

    /* --- NEW CSS FOR ASPECT RATIO FIX --- */
    position: absolute; /* Allows it to use the full space of the relative parent */
    top: 0;
    left: 0;
}

/* --- Responsive Design for Gallery Grid --- */
@media (max-width: 1200px) {
    #photo-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on smaller desktops/laptops */
    }
}

@media (max-width: 768px) {
    #photo-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 500px) {
    #photo-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

/* --- Lightbox Modal Styling (Container) --- */
.lightbox-modal {
    display: none; /* Initially hidden, opened via JS */
position: fixed !important;
    z-index: 99999 !important; /* Ensure it's above all page content (high priority) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    
    background-color: rgba(0, 0, 0, 0.95); /* Dark, semi-transparent overlay */
    
    /* --- CRITICAL FIX: Flexbox for Perfect Centering --- */
    display: flex; /* Overridden by JS when opening, but good default */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically (Prevents clipping at top) */
    
    overflow: hidden; /* Prevent modal itself from scrolling */
    padding: 0; 
}

/* --- Lightbox Image Styling (The Photo Inside) --- */
.lightbox-image {
    width: auto;
    height: auto;
    
    /* Ensures the image fits within the viewport on all devices */
    max-width: 95%; 
    max-height: 95vh; /* 95% of viewport height */
    
    display: block; /* Ensure it respects width/height limits */
    
    /* Optional: Smooth entrance animation */
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
}

/* --- Close Button Styling (The 'X') --- */
.lightbox-close {
/* Position and Z-Index (CRITICAL) */
position: fixed; /* Keep fixed to be relative to viewport */
    top: 20px; /* Slightly adjust position for better visual balance */
    right: 20px; /* Slightly adjust position for better visual balance */
    z-index: 100001; /* Ensure it's always on top */

    color: #f1f1f1; /* White 'X' */

    
    width: 40px; /* Fixed width and height for a perfect circle */
    height: 40px;
    
    display: flex; /* Use flexbox to perfectly center the 'X' inside the circle */
    justify-content: center;
    align-items: center;
    
    font-size: 28px; /* Slightly smaller 'X' character */
    font-weight: bold; /* Keep it bold */
    line-height: 1; /* Essential for vertical centering of text */
    cursor: pointer;
    user-select: none; /* Prevent selection on tap */
    
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth hover effect */
}


/* --- Modal Animation Keyframes --- */
@keyframes zoom {
    from {transform: scale(0.1)} 
    to {transform: scale(1)}
}