/* ------------------- */
/* RESET & BASIC SETUP */
/* ------------------- */
:root {
    /* Original colors from project.css for header/footer consistency */
    --color-primary: #6c74e6;
    --color-primary-dark: #4d4cdb;
    --color-secondary: #FFFFFF;
    --color-bg-dark: #2c2989;
    --color-bg-light: #f4f6fe;
    --color-text-dark: #1d1e6c;
    --color-border: #dae0fa;

    /* Dark theme colors for the main body */
    --color-body-bg: #0a0a1f;
    --color-body-text: #b0b0d1;
    
    --font-primary: 'Poppins', sans-serif;
    --container-width: 1200px;
    --section-padding: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-primary);
    background-color: var(--color-body-bg); /* Dark background for the page */
    color: var(--color-body-text); /* Lighter text for dark bg */
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem; /* Add horizontal padding for smaller screens */
}

/* Background Blobs */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1; /* Send to back */
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(80px);
}

.blob1 {
    width: 400px;
    height: 400px;
    background-color: var(--color-primary);
    top: -100px;
    left: -100px;
    animation: moveBlob1 20s infinite alternate ease-in-out;
}

.blob2 {
    width: 500px;
    height: 500px;
    background-color: var(--color-primary-dark);
    bottom: -150px;
    right: -150px;
    animation: moveBlob2 25s infinite alternate ease-in-out;
}

.blob3 {
    width: 300px;
    height: 300px;
    background-color: var(--color-primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: moveBlob3 18s infinite alternate ease-in-out;
}

@keyframes moveBlob1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 200px); }
}

@keyframes moveBlob2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -100px); }
}

@keyframes moveBlob3 {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}


/* ------------------- */
/* TYPOGRAPHY */
/* ------------------- */
h1, h2, h3, h4 {
    color: var(--color-secondary); /* White for headings */
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-body-text);
    margin-top: 0.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}


/* ------------------- */
/* HEADER */
/* ------------------- */
.header {
    background-color: var(--color-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.5rem;
}
.header__logo img { height: 40px; }
.header__nav ul { display: flex; gap: 2.5rem; }
.header__nav a { color: #4A5568; font-weight: 500; }
.header__nav a:hover, .header__nav a.active { color: var(--color-primary); }
.header__menu-toggle { display: none; }


/* ------------------- */
/* GALLERY HEADER */
/* ------------------- */
.gallery-header {
    background-color: var(--color-body-bg);
    padding: var(--section-padding) 0 4rem 0;
    text-align: center;
}


/* ------------------- */
/* GALLERY - ANIMATED SCROLL */
/* ------------------- */
.gallery {
    padding: var(--section-padding) 0;
    background-color: transparent; /* Makes the body bg visible */
    overflow: hidden; /* Hide overflowing content from rows */
}

.gallery-row {
    margin-bottom: 2rem; /* Space between rows */
    overflow: hidden; /* Crucial for hiding content outside the row */
}

.gallery-row-inner {
    display: flex;
    width: fit-content; /* Allow content to dictate width */
    animation-timing-function: linear; /* Constant speed */
    animation-iteration-count: infinite; /* Loop forever */
}

.gallery-row--right-to-left .gallery-row-inner {
    animation-name: scrollRightToLeft;
    animation-duration: 40s; /* Adjust speed as needed */
}

.gallery-row--left-to-right .gallery-row-inner {
    animation-name: scrollLeftToRight;
    animation-duration: 40s; /* Adjust speed as needed */
}

.gallery-item {
    flex-shrink: 0; /* Prevent items from shrinking */
    width: 520px; /* Adjust as needed for image size */
    margin-right: 1.5rem; /* Space between items */
    
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease; /* Added border transition */
    aspect-ratio: 16 / 10; /* Maintain aspect ratio */
    cursor: pointer; /* Indicate clickable */
    position: relative; /* For selection overlay positioning */
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block; /* Remove extra space below image */
}

/* Keyframe Animations */
@keyframes scrollRightToLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%); /* Scroll exactly half the content width */
    }
}

@keyframes scrollLeftToRight {
    from {
        transform: translateX(-50%); /* Start from the middle (or half the duplicated content) */
    }
    to {
        transform: translateX(0);
    }
}


/* ------------------- */
/* MODAL/LIGHTBOX STYLES */
/* ------------------- */
.image-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: hidden; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05); /* Slightly visible glass container */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: 80vh; /* Adjust as needed */
    object-fit: contain; /* Ensure the entire image is visible */
    border-radius: 4px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001; /* Above modal content */
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
}
a {
    text-decoration: none;
    color: var(--color-text-dark);
    transition: color 0.3s ease;
}
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(0,0,0,0.5);
    z-index: 2001;
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-decoration: none; /* Override default link style */
}

.download-btn:hover {
    background-color: var(--color-primary-dark);
}

