/* General Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    
}

.gallery-page {
    overflow-x: hidden; /* Prevent horizontal scrollbar due to animations */
}

/* Header Styles */
.header {
    height: 50vh; /* Occupies full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Positions nav at top and copyright at bottom */
    background: black; /* Unified gradient */
    background-size: 400% 400%;
    animation: gradient 20s ease infinite;
    position: relative;
}

/* Navigation Styles */
.gallery-page .nav {
    position: static; /* Changed from relative to static for seamless integration */
    width: 100%;
    background: transparent; /* Removed background for no boundary */
    padding: 20px 0; /* Adjusted padding */
    transition: background 0.3s ease;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    margin-right: 50px; /* Added this line to move the nav items to the right */

}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-item {
    font-family: 'Public Sans', sans-serif; /* Updated to match gradient */
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
}

.nav-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding-left: 30px;
    padding-right: 30px;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1B7478;
    min-width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: calc(100% + 8px); 
    left: 0;
    border-radius: 10px;
    overflow: hidden;
}

/* Pseudo-element to cover the gap */
.nav-dropdown:hover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px; /* Match the space added above */
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    font-family: 'Public Sans', sans-serif; /* Updated to match nav-item */
    color: #f1f1f1;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    font-size: 16px;
}

.dropdown-content a:hover {
    background-color: #125fdc;
}

.arrow-container {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
}

.arrow {
    width: 7px;
    height: 7px;
    border: solid white;
    border-width: 2px 2px 0 0;
    display: inline-block;
    transform: rotate(135deg);
    transition: transform 0.3s ease;
    position: relative;
    top: -2px;
    transform-origin: 69% 50%;
}

.nav-dropdown:hover .arrow {
    transform: rotate(-45deg) translateY(1.8px);
}

/* Gallery Hero Section Styles */
.gallery-hero {
    flex: 1; /* Takes up remaining space in header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent; /* Transparent to show header gradient */
    padding: 20px 0; /* Adjusted padding to remove boundary */
    overflow: hidden; /* Prevents internal scrolling */
    position: relative;
}

.gallery-hero .container {
    z-index: 1;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%; /* Ensures container fills gallery-hero */
}

.gallery-hero .hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%; /* Ensures content fills container */
}

.gallery-hero .hero-text {
    padding: 20px;
    color: white;
    overflow: auto; /* Prevents overflowing content */
}

.gallery-hero h1 {
    font-size: 3rem;
    color: white;
    margin: 0;
}

.gallery-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-section-cutter-image {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    pointer-events: none;
}
.gallery-content {
    padding-top: 1px !important; /* Forcefully removes padding */
}

/* Gallery Content Styles */
.gallery-content {
    padding: 150px 150px;
    position: relative;
    z-index: 1;
    background-color: white; /* White background for the entire content area */
}

/* Removed .white class as it's no longer needed */
.gallery-content .container { 
    padding: 0px 20px;
}

.year-section {
    margin-bottom: 40px;
}

