body {
    font-family: Lexend, "Noto Sans", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #111418;
    min-height: 100vh; /* Set minimum height of the body */
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
}

.container {
    /* width: 100%; */
    max-width: min(960px, 90vw); /* Use min() to ensure it doesn't exceed viewport width, ojala poder hacer 100vw - 15-15px de padding */
    margin: auto;
    padding: 20px;
    flex-grow: 1; /* Allow container to grow and fill available space */
    /* overflow: scroll; */
}

header {
    background: #fff;
    color: #111418;
    padding: 12px 40px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Added shadow for depth */
    position: sticky;
    top: 0; /* Stick to the top */
    z-index: 1000; /* Ensure it's above other content */
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 1rem; /* 16px */
}

.header-branding img {
    height: 32px;
    vertical-align: middle;
}

header h1 {
    margin: 0;
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
}

nav ul {
    padding: 0;
    list-style: none;
    margin: 0;
    display: flex;
    gap: 2.25rem; /* 36px */
}

nav a {
    color: #111418;
    text-decoration: none;
    font-size: 1rem; /* Increased font size for nav links */
    font-weight: 500;
    display: flex; /* Align icon and text */
    align-items: center; /* Align icon and text */
    gap: 8px; /* Space between icon and text */
}

nav a:hover {
    text-decoration: underline;
}

/* Hamburger Menu Styles */
#hamburger-menu {
    display: none; /* Hidden by default, shown in media query */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Ensure it's above other elements if needed */
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #111418; /* Matches nav link color */
    margin: 5px 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Animation for hamburger to X when menu is open */
#hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}
#hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
/* End Hamburger Menu Styles */

footer {
    text-align: center;
    padding: 20px;
    padding-top: 40px; /* para contrarrestar el margen quitado */
    /* margin-top: 20px; Added in container-margin */
    background: #333;
    color: #fff;
    flex-grow: 1;
    /* box-shadow: inset 0 4px 8px -4px rgba(0, 0, 0, 1); Added inset shadow to the top - NO LONGER NEEDED, added in container-margin */
}

@media (min-width: 769px) {
    footer {
        position: sticky;
        bottom: 0;
        z-index: 1;
    }
}
.container-margin {
    background-color: white;
    /* margin-bottom: 20px; breaks with shadow */
    box-shadow: 0px 8px 20px black;
    z-index: 5;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.footer-section {
    flex: 1;
    text-align: center; /* Changed from left to center */
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.footer-section p {
    margin: 8px 0;
    line-height: 1.6;
    font-size: 0.9em;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: #fff;
    text-decoration: underline;
}

/* New responsive styles for header and container */
/* These are placed before footer styles to maintain separation */
@media (max-width: 1024px) {
    header {
        padding: 12px 20px;
    }
    /* .container styling at this breakpoint can be added if needed */
}

@media (max-width: 768px) {
    header {
        flex-direction: row; /* Changed from column to row */
        align-items: center; /* Align items vertically */
        justify-content: space-between; /* Pushes branding to left and nav to right */
        padding: 10px 15px;
        gap: 10px;
    }

    nav {
        width: auto; /* Allow nav to take only necessary width */
        display: flex; 
        justify-content: flex-end; 
        flex-wrap: nowrap; /* Prevent wrapping of hamburger and nav-links container */
    }

    nav ul li a {
        display: block;
        padding: 8px 0;
    }

    .container {
        /* Overrides general .container for this breakpoint if it had % width */
        /* Assuming .container is full width within its max-width by default */
        padding: 15px;
        background-color: white;
    }

    footer {
        padding: 15px 10px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        align-items: center; /* Added to center stacked sections */
    }
    
    .footer-section {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .footer-section h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .footer-section p {
        font-size: 0.8em;
        margin: 6px 0;
        line-height: 1.4;
    }

    nav ul#nav-links {
        display: flex; 
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem; 
        background-color: #fff; 
        padding: 10px 15px; 
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 

        position: absolute;
        top: 100%; 
        left: 0; 
        right: auto; 
        width: 220px; /* Slightly wider for icons */
        z-index: 1000; 
    }
}

@media (max-width: 2000px) {
    #hamburger-menu {
        display: block; /* Show hamburger on small screens */
        order: 1; /* Visually place hamburger before nav links if markup is different, or manage via justify-content */
    }

    nav ul#nav-links { /* Target by ID for specificity */
        display: flex; /* Changed from none */
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem; /* 12px */
        background-color: #fff; /* Background for the dropdown */
        padding: 10px 15px; /* Adjusted padding */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5); /* Adjusted shadow */

        position: absolute;
        top: 100%; /* Positioned below the header */
        left: 0;
        right: 0;
        z-index: 1000; /* On par with header, below hamburger (1001) */

        opacity: 0;
        transform: translateY(-20px); /* Initial state for animation */
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0s linear 0.3s;
    }

    nav ul#nav-links.active {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0s linear 0s;
    }
}


@media (max-width: 480px) {
    header {
        padding: 10px;
    }
    header h1 {
        font-size: 1rem;
    }

    .container {
        padding: 10px;
    }

    footer {
        padding: 12px 8px;
    }
    
    .footer-content {
        gap: 12px;
    }
    
    .footer-section {
        margin-bottom: 12px;
    }
    
    .footer-section h3 {
        font-size: 0.95em;
        margin-bottom: 6px;
    }
    
    .footer-section p {
        font-size: 0.75em;
        margin: 5px 0;
    }
}

/* New Table styles */
table {
    max-height: 90vh;
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid #dbe0e6;
    border-radius: 0.5rem; /* 8px */
    /* overflow: hidden; */ /* Removed to allow scrolling */

    /* Added for horizontal scrolling */
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Optional: for smoother scrolling on iOS */
}

th, td {
    padding: 12px 16px; /* py-3, px-4 */
    text-align: left;
    font-size: 0.875rem; /* text-sm */
    border: none; /* Individual cell borders removed */
    white-space: nowrap; /* Prevent cell content from wrapping */
}

th {
    background-color: #fff;
    color: #111418;
    font-weight: 500; /* font-medium */
}

tbody tr {
    border-top: 1px solid #dbe0e6;
}

thead tr { 
    border-top: none;
}

/* Gallery Page Specific Styles - if any global ones are needed */
/* Styles for .gallery-sections-container, .gallery-section, .image-grid, .image-container, .download-button 
   are primarily in gallery_page.php for now to keep them component-specific. 
   If they were to be reused or needed more global scope, they could be moved here. */

/* Ensure .container allows for full-width content if needed by gallery */
.container.full-width-gallery {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}