/* ========== GENERAL LAYOUT ========== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body { 
    height: 100%; 
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.4;
    color: #111;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 16px;
}

main, header, footer { 
    max-width: 1100px; 
    margin: 0 auto; 
}

header { 
    padding: 20px 0; 
    text-align: center;
}

header h1 { 
    font-size: 1.6rem; 
    margin-bottom: 6px; 
}

header p { 
    margin: 8px 0; 
}

/* ========== TABS LAYOUT ========== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem; /* Add some space for the scrollbar if it appears */
    border-bottom: 1px solid #ddd;
}

.tab-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.tab-link:hover {
    color: #111;
}

.tab-link.active {
    color: #111;
    border-bottom-color: #111;
}

/* ========== GALLERY LAYOUT ========== */
.gallery-nav { 
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px; 
    margin: 16px 0; 
}

.gallery-nav figure figcaption {
    /* Re-enable captions and add styling */
    display: block;
    text-align: center;
    padding-top: 10px;
    font-weight: 600;
}

/* On the sponsorships page, use a 3-column grid and ensure images have the same height */
.sponsorships-gallery {
    grid-template-columns: repeat(3, 1fr);
}

.sponsorships-gallery .image-wrapper img {
    aspect-ratio: 2 / 3;
    object-fit: contain;
    background-color: #f9f9f9;
}

/* ========== CONTENT SECTION ========== */
.content-section {
    padding: 0 1rem;
}

.content-section p {
    max-width: 700px;
    width: 100%;
    margin: 0 auto 1em;
    line-height: 1.6;
}

.page-intro {
    text-align: center;
    margin-bottom: 3rem;
}

/* ========== VIDEO CONTAINER ========== */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px; /* Optional: Limit max video width */
    margin: 1.5rem auto 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========== FOUNDER'S NOTE ARTICLE STYLES ========== */
.founder-note {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    text-align: left;
}

.founder-note h2 {
    margin-bottom: 0.5em;
}

.founder-note .byline {
    font-style: italic;
    color: #555;
    margin-bottom: 2em;
}

.founder-note blockquote {
    font-size: 1.2em;
    font-weight: 600;
    margin: 2em 0;
    padding-left: 1em;
    border-left: 4px solid #ddd;
}

.founder-note .signature {
    font-style: normal;
}

/* ========== SIDE-BY-SIDE IMAGES ========== */
.side-by-side-images {
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* Space between images */
    margin-top: 3rem; /* Space above the images */
}

.side-by-side-images figure {
    flex: 1; /* Each figure takes up equal space */
    max-width: 400px; /* Optional: Limit the max width of each image */
}

/* ========== TEXT-IMAGE ROW STYLES ========== */
.text-image-row {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.text-image-row .text-content {
    flex: 1;
    text-align: left;
}

.text-image-row .text-content p {
    margin-bottom: 0; /* Remove default paragraph margin */
}

.text-image-row .image-content {
    flex: 1;
}

.text-image-row.reverse {
    flex-direction: row-reverse;
}

.text-image-row img {
    width: 100%;
    height: auto;
}

footer { 
    margin-top: 18px; 
    padding: 12px 0; 
    text-align:center; 
    color:#555; 
    font-size:0.95rem; 
}

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (max-width: 1024px) {
    /* Make main gallery on homepage a single column on tablets and below */
    .gallery-nav { 
        grid-template-columns: 1fr; 
    }

    .text-image-row,
    .text-image-row.reverse {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .tabs {
        justify-content: flex-start; /* Align tabs to the left */
        overflow-x: auto; /* Allow horizontal scrolling */
        white-space: nowrap; /* Prevent tabs from wrapping */
    }
    .side-by-side-images {
        flex-direction: column;
    }

    /* Ensure 3-column galleries stack into a single column on mobile */
    .sponsorships-gallery {
        grid-template-columns: 1fr;
    }
}

/* ========== HOVER OVERLAY STYLES ========== */
.hover-container {
    position: relative;
    display: block; /* Ensure the anchor tag takes up space */
    overflow: hidden; /* Hide anything that overflows */
}

.hover-container .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease; /* Smooth transition for opacity */
    pointer-events: none; /* Allow clicks to pass through when hidden */
}

.hover-container:hover .overlay {
    opacity: 1; /* Show on hover */
    pointer-events: auto; /* Enable clicks on the overlay when visible */
}

.overlay-text {
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: underline;
}

/* ========== MODAL STYLES ========== */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: fadeIn 0.3s;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #111;
}

.modal-body {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

#modal-text-content {
    flex: 1;
    text-align: left;
}

#modal-text-content h3 {
    margin-bottom: 1em;
}

#modal-text-content p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.modal-video-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
}