/* ------------------- */
/* Styles for Selection */
/* ------------------- */
.gallery-item.selected {
    border: 3px solid var(--color-primary); /* Highlight selected item */
    box-shadow: 0 0 0 5px rgba(108, 116, 230, 0.5); /* Outer glow */
}

.selection-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: var(--color-primary);
    cursor: pointer;
    z-index: 5; /* Above image but below modal controls */
    border: 1px solid var(--color-primary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.selection-overlay.selected-icon {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

/* Hide selection overlay by default, show when selection mode is active */
body.selection-mode .selection-overlay {
    display: flex;
}
body:not(.selection-mode) .selection-overlay {
    display: none;
}

.top-bar-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem; /* Add padding consistent with container */
    margin-bottom: 1rem;
    display: none; /* Hidden by default */
    background-color: var(--color-body-bg); /* Match body background */
    z-index: 999; /* Ensure it's above gallery items */
    position: sticky;
    top: 70px; /* Below the header */
    left: 0;
    width: 100%;
}

body.selection-mode .top-bar-actions {
    display: flex; /* Show when in selection mode */
}
/* Ensure the .top-bar-actions respects the container width */
.top-bar-actions .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}


/* ------------------- */
/* FOOTER */
/* ------------------- */
.footer {
    background-color: var(--color-bg-dark);
    padding: var(--section-padding) 0 2rem 0;
    color: var(--color-body-text);
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

.footer__col h4 {
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer__col ul {
    list-style: none;
}

.footer__col ul li {
    margin-bottom: 0.8rem;
}

.footer__col ul li a {
    color: var(--color-body-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer__col ul li a:hover {
    color: var(--color-primary);
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer__logo img {
    height: 50px;
}

.footer__col--about p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer__copyright {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}


/* ------------------- */
/* RESPONSIVE STYLES (Adjust for smaller screens) */
/* ------------------- */
@media (max-width: 1024px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2.25rem; }
    
    .footer__container { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
    .footer__col--about { grid-column: 1 / -1; text-align: center; margin-bottom: 2rem; }
    .footer__col--about p { margin: 0 auto; max-width: 500px; }
    .footer__logo { justify-content: center; }

    .gallery-item {
        width: 420px; /* Adjust item size for larger tablets */
        margin-right: 1rem;
    }

    .top-bar-actions {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
   
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    
    .header__contact { display: none; }
    
    .header__menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001; 
    }
    .header__menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--color-text-dark);
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

    .header__nav {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg-dark);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        clip-path: circle(0% at top right);
        transition: clip-path 0.5s ease-out;
    }
    .header__nav.active { 
        clip-path: circle(150% at top right);
    }
    .header__nav ul { 
        flex-direction: column; 
        gap: 2rem;
    }
    .header__nav a {
        color: var(--color-secondary);
        font-size: 1.5rem;
    }

    
    .footer__container { grid-template-columns: 1fr 1fr; text-align: left; }
    .footer__col--about { text-align: left; grid-column: 1 / -1; margin-bottom: 1rem; }
    .footer__logo { justify-content: flex-start; }

    .gallery-item {
        width: 280px; /* Slightly smaller items on tablets */
    }

    /* Adjust animation duration for potentially fewer visible items */
    .gallery-row--right-to-left .gallery-row-inner,
    .gallery-row--left-to-right .gallery-row-inner {
        animation-duration: 30s; /* Faster animation for smaller screens */
    }

    .close-btn {
        font-size: 30px;
        top: 15px;
        right: 20px;
    }

    .prev-btn, .next-btn {
        font-size: 16px;
        padding: 10px;
        margin-top: -30px;
    }

    .download-btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    .top-bar-actions {
        top: 60px; /* Adjust sticky top for smaller header */
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .footer__container { grid-template-columns: 1fr; gap: 2rem; }
    .footer__col--about { text-align: center; }
    .footer__col { text-align: center; }
    .footer__logo { justify-content: center; }
    .footer__col h4 { margin-bottom: 1rem; }

    .gallery-item {
        width: 250px; /* Even smaller items on mobile */
        margin-right: 1rem;
    }

    /* Further adjust animation duration */
    .gallery-row--right-to-left .gallery-row-inner,
    .gallery-row--left-to-right .gallery-row-inner {
        animation-duration: 25s;
    }

    .selection-overlay {
        width: 25px;
        height: 25px;
        font-size: 16px;
        top: 5px;
        right: 5px;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {

}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: var(--color-text-dark);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 3.25rem; } 
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; font-weight: 600; }

a {
    text-decoration: none;
    color: var(--color-text-dark);
    transition: color 0.3s ease;
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.section-subtitle {
    max-width: 600px;
    margin-bottom: 2rem;
    color: #4A5568;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border-color: var(--color-primary);
}
.btn--primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}
.btn--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}