.year-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.gallery-item {
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item .caption {
    text-align: center;
    padding: 10px;
    font-size: 14px;
    color: #333;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}


/* Copyright Styles */
.header .copyright {
    text-align: center;
    padding: 10px 0;
}

.header .copyright p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Footer Styles */
footer {
    background: black; /* Same gradient as header */
    background-size: 400% 400%; /* Ensure the animation matches */
    animation: gradient 30s ease infinite; /* Same animation as header */
    color: white;
    text-align: center;
    padding: 20px 0;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    padding: 13px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background-color: #1B7476;
    border-radius: 8px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
}

/* Responsive Styles */

/* Tablet and below */
@media (max-width: 1024px) {
    .gallery-content .gallery-container {
        padding: 3rem 0;
    }

    .gallery-hero {
        height: 60vh;
    }

    .gallery-hero h1 {
        font-size: 2.5rem;
    }

    .gallery-hero p {
        font-size: 1rem;
    }

    .gallery-content {
        padding: 3rem 0;
    }

    .gallery-content h2 {
        font-size: 1.75rem;
    }

    .gallery-content p {
        font-size: 0.9rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        cursor: pointer;
        padding: 13px;
        position: fixed;
        top: 10px;
        right: 5.5px;
        z-index: 1001;
        background-color: #1B7476;
        border-radius: 8px;
        transform: scale(0.8);
    }

    .bar {
        width: 25px;
        height: 3px;
        background-color: white;
        margin: 5px 0;
        transition: 0.4s;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav {
        background: none; /* Remove the gradient background */
        padding: 0; /* Remove any padding */
        height: auto; /* Allow the height to adjust automatically */
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 50px;
        right: 11px;
        width: 200px;
        background-color: #1B7476;
        padding: 10px 0;
        border-radius: 8px 0 8px 8px;
        overflow: hidden;
        z-index: 1000;
    }

    .nav-menu.show {
        display: block;
        max-height: 100vh;
        overflow-y: auto;
    }

    .nav-item {
        display: block;
        padding: 10px 20px;
        color: white;
        text-decoration: none;
        transition: background-color 0.3s;
        font-size: 16px;
    }

    .nav-dropdown {
        position: relative;
    }

    .nav-dropdown > .nav-item .arrow-container {
        display: inline-flex; /* Show the arrow for Research menu */
    }

    .dropdown-content {
        display: none;
        background-color: transparent; /* Remove background */
        box-shadow: none;
        padding-left: 5px; /* Indent submenu items */
        position: static; /* Ensure it's not absolutely positioned */
    }

    .nav-dropdown.active .dropdown-content {
        display: block; /* Show submenu when active */
    }

    /* Remove background color and box shadow for active items */
    .nav-item.active,
    .nav-item:hover {
        background-color: transparent !important;
        box-shadow: none !important;
    }

    /* Remove any padding changes for active items */
    .nav-item.active {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Ensure dropdown content is displayed normally */
    .nav-dropdown.active .dropdown-content {
        display: block;
        background-color: transparent;
    }

    /* Remove hover effects for dropdown items */
    .dropdown-content a:hover {
        background-color: transparent;
    }

    .gallery-page .gallery-hero {
        height:18vh; /* Allow height to adjust based on content */
        padding: 10px 0; /* Reduced padding for conciseness */
    }

    .gallery-page .gallery-hero h1 {
        font-size: 2rem; /* Further reduced font size for better fit on mobile */
        white-space: normal;
        text-align: center;
        margin-bottom: 0.5rem; /* Added margin for spacing */
    }

    .gallery-page .gallery-content {
        padding: 2rem 1rem; /* Reduces vertical padding for better fit */
    }
    .gallery-container {
        padding: 2rem 1rem; /* Reduced padding for better fit */
    }
    .gallery-page .gallery-content .container.white {
        padding-left: 10px;  /* Reduced horizontal padding */
        padding-right: 10px; /* Reduced horizontal padding */
    }

    .gallery-page .gallery-grid {
        grid-template-columns: 1fr; /* Switches to single-column layout */
        gap: 15px; /* Reduces gap between gallery items */
    }

    .gallery-page .gallery-item .caption {
        font-size: 1rem; /* Makes captions readable on small screens */
        padding: 10px; /* Adds spacing around captions */
        text-align: center; /* Centers the caption text */
    }   
}

/* Specific Page Styles */
.gallery-page .nav-menu .nav-item.active {
    padding-left: 10px;
    padding-right: 10px;
}



/* Media Query for Large Screens (1600px and above) */
@media (min-width: 1600px) {
    /* Container Adjustments */
    .gallery-content .container {
        max-width: 1400px;      /* Ensures content doesn't stretch excessively */
        padding-left: 10px;     /* Reduced horizontal padding */
        padding-right: 10px;    /* Reduced horizontal padding */
        margin: 0 auto;         /* Center container on the page */
    }

    /* Navigation Content Adjustments */
    .nav-content {
        margin-right: 80px;     /* Aligns navigation items with ample spacing */
    }

    /* Navigation Menu Adjustments */
    .nav-menu {
        gap: 20px;              /* Adds space between navigation items */
    }

    /* Navigation Items Adjustments */
    .nav-item {
        padding: 15px 20px;     /* Increases clickable area for nav items */
        font-size: 18px;        /* Enhances readability */
    }

    /* Dropdown Content Adjustments */
    .dropdown-content a {
        padding: 14px 20px;     /* Provides comfortable spacing in dropdowns */
        font-size: 18px;        /* Consistent font size with nav items */
    }

    /* Gallery Hero Section Adjustments */
    .gallery-hero {
        padding: 40px 0;         /* Increases vertical padding for better spacing */
    }

    .gallery-hero h1 {
        font-size: 4rem;         /* Prominent heading for larger screens */
    }

    /* Gallery Content Adjustments */
    .gallery-content {
        padding: 4rem 0;         /* Maintains consistent padding */
        max-width: 1400px;       /* Set max width for consistent layout */
        margin: 0 auto;          /* Center the gallery content */
    }

    /* Year Section Adjustments */
    .year-section {
        margin-bottom: 40px;     /* Consistent spacing between years */
    }

    .year-section h2 {
        font-size: 2.5rem;       /* Larger headings for prominence */
    }

    /* Gallery Grid Adjustments */
    .gallery-grid {
        display: grid;           /* Use CSS Grid for layout */
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Flexible column layout */
        gap: 30px;               /* Increased gap between gallery items */
        max-width: 1200px;       /* Set max width for grid area */
        margin: 0 auto;          /* Center the gallery grid within the container */
    }

    /* Gallery Item Adjustments */
    .gallery-item {
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Enhanced shadow for depth */
        background-color: #fff; /* Background color for visibility */
        border-radius: 8px;     /* Rounded corners */
        overflow: hidden;
        text-align: center;     /* Center content inside each item */
    }

    /* Caption Adjustments */
    .gallery-item .caption {
        font-size: 1.3rem;       /* Improved readability */
        padding: 15px;           /* Increased padding for better spacing */
    }

    /* Tools Languages Adjustments (if applicable) */
    .tools-languages p {
        font-size: 1.2rem;       /* Increased font size */
    }

    .tool-icon {
        width: 40px;             /* Larger icons for visibility */
        height: 40px;
    }
}

/* Footer Styles */
footer {
    background: black;
    background-size: 400% 400%;
    animation: gradient 20s ease infinite;
    color: white;
    padding: 30px 10%; /* Increased padding for a better layout */
    display: flex;
    flex-direction: column; /* Column layout for small screens */
    text-align: center; /* Center text for default view */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
}

footer p {
    font-size: 14px; /* Increased font size for readability */
    margin: 0;
    opacity: 0.8; /* Slightly faded text color */
}

/* Flex container for footer links, hidden on smaller screens */
footer .footer-links {
    display: flex;
    gap: 15px; /* Space between footer links */
    margin-top: 15px;
}

footer .footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

footer .footer-links a:hover {
    color: #f0f0f0; /* Slight color change on hover */
}
/* Responsive Styles for Larger Screens */
@media (min-width: 1024px) {
    footer {
        flex-direction: row; /* Row layout for larger screens */
        justify-content: center; /* Center content horizontally */
        padding: 30px 0; /* Remove side padding to center footer */
        text-align: center; /* Center text */
    }

    footer p {
        margin: 0 20px; /* Add margin to create space between items */
    }
}
/* Ensure consistent animation settings on all screen sizes */
@media (max-width: 768px) {
    .gradient-background, 
    .project-hero {
        background-size: 400% 400%; /* Same as desktop */
        animation: gradient 20s ease infinite; /* Ensure animation is applied */
    }

    /* Re-apply keyframes to prevent "sticking" */
    @keyframes gradient {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }
}