/* Index-only media and section refinements. */
.home-page .countdown-section > img.div-img {
    width: 75%;
    max-width: 75%;
    height: auto;
    margin-inline: auto;
}
.home-page .countdown-section .countdown-video-wrapper {
    width: min(75%, 720px);
    max-width: 100%;
    height: auto;
    padding: 0;
    aspect-ratio: 16 / 9;
}
.home-page #daily-journal,
.home-page #ok-america {
    background: linear-gradient(135deg, #e5e5e5 0%, #f2f2f2 50%, #ffffff 100%);
}
.home-page :is(#daily-journal, #ok-humanity) .video-gallery-section,
.home-page :is(#daily-journal, #ok-humanity) .video-container,
.home-page :is(#daily-journal, #ok-humanity) .video-container iframe {
    border-color: transparent;
}
.home-page .scrollable-gallery-section .gallery-card,
.home-page .scrollable-gallery-section .gallery-card img {
    border-color: transparent;
}

/* ============================================= */
/* styles/styles.css - MPGA Website              */ 
/* Author: Leslie Brockman.                      */
/* Updated  09-04-2026                           */
/* I know what I did. I am paying for it.        */
/* Reclass pending to clean this monster up.     */
/* I am very well aware AI  can automate         */
/* AI can mess it up too                         */ 
/* I do it myself                                */
/* ============================================= */

/* ================ quick developer notes ================ */
/* color pallet and design will change per Palestinian culture and aesthetics */
/* logo pending for contest among the youth designers of Palestine. */
/* once the entire layout is set, more specific rules will be added per section and element. */
/* class names will be updated to be more specific and descriptive over time. */
/*I am totally avoiding refractoring this beast for now */

/* ================ DESIGN TOKENS ================ */
:root {
    /* Color Palette */
    --primary-green: #009736;
    --accent-red: #CF1127;
    --dark: #111111;
    --light: #ffffff;
    --gold: #f0c045;

    /* Typography */
    --font-en: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ar: 'Amiri', serif;

    /* Shared Panel Styling */
    --panel-border: 4px solid var(--dark);
    --panel-radius: 12px;
    --panel-shadow: 0 8px 20px rgba(207, 17, 39, 0.45), 0 4px 10px rgba(0, 0, 0, 0.3);
    --panel-bg: #fff;
    --surface-soft: #f8f8f8;
}

/* ===== Shared site imagery (EDU and Circus intentionally excluded) ===== */
body:not(.edu-page):not(.circus-page-body) {
    background-color: var(--light);
}

body:not(.edu-page):not(.circus-page-body) .site-header {
    background-color: #242424;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.40)),
        url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/maint/header.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body:not(.edu-page):not(.circus-page-body) .site-footer {
    background-color: #242424;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.40)),
        url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/maint/header.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body:not(.edu-page):not(.circus-page-body) .site-header .site-title,
body:not(.edu-page):not(.circus-page-body) .site-header .menu-toggle,
body:not(.edu-page):not(.circus-page-body) .site-footer .footer-content,
body:not(.edu-page):not(.circus-page-body) .site-footer .copyright {
    color: var(--light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* ===== Hero journalist directory: single-card gallery ===== */
.hero-page .journalist-menu-toggle {
    display: none;
}

.hero-page #journalist-tabs {
    margin: 0 auto 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(17, 17, 17, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.hero-page #journalist-tabs .source-tab:hover,
.hero-page #journalist-tabs .source-tab.is-active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--light);
    transform: translateY(-2px);
}

.hero-page #journalist-tabs .source-tab:focus-visible,
.hero-page .journalist-menu-toggle:focus-visible,
.hero-page #journalists-gallery a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.hero-page #journalists-gallery {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 560px;
    padding: clamp(1.25rem, 4vw, 3rem);
    overflow: hidden;
    scroll-snap-type: none;
    border-radius: 18px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.28)), url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/hero/background_camera.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-page #journalists-gallery > .source-card {
    display: none;
    flex: 0 1 420px;
    width: min(100%, 420px);
    max-width: 420px;
    scroll-snap-align: none;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
    transform: none;
}

.hero-page #journalists-gallery > .source-card.is-active {
    display: block;
}

.hero-page #journalists-gallery > .source-card:hover {
    background: rgba(255, 255, 255, 0.98);
    color: var(--dark);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
    transform: translateY(-3px);
}

.hero-page #journalists-gallery > .source-card:hover .card-title a {
    color: var(--accent-red);
}

.hero-page #journalists-gallery > .source-card:hover .card-desc {
    color: #333333;
}

.hero-page #journalists-gallery > .source-card:hover .social-link {
    background-color: #f1ece7;
    color: var(--dark);
}

/* ===== HERO JOURNALIST SOCIAL-MEDIA LINKS: START ===== */
.hero-page #journalists-gallery .card-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
}

.hero-page #journalists-gallery .card-socials .social-link,
.hero-page #journalists-gallery .card-socials .social-link[aria-label] {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #e9f5ed;
}

.hero-page #journalists-gallery .card-socials .social-link img,
.hero-page #journalists-gallery .card-socials .social-link[aria-label] img,
.hero-page #journalists-gallery .card-socials .social-link[aria-label*="Facebook"] img,
.hero-page #journalists-gallery .card-socials .social-link[aria-label*="Instagram"] img {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);
    object-fit: cover;
    object-position: center;
    display: block;
}
/* ===== HERO JOURNALIST SOCIAL-MEDIA LINKS: END ===== */

@media (max-width: 600px) {
    .hero-page .journalist-menu-toggle {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        width: 100%;
        margin: 0 0 0.65rem;
        padding: 0.7rem 0.9rem;
        border: 2px solid var(--dark);
        border-radius: 10px;
        background: var(--light);
        color: var(--dark);
        font-family: inherit;
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.2;
        text-align: left;
        cursor: pointer;
    }

    .hero-page .journalist-menu-icon {
        font-size: 1.2rem;
    }

    .hero-page #journalist-tabs {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        max-height: 52vh;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        overflow-y: auto;
    }

    .hero-page #journalist-tabs.is-open {
        display: flex;
    }

    .hero-page #journalist-tabs .source-tab {
        width: 100%;
        min-height: 44px;
        flex: none;
        border-radius: 8px;
        text-align: left;
        white-space: normal;
    }

    .hero-page #journalists-gallery {
        min-height: 0;
        padding: 1rem;
        border-radius: 14px;
    }

    .hero-page #journalists-gallery > .source-card {
        width: 100%;
        max-width: 360px;
        flex-basis: 100%;
    }
}

/* ===== Their Voices Remain memorial gallery ===== */
.hero-page .memorial-section {
    margin-top: clamp(2.5rem, 6vw, 5rem);
}

.hero-page .memorial-header h3 {
    color: #7c2934;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.15;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.85);
}

.hero-page .memorial-header p span {
    color: var(--light);
    text-shadow:
        -1px -1px 0 var(--accent-red),
         1px -1px 0 var(--accent-red),
        -1px  1px 0 var(--accent-red),
         1px  1px 0 var(--accent-red);
}

.hero-page #their-voices-tabs {
    max-width: 680px;
    margin: 0 auto 1.25rem;
    padding: 0.8rem;
    border: 1px solid rgba(17, 17, 17, 0.14);
    border-radius: 14px;
    background: rgba(248, 246, 242, 0.9);
}

.hero-page #their-voices-tabs .source-tab:hover,
.hero-page #their-voices-tabs .source-tab.is-active {
    background: #7c2934;
    border-color: #7c2934;
    color: var(--light);
    transform: translateY(-1px);
}

.hero-page #their-voices-tabs .source-tab:focus-visible,
.hero-page .memorial-menu-toggle:focus-visible,
.hero-page #their-voices-gallery a:focus-visible,
.hero-page #their-voices-gallery .memorial-photo-gallery:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.hero-page #their-voices-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 640px;
    padding: clamp(1.25rem, 4vw, 3rem);
    overflow: hidden;
    scroll-snap-type: none;
    border-radius: 18px;
    background: linear-gradient(145deg, #ddd5cb, #f6f2ec 52%, #cfc3b7);
}

.hero-page #their-voices-gallery > .memorial-card {
    display: none;
    flex: 0 1 520px;
    width: min(100%, 520px);
    max-width: 520px;
    overflow: hidden;
    scroll-snap-align: none;
    background: rgba(255, 255, 255, 0.97);
    color: var(--dark);
    border: 1px solid rgba(124, 41, 52, 0.2);
    box-shadow: 0 14px 34px rgba(31, 25, 22, 0.24);
    transform: none;
}

.hero-page #their-voices-gallery > .memorial-card.is-active {
    display: block;
}

.hero-page #their-voices-gallery > .memorial-card:hover {
    background: rgba(255, 255, 255, 0.98);
    color: var(--dark);
    border-color: rgba(124, 41, 52, 0.3);
    box-shadow: 0 17px 40px rgba(31, 25, 22, 0.29);
    transform: translateY(-2px);
}

.hero-page #their-voices-gallery > .memorial-card:hover .card-title a {
    color: #7c2934;
}

.hero-page #their-voices-gallery > .memorial-card:hover .card-desc {
    color: #333333;
}

.hero-page #their-voices-gallery .memorial-portrait {
    aspect-ratio: 16 / 10;
    border: 0;
    background: transparent;
}

.hero-page #their-voices-gallery .memorial-portrait img {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.hero-page #their-voices-gallery .memorial-dates {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0 1rem 0.8rem;
    color: #665b55;
    font-size: 0.9rem;
    font-weight: 650;
}

.hero-page #their-voices-gallery .memorial-photo-gallery {
    display: flex;
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    border-radius: 12px;
    border: 0;
    background: transparent;
    scrollbar-color: #7c2934 #ded7cf;
    scrollbar-width: thin;
}

.hero-page #their-voices-gallery .memorial-photo {
    flex: 0 0 100%;
    height: clamp(190px, 34vw, 290px);
    margin: 0;
    border: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.hero-page #their-voices-gallery .memorial-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    object-position: center;
}

.hero-page #their-voices-gallery .memorial-photo-gallery::-webkit-scrollbar {
    height: 7px;
}

.hero-page #their-voices-gallery .memorial-photo-gallery::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #7c2934;
}

@media (max-width: 600px) {
    .hero-page #their-voices-tabs {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        max-height: 45vh;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        overflow-y: auto;
    }

    .hero-page #their-voices-tabs.is-open {
        display: flex;
    }

    .hero-page #their-voices-tabs .source-tab {
        width: 100%;
        min-height: 44px;
        flex: none;
        border-radius: 8px;
        text-align: left;
        white-space: normal;
    }

    .hero-page #their-voices-gallery {
        min-height: 0;
        padding: 1rem;
        border-radius: 14px;
    }

    .hero-page #their-voices-gallery > .memorial-card {
        width: 100%;
        max-width: 420px;
        flex-basis: 100%;
    }

    .hero-page #their-voices-gallery .memorial-photo {
        height: clamp(180px, 62vw, 260px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-page #their-voices-gallery .memorial-photo-gallery {
        scroll-behavior: auto;
    }

    .hero-page #their-voices-gallery > .memorial-card,
    .hero-page #their-voices-tabs .source-tab {
        transition: none;
    }
}

/* ===== Hero Research Sources single-card directory ===== */
.hero-page #sources-section {
    margin-top: clamp(2.5rem, 6vw, 5rem);
}

.hero-page #sources-section > .sources-header h3 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.15;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.85);
}

.hero-page #sources-section > .sources-header p span {
    color: var(--light);
    text-shadow:
        -1px -1px 0 var(--accent-red),
         1px -1px 0 var(--accent-red),
        -1px  1px 0 var(--accent-red),
         1px  1px 0 var(--accent-red);
}

.hero-page #research-source-tabs {
    margin: 0 auto 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(17, 17, 17, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.hero-page #research-source-tabs .source-tab:hover,
.hero-page #research-source-tabs .source-tab.is-active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--light);
    transform: translateY(-2px);
}

.hero-page #research-source-tabs .source-tab:focus-visible,
.hero-page .research-menu-toggle:focus-visible,
.hero-page #sources-gallery a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.hero-page #sources-gallery.research-sources-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 560px;
    padding: clamp(1.25rem, 4vw, 3rem);
    overflow: hidden;
    scroll-snap-type: none;
    border-radius: 18px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.28)), url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/hero/background_camera.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-page #sources-gallery.research-sources-gallery > .source-card {
    display: none;
    flex: 0 1 420px;
    width: min(100%, 420px);
    max-width: 420px;
    scroll-snap-align: none;
    background: rgba(255, 255, 255, 0.96);
    color: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
    transform: none;
}

.hero-page #sources-gallery.research-sources-gallery > .source-card.is-active {
    display: block;
}

.hero-page #sources-gallery.research-sources-gallery > .source-card:hover {
    background: rgba(255, 255, 255, 0.98);
    color: var(--dark);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
    transform: translateY(-3px);
}

.hero-page #sources-gallery.research-sources-gallery > .source-card:hover .card-title a {
    color: var(--accent-red);
}

.hero-page #sources-gallery.research-sources-gallery > .source-card:hover .card-desc {
    color: #333333;
}

.hero-page #sources-gallery.research-sources-gallery > .source-card:hover .social-link {
    background-color: #f1ece7;
    color: var(--dark);
}

@media (max-width: 600px) {
    .hero-page #research-source-tabs {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        max-height: 52vh;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        overflow-y: auto;
    }

    .hero-page #research-source-tabs.is-open {
        display: flex;
    }

    .hero-page #research-source-tabs .source-tab {
        width: 100%;
        min-height: 44px;
        flex: none;
        border-radius: 8px;
        text-align: left;
        white-space: normal;
    }

    .hero-page #sources-gallery.research-sources-gallery {
        min-height: 0;
        padding: 1rem;
        border-radius: 14px;
    }

    .hero-page #sources-gallery.research-sources-gallery > .source-card {
        width: 100%;
        max-width: 360px;
        flex-basis: 100%;
    }
}

/* ================ RESET & BASE ================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-en);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.65;
    overflow-x: hidden;
    overflow-y: scroll;
}

body.circus-page-body {
    background-color: #fffdf6;
    background-image:
        radial-gradient(ellipse 24px 32px at 7% 38%, #ff5f6d 0 88%, transparent 91%),
        radial-gradient(ellipse 26px 35px at 93% 42%, #f0c045 0 88%, transparent 91%),
        radial-gradient(ellipse 22px 30px at 14% 92%, #009736 0 88%, transparent 91%),
        radial-gradient(ellipse 25px 34px at 86% 84%, #1f9df7 0 88%, transparent 91%),
        radial-gradient(ellipse 23px 31px at 4% 78%, #cf1127 0 88%, transparent 91%),
        radial-gradient(ellipse 24px 33px at 97% 14%, #7d5ce0 0 88%, transparent 91%),
        radial-gradient(circle at 10% 12%, #f4d03f 0 4px, transparent 5px),
        radial-gradient(circle at 24% 28%, #ef4444 0 4px, transparent 5px),
        radial-gradient(circle at 39% 16%, #2ec27e 0 4px, transparent 5px),
        radial-gradient(circle at 60% 20%, #f59e0b 0 4px, transparent 5px),
        radial-gradient(circle at 78% 14%, #1d4ed8 0 4px, transparent 5px),
        radial-gradient(circle at 91% 30%, #f472b6 0 4px, transparent 5px),
        radial-gradient(circle at 14% 72%, #22c55e 0 4px, transparent 5px),
        radial-gradient(circle at 30% 84%, #f59e0b 0 4px, transparent 5px),
        radial-gradient(circle at 50% 76%, #8b5cf6 0 4px, transparent 5px),
        radial-gradient(circle at 72% 88%, #ef4444 0 4px, transparent 5px),
        radial-gradient(circle at 88% 68%, #2dd4bf 0 4px, transparent 5px);
    background-attachment: fixed;
    background-size: 100% 100%;
}

html {
    overflow-y: scroll;
    scrollbar-width: auto;
    scrollbar-color: var(--primary-green) rgba(17, 17, 17, 0.12);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 14px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: rgba(17, 17, 17, 0.1);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-green), var(--accent-red));
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Red Door page intro: black hold then match-light reveal */
.reddoor-page.match-intro-active::before,
.reddoor-page.match-intro-active::after {
    content: "";
    position: fixed;
    inset: 0;
}

.reddoor-page.match-intro-active::before {
    background: #000;
    z-index: 9998;
    pointer-events: all;
}

.reddoor-page.match-intro-active::after {
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
}

.reddoor-page.match-intro-active.match-intro-light::before {
    animation: matchCurtainFade 1.7s ease-out forwards;
}

.reddoor-page.match-intro-active.match-intro-light::after {
    animation: matchFlareReveal 1.7s ease-out forwards;
}

h1, h2, h3, h4 {
    font-family: var(--font-ar);
    font-weight: 700;
    margin: 0 0 1rem 0;
}

img {
    max-width: 100%;
    height: auto;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 4px solid #000000;
    border-radius: 16px;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

@keyframes matchCurtainFade {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes matchFlareReveal {
    0% {
        opacity: 1;
        background: radial-gradient(circle at 14% 84%, rgba(255, 245, 186, 0.98) 0%, rgba(255, 181, 76, 0.9) 3%, rgba(255, 116, 28, 0.7) 8%, rgba(0, 0, 0, 1) 24%);
    }
    40% {
        opacity: 1;
        background: radial-gradient(circle at 18% 82%, rgba(255, 245, 186, 0.95) 0%, rgba(255, 181, 76, 0.82) 7%, rgba(255, 116, 28, 0.45) 18%, rgba(0, 0, 0, 0.92) 42%);
    }
    100% {
        opacity: 0;
        background: radial-gradient(circle at 22% 80%, rgba(255, 245, 186, 0) 0%, rgba(255, 181, 76, 0) 16%, rgba(255, 116, 28, 0) 30%, rgba(0, 0, 0, 0) 60%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reddoor-page.match-intro-active::before,
    .reddoor-page.match-intro-active::after {
        animation: none !important;
    }
}

body.reddoor-page {
    background:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/redoor/background.jpeg") center / cover no-repeat fixed;
}

.reddoor-page .reddoor-container,
.reddoor-page .reddoor-container h2,
.reddoor-page .reddoor-container h3,
.reddoor-page .reddoor-container p {
    color: #fff;
    text-shadow: 1px 1px 3px var(--primary-green), 0 0 10px rgba(0, 151, 54, 0.8);
}

.reddoor-page .reddoor-image {
    width: min(100%, 750px);
    margin: 0 auto;
}

.reddoor-page img {
    border-color: #fff;
}

.reddoor-page .scrollable-gallery {
    border-color: #fff;
}

.reddoor-page .popup {
    border-color: #fff;
    background:
        linear-gradient(rgba(255, 253, 246, 0.5), rgba(255, 253, 246, 0.5)),
        url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/redoor/background.jpeg") center / cover no-repeat;
    scrollbar-color: var(--accent-red) transparent;
}

.reddoor-page .popup::before {
    display: none;
}

.reddoor-page .popup::-webkit-scrollbar-thumb {
    background: var(--accent-red);
}

.reddoor-page h2,
.reddoor-page h3,
.reddoor-page p,
.reddoor-page figcaption,
.reddoor-page .popup h2,
.reddoor-page .popup h3,
.reddoor-page .popup p,
.reddoor-page .popup figcaption {
    text-align: center;
}

.reddoor-page .reddoor-container > * {
    margin-top: 1.75rem;
}

.reddoor-page .reddoor-container > *:first-child {
    margin-top: 0;
}

.reddoor-page .reddoor-description {
    text-align: center;
}

.reddoor-page .archive-genocide-heading {
    color: #fff;
}


/* ================ UTILITY ================ */
.hidden {
    display: none !important;
}

.lang-ar {
    direction: rtl;
    text-align: right;
    font-family: var(--font-ar);
}

/* ================ HEADER ================ */
.site-header {
    background: var(--light);
    padding: 1.2rem 0;
    z-index: 1000;
    border-bottom: 8px solid var(--dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.header-logo {
    flex-shrink: 0;
    padding-top: 0.4rem;
}

.logo-img {
    height: 110px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-title {
    margin: 0 0 0.8rem 0;
    font-size: 2.65rem;
    text-align: center;
}

.lang-toggle {
    margin-bottom: 1.1rem;
    background: var(--primary-green);
    color: white;
    border: 2px solid var(--dark);
    padding: 0.65rem 1.4rem;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-toggle:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2.1rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Navigation */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--dark);
    border-radius: 6px;
    font-weight: bold;
    background: var(--primary-green);
    color: #000;
    box-shadow: 0 4px 0 #000;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: var(--accent-red);
    color: #000;
    box-shadow: 0 4px 0 var(--primary-green);
    transform: translateY(-2px);
}

/* ================ PAGE SHELLS & PANELS ================ */
.section {
    padding: 2.5rem 1.5rem;
    margin: 2.5rem auto;
    max-width: 1200px;
    border: var(--panel-border);
    border-radius: var(--panel-radius);
    background: var(--panel-bg);
    box-shadow: var(--panel-shadow);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.35rem;
    margin: 0.25rem 0 0.65rem;
    color: var(--dark);
}

.section-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 1.25rem;
    line-height: 1.55;
}

/* ================ LEGAL PAGE ================ */
.legal-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    border: var(--panel-border);
    border-radius: var(--panel-radius);
    background: var(--panel-bg);
    box-shadow: var(--panel-shadow);
}

.legal-section h2 {
    text-align: center;
    margin-bottom: 1.25rem;
}

.legal-box {
    min-height: 90px;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #f8f8f8;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45);
}

.legal-box:last-child {
    margin-bottom: 0;
}

.legal-section-3 .legal-box {
    padding: 1.25rem;
}

.legal-section-3 .legal-box a,
.legal-section-3 .legal-box img,
.legal-section-3 .legal-box p,
.legal-section-3 .legal-box h2,
.legal-section-3 .legal-box h3 {
    margin-left: auto;
    margin-right: auto;
}

.legal-section-2 .legal-box-4 a {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.legal-section-2 .legal-box-4 img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.legal-section-2 .legal-box-6 .scrollable-gallery {
    margin: 0;
    max-width: 100%;
}

.legal-section-2 .legal-box-6 .gallery-item {
    flex: 0 0 240px;
}

.legal-section-2 .legal-box-6 .gallery-item img {
    height: 190px;
}


/* ================ MAIN CONTENT ================ */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    min-height: calc(100vh - 300px);
}

/* Shared layout helpers for centered card sections */
.legal-section-1 .legal-box-1,
.legal-section-1 .legal-box-2,
.legal-section-1 .legal-box-3,
.legal-section-2 .legal-box-4,
.legal-section-2 .legal-box-5,
.legal-section-3 .legal-box,
.hero-page #section-dedication,
.hero-page #section-journalists {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

main img {
    max-width: 300px;
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
}

main p {
    max-width: 600px;
    font-size: 1.3rem;
    line-height: 1.6;
}

/* ================ CIRCUS PAGE ================ */
.circus-page {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 2.5rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.circus-page .circus-intro {
    border: 2px solid var(--primary-green);
    border-radius: 12px;
    background: var(--panel-bg);
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45), 0 6px 0 var(--primary-green);
    text-align: center;
}

.circus-page .circus-intro h2 {
    margin-bottom: 1.25rem;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--dark);
}

.circus-page .section {
    border: 2px solid var(--primary-green);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45), 0 6px 0 var(--primary-green);
}

.circus-page .section h3 {
    margin-bottom: 1rem;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.circus-page .section p {
    max-width: 760px;
    margin: 0 auto 1.5rem;
    font-size: 1.08rem;
    line-height: 1.7;
}

.circus-story {
    overflow: hidden;
}

.circus-story img {
    float: left;
    width: min(100%, 330px);
    max-width: 330px;
    margin: 0 1.5rem 0.75rem 0;
    display: block;
}

.circus-story p {
    margin: 0;
    max-width: none;
    text-align: left;
    font-size: 1.08rem;
    line-height: 1.75;
}

.circus-page .social-link,
.circus-page .circus-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    padding: 0.75rem;
    margin: 1.5rem auto 0;
    border: 2px solid var(--dark);
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 4px 0 var(--dark);
    transition: all 0.25s ease;
}

.circus-page .social-link:hover,
.circus-page .social-link:focus-visible,
.circus-page .circus-social-links a:hover,
.circus-page .circus-social-links a:focus-visible {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 var(--primary-green);
}

.circus-page .social-link img,
.circus-page .circus-social-links a img {
    max-width: 39px;
    max-height: 39px;
    margin: 0;
    border: none;
    border-radius: 0;
}

.circus-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1rem;
    flex-wrap: nowrap;
    margin-top: 1.5rem;
}

@media (max-width: 700px) {
    .circus-social-links {
        flex-wrap: wrap;
    }
}

/* =================================
   CIRCUS PAGE BALLOON BUTTONS
   ================================= */

.circus-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
}

/* Balloon button */
.circus-balloon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;

    width: 150px;
    height: 105px;

    background: #d4af37;
    color: #006b3c;

    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;

    border: 3px solid #006b3c;
    border-radius: 50% 50% 48% 48%;

    box-shadow:
        0 8px 15px rgba(0, 0, 0, 0.25),
        inset -8px -8px 12px rgba(0, 0, 0, 0.12),
        inset 8px 8px 12px rgba(255, 255, 255, 0.25);

    animation: circus-balloon-float 3s ease-in-out infinite;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.circus-balloon img {
    width: 64px;
    height: auto;
    max-height: 52px;
    margin: 0;
    object-fit: contain;
}

/* Balloon string */
.circus-balloon::before {
    content: "";
    position: absolute;

    bottom: -48px;
    left: 50%;

    width: 3px;
    height: 38px;

    background: #d1112e;
    transform: translateX(-50%);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

/* Balloon bow */
.circus-balloon::after {
    content: "";
    position: absolute;

    bottom: -21px;
    left: 50%;

    width: 34px;
    height: 18px;

    background: #d1112e;
    clip-path: polygon(
        0 0,
        38% 24%,
        50% 0,
        62% 24%,
        100% 0,
        84% 100%,
        56% 66%,
        44% 66%,
        16% 100%
    );
    transform: translateX(-50%);
}

/* Floating/bobbing animation */
@keyframes circus-balloon-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Hover */
.circus-balloon:hover {
    background: #006b3c;
    color: #d4af37;

    transform: translateY(-12px) scale(1.05);

    box-shadow:
        0 15px 25px rgba(0, 0, 0, 0.3),
        inset -8px -8px 12px rgba(0, 0, 0, 0.12),
        inset 8px 8px 12px rgba(255, 255, 255, 0.2);
}

/* Keyboard accessibility */
.circus-balloon:focus-visible {
    outline: 3px solid #d4af37;
    outline-offset: 5px;
}

@media (max-width: 900px) {
    .circus-page {
        gap: 1.5rem;
        padding: 2rem 0.85rem 2.5rem;
    }

    .circus-page .section {
        padding: 1.5rem 1.25rem;
    }

    .circus-story img {
        width: min(42%, 280px);
        max-width: 280px;
        margin-right: 1.25rem;
    }

    .circus-story p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .circus-buttons {
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 600px) {
    .circus-page {
        padding: 1.25rem 0.65rem 2rem;
    }

    .circus-page .section {
        border-radius: 10px;
        padding: 1.25rem 0.85rem;
    }

    .circus-page .section h3 {
        font-size: 1.65rem;
    }

    .circus-story {
        overflow: visible;
    }

    .circus-story img {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 auto 1rem;
    }

    .circus-story p {
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .circus-page .social-link,
    .circus-page .circus-social-links a {
        width: 72px;
        height: 72px;
        margin-top: 1rem;
    }

    .circus-page .social-link img,
    .circus-page .circus-social-links a img {
        max-width: 33px;
        max-height: 33px;
    }

    .circus-social-links {
        gap: 0.65rem;
        margin-top: 1rem;
    }

    .circus-buttons {
        gap: 1rem;
        padding: 1.25rem 0.5rem;
    }

    .circus-balloon {
        width: 132px;
        height: 94px;
        font-size: 0.95rem;
    }
}

@media (max-width: 380px) {
    .circus-page .circus-social-links a,
    .circus-page .social-link {
        width: 64px;
        height: 64px;
        padding: 0.5rem;
    }

    .circus-page .circus-social-links a img,
    .circus-page .social-link img {
        max-width: 28px;
        max-height: 28px;
    }

    .circus-balloon {
        width: 118px;
        height: 84px;
        font-size: 0.88rem;
    }
}

/* ================ Index/Home PAGE ================ */
.hero-page main {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 2.5rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-page .hero-section-1,
.hero-page .hero-section-2 {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45),
                0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.hero-page .hero-section-2 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

body.hero-page {
    background-image: url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/maint/background_camera.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.hero-page #section-dedication,
.hero-page #section-journalists {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.hero-page #section-journalists,
.hero-page #section-dedication {
    gap: 0.75rem;
}

.hero-page #section-journalists h2,
.hero-page #section-journalists p,
.hero-page #section-dedication h2,
.hero-page #section-dedication p {
    margin-left: auto;
    margin-right: auto;
}

.hero-page #section-journalists p,
.hero-page #section-dedication p {
    max-width: 820px;
}

.hero-page .hero-section-2 #section-journalists h2,
.hero-page .hero-section-2 #section-journalists p {
    color: var(--light);
    text-shadow:
        -1px -1px 0 var(--accent-red),
         1px -1px 0 var(--accent-red),
        -1px  1px 0 var(--accent-red),
         1px  1px 0 var(--accent-red);
}

.hero-page .hero-section-2 > .journalist-directory-header h3 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.15;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.85);
}

.hero-page .hero-section-2 > .journalist-directory-header p span {
    color: var(--light);
    text-shadow:
        -1px -1px 0 var(--accent-red),
         1px -1px 0 var(--accent-red),
        -1px  1px 0 var(--accent-red),
         1px  1px 0 var(--accent-red);
}

.hero-page .card {
    flex: 0 0 clamp(340px, 44vw, 520px);
    width: clamp(340px, 44vw, 520px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    scroll-snap-align: start;
}

.hero-page .card-image,
.hero-page .card-links {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-page .card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
}

.hero-page .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0;
}

.hero-page .card-links img {
    max-width: 42px;
    margin-bottom: 0;
}

.hero-page .social-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-page .video-gallery-section {
    width: 100%;
    margin: 0 auto;
}

.hero-page .hero-section-3 {
    width: 100%;
}

.hero-page .video-gallery {
    justify-content: flex-start;
    align-items: flex-start;
    padding-left: 0;
    scroll-padding-left: 0;
    scroll-snap-type: x mandatory;
}

.hero-page .video-container {
    scroll-snap-align: start;
}

.hero-page .image-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0 1.25rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.hero-page #sources-gallery {
    width: 100%;
}

.hero-page #sources-gallery h3 {
    font-size: 2.2rem;
    margin: 0 0 0.75rem;
}

.hero-page #sources-gallery p {
    margin: 0 auto 1rem;
    max-width: 900px;
}

.hero-page #sources-gallery .image-gallery::-webkit-scrollbar {
    height: 10px;
}

.hero-page #sources-gallery .image-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.hero-page #sources-gallery .image-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.hero-page .image-container {
    flex: 0 0 clamp(300px, 40vw, 420px);
    width: clamp(300px, 40vw, 420px);
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #fff;
    scroll-snap-align: start;
    align-self: flex-start;
}

.hero-page .image-container a,
.hero-page .image-container img {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-page .image-gallery {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) transparent;
}

.hero-page .image-container img {
    object-fit: cover;
}

.hero-page .disclaimer {
    margin: 1rem auto 0;
    max-width: 900px;
    text-align: center;
}

.hero-page .disclaimer p {
    font-size: 0.65rem;
    line-height: 1.35;
    margin: 0;
}


/* ================ UNITED PAGE ================ */
.united-main {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 0 1rem 3rem;
    gap: 2rem;
}

.united-section-1,
.united-section-2,
.united-section-3,
.united-section-4 {
    width: min(100%, 1000px);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.united-page .united-section-2,
.united-page .united-section-3,
.united-page .united-section-4 {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.united-section-1 > div {
    width: min(100%, 1000px);
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45),
                0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.united-section-2 > .united-2-1,
.united-section-3 > .united-3-1 {
    width: min(100%, 1000px);
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    position: relative;
    z-index: 2;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45),
                0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.united-section-4 > .united-4-1 {
    width: min(100%, 1000px);
    min-width: 0;
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45),
                0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.united-section-3 > .hero-grid {
    width: min(100%, 1000px);
    margin: -0.85rem auto 0;
    padding: 1.75rem 1.5rem;
    position: relative;
    z-index: 1;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45),
                0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.united-section-2 .hero-grid,
.united-section-3 .hero-grid {
    gap: 2rem;
    justify-items: center;
}

/* United desktop layout: stack all major blocks vertically */
@media (min-width: 992px) {
    .united-page .united-section-2 {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .united-page .hero-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        width: min(100%, 1000px);
        margin: 0 auto;
    }

    .united-page .hero-grid > * {
        width: 100%;
    }

    .united-page .hero-media {
        align-items: center;
        text-align: center;
    }

    .united-page .hero-media > img {
        width: min(100%, 340px);
        max-width: 340px;
        min-height: auto;
        object-fit: cover;
    }

    .united-page .hero-media .social-link img {
        max-width: 56px;
        width: 56px;
        height: 56px;
    }

    .united-page .hero-media .social-link,
    .united-page .hero-media > a:not(.social-link) {
        align-self: center;
    }

    .united-page .hero-media > a:not(.social-link) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.35rem;
        padding: 0.45rem 0.8rem;
        border: 2px solid var(--dark);
        border-radius: 6px;
        background: var(--primary-green);
        color: #000;
        font-weight: 700;
    }
}

    /* United responsive image sizing across breakpoints */
    @media (min-width: 1600px) {
        .united-page .hero-media > img {
            max-width: 420px;
        }
    }

    @media (min-width: 1200px) and (max-width: 1599px) {
        .united-page .hero-media > img {
            max-width: 380px;
        }
    }

    @media (min-width: 992px) and (max-width: 1199px) {
        .united-page .hero-media > img {
            max-width: 340px;
        }
    }

    @media (min-width: 769px) and (max-width: 991px) {
        .united-page .hero-media > img {
            max-width: 300px;
        }
    }

    @media (min-width: 576px) and (max-width: 768px) {
        .united-page .hero-media > img {
            max-width: 260px;
        }
    }

    @media (max-width: 575px) {
        .united-page .hero-media > img {
            max-width: 220px;
        }

        .united-page .hero-media .social-link img {
            width: 48px;
            height: 48px;
            max-width: 48px;
        }
    }

    .united-gallery {
        width: 100%;
        max-width: 100%;
    }
    .united-gallery .video-gallery {
        width: 100%;
        padding: 0.5rem 0 0.75rem;
        gap: 1rem;
        scroll-snap-type: x mandatory;
    }
    .united-gallery .video-container {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        aspect-ratio: 16 / 9;
        scroll-snap-align: start;
    }
    .united-gallery .video-container video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.united-section-1 > div p {
    margin-left: auto;
    margin-right: auto;
}

.united-section-2 > .united-2-1 p,
.united-section-3 > .united-3-1 p {
    margin-left: auto;
    margin-right: auto;
}

/* United hero bio copy: centered with paragraph indent */
.united-page .hero-bio .lang-en,
.united-page .hero-bio .lang-ar {
    text-align: center;
}

.united-page .hero-bio p {
    text-indent: 0;
    margin-left: auto;
    margin-right: auto;
}

/* United list: replace default bullets with Palestine flag markers */
.united-page .hero-bio .palestine-flag-list {
    list-style: none;
    margin: 1rem auto 0;
    padding: 0;
    text-align: left;
}

.united-page .hero-bio .palestine-flag-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.55rem;
}

.united-page .hero-bio .palestine-flag-list li::before {
    content: "🇵🇸";
    position: absolute;
    left: 0;
    top: 0;
    line-height: 1;
}

/* United: thin framing around hero blocks */
.united-page .hero-grid {
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    background: linear-gradient(180deg, #6f6f6f 0%, #b8b8b8 45%, #111111 100%);
    width: min(100%, 1000px);
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.united-page .hero-grid > * {
    min-width: 0;
}

/* United hero bio visual treatment */
.united-page .hero-bio {
    border: 1px solid rgba(0, 0, 0, 0.65);
    background: linear-gradient(180deg, #6f6f6f 0%, #b8b8b8 45%, #111111 100%);
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 0 #000, 0 0 6px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.9);
    width: 100%;
    box-sizing: border-box;
}

.united-page .hero-bio h3,
.united-page .hero-bio p {
    color: #fff;
    text-shadow: 0 2px 0 #000, 0 0 6px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.9);
    overflow-wrap: anywhere;
}

.united-page .hero-bio .palestine-flag-list li {
    overflow-wrap: anywhere;
}

@media (max-width: 991px) {
    .united-page .united-main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .united-page .hero-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.85rem;
    }

    .united-page .hero-media {
        align-items: center;
        text-align: center;
    }

    .united-page .hero-media > img {
        width: min(100%, 320px);
        max-width: 320px;
        height: auto;
    }

    .united-page .hero-media .social-link,
    .united-page .hero-media > a:not(.social-link) {
        align-self: center;
    }

    .united-page .hero-media > a:not(.social-link) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.35rem;
        padding: 0.45rem 0.8rem;
        border: 2px solid var(--dark);
        border-radius: 6px;
        background: var(--primary-green);
        color: #000;
        font-weight: 700;
    }
}

@media (max-width: 575px) {
    .united-page .united-main {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .united-page .united-section-1,
    .united-page .united-section-2,
    .united-page .united-section-3,
    .united-page .united-section-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .united-page .hero-grid {
        padding: 0.75rem;
    }

    .united-page .hero-bio {
        padding: 0.9rem;
    }
}

.contact-page {
    background:
        linear-gradient(180deg, rgba(0, 151, 54, 0.08) 0%, rgba(255, 255, 255, 0.96) 22%, rgba(207, 17, 39, 0.08) 100%);
}

/* ================ CONTACT PAGE ================ */
.contact-main {
    width: 100%;
    padding: 3rem 1.5rem 4rem;
}

.contact-wrapper {
    width: min(100%, 860px);
    margin: 0 auto;
    padding: 2rem;
    border: 4px solid var(--dark);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(0, 151, 54, 0.08), rgba(255, 255, 255, 0.96) 35%, rgba(207, 17, 39, 0.12));
    box-shadow: 0 12px 30px rgba(17, 17, 17, 0.18),
                0 8px 18px rgba(207, 17, 39, 0.22);
}

.contact-form {
    width: 100%;
}

.contact-form h2 {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.contact-page .contact-form p {
    margin: 0 auto 1.75rem;
    max-width: 640px;
}

.contact-form-fields {
    display: grid;
    gap: 1rem;
    width: 100%;
    text-align: left;
}

.contact-form-fields label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
    color: var(--dark);
}

.contact-page .lang-ar {
    text-align: right;
}

.contact-form-fields .lang-ar {
    justify-self: end;
}

.contact-form-fields input,
.contact-form-fields textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 3px solid var(--dark);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--dark);
    font: inherit;
    box-shadow: 0 4px 0 rgba(17, 17, 17, 0.18);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.contact-form-fields textarea {
    min-height: 180px;
    resize: vertical;
}

.status-message {
    min-height: 1.75rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.status-message.success {
    color: var(--primary-green);
}

.status-message.error {
    color: var(--accent-red);
}

.contact-form-fields input:focus,
.contact-form-fields textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 4px rgba(207, 17, 39, 0.18);
    transform: translateY(-1px);
}

.contact-form-fields button {
    justify-self: center;
    min-width: 180px;
    padding: 0.9rem 1.8rem;
    border: 3px solid var(--dark);
    border-radius: 8px;
    background: var(--primary-green);
    color: var(--dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 0 var(--dark);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-form-fields button:hover,
.contact-form-fields button:focus-visible {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 var(--primary-green);
}

/* ================ MPGA PAGE ================ */
.mpga-section-2 {
    text-align: left;
}

.mpga-section-2 h2,
.mpga-section-2 ul,
.mpga-section-2 li {
    text-align: left;
}

.mpga-section-2 h2 {
    text-align: center;
}

.mpga-section-2 h3 {
    text-align: center;
}

.mpga-section-2 .purpose p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.mpga-section-3 .image-gallery-section > p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.mpga-section-2 ul {
    margin: 0;
    padding-left: 1.5rem;
}

.mpga-main {
    width: min(100%, 1200px);
    margin: 0 auto;
}

.mpga-page .mpga-section-2-media,
.mpga-page .image-gallery-section {
    width: 100%;
}

/* MPGA responsive breakpoints */
@media (min-width: 1200px) {
    .mpga-main {
        width: min(100%, 1240px);
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .mpga-main {
        width: min(100%, 1060px);
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .mpga-page .mpga-section-3 .image-container {
        flex: 0 0 300px;
        width: 300px;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .mpga-main {
        width: min(100%, 920px);
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .mpga-page .mpga-section-1 p,
    .mpga-page .mpga-section-2 .purpose p,
    .mpga-page .mpga-section-3 .outline-paragraph {
        max-width: 100%;
    }

    .mpga-page .mpga-section-3 .image-container {
        flex: 0 0 280px;
        width: 280px;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    .mpga-main {
        width: 100%;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .mpga-page .section {
        padding: 1.35rem 0.85rem;
    }

    .mpga-page .mpga-section-1 h2,
    .mpga-page .mpga-section-2 h2,
    .mpga-page .mpga-section-3 h2 {
        font-size: 1.55rem;
    }

    .mpga-page .mpga-section-2 h3,
    .mpga-page .mpga-section-3 h3 {
        font-size: 1.2rem;
    }

    .mpga-page .mpga-section-1 p,
    .mpga-page .mpga-section-2 p,
    .mpga-page .mpga-section-3 p,
    .mpga-page .mpga-section-2 li,
    .mpga-page .mpga-section-3 li {
        font-size: 0.98rem;
        line-height: 1.5;
    }

    .mpga-page .mpga-section-3 .image-container {
        flex: 0 0 min(78vw, 290px);
        width: min(78vw, 290px);
    }

    .mpga-page .mpga-highlight-gallery .gallery-card {
        flex: 0 0 min(78vw, 290px);
    }
}

@media (max-width: 575px) {
    .mpga-main {
        width: 100%;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }

    .mpga-page .section {
        padding: 1.1rem 0.75rem;
        margin: 1.1rem auto;
    }

    .mpga-page .mpga-section-1 h2,
    .mpga-page .mpga-section-2 h2,
    .mpga-page .mpga-section-3 h2 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .mpga-page .mpga-section-2 h3,
    .mpga-page .mpga-section-3 h3 {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    .mpga-page .mpga-section-1 p,
    .mpga-page .mpga-section-2 p,
    .mpga-page .mpga-section-3 p,
    .mpga-page .mpga-section-2 li,
    .mpga-page .mpga-section-3 li {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .mpga-page .outline-paragraph {
        margin-left: 0;
        margin-right: 0;
        text-indent: 0;
    }

    .mpga-page .mpga-highlight-gallery,
    .mpga-page .image-gallery {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .mpga-page .mpga-highlight-gallery .gallery-card,
    .mpga-page .mpga-section-3 .image-container {
        flex: 0 0 min(84vw, 280px);
        width: min(84vw, 280px);
    }
}

.outline-paragraph {
    text-indent: 2em;
    margin-left: 30px;
}

.lang-ar .outline-paragraph {
    margin-left: 0;
    margin-right: 30px;
}

.pages {
    text-align: center;
}

.pages .outline-paragraph {
    margin-left: auto;
    margin-right: auto;
    text-indent: 0;
}

.subpages ul,
.subpages li {
    text-align: left;
}

.subpages ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* ================ FAITH PAGE ================ */
.faith-page main {
    display: block;
    min-height: auto;
    padding: 2.5rem 0 3rem;
    text-align: initial;
}

/* ================ TICKET PAGE ================ */
.ticket-page {
    width: min(100%, 1200px);
    margin: 0 auto;
    align-items: stretch;
    text-align: initial;
}

.ticket-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-top h2 {
    text-align: center;
}

.ticket-copy-block {
    width: min(100%, 860px);
    margin: 0 auto 1rem;
    text-align: center;
}

.ticket-copy-block p {
    width: min(100%, 760px);
    margin: 0.35rem auto 0;
    text-align: center !important;
}

.ticket-copy-block p .lang-en,
.ticket-copy-block p .lang-ar {
    display: block;
    width: 100%;
    text-align: center !important;
}

.ticket-page h1,
.ticket-page h2,
.ticket-page h3,
.ticket-page h4,
.ticket-page h5,
.ticket-page h6,
.ticket-page p {
    text-align: center;
}

.ticket-page p .lang-en,
.ticket-page p .lang-ar {
    display: inline-block;
    width: 100%;
    text-align: center !important;
}

.ticket-page p {
    text-align: center !important;
}

.ticket-top-link {
    display: block;
    width: min(100%, 980px);
}

.ticket-top-image {
    width: 100%;
    max-width: 980px;
    height: auto;
    margin: 0 auto;
}

.ticket-gallery-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1.25rem;
    border: 5px solid #000;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(207, 17, 39, 0.55);
    margin: 1.25rem auto;
    max-width: 1200px;
}

.ticket-gallery-scroll figure {
    flex: 0 0 360px;
    margin: 0;
    border: 0;
    border-radius: 12px;
    overflow: visible;
    background: #fff;
}

.ticket-gallery-scroll img {
    width: 100%;
    height: 360px;
    object-fit: contain;
    margin: 0;
    border: 0;
}

.ticket-gallery-scroll figcaption {
    padding: 0.7rem 0.8rem;
    text-align: center;
}

.ticket-page .ticket-video-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 1rem auto 0;
}

.ticket-page .ticket-video-wrap iframe {
    width: min(100%, 840px);
    max-width: 840px;
    height: 472px;
    border: 0;
    display: block;
}

.ticket-gallery-scroll::-webkit-scrollbar {
    height: 10px;
}

.ticket-gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.ticket-gallery-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.ticket-middle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.ticket-col-land,
.ticket-col-ffc,
.ticket-col-gsf {
    min-width: 0;
}

/* Ticket page responsive breakpoints */
@media (min-width: 1200px) {
    .ticket-page {
        width: min(100%, 1240px);
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .ticket-gallery-scroll figure {
        flex: 0 0 360px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .ticket-page {
        width: min(100%, 1040px);
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .ticket-middle {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticket-col-gsf {
        grid-column: 1 / -1;
    }

    .ticket-gallery-scroll figure {
        flex: 0 0 320px;
    }

    .ticket-gallery-scroll img {
        height: 320px;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .ticket-page {
        width: min(100%, 900px);
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .ticket-middle {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .ticket-gallery-scroll {
        gap: 1rem;
        padding: 1rem;
    }

    .ticket-gallery-scroll figure {
        flex: 0 0 290px;
    }

    .ticket-gallery-scroll img {
        height: 290px;
    }

    .ticket-page .ticket-video-wrap iframe {
        width: min(100%, 760px);
        height: clamp(320px, 52vw, 430px);
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    .ticket-page {
        width: 100%;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .ticket-top h2 {
        font-size: 1.6rem;
        line-height: 1.2;
        word-break: break-word;
    }

    .ticket-middle {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ticket-copy-block {
        width: 100%;
    }

    .ticket-copy-block p {
        width: 100%;
    }

    .ticket-gallery-scroll {
        gap: 0.85rem;
        padding: 0.85rem;
        border-width: 3px;
    }

    .ticket-gallery-scroll figure {
        flex: 0 0 min(82vw, 300px);
    }

    .ticket-gallery-scroll img {
        height: 250px;
    }

    .ticket-page .ticket-video-wrap iframe {
        width: 100%;
        max-width: 100%;
        height: clamp(230px, 56vw, 360px);
    }
}

@media (max-width: 575px) {
    .ticket-page {
        width: 100%;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }

    .ticket-top {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .ticket-top h2 {
        font-size: 1.35rem;
        line-height: 1.2;
        word-break: break-word;
        margin: 0;
    }

    .ticket-middle {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .ticket-page h2,
    .ticket-page h3 {
        font-size: 1.15rem;
    }

    .ticket-page p {
        font-size: 0.96rem;
        line-height: 1.45;
    }

    .ticket-gallery-scroll {
        gap: 0.75rem;
        padding: 0.75rem;
        margin: 1rem auto;
        border-width: 3px;
        border-radius: 10px;
    }

    .ticket-gallery-scroll figure {
        flex: 0 0 min(86vw, 280px);
    }

    .ticket-gallery-scroll img {
        height: 220px;
    }

    .ticket-gallery-scroll figcaption {
        padding: 0.55rem 0.6rem;
        font-size: 0.95rem;
    }

    .ticket-page .ticket-video-wrap {
        margin-top: 0.75rem;
    }

    .ticket-page .ticket-video-wrap iframe {
        width: 100%;
        max-width: 100%;
        height: clamp(200px, 58vw, 290px);
    }
}

.faith-page .section {
    max-width: 1100px;
}

.faith-intro-copy {
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
    width: 100%;
}

.faith-intro-copy .lang-en p,
.faith-intro-copy .lang-ar p {
    text-align: center;
    text-indent: 0;
}

.faith-intro {
    background-image: url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/maint/0026.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

.faith-intro .section-title {
    color: var(--gold);
    -webkit-text-stroke: 1px #000;
    text-shadow: 0 1px 0 #000;
    display: inline-block;
    padding: 0.35rem 0.9rem;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.95);
}

.faith-link-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0 0.25rem;
    scroll-behavior: smooth;
    justify-content: flex-start;
    align-items: stretch;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.faith-link-item {
    flex: 0 0 280px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    scroll-snap-align: start;
}

.faith-link-item img {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.prayer-section {
    background-image: url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/maint/0035.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.prayer-section .section-title {
    margin-bottom: 1.25rem;
}

.prayer-image {
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    border: 4px solid var(--dark);
    object-fit: cover;
}

.prayer-body {
    border: 4px solid var(--primary-green);
    border-radius: 12px;
    padding: 1.5rem;
    background: #f8f8f8;
}

.prayer-copy {
    text-align: left;
    font-size: 1.08rem;
    line-height: 1.75;
    color: #222;
}

.faith-page .prayer-copy p {
    text-indent: 0;
    max-width: 960px;
    margin: 0 auto 0.9rem;
    text-align: center;
}

.faith-page .prayer-section .section-date,
.faith-page .prayer-section .prayer-copy,
.faith-page .prayer-section .prayer-copy.lang-ar {
    text-align: center;
}

.faith-page .prayer-copy {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.prayer-copy.lang-ar {
    text-align: right;
}

.faith-link-grid::-webkit-scrollbar {
    height: 10px;
}

.faith-link-grid::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.faith-link-grid::-webkit-scrollbar-track {
    background: transparent;
}

/* ================ DAY JOURNAL SECTION ================ */
.day-journal .section-date {
    text-align: center;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #222;
}

.day-journal .section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.4rem;
}

.day-journal .quote-of-day {
    text-align: center;
    margin: 0 auto 1rem;
    max-width: 900px;
}

.day-journal .quote-title {
    text-align: center;
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: #222;
}

.day-journal .quote-text {
    text-align: center;
    margin: 0 auto;
    max-width: 820px;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #222;
}

.quote-reply {
    text-align: center;
    margin: 0.5rem auto 0;
    font-size: 1rem;
    color: #222;
}

.journal-media .caption + .div-img {
    margin-top: 3rem;
}

/* Green border around text */
.text-content {
    border: 4px solid var(--primary-green);
    border-radius: 10px;
    padding: 1.5rem;
    background: #f8f8f8;
}

.home-page .content-grid .text-content {
    border: none;
}

/* Day journal overrides: no border on text, image-left layout */
.day-journal .text-content {
    border: none;
    background: transparent;
    padding: 0 0 0 0.5rem;
}

.text-content .lang-en p,
.text-content .lang-ar p {
    text-indent: 2em;
}

.text-content .lang-ar {
    text-align: right;
    font-family: var(--font-ar);
}

/* Smaller journal image */
.journal-img {
    max-width: 420px;
    width: 100%;
    height: auto;
    border: 3px solid #000;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.day-journal .content-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.media-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 800px;
}

.journal-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 300px;
}

.journal-media .div-img {
    width: 300px;
    max-width: 300px;
    height: auto;
}

.day-journal .journal-media {
    width: min(100%, 360px);
    align-items: flex-start;
    gap: 1rem;
}

.day-journal .journal-media .div-img {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.day-journal .text-content {
    width: 100%;
    min-width: 0;
}

.media-content img,
.div-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-width: 100%;
}

.tribute-img {
    display: block;
    width: min(100%, 900px);
    margin: 2rem auto 0;
}
/* ================ ok Humanity section ================ */
.ok-humanity .media-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-top: 0.5rem;
    padding-right: 1.375rem;
    height: 100%;
    justify-content: flex-start;
}

.ok-humanity .content-grid,
.ok-humanity .text-content,
.ok-humanity .okh-message-copy,
.ok-humanity .okh-side-quests-copy,
.ok-humanity .okh-side-quests-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.ok-humanity .media-grid img {
    width: auto;
    max-width: 330px;
    min-width: 140px;
    height: auto;
    flex: 0 1 auto;
}

.home-page .ok-humanity .media-grid .ticket-preview-figure {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0;
    text-align: center;
}

.home-page .ok-humanity .ticket-preview-figure a,
.home-page .ok-humanity .ticket-preview-figure img {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.home-page .ok-humanity .ticket-preview-figure figcaption {
    margin-top: 0.75rem;
    line-height: 1.35;
    text-align: center;
}

.ok-humanity .ok-humanity-third-link {
    display: inline-flex;
    justify-content: center;
}

.ok-humanity .ok-humanity-third-link img {
    min-width: 0;
    max-width: 120px;
}

/* Desktop OK Humanity layout: images above text, with third image below the top two */
@media (min-width: 992px) {
    .ok-humanity .content-grid {
        grid-template-columns: 1fr;
    }

    .ok-humanity .text-content .lang-en,
    .ok-humanity .text-content .lang-ar {
        text-align: center;
    }

    .ok-humanity .text-content .lang-en p,
    .ok-humanity .text-content .lang-ar p {
        text-indent: 0;
        margin-left: auto;
        margin-right: auto;
    }

    .ok-humanity .media-grid {
        order: -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(220px, 330px));
        justify-content: center;
        align-items: start;
        gap: 1.25rem;
        padding-right: 0;
    }

    .ok-humanity .ok-humanity-third-link {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .ok-humanity .media-grid .div-img {
        width: 100%;
    }
}

/* Number the OK Humanity list items with a custom counter */
.ok-humanity .text-content ul {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    counter-reset: ok-humanity-item;
    text-align: start;
}

.ok-humanity .text-content ul li {
    position: relative;
    padding-inline-start: 2rem;
    margin-bottom: 0.55rem;
    counter-increment: ok-humanity-item;
    text-align: start;
}

.ok-humanity .text-content ul li::before {
    content: counter(ok-humanity-item) ".";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    font-weight: 700;
    color: var(--accent-red);
}

.ok-humanity .side-quests-heading {
    margin-top: 1.1rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.ok-humanity .side-quests-intro {
    margin: 0 0 0.75rem;
    text-align: center;
    font-weight: 700;
}

.ok-humanity .text-content ul.side-quests-gallery {
    list-style: none;
    counter-reset: none;
    margin: 0.5rem auto 1.25rem;
    text-align: initial;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    max-width: 100%;
    border: 0;
    box-shadow: none;
}

.ok-humanity .text-content ul.side-quests-gallery li.quest-card {
    position: static;
    counter-increment: none;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    padding-inline-start: 1rem;
    margin: 0;
    background: #f8f8f8;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    flex: 0 0 440px;
    scroll-snap-align: start;
}

.ok-humanity .text-content ul.side-quests-gallery li.quest-card::before {
    content: none;
}

.ok-humanity .quest-card h3 {
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.ok-humanity .quest-card .quest-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
}

.ok-humanity .quest-card p {
    margin: 0;
    max-width: none;
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: start;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ok-humanity .lang-ar .quest-card p {
    text-align: right;
}

.ok-humanity .quest-card .quest-media {
    margin-top: auto;
    padding-top: 0.9rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.ok-humanity .quest-card a {
    text-decoration: underline;
    display: inline-flex;
    justify-content: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ok-humanity .quest-card img {
    width: 400px;
    height: 300px;
    object-fit: contain;
    border: 0;
    background: #fff;
}

/* Keep side-quest cards fluid on smaller viewports */
@media (max-width: 991px) {
    .home-page .ok-humanity.section,
    .home-page .ok-humanity .content-grid,
    .home-page .ok-humanity .text-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .home-page .ok-humanity .okh-side-quests-list {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .home-page .ok-humanity .text-content ul.side-quests-gallery {
        width: 100%;
        max-width: 100%;
        padding: 0.85rem;
        gap: 0.9rem;
    }

    .ok-humanity .text-content ul.side-quests-gallery li.quest-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ok-humanity .quest-card img {
        width: min(100%, 360px);
        height: 220px;
        object-fit: contain;
    }

    .home-page .ok-humanity .media-grid {
        padding-right: 0;
        gap: 0.95rem;
    }

    .home-page .ok-humanity .media-grid img {
        width: min(100%, 260px);
        max-width: 260px;
    }

    .home-page .ok-humanity .ok-humanity-third-link img {
        width: min(100%, 92px);
        max-width: 92px;
    }
}

@media (max-width: 768px) {
    .ok-humanity .text-content ul.side-quests-gallery li.quest-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 575px) {
    .ok-humanity .text-content ul.side-quests-gallery {
        padding: 0.75rem;
        gap: 0.8rem;
        border-width: 3px;
    }

    .ok-humanity .text-content ul.side-quests-gallery li.quest-card {
        padding: 0.8rem;
        padding-inline-start: 0.8rem;
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 0;
    }

    .ok-humanity .quest-card .quest-copy {
        padding-bottom: 0;
    }

    .ok-humanity .quest-card p {
        font-size: 0.85rem;
        line-height: 1.42;
    }

    .ok-humanity .quest-card img {
        width: min(100%, 260px);
        height: 180px;
        object-fit: contain;
    }

    .ok-humanity .media-grid {
        width: 100%;
        padding-right: 0;
        gap: 0.85rem;
    }

    .ok-humanity .media-grid img {
        max-width: min(100%, 320px);
        width: 100%;
    }

    .home-page .ok-humanity .media-grid img {
        width: min(100%, 220px);
        max-width: 220px;
    }

    .home-page .ok-humanity .ok-humanity-third-link img {
        width: min(100%, 82px);
        max-width: 82px;
    }
}

.united-page .source-card {
    box-shadow: 0 8px 20px rgba(0, 151, 54, 0.45);
}

.united-page .source-card .card-image img {
    border: none;
}

.united-page .source-card:hover {
    background: var(--light);
    color: var(--dark);
}

.united-page .source-card:hover .card-title a {
    color: var(--dark);
    text-shadow: 1px 1px 5px var(--accent-red), 0 0 10px var(--accent-red);
}

.united-page .source-card:hover .card-desc {
    color: var(--dark);
    text-shadow: 1px 1px 5px var(--accent-red), 0 0 10px var(--accent-red);
}

/* ================ Ok America section ================ */

.ok-america.section {
    border: none;
    box-shadow: none;
    background: transparent;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.ok-america .content-grid {
    grid-template-columns: 1fr;
    justify-items: center;
}

.ok-america .text-content {
    width: min(100%, 980px);
    justify-self: center;
    margin: 0 auto;
    text-align: center;
    border: none;
    background: transparent;
    padding: 0;
}

.ok-america .text-content .lang-ar {
    text-align: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.hero-media {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-start;
    min-width: 0;
}

.hero-media > img {
    max-width: 420px;
    width: 100%;
    object-fit: cover;
}

.hero-media .social-link {
    display: inline-flex;
    width: fit-content;
}

.hero-media .social-link img {
    max-width: 70px;
    width: 100%;
}

.hero-bio {
    border: 4px solid var(--accent-red);
    border-radius: 10px;
    padding: 1.25rem;
    background: #f8f8f8;
    min-width: 0;
}

.hero-gallery {
    min-width: 0;
    align-self: start;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Featured Hero: vertical content flow */
#featured-hero .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

#featured-hero .hero-grid > * {
    width: min(100%, 980px);
}

#featured-hero .hero-media {
    align-items: center;
    gap: 1.5rem;
}

#featured-hero .hero-media figure {
    margin: 0;
    width: 100%;
    max-width: 520px;
}

#featured-hero .hero-media figure img {
    width: 100%;
    max-width: 520px;
}

#featured-hero .hero-media figcaption {
    margin-top: 0.6rem;
    text-align: center;
}

#featured-hero .hero-bio,
#featured-hero .video-gallery-section,
#featured-hero .hero-gallery-block,
#featured-hero .hero-extra-block {
    width: min(100%, 980px);
}

#featured-hero .hero-gallery-block .scrollable-gallery {
    width: 100%;
}

/* Featured Hero interactive image and video modal */
#featured-hero .andrey-feature {
    display: grid;
    place-items: center;
    padding: clamp(.75rem, 2vw, 1.25rem);
    background: #f8f8f8;
}

.andrey-feature-trigger {
    display: block;
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.andrey-feature-trigger:focus-visible {
    outline: 4px solid var(--gold);
    outline-offset: 5px;
}

.andrey-feature-trigger .interactive-wiggle {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border: 3px solid var(--dark);
    border-radius: 12px;
    object-fit: contain;
    animation: giftShake 2.8s ease-in-out infinite;
    transform-origin: center;
}

.andrey-feature-trigger:hover .interactive-wiggle {
    box-shadow: 0 10px 25px rgba(207, 17, 39, .45), 0 5px 0 var(--primary-green);
}

body.andrey-modal-open { overflow: hidden; }

.andrey-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: clamp(.75rem, 3vw, 2rem);
    overflow-y: auto;
    background: rgba(0, 0, 0, .78);
    opacity: 0;
    transition: opacity .25s ease;
}

.andrey-modal[hidden] { display: none; }
.andrey-modal.is-open { opacity: 1; }

.andrey-modal-content {
    width: min(100%, 920px);
    max-height: calc(100svh - 2rem);
    margin: auto;
    padding: clamp(1.1rem, 4vw, 2.5rem);
    overflow-y: auto;
    border: 4px solid var(--dark);
    border-radius: 16px;
    background: var(--light);
    box-shadow: 0 14px 40px rgba(207, 17, 39, .45), 0 7px 0 var(--primary-green);
    text-align: center;
}

.andrey-modal-content > h2 {
    margin: 0 auto 1.5rem;
    padding: 0;
}

.andrey-video-feature + .andrey-video-feature { margin-top: 2rem; }
.andrey-video-feature h3 { margin-bottom: .75rem; }

.andrey-modal .video-wrapper {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    padding: 0;
    border: 3px solid var(--dark);
    border-radius: 12px;
    background: #171717;
    overflow: hidden;
}

.andrey-modal .video-wrapper iframe {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.andrey-video-placeholder p {
    margin: 0;
    padding: 1rem;
    color: var(--light);
    font-size: clamp(.9rem, 2vw, 1.1rem);
    font-weight: 700;
}

.andrey-modal-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
    margin-top: 2rem;
}

.modal-back-button,
.andrey-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(100%, 260px);
    min-height: 48px;
    padding: .75rem 1.2rem;
    border: 2px solid var(--dark);
    border-radius: 7px;
    color: var(--dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.modal-back-button { background: var(--primary-green); }
.andrey-profile-link { background: var(--gold); }
.modal-back-button:hover,
.andrey-profile-link:hover { background: var(--accent-red); }
.modal-back-button:focus-visible,
.andrey-profile-link:focus-visible { outline: 3px solid var(--primary-green); outline-offset: 3px; }

@media (max-width: 768px) {
    #featured-hero .andrey-feature { padding: .65rem; }
    .andrey-modal { padding: .65rem; }
    .andrey-modal-content { max-height: calc(100svh - 1.3rem); padding: 1rem; border-width: 3px; border-radius: 12px; }
    .andrey-modal-content > h2 { font-size: 1.5rem; }
    .andrey-video-feature + .andrey-video-feature { margin-top: 1.4rem; }
    .andrey-video-feature h3 { font-size: 1.12rem; }
    .andrey-modal-actions { margin-top: 1.4rem; }
    .modal-back-button,
    .andrey-profile-link { width: 100%; max-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
    .andrey-feature-trigger .interactive-wiggle { animation: none; }
    .andrey-modal { transition: none; }
}

#featured-hero .hero-gallery-block .scrollable-gallery {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    border: 5px solid #000;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(207, 17, 39, 0.35);
    margin: 1.5rem auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

#featured-hero .hero-gallery-block .gallery-card {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    aspect-ratio: 1 / 1;
    border: 0;
    border-radius: 0;
}

#featured-hero .hero-gallery-block .gallery-card img,
#featured-hero .hero-gallery-block .gallery-card a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.gallery-title {
    text-align: center;
}

.hero-gallery .video-gallery {
    height: auto;
    padding: 10px 0 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) transparent;
}

.hero-gallery .video-container {
    min-width: calc(100% - 1rem);
    flex-shrink: 0;
    max-width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-gallery .video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* Video */
.video-embed-section {
    max-width: 560px;
    margin: 2rem auto 0;
	padding-left: 2rem;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

/* ================ GALLERIES ================ */
.video-gallery-section,
.image-gallery-section,
.links-gallery-section {
    border: 5px solid #000;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(207, 17, 39, 0.55);
    margin: 2.8rem auto;
}

.video-gallery,
.image-gallery,
.links-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 10px 0;
    border-radius: 12px;
}

.this-state .video-gallery {
    justify-content: flex-end;
}

.video-gallery::-webkit-scrollbar,
.image-gallery::-webkit-scrollbar,
.links-gallery::-webkit-scrollbar {
    height: 10px;
}

.video-gallery::-webkit-scrollbar-thumb,
.image-gallery::-webkit-scrollbar-thumb,
.links-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.video-gallery::-webkit-scrollbar-track,
.image-gallery::-webkit-scrollbar-track,
.links-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.video-container,
.image-container {
    flex: 0 0 320px;
    border: 2px solid var(--dark);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 151, 54, 0.5);
}

.video-container {
    flex-basis: clamp(340px, 44vw, 520px);
    width: clamp(340px, 44vw, 520px);
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

/* Bottom section embeds: remove dark container chrome and make iframe fill cleanly */
.section-bottom-video .video-container {
    background: transparent;
    border: none;
    box-shadow: none;
}

.section-bottom-video .video-container iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 12px;
}

/* Desktop layout: keep the bottom video centered under each section */
@media (min-width: 992px) {
    .section-bottom-video .video-gallery {
        justify-content: center;
        overflow-x: visible;
    }
}

/* Play and Replay Button Styling */
.initial-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    background: var(--primary-green);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.initial-play-btn:hover {
    background: var(--accent-red);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
    gap: 1rem;
}

.replay-btn {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: var(--accent-red);
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.replay-btn:hover {
    background: var(--primary-green);
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.links-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.links-gallery::-webkit-scrollbar {
  height: 8px;
}

.links-gallery::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.gallery-item {
  flex: 0 0 280px;           /* Adjust width as needed */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
}

.gallery-item img {
  width: 100%;
  height: 200px;              /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

/* Keep Section 4 and This State gallery images larger and uncropped */
.links-gallery-section .gallery-item,
.this-state .state-image-gallery .gallery-item {
    flex: 0 0 340px;
}

.links-gallery-section .gallery-item img,
.this-state .state-image-gallery .gallery-item img {
    height: 260px;
    object-fit: contain;
    background: #fff;
}


.caption {
  display: block;
  width: 100%;
  margin: 0.75rem auto 0;
  padding: 12px 10px;
  background: #f8f8f8;
  text-align: center;
  font-weight: 700;
  font-size: 1.5rem;
  min-height: 50px;
  border: 2px solid var(--dark);
  border-radius: 6px;
}

/* Callout variant used for the highlighted caption in OK Palestine */
.caption-callout {
    color: #CF1127;
    text-shadow: 0 0 4px #009736, 0 0 8px #009736;
    -webkit-text-stroke: 1px #000;
}

/* ================ FOOTER ================ */
.site-footer {
    background: var(--light);
    padding: 2.5rem 1rem 1.5rem;
    border-top: 8px solid var(--dark);
    text-align: center;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-btn {
    background: var(--primary-green);
    color: white;
    border: 2px solid var(--dark);
    padding: 0.8rem 1.8rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.footer-btn:hover {
    background: var(--accent-red);
    transform: translateY(-3px);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.7rem;
    flex: 1;
    min-width: 220px;
}

.footer-img {
    width: 100%;
    max-width: 110px;
    height: auto;
    object-fit: cover;
}

.footer-content p {
    margin: 0;
    font-size: 1.1rem;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1.5rem;
}


/* ================ RESPONSIVE ================ */


/* ================SCROLLABLE GALLERY ============= */
.scrollable-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1.5rem;
    border: 5px solid #000;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(207, 17, 39, 0.55);
    margin: 2rem auto;
    max-width: 1200px;
}

.gallery-card {
    flex: 0 0 300px;
    border: 2px solid var(--dark);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.gallery-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-card a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reddoor-gallery {
    max-width: 1500px;
}

.reddoor-gallery .gallery-card {
    border: none;
    flex: 0 0 375px;
}

.reddoor-gallery .gallery-card img {
    height: 375px;
}

@media (max-width: 991px) {
    .reddoor-page main.reddoor-main {
        padding: 1.5rem 0.75rem;
    }

    .reddoor-gallery .gallery-card {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .reddoor-gallery .gallery-card img {
        height: 320px;
    }

    .reddoor-page .popup-images {
        flex-wrap: wrap;
        justify-content: center;
    }

    .reddoor-page .popup-images figure {
        flex: 0 0 min(100%, 325px);
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    .reddoor-gallery .gallery-card {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .reddoor-page .reddoor-title,
    .reddoor-page .reddoor-subtitle {
        font-size: 1.4rem;
    }

    .reddoor-gallery {
        padding: 0.85rem;
        gap: 0.85rem;
    }

    .reddoor-gallery .gallery-card img {
        height: 260px;
    }

    .reddoor-page .popup-main-image {
        max-width: 100%;
    }

    .reddoor-page .popup-images img {
        max-height: 242px;
    }
}

@media (min-width: 420px) and (max-width: 575px) {
    .reddoor-gallery .gallery-card {
        flex-basis: 100%;
        width: 100%;
    }
}

@media (max-width: 359px) {
    .reddoor-page .reddoor-container {
        padding: 0.7rem;
    }

    .reddoor-gallery .gallery-card img {
        height: 220px;
    }
}

.scrollable-gallery::-webkit-scrollbar {
    height: 10px;
}

.scrollable-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.scrollable-gallery::-webkit-scrollbar-track {
    background: transparent;
}

/* Letter page display updates: full-width hero image and softer page surface. */
.letter-page {
    background: #ededed;
}

.letter-page img {
    border: 0;
}

.letter-page .letter-main {
    width: 100%;
}

.letter-page .letter-section {
    width: 100%;
    padding-bottom: 1.5rem;
}

.letter-page .letter-top-image,
.letter-page .letter-bottom-image {
    width: min(100%, 1200px);
    margin: 1.5rem auto;
}

.letter-page .letter-media-top,
.letter-page .letter-media-gallery,
.letter-page .letter-media-bottom {
    width: 100%;
}

.letter-page .letter-top-image {
    width: 100%;
    min-height: clamp(280px, 75vw, 950px);
    margin: 1rem 0 1.5rem;
    border-radius: 0;
    background-image: url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/love/anas0.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.letter-page .letter-bottom-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

.letter-page .letter-media-bottom {
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.letter-page .letter-bottom-image {
    width: min(100%, 1200px);
    margin: 1.5rem auto;
}

.letter-page .letter-bottom-image a {
    display: flex;
    justify-content: center;
}

.letter-page .scrollable-gallery {
    border: 0;
    box-shadow: none;
}

.letter-page .letter-media-gallery .scrollable-gallery {
    width: min(100%, 1200px);
    margin: 1.5rem auto;
    padding: 1rem;
    gap: 1rem;
}

.letter-page .gallery-card {
    border: 0;
    flex: 0 0 clamp(180px, 28vw, 290px);
    border-radius: 10px;
}

.letter-page .letter-media-gallery .gallery-card img {
    width: 90%;
    height: 90%;
    margin: 5% auto;
    object-fit: contain;
}

.letter-page .scrollable-gallery .gallery-card img:hover {
    transform: scale(1.15);
}

.letter-page .letter-content {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.letter-page #letter-en,
.letter-page #letter-ar {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

.letter-page #letter-en p,
.letter-page #letter-ar {
    font-size: clamp(1rem, 1rem + 0.2vw, 1.15rem);
    line-height: 1.75;
}

.letter-page #letter-en p {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.letter-page .letter-content .lang-ar,
.letter-page .letter-content #letter-ar {
    text-align: center;
}

@media (max-width: 1024px) {
    .letter-page .letter-media-gallery .scrollable-gallery {
        width: min(100%, 960px);
    }

    .letter-page .gallery-card {
        flex: 0 0 clamp(170px, 34vw, 250px);
    }
}

@media (max-width: 768px) {
    .letter-page .letter-top-image {
        min-height: clamp(220px, 75vw, 620px);
        margin-top: 0.75rem;
    }

    .letter-page .letter-media-gallery .scrollable-gallery {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .letter-page .gallery-card {
        flex: 0 0 clamp(150px, 52vw, 220px);
    }

    .letter-page .letter-bottom-image {
        margin: 1rem auto;
    }

    .letter-page .letter-content {
        padding: 0 0.75rem;
    }
}

@media (max-width: 480px) {
    .letter-page .letter-top-image {
        min-height: 72vw;
    }

    .letter-page .letter-media-gallery .scrollable-gallery {
        padding: 0.5rem;
    }

    .letter-page .gallery-card {
        flex: 0 0 72vw;
    }

    .letter-page .caption {
        font-size: 1rem;
        padding: 10px 8px;
    }
}

@media (max-width: 360px) {
    .letter-page .letter-top-image {
        min-height: 80vw;
    }

    .letter-page .letter-content {
        padding: 0 0.55rem;
    }

    .letter-page #letter-en p,
    .letter-page #letter-ar {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .letter-page .gallery-card {
        flex: 0 0 80vw;
    }

    .letter-page .letter-media-gallery .gallery-card img {
        width: 88%;
        height: 88%;
        margin: 6% auto;
    }

    .letter-page .caption {
        font-size: 0.92rem;
        padding: 8px 6px;
    }
}

@media (min-width: 1600px) {
    .letter-page .letter-top-image {
        min-height: clamp(720px, 55vw, 980px);
    }

    .letter-page .letter-media-gallery .scrollable-gallery,
    .letter-page .letter-bottom-image,
    .letter-page .letter-content {
        width: min(100%, 1360px);
    }

    .letter-page .gallery-card {
        flex: 0 0 320px;
    }

    .letter-page #letter-en,
    .letter-page #letter-ar {
        max-width: 980px;
    }
}

/* Keep mixed-class galleries visually consistent with global gallery design. */
.video-gallery.scrollable-gallery,
.image-gallery.scrollable-gallery {
    padding: 10px 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    max-width: none;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Gallery Section Headings */
h2 {
    text-align: center;
    font-size: 2rem;
    margin: 2rem auto 1rem;
    max-width: 1200px;
    padding: 0 1.5rem;
    color: var(--dark);
}

main h2 {
    text-align: center;
    font-size: 2rem;
    margin: 2rem auto 1rem;
    max-width: 1200px;
    padding: 0 1.5rem;
    color: var(--dark);
}

.video-embed-section p {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}


/* ================ LINK.HTML PAGE ================ */
.link-page-main {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 0.75rem 1.25rem;
}

.link-page header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    text-align: center;
}

.link-page .header-center {
    width: 100%;
}

.link-page .main-nav {
    width: 100%;
}

.link-page .nav-menu {
    justify-content: center;
}

.link-page .header-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.link-page .header-home-btn {
    background: var(--primary-green);
    color: #000;
    border: 2px solid var(--dark);
    border-radius: 6px;
    padding: 0.65rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.link-page .gallery-intro {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 1rem 1.25rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45),
                0 4px 10px rgba(0, 0, 0, 0.3);
}

.link-page .gallery-intro p {
    max-width: 980px;
    margin: 0 auto;
}

.link-page .gallery-section-copy {
    max-width: 1100px;
    margin: 1.5rem auto 1rem;
    padding: 1rem 1.25rem;
    border: 4px solid #000;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.28),
                0 4px 10px rgba(0, 0, 0, 0.18);
}

.link-page .gallery-section-copy h2 {
    margin: 0 0 0.75rem;
    padding: 0;
}

.link-page .gallery-section-copy p {
    margin: 0;
    max-width: 960px;
}

.link-page .image-gallery-section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
}

.link-page .image-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    width: 100%;
}

.link-page .image-container {
    flex: 0 0 calc((100% - 2rem) / 3);
    max-width: calc((100% - 2rem) / 3);
    min-height: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 2px solid var(--dark);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 151, 54, 0.35);
    scroll-snap-align: start;
}

.link-page .image-container > img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    margin: 0;
}

.link-page .image-container p {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
    max-width: 100%;
}

.link-page .social-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.link-page .social-links .social-link img {
    width: 40px;
    height: 40px;
    border-width: 2px;
    border-radius: 8px;
    margin: 0;
    object-fit: cover;
}

.link-page .image-container > a {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dark);
    border-radius: 6px;
    padding: 0.45rem 0.8rem;
    background: var(--primary-green);
    color: #000;
    font-weight: 700;
}

.link-page .featured-image-galleries {
    width: 100%;
    min-width: 0;
    margin: 1.5rem auto;
    padding: clamp(0.5rem, 2vw, 1.25rem);
    border: 1px solid var(--gold);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 151, 54, 0.35);
}

.link-page .featured-image-galleries .gallery-section-copy {
    margin-top: 0;
    border: 0;
    box-shadow: none;
}

.link-page .featured-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
}

.link-page .featured-profile .image > img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    border: 0;
    box-shadow: none;
}

.link-page .featured-profile .social-link img {
    border: 0;
    box-shadow: none;
}

@media (min-width: 769px) {
    .link-page .featured-profile {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    }
}

.link-page .featured-image-galleries .image-container {
    min-height: 0;
    border: 0;
    box-shadow: none;
}

.link-page .featured-image-galleries .image-container img {
    border: 0;
    box-shadow: none;
}

.link-page .featured-image-galleries .image-container > img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
}

.link-page .button-container {
    max-width: 1000px;
    margin: 1.5rem auto 2rem;
    padding: 1rem;
    text-align: center;
}

.link-page .button-container > a > button {
    background: var(--primary-green);
    color: #000;
    border: 2px solid var(--dark);
    border-radius: 6px;
    padding: 0.65rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.link-page .disclaimer {
    margin: 1rem auto 0;
    max-width: 900px;
    font-size: 1rem;
    line-height: 1.5;
}

.link-page footer {
    border-top: 8px solid var(--dark);
    padding: 1.5rem 1rem;
    text-align: center;
}

.link-page #footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.link-page #footer-content .footer-img {
    max-width: 110px;
}


/* ================ EDU.HTML PAGE ================ */
.edu-page {
    background: var(--light);
}

.edu-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.edu-main h1,
.edu-main h2,
.edu-main h3,
.edu-main h4,
.edu-main h5,
.edu-main h6,
.edu-main p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.edu-content {
    max-width: 1200px;
    margin: 0 auto;
}

.edu-content h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin: 2rem 0 1rem;
    color: var(--dark);
}

.edu-content > p {
    max-width: 900px;
    margin: 1.5rem auto;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.6;
}

#image-section {
    max-width: 1000px;
    margin: 2rem auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.35);
}

#image-section img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.video-embed-section {
    max-width: 800px;
    margin: 3rem auto;
    text-align: center;
}

.video-embed-section p {
    text-align: center;
}

.edu-page .video-gallery-section {
    max-width: 1200px;
    margin: 2.8rem auto;
    border-radius: 18px;
    overflow: hidden;
    text-align: center;
}

.edu-page .video-gallery-section h2 {
    text-align: center;
}

.edu-page .edu-bottom-video {
    width: min(92%, 960px);
    max-width: 960px;
    margin: 3rem auto;
    padding: 0;
}

.edu-page .edu-bottom-video .video-wrapper {
    width: 100%;
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
    aspect-ratio: 16 / 9;
}

.edu-page .edu-bottom-video .video-wrapper iframe {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
}

.edu-page .video-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.5rem;
    scroll-behavior: smooth;
    width: 100%;
    justify-content: center;
}

.video-embed-section p {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 4px solid var(--dark);
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.35);
    background: #000;
}

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

.edu-page .image-gallery-section,
.edu-page .video-gallery-section {
    max-width: 1320px;
    margin: 2.8rem auto;
    border-radius: 18px;
    overflow: hidden;
}

.edu-page .image-gallery-section h2,
.edu-page .video-gallery-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin: 0 0 1.5rem;
    color: var(--dark);
}

.edu-page .image-gallery {
    display: flex;
    gap: 1.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.75rem;
    scroll-behavior: smooth;
    width: 100%;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.edu-page .image-gallery::-webkit-scrollbar {
    height: 10px;
}

.edu-page .image-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.edu-page .image-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.edu-page .image-container,
.edu-page .video-container {
    flex: 0 0 420px;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 16px rgba(0, 151, 54, 0.28);
    background: #fff;
    scroll-snap-align: start;
}

.edu-page .image-container img {
    width: 100%;
    height: 340px;
    object-fit: contain;
    display: block;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.edu-page .video-container video {
    width: 100%;
    height: 340px;
    object-fit: contain;
    display: block;
}

.edu-content-section {
    max-width: 1000px;
    margin: 2.5rem auto;
    padding: 2rem;
    border-radius: 16px;
    border: 5px solid var(--primary-green);
    box-shadow: 0 10px 30px rgba(0, 151, 54, 0.55);
    background: #fff;
    text-align: center;
}

.edu-content-section h3 {
    font-size: 1.6rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}

.edu-content-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* =========================
   MATH FLASHCARDS
========================= */

.math-flashcards {
    --flashcard-primary: #4f46e5;
    --flashcard-primary-dark: #3730a3;
    --flashcard-primary-light: #818cf8;
    --flashcard-accent: #10b981;
    --flashcard-correct: #059669;
    --flashcard-wrong: #dc2626;
    --flashcard-front: #ffffff;
    --flashcard-back: #eef2ff;
    --flashcard-text: #1e1b4b;
    --flashcard-muted: #64748b;
    --flashcard-border: #e2e8f0;
    --flashcard-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
    --flashcard-radius: 20px;
    --flashcard-transition: 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
    color: var(--flashcard-text);
}

.math-flashcards > .edu-content-section {
    background: linear-gradient(145deg, #e0e7ff 0%, #f0f9ff 50%, #ecfdf5 100%);
}

.math-flashcards h2,
.math-flashcards h3 {
    color: var(--flashcard-primary-dark);
}

.math-flashcards .math-instructions {
    width: min(100%, 680px);
    margin: 1.25rem auto 0;
    padding: 1rem 1.25rem 1rem 2.5rem;
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--flashcard-text);
    text-align: left;
}

.math-flashcards .math-instructions li {
    padding: 0.25rem 0;
}

.math-flashcards .math-instructions .lang-ar {
    text-align: right;
}

.flashcard-operations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.flashcard-operation {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: var(--flashcard-radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--flashcard-shadow);
}

.flashcard-operation[data-operation="addition"] {
    order: 1;
}

.flashcard-operation[data-operation="subtraction"] {
    order: 2;
}

.flashcard-operation[data-operation="multiplication"] {
    order: 3;
}

.flashcard-operation[data-operation="division"] {
    order: 4;
}

.flashcard-operation h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.math-flashcards .stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.math-flashcards .stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 0.85rem;
    font-weight: 600;
}

.math-flashcards .stat-correct {
    color: var(--flashcard-correct);
}

.math-flashcards .stat-wrong {
    color: var(--flashcard-wrong);
}

.math-flashcards .stat-timer,
.math-flashcards .stat-progress {
    color: var(--flashcard-primary);
}

.math-flashcards .card-scene {
    width: 100%;
    max-width: 340px;
    height: 220px;
    margin: 0 auto 1.25rem;
    perspective: 1200px;
}

.math-flashcards .card {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    border-radius: var(--flashcard-radius);
    background: transparent;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform var(--flashcard-transition);
}

.math-flashcards .card:focus-visible {
    outline: 3px solid var(--flashcard-primary-light);
    outline-offset: 4px;
}

.math-flashcards .card.is-flipped {
    transform: rotateY(180deg);
}

.math-flashcards .card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(79, 70, 229, 0.1);
    border-radius: var(--flashcard-radius);
    box-shadow: var(--flashcard-shadow);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.math-flashcards .card-front {
    background: var(--flashcard-front);
}

.math-flashcards .card-back {
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    transform: rotateY(180deg);
}

.math-flashcards .face-label {
    margin-bottom: 0.5rem;
    color: var(--flashcard-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.math-flashcards .question {
    font-size: clamp(2rem, 8vw, 2.6rem);
    font-weight: 700;
}

.math-flashcards .answer {
    color: var(--flashcard-primary);
    font-size: clamp(2.4rem, 9vw, 3.2rem);
    font-weight: 800;
}

.math-flashcards .hint {
    margin-top: 0.7rem;
    color: var(--flashcard-muted);
    font-size: 0.78rem;
}

.math-flashcards .score-btns {
    display: none;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.math-flashcards .answer-check {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    max-width: 360px;
    margin: 0 auto 1rem;
    flex-wrap: wrap;
}

.math-flashcards .answer-input {
    width: 86px;
    padding: 0.65rem 0.75rem;
    border: 2px solid var(--flashcard-border);
    border-radius: 16px;
    background: #fff;
    color: var(--flashcard-text);
    font: inherit;
    text-align: center;
}

.math-flashcards .answer-input:focus-visible {
    outline: 3px solid var(--flashcard-primary-light);
    outline-offset: 2px;
    border-color: var(--flashcard-primary);
}

.math-flashcards .btn-check {
    background: var(--flashcard-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.math-flashcards .btn-check:hover:not(:disabled) {
    background: var(--flashcard-correct);
}

.math-flashcards .answer-feedback {
    flex-basis: 100%;
    min-height: 1.4em;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.math-flashcards .answer-feedback.is-correct {
    color: var(--flashcard-correct);
}

.math-flashcards .answer-feedback.is-wrong {
    color: var(--flashcard-wrong);
}

.math-flashcards .score-btns.is-visible {
    display: flex;
}

.math-flashcards .controls {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    max-width: 400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.math-flashcards button {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.math-flashcards button:not(.card) {
    border-radius: 16px;
    text-shadow: 0 1px 2px rgba(30, 27, 75, 0.22);
}

.math-flashcards .btn-start {
    display: block;
    margin: 0 auto 1rem;
    background: var(--flashcard-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.math-flashcards .btn-start:hover:not(:disabled) {
    background: var(--flashcard-primary-dark);
}

.math-flashcards button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.math-flashcards .btn-flip {
    background: var(--flashcard-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.math-flashcards .btn-flip:hover:not(:disabled) {
    background: var(--flashcard-primary-dark);
}

.math-flashcards .btn-nav {
    border: 2px solid var(--flashcard-border);
    background: #fff;
    color: var(--flashcard-text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.math-flashcards .btn-nav:hover:not(:disabled) {
    border-color: var(--flashcard-primary);
    color: var(--flashcard-primary);
}

.math-flashcards .btn-correct {
    background: var(--flashcard-correct);
    color: #fff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.math-flashcards .btn-wrong {
    background: var(--flashcard-wrong);
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.math-flashcards .btn-shuffle {
    background: var(--flashcard-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.math-flashcards .btn-reset {
    border: 2px solid var(--flashcard-border);
    background: #f1f5f9;
    color: var(--flashcard-text);
}

.math-flashcards .footer-note {
    margin-top: 1.25rem;
    color: var(--flashcard-muted);
    font-size: 0.8rem;
    text-align: center;
}

.math-flashcards .results {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(30, 27, 75, 0.55);
    backdrop-filter: blur(4px);
}

.math-flashcards .results.is-visible {
    display: flex;
}

.math-flashcards .results-card {
    width: 100%;
    max-width: 340px;
    padding: 2rem 1.75rem;
    border-radius: var(--flashcard-radius);
    background: #fff;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: math-flashcard-pop-in 0.35s ease;
}

.math-flashcards .results-card h2 {
    margin-bottom: 0.4rem;
    color: var(--flashcard-primary-dark);
    font-size: 1.4rem;
}

.math-flashcards .score-big {
    margin: 0.6rem 0;
    color: var(--flashcard-primary);
    font-size: 2.6rem;
    font-weight: 800;
}

.math-flashcards .detail {
    margin-bottom: 0.25rem;
    color: var(--flashcard-muted);
    font-size: 0.95rem;
}

.math-flashcards .time-result {
    margin: 1rem 0 1.4rem;
    font-size: 1.05rem;
    font-weight: 600;
}

@keyframes math-flashcard-pop-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 900px) {
    .flashcard-operations {
        grid-template-columns: 1fr;
    }

    .flashcard-operation {
        width: min(100%, 520px);
        margin: 0 auto;
    }
}

@media (max-width: 400px) {
    .math-flashcards .card-scene {
        height: 200px;
    }

    .flashcard-operation {
        padding: 1rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .math-flashcards .card {
        transition: none;
    }

    .math-flashcards .results-card {
        animation: none;
    }
}


/* =========================
   MAIN GIFT
========================= */

.gift-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.gift-image {
    width: 700px;
    max-width: 90%;
    cursor: pointer;
    border: none;
    border-radius: 0;
    box-shadow: none;

    animation: giftShake 0.35s infinite;
    transform-origin: center;
}


/* =========================
   GIFT SHAKE ANIMATION
========================= */

@keyframes giftShake {

    0% {
        transform: translateX(0) rotate(0deg);
    }

    15% {
        transform: translateX(-8px) rotate(-1deg);
    }

    30% {
        transform: translateX(8px) rotate(1deg);
    }

    45% {
        transform: translateX(-7px) rotate(-1deg);
    }

    60% {
        transform: translateX(7px) rotate(1deg);
    }

    75% {
        transform: translateX(-4px) rotate(0deg);
    }

    100% {
        transform: translateX(0) rotate(0deg);
    }
}


/* Stop shaking after click */

.gift-image.stopped {
    animation: none;
}


/* =========================
   POPUP OVERLAY
========================= */

.popup-overlay {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 1000;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.75);
}


/* Show popup */

.popup-overlay.show {
    display: flex;
}


/* =========================
   POPUP BOX
========================= */

.popup {
    position: relative;
    width: 900px;
    max-width: 95%;
    max-height: 90vh;

    overflow-y: auto;

    padding: 40px 30px 30px;

    background: #fffdf6;
    border: 4px solid var(--primary-green);
    border-radius: 18px;

    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45), 0 6px 0 var(--primary-green);

    text-align: center;
}

.popup > * {
    position: relative;
    z-index: 1;
}

.balloon-cluster {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.balloon {
    position: absolute;
    width: 24px;
    height: 30px;
    border: 2px solid var(--dark);
    border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
    box-shadow: inset -4px -6px 0 rgba(255, 255, 255, 0.2);
}

.balloon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 2px;
    height: 18px;
    background: rgba(17, 17, 17, 0.65);
    transform: translateX(-50%);
}

.balloon-1 { top: -8px; left: 8%; background: linear-gradient(135deg, #ff9a8b, #ff5f6d); }
.balloon-2 { top: -10px; right: 12%; background: linear-gradient(135deg, #ffd86b, #f0c045); }
.balloon-3 { top: 16%; left: 2%; background: linear-gradient(135deg, #7ce0b6, #009736); }
.balloon-4 { top: 16%; right: 2%; background: linear-gradient(135deg, #9ad7ff, #1f9df7); }
.balloon-5 { bottom: 10%; left: 10%; background: linear-gradient(135deg, #ffb36c, #cf1127); }
.balloon-6 { bottom: 8%; right: 12%; background: linear-gradient(135deg, #c7a6ff, #7d5ce0); }

.popup::before {
    content: "";
    position: absolute;
    inset: 10px 12px 10px 12px;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 20%, #f4d03f 0 4px, transparent 5px),
        radial-gradient(circle at 25% 30%, #ef4444 0 4px, transparent 5px),
        radial-gradient(circle at 40% 18%, #2ec27e 0 4px, transparent 5px),
        radial-gradient(circle at 60% 22%, #f59e0b 0 4px, transparent 5px),
        radial-gradient(circle at 78% 18%, #1d4ed8 0 4px, transparent 5px),
        radial-gradient(circle at 90% 34%, #f472b6 0 4px, transparent 5px),
        radial-gradient(circle at 14% 75%, #22c55e 0 4px, transparent 5px),
        radial-gradient(circle at 30% 82%, #f59e0b 0 4px, transparent 5px),
        radial-gradient(circle at 50% 78%, #8b5cf6 0 4px, transparent 5px),
        radial-gradient(circle at 72% 86%, #ef4444 0 4px, transparent 5px),
        radial-gradient(circle at 88% 70%, #2dd4bf 0 4px, transparent 5px);
    opacity: 0.9;
}

/* =========================
   POPUP IMAGES
========================= */

.popup-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 0 auto 20px;
    max-width: 720px;
}

.popup-images figure {
    width: min(40%, 260px);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-images figure a {
    display: block;
    width: 100%;
    text-align: center;
}

.popup-images img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    border: 3px solid var(--primary-green);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 151, 54, 0.25);
    transition: transform 0.2s ease;
}

.popup-images img:hover {
    transform: scale(1.03);
}


/* =========================
   CAPTION
========================= */

.popup figcaption {
    margin-top: 15px;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
}

.popup figcaption .arabic {
    display: block;
    direction: rtl;
    font-family: Arial, sans-serif;
}


/* =========================
   BACK BUTTON
========================= */

.back-button {
    display: block;
    margin: 20px auto 0;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--dark);
    border-radius: 6px;
    background: var(--primary-green);
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 0 var(--dark);
    cursor: pointer;
    transition: all 0.25s ease;
}

.back-button:hover,
.back-button:focus-visible {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 var(--primary-green);
}

/* =========================
   POPUP MAIN IMAGE (single image above the popup-images row)
========================= */

.popup-main-image {
    display: flex;
    justify-content: center;
    margin: 0 auto 20px;
    max-width: 360px;
}

.popup-main-image img {
    width: 100%;
    height: auto;
    border: 3px solid var(--primary-green);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 151, 54, 0.25);
}

.reddoor-popup-trigger {
    cursor: pointer;
}

.reddoor-page .popup-main-image {
    max-width: 450px;
}

.reddoor-page .popup-images figure {
    width: min(40%, 325px);
}

.reddoor-page .popup-images img {
    max-height: 325px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .gift-container {
        padding: 20px;
    }

    .gift-image {
        max-width: 100%;
    }

    .popup {
        padding: 20px;
    }

    .popup-images {
        flex-direction: column;
    }

    .popup-images figure {
        width: 100%;
    }

    .popup figcaption {
        font-size: 1.2rem;
    }
}



/* ================ ABOUT.HTML PAGE ================ */
.about-page {
    background: var(--light);
}

.about-page .about-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.about-page .about-div-1,
.about-page .about-div-2,
.about-page .about-div-3 {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about-page .about-div-1,
.about-page .about-div-2,
.about-page .about-div-3 {
    border: 4px solid #000;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.55);
}

.about-page .about-div-1 h2,
.about-page .about-div-2 h3,
.about-page .about-div-3 h3 {
    font-size: 1.8rem;
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-page .about-div-2 p,
.about-page .about-div-3 p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    text-align: center;
    margin-bottom: 1.5rem;
}

.about-page .about-div-3 .image-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.5rem;
    scroll-behavior: smooth;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.about-page .about-div-3 .image-gallery::-webkit-scrollbar {
    height: 10px;
}

.about-page .about-div-3 .image-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.about-page .about-div-3 .image-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.about-page .about-div-3 .image-container {
    flex: 0 0 300px;
    width: 300px;
    aspect-ratio: 1 / 1;
    border: 2px solid #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 151, 54, 0.5);
    background: #fff;
}

.about-page .about-div-3 .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ================ FACE.HTML PAGE ================ */
.face-page {
    background: var(--light);
}

.face-page .face-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem 0.85rem 2.5rem;
}

.face-page .face-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: stretch;
    max-width: 1180px;
    margin: 0 auto 2rem;
    padding: 0.9rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.5);
}

.face-page .face-hero img {
    width: 92%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.65);
}

.face-page .face-hero img:first-child,
.face-page .face-hero img:last-child {
    justify-self: end;
}

.face-page .image-gallery-section {
    max-width: 1240px;
    margin: 2rem auto;
    padding: 1rem 0.85rem 1.2rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.5);
}

.face-page .face-gallery-section {
    scroll-margin-top: 1rem;
}

.face-page .image-gallery-section h2 {
    margin: 0 auto 0.8rem;
    padding: 0 0.75rem;
    text-align: center;
}

.face-page .image-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.8rem;
    scroll-behavior: smooth;
}

.face-page .image-gallery::-webkit-scrollbar {
    height: 10px;
}

.face-page .image-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.face-page .image-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.face-page .image-container {
    flex: 0 0 280px;
    width: 280px;
    aspect-ratio: 4 / 5;
    border: 2px solid #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 151, 54, 0.35);
    background: #fff;
}

.face-page .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-page .video-gallery-section {
    max-width: 1240px;
    margin: 2rem auto;
}

.face-page .video-gallery.scrollable-gallery {
    gap: 1rem;
    padding: 0.8rem;
}

.face-page .video-gallery-section .video-container {
    flex: 0 0 320px;
    width: 320px;
}

.face-page .video-gallery-section .video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 991px) {
    .face-page .face-gallery-top .image-gallery {
        flex-direction: column;
        align-items: center;
        overflow-x: visible;
        overflow-y: visible;
        gap: 0.8rem;
        padding: 0.7rem;
    }

    .face-page .face-gallery-top .image-container {
        flex: 0 0 auto;
        width: min(100%, 460px);
        max-width: 100%;
    }
}


/* ================ LESLIE.HTML PAGE ================ */
.leslie-page {
    background: var(--light);
}

.leslie-page main.leslie-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem 0.85rem 2.5rem;
}

.leslie-page .leslie-1,
.leslie-page .leslie-2,
.leslie-page .leslie-3,
.leslie-page .scroll-panels {
    max-width: 1240px;
    margin: 2rem auto;
    padding: 1rem 0.85rem 1.2rem;
    border: 4px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.5);
}

.leslie-page .leslie-1,
.leslie-page .leslie-2 {
    min-height: 120px;
}

.leslie-page .leslie-1 {
    display: flex;
    align-items: stretch;
    gap: 1rem;
}

.leslie-page .leslie-1-media {
    flex: 0 0 clamp(240px, 30vw, 320px);
}

.leslie-page .leslie-1-media img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    border: 3px solid #000;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 151, 54, 0.35);
}

.leslie-page .leslie-1-bio {
    flex: 1;
    border: 3px solid #000;
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 4px 12px rgba(207, 17, 39, 0.25);
    display: flex;
    align-items: center;
}

.leslie-page .leslie-1-bio p {
    margin: 0;
    line-height: 1.65;
}

.leslie-page .leslie-2 h2,
.leslie-page .leslie-3 h2,
.leslie-page .image-gallery-section h2,
.leslie-page .scroll-panel h2,
.leslie-page .scroll-panel h3,
.leslie-page .scroll-panel h4 {
    text-align: center;
}

.leslie-page .image-gallery-section {
    margin: 1.5rem auto;
    padding: 1rem 0.85rem 1.15rem;
    border: 3px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(0, 151, 54, 0.26);
}

.leslie-page .image-gallery-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.8rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) transparent;
}

.leslie-page .image-gallery-scroll::-webkit-scrollbar {
    height: 10px;
}

.leslie-page .image-gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.leslie-page .image-gallery-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.leslie-page .image-gallery-scroll img {
    flex: 0 0 calc((100% - 2rem) / 3);
    width: calc((100% - 2rem) / 3);
    height: 360px;
    object-fit: cover;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 151, 54, 0.35);
}

.leslie-page .scrollable-gallery {
    padding: 0.8rem;
    border: none;
}

.leslie-page .gallery-card {
    flex: 0 0 calc((100% - 2rem) / 3);
    width: calc((100% - 2rem) / 3);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 151, 54, 0.35);
}

.leslie-page .gallery-card img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: contain;
    border: none;
    background: #fff;
}

.leslie-page .leslie-video-gallery {
    scroll-snap-type: x mandatory;
}

.leslie-page .leslie-video-gallery .video-card {
    aspect-ratio: 16 / 9;
    background: #000;
    scroll-snap-align: start;
}

.leslie-page .leslie-video-gallery .video-card iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.leslie-page .eighth-front-gallery img {
    border: none;
}

.leslie-page .scroll-panels {
    display: grid;
    gap: 1.2rem;
}

.leslie-page .scroll-panel {
    border: 3px solid #000;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(207, 17, 39, 0.35);
}

.leslie-page .scroll-panel-body {
    max-height: 72vh;
    overflow: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) transparent;
}

.leslie-page .cover-letter-img {
    display: block;
    width: min(1100px, 100%);
    margin: 2rem auto 0;
    border: 4px solid #000;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(207, 17, 39, 0.45);
}

/* ================ 8TH FRONT - TIPS & TRICKS ================ */
.eighth-front-tips {
    width: min(100%, 1100px);
    margin: 2rem auto;
    border: 4px solid var(--dark);
    border-radius: 14px;
    overflow: hidden;
    background: var(--light);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.eighth-front-tips-heading {
    margin: 0;
    padding: 1rem 1.25rem;
    background: var(--primary-green);
    color: var(--light);
    text-align: center;
    border-bottom: 4px solid var(--dark);
    font-size: 1.6rem;
}

.eighth-front-tips-body {
    padding: 1.25rem 2rem 1.5rem;
    background: var(--light);
}

.eighth-front-tips-body ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.eighth-front-tips-body li {
    margin-bottom: 0.9rem;
    line-height: 1.6;
}

.eighth-front-tips-body li:last-child {
    margin-bottom: 0;
}

.eighth-front-intro-summary {
    text-align: center;
    width: min(100%, 800px);
    margin-left: auto;
    margin-right: auto;
}

.eighth-front-table-wrapper {
    margin: 2rem auto;
    padding: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--light);
    border: 1px solid rgba(17, 17, 17, 0.35);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(207, 17, 39, 0.24), 0 10px 24px rgba(0, 0, 0, 0.12);
}

.eighth-front-table {
    width: min(100%, 1100px);
    min-width: 480px;
    margin: 0 auto;
    border-collapse: collapse;
    background: var(--light);
    color: var(--dark);
    border: 2px solid var(--dark);
    overflow: hidden;
}

.eighth-front-table th,
.eighth-front-table td {
    padding: 0.9rem 1rem;
    border: 1px solid #a6aea4;
    text-align: left;
    vertical-align: top;
    line-height: 1.55;
}

.eighth-front-table th {
    background: var(--dark);
    color: var(--light);
    font-size: 1.05rem;
}

.eighth-front-table tbody tr:nth-child(even) td {
    background: #f1f4ef;
}

.eighth-front-table tbody tr:hover td {
    background: rgba(0, 151, 54, 0.1);
}

.eighth-front-table .platform-cell {
    width: 42%;
    min-width: 220px;
    text-align: left;
    vertical-align: top;
    font-weight: 400;
}

.eighth-front-table .platform-info {
    text-align: center;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.eighth-front-table .platform-info a {
    display: block;
    margin-bottom: 0.55rem;
}

.eighth-front-table .platform-info img,
.eighth-front-table .platform-placeholder {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto;
    object-fit: contain;
}

.eighth-front-table .cell-pros {
    font-weight: 400;
}

.eighth-front-table .platform-placeholder {
    width: auto;
    height: auto;
    padding: 0.75rem 0.4rem;
    border: 1px dashed var(--primary-green);
    color: var(--primary-green);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.eighth-front-table a {
    color: var(--primary-green);
    text-decoration: none;
}

.eighth-front-table a:hover,
.eighth-front-table a:focus-visible {
    color: var(--accent-red);
    text-decoration: underline;
}

.eighth-front-table .table-read-more {
    display: none;
}

@media (max-width: 768px) {
    .eighth-front-table-wrapper {
        padding: 1rem;
    }

    .eighth-front-table th,
    .eighth-front-table td {
        padding: 0.65rem 0.7rem;
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .eighth-front-table .table-read-more {
        display: inline-block;
        margin-top: 0.55rem;
        padding: 0.35rem 0.7rem;
        border: 1px solid var(--dark);
        border-radius: 999px;
        background: #f1f4ef;
        color: var(--dark);
        font: inherit;
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
    }

    .eighth-front-table .table-read-more:hover,
    .eighth-front-table .table-read-more:focus-visible {
        background: var(--dark);
        color: var(--light);
    }

    .eighth-front-table .table-cell-copy {
        position: relative;
    }

    .eighth-front-table .table-cell-copy.is-collapsed {
        max-height: 5.8em;
        overflow: hidden;
    }

    .eighth-front-table .table-cell-copy.is-collapsed::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 2.1em;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--light));
        pointer-events: none;
    }
}

@media (max-width: 500px) {
    .eighth-front-table-wrapper {
        padding: 0.6rem;
    }

    .eighth-front-table {
        min-width: 0;
        width: 100%;
    }

    .eighth-front-table th,
    .eighth-front-table td {
        padding: 0.55rem 0.5rem;
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .eighth-front-table th {
        font-size: 0.85rem;
    }

    .eighth-front-table .platform-cell {
        width: auto;
        min-width: 0;
    }

    .eighth-front-table .platform-info img,
    .eighth-front-table .platform-placeholder {
        width: 38px;
        height: 38px;
    }

    .eighth-front-table .platform-placeholder {
        font-size: 0.7rem;
        padding: 0.5rem 0.3rem;
    }

    .eighth-front-table .table-read-more {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

.eighth-front-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 1.5rem;
    padding: 0.25rem 0 0.75rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) transparent;
    -webkit-overflow-scrolling: touch;
}

.eighth-front-gallery::-webkit-scrollbar {
    height: 8px;
}

.eighth-front-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

.eighth-front-gallery figure {
    flex: 0 0 calc((100% - 2rem) / 3);
    width: calc((100% - 2rem) / 3);
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f4f4;
    scroll-snap-align: start;
}

.eighth-front-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 600px) {
    .eighth-front-tips {
        margin: 1.5rem auto;
    }

    .eighth-front-tips-heading {
        font-size: 1.35rem;
    }

    .eighth-front-tips-body {
        padding: 1rem 1.25rem 1.25rem;
    }
}


/* ================ Countdown Timer Styling Located in Index ================ */
/* Countdown Timer Styling */
.countdown-section {
    text-align: center;
    padding: 2rem 1rem;
}

.countdown-section .countdown-video-wrapper {
    width: min(100%, 960px);
    margin: 2rem auto 0;
}

.countdown-section .countdown-image {
    display: block;
    width: min(100%, 450px);
    max-width: 450px;
    height: auto;
    margin: 1rem auto 1.5rem;
}

.countdown-image-breathing {
    animation: countdownBreathe 1.4s ease-in-out infinite;
    transform-origin: center;
}

.rose-garden-entry {
    width: min(100%, 1100px);
    margin: 0 auto clamp(2rem, 5vw, 4rem);
    padding: 0 1rem;
}

.rose-garden-entry__link {
    display: block;
    width: 100%;
    border-radius: 18px;
}

.rose-garden-entry__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 3px solid var(--dark);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(17, 17, 17, .3);
    transition: transform .3s ease, box-shadow .3s ease;
}

.rose-garden-entry__link:hover .rose-garden-entry__image {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(17, 17, 17, .38);
}

.rose-garden-entry__link:focus-visible {
    outline: 4px solid var(--gold);
    outline-offset: 5px;
}

.letter-feature {
    width: min(100%, 900px);
    margin: 0 auto clamp(2rem, 5vw, 4rem);
    padding: 0 1rem;
}

.letter-feature-trigger {
    display: block;
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    cursor: pointer;
}

.letter-feature-trigger:focus-visible {
    outline: 4px solid var(--gold);
    outline-offset: 5px;
}

.letter-feature-trigger .breathing-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 3px solid var(--dark);
    border-radius: 18px;
    object-fit: contain;
    box-shadow: 0 14px 34px rgba(17, 17, 17, .3);
    animation: countdownBreathe 3.6s ease-in-out infinite;
    transform-origin: center;
}

.letter-feature-trigger:hover .breathing-image {
    box-shadow: 0 18px 42px rgba(207, 17, 39, .38), 0 5px 0 var(--primary-green);
}

/* Index Explore: editorial grid with uncropped artwork. */
.explore-section {
    width: min(94%, 1500px);
    max-width: 1500px;
    margin: 4rem auto;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 2px solid var(--gold);
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}

.explore-heading {
    margin-bottom: 2.5rem;
    text-align: center;
}

.explore-heading .section-title {
    position: relative;
    margin-bottom: .75rem;
    padding-top: 2.25rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 7vw, 5.25rem);
    font-weight: 700;
    line-height: 1;
}

.explore-heading .section-title::before {
    content: "❧";
    position: absolute;
    top: -.75rem;
    left: 50%;
    color: var(--primary-green);
    font-size: 2.4rem;
    font-weight: 400;
    transform: translateX(-50%);
}

.explore-kicker {
    margin: 0 auto;
    color: var(--dark);
    font-size: clamp(.72rem, 1.2vw, .95rem);
    font-weight: 700;
    letter-spacing: .38em;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
}

.explore-intro {
    margin: .45rem auto 0;
    color: #5f625f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.15rem, 2.2vw, 1.65rem);
    font-style: italic;
    text-align: center;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem 2rem;
    width: 100%;
}

.explore-card {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

.explore-letter-trigger {
    appearance: none;
    cursor: pointer;
}

.explore-image-frame {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.explore-image-frame img {
    display: block;
    width: 100%;
    height: 330px;
    object-fit: contain;
    object-position: center;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    transition: transform .3s ease, opacity .3s ease;
}

.explore-card:hover .explore-image-frame img {
    transform: scale(1.025);
}

.explore-card-title {
    margin: .8rem 0 0;
    padding: 0;
    color: var(--dark);
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    transition: color .3s ease;
}

.explore-card-title a {
    color: inherit;
    text-decoration: none;
}

.explore-card:hover .explore-card-title {
    color: var(--accent-red);
}

[dir="rtl"] .explore-card-title,
html[lang="ar"] .explore-card-title {
    direction: rtl;
    text-align: center;
}

.explore-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    min-width: 180px;
    min-height: 48px;
    margin-top: 1.15rem;
    padding: .7rem 1.35rem;
    border: 0;
    border-radius: 999px;
    background: var(--gold);
    color: var(--dark);
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(17, 17, 17, .16);
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
}

.explore-button:hover {
    background: var(--primary-green);
    color: var(--light);
    transform: translateY(-2px);
}

.explore-button:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 4px;
}

.explore-card .breathing-image {
    animation: gentle-breathe 4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes gentle-breathe {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.025);
    }
}

@media (max-width: 1000px) {
    .explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem 1.5rem;
    }

    .explore-image-frame img {
        height: 310px;
    }
}

@media (max-width: 650px) {
    .explore-section {
        width: min(92%, 600px);
        margin: 3rem auto;
    }

    .explore-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .explore-image-frame {
        min-height: auto;
    }

    .explore-image-frame img {
        width: 100%;
        height: auto;
        max-height: 420px;
        object-fit: contain;
    }

    .explore-card-title {
        font-size: 1.35rem;
    }
}

body.letter-modal-open { overflow: hidden; }

.letter-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: clamp(.75rem, 3vw, 2rem);
    overflow-y: auto;
    background: rgba(0, 0, 0, .78);
    opacity: 0;
    transition: opacity .25s ease;
}

.letter-modal[hidden] { display: none; }
.letter-modal.is-open { opacity: 1; }

.letter-modal-content {
    position: relative;
    isolation: isolate;
    width: min(100%, 850px);
    max-height: calc(100svh - 2rem);
    margin: auto;
    padding: clamp(2rem, 7vw, 5rem) clamp(1.25rem, 6vw, 4rem);
    overflow-y: auto;
    border: 4px solid var(--dark);
    border-radius: 18px;
    background-color: #423733;
    background-image: linear-gradient(rgba(20, 17, 15, .58), rgba(20, 17, 15, .72)), url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/index/letter2.jpeg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--light);
    box-shadow: 0 16px 45px rgba(0, 0, 0, .55), 0 7px 0 var(--primary-green);
    text-align: center;
}

.letter-modal-content h2 {
    margin: 0 auto 1.25rem;
    padding: 0;
    color: var(--light);
    text-shadow: 0 2px 6px rgba(0, 0, 0, .9);
}

.letter-modal-content p {
    max-width: 650px;
    margin: 0 auto clamp(2rem, 6vw, 4rem);
    padding: 1rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, .48);
    color: var(--light);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

.letter-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 48px;
    padding: .75rem 1.4rem;
    border: 2px solid var(--dark);
    border-radius: 7px;
    background: var(--primary-green);
    color: var(--dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--dark);
}

.letter-back-button:hover { background: var(--accent-red); }
.letter-back-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.letter-modal-lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    padding: .5rem 1.1rem;
    border: 2px solid var(--dark);
    border-radius: 999px;
    background: var(--light);
    color: var(--dark);
    font: inherit;
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--dark);
}

.letter-modal-lang-toggle:hover { background: var(--gold); }
.letter-modal-lang-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

@media (max-width: 768px) {
    .rose-garden-entry {
        margin-bottom: 2rem;
        padding: 0 .5rem;
    }

    .rose-garden-entry__image {
        border-width: 2px;
        border-radius: 13px;
    }

    .letter-feature { margin-bottom: 2rem; padding: 0 .5rem; }
    .letter-feature-trigger .breathing-image { border-width: 2px; border-radius: 13px; }
    .letter-modal { padding: .65rem; }
    .letter-modal-content { max-height: calc(100svh - 1.3rem); padding: 1.5rem 1rem; border-width: 3px; border-radius: 12px; }
    .letter-modal-content h2 { font-size: 1.5rem; }
    .letter-modal-content p { margin-bottom: 2rem; font-size: 1rem; }
    .letter-back-button { width: 100%; max-width: 320px; }
}

@keyframes countdownBreathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .countdown-image-breathing {
        animation: none;
    }

    .letter-feature-trigger .breathing-image,
    .explore-card .breathing-image { animation: none; }
    .letter-modal { transition: none; }
}

/* Main timer container */
#countdown {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    flex-wrap: wrap;
    border: 4px solid #ff1e1e;   /* Bright red border */
    border-radius: 20px;
    padding: 2rem;

    box-shadow:
        0 0 15px rgba(255, 30, 30, 0.6),
        0 0 35px rgba(255, 30, 30, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.05);

    max-width: 900px;
    margin: 0 auto;
}

/* Individual time boxes */
.time-box {
    font-family: "Orbitron", sans-serif;
    border: 2px solid rgba(255, 30, 30, 0.8);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    min-width: 140px;
    flex: 1 1 150px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.time-box:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 0 20px rgba(255, 30, 30, 0.6);
}

/* Countdown numbers */
.time-box span {
    display: block;
    font-family: "Orbitron", sans-serif;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    text-shadow:
        0 0 5px rgba(255,255,255,0.7),
        0 0 10px rgba(255,30,30,0.8),
        0 0 20px rgba(255,30,30,0.6);
    animation: pulse 1.5s infinite;
}

/* Labels */
.time-box p {
    margin-top: 0.75rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffb3b3;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Pulse animation for numbers */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow:
            0 0 5px rgba(255,255,255,0.7),
            0 0 10px rgba(255,30,30,0.8),
            0 0 20px rgba(255,30,30,0.6);
    }
    50% {
        transform: scale(1.05);
        text-shadow:
            0 0 8px rgba(255,255,255,0.9),
            0 0 15px rgba(255,30,30,1),
            0 0 30px rgba(255,30,30,0.8);
    }
}

/* -----------------------------
   Mobile & Tablet Media Queries
--------------------------------*/

/* Ordered by size: large desktop -> small mobile. */
/* Feature queries are listed last. */

/* ================ Extra Large Desktop MEDIA QUERIES ================ */
@media (min-width: 1600px) {
        .header-container,
        .section,
        .legal-section,
        .link-page-main,
        .edu-main,
        .face-page .face-main,
        .leslie-page main.leslie-page {
            max-width: 1440px;
        }

        .site-title {
            font-size: 3rem;
        }

        .section-title {
            font-size: 2.5rem;
        }

        main p {
            font-size: 1.35rem;
            max-width: 720px;
        }

        .video-container {
            width: clamp(420px, 34vw, 620px);
            flex-basis: clamp(420px, 34vw, 620px);
        }

        .gallery-item,
        .gallery-card,
        .faith-link-item {
            flex-basis: 340px;
        }
}

/* ================ Large Desktop MEDIA QUERIES ================ */

@media (min-width: 1200px) and (max-width: 1599px) {
        .section,
        .legal-section {
            padding: 2.4rem 1.4rem;
        }

        .hero-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .link-page .image-container {
            flex: 0 0 calc((100% - 2rem) / 3);
            max-width: calc((100% - 2rem) / 3);
        }
}
/* ================ Medium Desktop MEDIA QUERIES ================ */
@media (min-width: 992px) and (max-width: 1199px) {
        .site-title {
            font-size: 2.35rem;
        }

        .section {
            padding: 2.1rem 1.15rem;
        }

        .hero-page main,
        .united-main,
        .edu-main,
        .face-page .face-main,
        .leslie-page main.leslie-page {
            padding-left: 0.85rem;
            padding-right: 0.85rem;
        }

        .hero-page .card,
        .hero-page .image-container {
            flex: 0 0 320px;
            width: 320px;
        }

        .video-container {
            width: clamp(320px, 42vw, 480px);
            flex-basis: clamp(320px, 42vw, 480px);
        }

        .gallery-item,
        .gallery-card {
            flex-basis: 280px;
        }

        .link-page .image-container {
            flex: 0 0 calc((100% - 1rem) / 2);
            max-width: calc((100% - 1rem) / 2);
            min-height: 430px;
        }
}
/* ================ Compact Desktop MEDIA QUERIES ================ */
@media (min-width: 769px) and (max-width: 991px) {
        .header-container {
            gap: 1rem;
        }

        .site-title {
            font-size: 2.15rem;
        }

        .section-title {
            font-size: 2rem;
        }

        .section,
        .legal-section {
            padding: 1.75rem 1rem;
            margin: 1.75rem auto;
        }

        .hero-grid,
        .content-grid {
            grid-template-columns: 1fr;
            gap: 1.15rem;
        }

        .day-journal .content-grid {
            grid-template-columns: 1fr;
        }

        .hero-page .card,
        .hero-page .image-container,
        .gallery-item,
        .gallery-card,
        .faith-link-item {
            flex: 0 0 280px;
            width: 280px;
        }

        .video-container {
            width: min(100%, 520px);
            flex-basis: min(100%, 520px);
        }

        .link-page .image-container {
            flex: 0 0 calc((100% - 1rem) / 2);
            max-width: calc((100% - 1rem) / 2);
            min-height: 410px;
        }

        .face-page .face-hero {
            grid-template-columns: 1fr;
        }
}

/* ================ Tablet MEDIA QUERIES ================ */
@media (min-width: 768px) {
        .legal-section-1 .legal-box-1,
        .legal-section-1 .legal-box-2,
        .legal-section-1 .legal-box-3 {
            padding: 1.25rem;
        }

        .legal-section-1 .legal-box-1 p,
        .legal-section-1 .legal-box-2 p,
        .legal-section-1 .legal-box-3 p {
            margin-left: auto;
            margin-right: auto;
        }

        .legal-section-2 .legal-box-4 {
            padding: 1.25rem;
        }

        .legal-section-2 .legal-box-4 a {
            display: block;
            margin: 0 auto;
        }

        .legal-section-2 .legal-box-4 img {
            margin: 0 auto;
        }

        .legal-section-2 .legal-box-5 {
            padding: 1.25rem;
        }

        .content-grid {
            grid-template-columns: 1fr 1fr;
        }

        .media-content {
            min-height: 100%;
        }

        .hero-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            column-gap: 1.5rem;
            align-items: start;
        }

        .hero-grid > * {
            height: auto;
        }

        .hero-media,
        .hero-bio,
        .hero-gallery {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .hero-media > img {
            max-width: none;
            width: 100%;
            flex: 1;
            min-height: 340px;
            object-fit: cover;
        }

        .hero-media .social-link img {
            max-width: 60px;
        }

        .hero-gallery .video-gallery {
            flex: none;
            min-height: 0;
        }

        .ok-humanity .media-grid {
            flex-direction: column;
            align-items: center;
            gap: 2.5rem;
            padding-right: 1.875rem;
            height: 100%;
        }

        .ok-humanity .media-grid img {
            width: auto;
            max-width: 370px;
        }
}

/* ================ Mobile MEDIA QUERIES ================ */

@media (max-width: 768px) {
        .hero-page .hero-section-3 .image-container {
            flex: 0 0 260px;
            width: 260px;
        }

        .hero-page #sources-gallery h3 {
            font-size: 1.8rem;
        }

        .hero-page main {
            padding: 1.25rem 0.75rem 2rem;
            gap: 1.25rem;
        }

        .hero-page .hero-section-1,
        .hero-page .hero-section-2,
        .hero-page .hero-section-3 {
            padding: 1rem 0.75rem;
        }

        .hero-page #section-dedication,
        .hero-page #section-journalists {
            max-width: 100%;
        }

        .hero-page #section-dedication p,
        .hero-page #section-journalists p {
            max-width: 100%;
        }

        .hero-page .card {
            flex: 0 0 260px;
            width: 260px;
        }

        .hero-page .card-image {
            aspect-ratio: 4 / 3;
        }

        .hero-page .card-links img {
            max-width: 36px;
        }

        .hero-page .video-container {
            min-width: 100%;
            width: 100%;
        }

        .hero-page #sources-gallery .image-gallery,
        .hero-page .hero-section-3 .image-gallery {
            padding: 0.75rem 0 1rem;
        }

        .hero-page #sources-gallery .image-container,
        .hero-page .hero-section-3 .image-container {
            flex: 0 0 260px;
            width: 260px;
        }

        .hero-page .disclaimer p {
            font-size: 0.55rem;
            line-height: 1.3;
        }

        .contact-main {
            padding: 2rem 1rem 3rem;
        }

        .contact-wrapper {
            padding: 1.5rem;
        }

        .contact-page .contact-form p {
            font-size: 1.1rem;
        }

        .contact-form-fields button {
            width: 100%;
        }

        .legal-section {
            margin: 1.25rem auto;
            padding: 1rem;
        }

        .legal-section h2,
        .legal-box h2 {
            font-size: 1.5rem;
            margin-bottom: 0.85rem;
        }

        .legal-box h3 {
            font-size: 1.2rem;
        }

        .legal-box {
            min-height: auto;
            padding: 0.85rem;
        }

        .legal-box p {
            max-width: 100%;
            font-size: 1rem;
            line-height: 1.5;
        }

        .legal-section-2 .legal-box-4 img,
        .legal-section-3 .legal-box-7 img {
            width: 100%;
            max-width: 320px;
            height: auto;
        }

        .legal-section-2 .legal-box-6 .scrollable-gallery {
            padding: 0.75rem;
            gap: 0.75rem;
            border-width: 3px;
        }

        .legal-section-2 .legal-box-6 .gallery-item {
            flex: 0 0 200px;
        }

        .legal-section-2 .legal-box-6 .gallery-item img {
            height: 160px;
        }

        .site-header {
            position: static;
        }

        .header-container {
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .header-center {
            width: 100%;
        }

        .menu-toggle {
            display: block;
            width: 100%;
            text-align: center;
            margin-top: 1rem;
            padding: 0.5rem;
            font-size: 2.1rem;
        }

        .main-nav {
            display: none;
            width: 100%;
            margin-top: 1rem;
            position: static;
            background: white;
            border-top: 4px solid var(--dark);
            padding: 1rem;
        }

        .main-nav.active {
            display: block;
        }

        .nav-menu {
            flex-direction: column;
            align-items: center;
        }

        .logo-img {
            height: 85px;
            max-width: 130px;
        }

        .site-title {
            font-size: 2.1rem;
        }

        main {
            min-height: auto;
            padding: 1.5rem 0.85rem;
        }

        main p {
            max-width: 100%;
            font-size: 1.05rem;
            line-height: 1.55;
        }

        .section {
            padding: 2rem 1rem;
            margin: 1.8rem auto;
            width: 100%;
        }

        .section-title {
            font-size: 1.9rem;
        }

        .section-subtitle {
            font-size: 1.2rem;
            margin: 0.2rem 0 0.55rem;
        }

        .section-intro {
            font-size: 1rem;
            margin: 0 auto 1rem;
        }

        .day-journal .section-title {
            font-size: 2rem;
            margin-bottom: 1.25rem;
        }

        .day-journal .quote-of-day,
        .day-journal .quote-text {
            max-width: 100%;
        }

        .day-journal .quote-title {
            font-size: 1.15rem;
        }

        .day-journal .section-date {
            font-size: 1.1rem;
        }

        .content-grid,
        .hero-grid {
            gap: 1rem;
        }

        .text-content {
            padding: 1rem;
        }

        .media-content {
            min-height: auto;
        }

        .day-journal .content-grid {
            grid-template-columns: 1fr;
        }

        .journal-media {
            width: 100%;
        }

        .journal-media .div-img {
            width: 100%;
            max-width: 100%;
        }

        .day-journal .text-content {
            padding: 0;
        }

        .ok-humanity .media-grid {
            gap: 1rem;
            padding-right: 0;
        }

        .ok-humanity .media-grid img {
            max-width: 100%;
            width: 100%;
        }

        .hero-media {
            align-items: center;
            gap: 1.25rem;
        }

        .footer-row {
            flex-direction: column;
        }

        .footer-content {
            order: 0;
        }

        .footer-btn-left {
            order: 1;
        }

        .footer-btn-right {
            order: 2;
        }

        .footer-img {
            max-width: 90px;
        }

        .hero-media > img {
            max-width: 100%;
            width: 100%;
        }

        .hero-media .social-link img {
            max-width: 72px;
        }

        .tribute-img {
            width: 100%;
            margin-top: 1.25rem;
        }

        .hero-bio {
            padding: 1rem;
        }

        .hero-gallery .video-gallery {
            padding: 0.5rem 0 0.75rem;
            scroll-snap-type: x mandatory;
        }

        .hero-gallery .video-container {
            min-width: 100%;
            height: 250px;
            scroll-snap-align: start;
        }

        .hero-gallery .video-container video {
            object-fit: cover;
        }

        .video-embed-section {
            padding-left: 0;
            padding-right: 0;
            margin-top: 1.25rem;
            max-width: 100%;
        }

        .faith-link-item {
            flex-basis: 230px;
        }

        .faith-link-item img {
            height: 270px;
        }

        .prayer-body {
            padding: 1.15rem;
        }

        .prayer-copy {
            font-size: 1rem;
        }

        .links-gallery-section .gallery-item,
        .this-state .state-image-gallery .gallery-item {
            flex: 0 0 280px;
        }

        .links-gallery-section .gallery-item img,
        .this-state .state-image-gallery .gallery-item img {
            height: 220px;
        }

        .scrollable-gallery {
            gap: 1rem;
            padding: 1rem;
            margin: 1.5rem auto;
        }

        .gallery-card {
            flex: 0 0 250px;
        }

        .gallery-card img {
            height: 250px;
        }

        main h2 {
            font-size: 1.5rem;
            margin: 1.5rem auto 0.75rem;
            padding: 0 1rem;
        }

        .link-page-main {
            padding: 0 0.5rem 1rem;
        }

        .link-page header {
            padding: 1rem 0.75rem;
        }

        .link-page .gallery-intro {
            margin: 1rem auto;
            padding: 0.85rem;
        }

        .link-page .gallery-section-copy {
            margin: 1rem auto 0.85rem;
            padding: 0.85rem;
        }

        .link-page .gallery-intro h2 {
            font-size: 1.5rem;
        }

        .link-page .gallery-section-copy h2 {
            font-size: 1.5rem;
        }

        .link-page .gallery-intro p {
            font-size: 0.98rem;
            line-height: 1.45;
        }

        .link-page .gallery-section-copy p {
            font-size: 0.98rem;
            line-height: 1.45;
        }

        .link-page .image-gallery {
            padding: 0.75rem;
            gap: 0.75rem;
        }

        .link-page .image-container {
            flex: 0 0 100%;
            max-width: 100%;
            min-height: 420px;
            padding: 0.75rem;
        }

        .link-page .image-container > img {
            height: 220px;
        }

        .edu-main {
            padding: 1.25rem 0.6rem;
        }

        .edu-content {
            max-width: 100%;
        }

        .edu-content h2 {
            font-size: 1.65rem;
            margin: 1.25rem 0 0.7rem;
        }

        .edu-content > p {
            font-size: 0.95rem;
            margin: 0.95rem auto;
            max-width: 100%;
        }

        .video-embed-section p {
            font-size: 1.4rem;
            margin-bottom: 1rem;
        }

        #image-section {
            margin: 1.25rem auto;
            border-radius: 14px;
        }

        .edu-content-section {
            padding: 1.15rem;
            margin: 2rem auto;
        }

        .edu-page .image-gallery-section,
        .edu-page .video-gallery-section {
            margin: 2rem auto;
        }

        .edu-page .image-gallery,
        .edu-page .video-gallery {
            padding: 0.9rem;
            gap: 1rem;
        }

        .edu-page .image-container,
        .edu-page .video-container {
            flex: 0 0 min(86vw, 520px);
            width: min(86vw, 520px);
            min-height: 0;
        }

        .edu-page .image-container img,
        .edu-page .video-container video {
            height: 300px;
        }

        .about-page .about-div-1,
        .about-page .about-div-2,
        .about-page .about-div-3 {
            margin: 1.5rem auto;
        }

        .about-page .about-div-1 h3,
        .about-page .about-div-2 h3,
        .about-page .about-div-3 h3 {
            font-size: 1.4rem;
        }

        .about-page .about-div-3 .image-gallery {
            gap: 1rem;
            padding: 1rem;
        }

        .about-page .about-div-3 .image-container {
            flex: 0 0 260px;
            width: 260px;
        }

        .about-page .about-div-3 .image-container img {
            height: 100%;
        }

        .face-page .face-main {
            padding: 1.2rem 0.5rem 1.8rem;
        }

        .face-page .image-gallery-section {
            margin: 1.25rem auto;
            padding: 0.75rem 0.55rem 0.9rem;
        }

        .face-page .image-container {
            flex: 0 0 230px;
            width: 230px;
        }

        .leslie-page main.leslie-page {
            padding: 1.2rem 0.5rem 1.8rem;
        }

        .leslie-page .leslie-1,
        .leslie-page .leslie-2,
        .leslie-page .leslie-3,
        .leslie-page .scroll-panels,
        .leslie-page .image-gallery-section {
            margin: 1.25rem auto;
            padding: 0.75rem 0.55rem 0.9rem;
        }

        .leslie-page .leslie-1 {
            flex-direction: column;
        }

        .leslie-page .leslie-1-media {
            flex: none;
        }

        .leslie-page .leslie-1-media img {
            min-height: 220px;
        }

        .leslie-page .image-gallery-scroll img,
        .leslie-page .gallery-card,
        .leslie-page .eighth-front-gallery figure {
            flex: 0 0 100%;
            width: 100%;
        }

        html,
        body {
            overflow-x: hidden;
        }

        .section,
        .legal-section,
        .video-gallery-section,
        .image-gallery-section,
        .links-gallery-section,
        .scrollable-gallery {
            width: 100%;
            max-width: 100%;
        }

        .video-gallery,
        .links-gallery,
        .scrollable-gallery,
        .faith-link-grid,
        .state-image-gallery {
            padding-left: 0.5rem;
            padding-right: 0.5rem;
        }

        .hero-grid,
        .content-grid:not(.day-journal .content-grid) {
            grid-template-columns: 1fr !important;
        }

        .day-journal .content-grid {
            grid-template-columns: 1fr !important;
        }

        .gallery-item,
        .gallery-card,
        .faith-link-item {
            flex: 0 0 clamp(220px, 75vw, 320px);
        }

        .gallery-item img,
        .gallery-card img {
            height: auto;
            aspect-ratio: 4 / 3;
            object-fit: contain;
            background: #fff;
        }

        #countdown {
            gap: 0.75rem;
            padding: 1.5rem;
        }

        .time-box {
            min-width: 120px;
            padding: 1.25rem 0.75rem;
        }

        .time-box span {
            font-size: 3rem;
        }
}

/* ================ small screen MEDIA QUERIES ================ */

@media (min-width: 576px) and (max-width: 768px) {
        .site-title {
            font-size: 2rem;
        }

        .section-title {
            font-size: 1.8rem;
        }

        .section-subtitle {
            font-size: 1.12rem;
        }

        main p,
        .edu-content > p,
        .link-page .gallery-intro p,
        .link-page .gallery-section-copy p {
            font-size: 1rem;
        }

        .hero-page .card,
        .hero-page .image-container,
        .gallery-item,
        .gallery-card,
        .faith-link-item,
        .face-page .image-container {
            flex-basis: 250px;
            width: 250px;
        }

        .leslie-page .image-gallery-scroll img,
        .leslie-page .gallery-card,
        .leslie-page .eighth-front-gallery figure {
            flex-basis: 100%;
            width: 100%;
        }

        .link-page .image-container {
            min-height: 400px;
        }
}

/* ================ small mobile MEDIA QUERIES ================ */

@media (max-width: 480px) {
        .hero-page .hero-section-3 .image-container {
            flex: 0 0 84vw;
            width: 84vw;
        }

        .hero-page #sources-gallery h3 {
            font-size: 1.45rem;
        }

        .hero-page main {
            padding: 1rem 0.5rem 1.5rem;
        }

        .hero-page .hero-section-1,
        .hero-page .hero-section-2,
        .hero-page .hero-section-3 {
            padding: 0.85rem 0.55rem;
        }

        .hero-page .card,
        .hero-page #sources-gallery .image-container,
        .hero-page .hero-section-3 .image-container {
            flex: 0 0 84vw;
            width: 84vw;
        }

        .hero-page .hero-section-3 .image-gallery,
        .hero-page #sources-gallery .image-gallery {
            gap: 0.75rem;
        }

        .hero-page .disclaimer p {
            font-size: 0.5rem;
        }

        .legal-section {
            padding: 0.85rem;
            margin: 1rem auto;
        }

        .legal-section h2,
        .legal-box h2 {
            font-size: 1.3rem;
        }

        .legal-box h3 {
            font-size: 1.05rem;
        }

        .legal-box p {
            font-size: 0.95rem;
            line-height: 1.45;
        }

        .legal-section-2 .legal-box-6 .scrollable-gallery {
            padding: 0.6rem;
            gap: 0.6rem;
        }

        .legal-section-2 .legal-box-6 .gallery-item {
            flex: 0 0 170px;
        }

        .legal-section-2 .legal-box-6 .gallery-item img {
            height: 135px;
        }

        .header-container {
            gap: 1rem;
        }

        .site-title {
            font-size: 1.8rem;
        }

        .lang-toggle {
            width: 100%;
            font-size: 0.95rem;
            padding: 0.55rem 1rem;
        }

        .section {
            padding: 1.4rem 0.85rem;
            margin: 1.25rem auto;
        }

        .section-title {
            font-size: 1.55rem;
        }

        .section-subtitle {
            font-size: 1.05rem;
            margin: 0.15rem 0 0.45rem;
        }

        .section-intro {
            font-size: 0.95rem;
            line-height: 1.45;
            margin: 0 auto 0.85rem;
        }

        .day-journal .section-title {
            font-size: 1.7rem;
        }

        .day-journal .quote-text,
        .text-content .lang-en p,
        .text-content .lang-ar p,
        main p {
            font-size: 0.98rem;
            line-height: 1.5;
        }

        .content-grid,
        .hero-grid {
            gap: 0.85rem;
        }

        .video-container,
        .image-container {
            flex: 0 0 100%;
            width: 100%;
            max-width: 100%;
        }

        .hero-gallery .video-container {
            height: 220px;
        }

        .initial-play-btn {
            width: 68px;
            height: 68px;
            font-size: 2rem;
        }

        .replay-btn {
            width: 60px;
            height: 60px;
            font-size: 1.9rem;
        }

        .video-embed-section iframe,
        .video-wrapper {
            border-radius: 10px;
        }

        .faith-link-item {
            flex-basis: 200px;
        }

        .faith-link-item img {
            height: 235px;
        }

        .links-gallery-section .gallery-item,
        .this-state .state-image-gallery .gallery-item {
            flex: 0 0 230px;
        }

        .links-gallery-section .gallery-item img,
        .this-state .state-image-gallery .gallery-item img {
            height: 180px;
        }

        .link-page-main {
            padding: 0 0.35rem 0.85rem;
        }

        .link-page .image-gallery {
            gap: 0.85rem;
        }

        .link-page .image-container {
            flex: 0 0 100%;
            max-width: 100%;
            min-height: 400px;
        }

        .link-page .header-btns {
            flex-direction: column;
            gap: 0.6rem;
        }

        .link-page .lang-toggle {
            width: 100%;
            max-width: 320px;
        }

        .link-page .header-btns .lang-toggle,
        .link-page .header-home-btn,
        .link-page .button-container > a > button {
            width: 100%;
            max-width: 320px;
        }

        .link-page .gallery-intro h2 {
            font-size: 1.3rem;
        }

        .link-page .image-container {
            flex: 0 0 82vw;
            min-height: 390px;
        }

        .link-page .image-container > img {
            height: 190px;
        }

        .link-page .disclaimer {
            font-size: 0.94rem;
        }

        .edu-main {
            padding: 1rem 0.45rem;
        }

        .edu-content h2 {
            font-size: 1.35rem;
        }

        .edu-content > p {
            font-size: 0.92rem;
            line-height: 1.5;
        }

        .video-embed-section p {
            font-size: 1.1rem;
        }

        #image-section {
            margin: 1rem auto;
        }

        .edu-content-section {
            padding: 0.95rem;
            margin: 1.5rem auto;
        }

        .edu-page .image-gallery-section,
        .edu-page .video-gallery-section {
            margin: 1.5rem auto;
        }

        .edu-page .image-gallery,
        .edu-page .video-gallery {
            display: flex;
            flex-direction: column;
            align-items: center;
            overflow-x: visible;
            overflow-y: visible;
            gap: 0.85rem;
            padding: 0.85rem 0;
        }

        .edu-page .image-container,
        .edu-page .video-container {
            flex: 0 0 auto;
            width: min(100%, calc(100vw - 1.25rem));
            max-width: min(100%, calc(100vw - 1.25rem));
        }

        .edu-page .image-container img,
        .edu-page .video-container video {
            height: min(72vw, 320px);
            object-fit: contain;
        }

        .about-page .about-div-3 .image-container {
            flex: 0 0 min(100%, calc(100vw - 2rem));
            width: min(100%, calc(100vw - 2rem));
        }

        .about-page .about-div-3 .image-container img {
            height: 100%;
        }

        .face-page .face-hero {
            grid-template-columns: 1fr;
            padding: 0.6rem;
            margin-bottom: 1.2rem;
        }

        .face-page .image-container {
            flex: 0 0 76vw;
            width: 76vw;
        }

        .leslie-page .image-gallery-scroll img,
        .leslie-page .gallery-card,
        .leslie-page .eighth-front-gallery figure {
            flex: 0 0 100%;
            width: 100%;
        }

        .leslie-page .scroll-panel-body {
            max-height: 68vh;
        }

        .nav-btn,
        .footer-btn {
            width: 100%;
            max-width: 320px;
            text-align: center;
        }

        .gallery-item,
        .gallery-card {
            flex: 0 0 82vw;
        }

        .caption {
            min-height: auto;
            font-size: 1.25rem;
        }

        #countdown {
            flex-direction: column;
            align-items: center;
            padding: 1rem;
            gap: 1rem;
        }

        .time-box {
            width: 100%;
            max-width: 280px;
            min-width: auto;
        }

        .time-box span {
            font-size: 2.5rem;
        }

        .time-box p {
            font-size: 0.8rem;
            letter-spacing: 1px;
        }
}
/* ================ smaller screen MEDIA QUERIES ================ */
@media (min-width: 420px) and (max-width: 575px) {
        .header-container {
            gap: 0.85rem;
        }

        .site-title {
            font-size: 1.7rem;
        }

        .lang-toggle,
        .nav-btn,
        .footer-btn,
        .link-page .header-home-btn,
        .link-page .button-container > a > button {
            min-height: 44px;
        }

        .section,
        .legal-section,
        .contact-wrapper,
        .link-page .gallery-intro,
        .link-page .gallery-section-copy {
            padding-left: 0.8rem;
            padding-right: 0.8rem;
        }

        .hero-page .card,
        .hero-page .image-container,
        .video-container,
        .image-container,
        .gallery-item,
        .gallery-card,
        .faith-link-item,
        .face-page .image-container {
            flex-basis: 82vw;
            width: 82vw;
        }

        .leslie-page .image-gallery-scroll img,
        .leslie-page .gallery-card,
        .leslie-page .eighth-front-gallery figure {
            flex-basis: 100%;
            width: 100%;
        }

        .hero-gallery .video-container {
            height: 210px;
        }

        .caption {
            font-size: 1.15rem;
            min-height: auto;
        }
}
/* ================ smallest screen MEDIA QUERIES ================ */
@media (max-width: 420px) {
        .contact-wrapper {
            padding: 1.2rem 1rem;
            border-radius: 14px;
        }

        .contact-form h2 {
            font-size: 1.75rem;
        }

        .contact-form-fields input,
        .contact-form-fields textarea,
        .contact-form-fields button {
            padding: 0.85rem 0.9rem;
        }
}
/* ================ tiniest screen MEDIA QUERIES ================ */
@media (max-width: 359px) {
        .site-title {
            font-size: 1.5rem;
        }

        .section-title,
        .day-journal .section-title,
        .hero-page #sources-gallery h3 {
            font-size: 1.3rem;
        }

        .section,
        .legal-section,
        .contact-wrapper,
        .link-page .gallery-intro,
        .link-page .gallery-section-copy,
        .edu-content-section,
        .about-page .about-div-1,
        .about-page .about-div-2,
        .about-page .about-div-3,
        .face-page .image-gallery-section,
        .leslie-page .leslie-1,
        .leslie-page .leslie-2,
        .leslie-page .leslie-3,
        .leslie-page .scroll-panels {
            padding: 0.7rem;
            margin: 0.9rem auto;
        }

        .lang-toggle,
        .nav-btn,
        .footer-btn,
        .link-page .header-home-btn,
        .link-page .button-container > a > button {
            width: 100%;
            max-width: 100%;
            font-size: 0.92rem;
        }

        .hero-page .card,
        .hero-page .image-container,
        .video-container,
        .image-container,
        .gallery-item,
        .gallery-card,
        .faith-link-item,
        .face-page .image-container {
            flex-basis: 88vw;
            width: 88vw;
        }

        .leslie-page .image-gallery-scroll img,
        .leslie-page .gallery-card,
        .leslie-page .eighth-front-gallery figure {
            flex-basis: 100%;
            width: 100%;
        }

        .hero-gallery .video-container {
            height: 185px;
        }

        .time-box span {
            font-size: 2.15rem;
        }
}

/* Face page breakpoint tuning */
@media (min-width: 1200px) {
        .face-page .face-main {
            width: min(100%, 1320px);
        }

        .face-page .video-gallery-section .video-container {
            flex: 0 0 320px;
            width: 320px;
        }
}

@media (min-width: 992px) and (max-width: 1199px) {
        .face-page .face-main {
            width: min(100%, 1120px);
            padding-left: 0.75rem;
            padding-right: 0.75rem;
        }

        .face-page .video-gallery-section .video-container {
            flex: 0 0 300px;
            width: 300px;
        }
}

@media (min-width: 769px) and (max-width: 991px) {
        .face-page .face-main {
            width: min(100%, 940px);
            padding-left: 0.7rem;
            padding-right: 0.7rem;
        }

        .face-page .video-gallery-section .video-container {
            flex: 0 0 280px;
            width: 280px;
        }
}

@media (min-width: 576px) and (max-width: 768px) {
        .face-page .face-main {
            width: 100%;
            padding-left: 0.55rem;
            padding-right: 0.55rem;
        }

        .face-page .image-gallery-section h2,
        .face-page .video-gallery-section h2 {
            font-size: 1.45rem;
            line-height: 1.2;
        }

        .face-page .video-gallery-section .video-container {
            flex: 0 0 min(82vw, 300px);
            width: min(82vw, 300px);
        }
}

@media (max-width: 575px) {
        .face-page .face-main {
            width: 100%;
            padding-left: 0.45rem;
            padding-right: 0.45rem;
        }

        .face-page .image-gallery-section h2,
        .face-page .video-gallery-section h2 {
            font-size: 1.25rem;
            line-height: 1.2;
        }

        .face-page .video-gallery.scrollable-gallery {
            padding: 0.7rem;
            gap: 0.75rem;
        }

        .face-page .video-gallery-section .video-container {
            flex: 0 0 min(86vw, 280px);
            width: min(86vw, 280px);
        }
}

@media (max-width: 991px) {
        .face-page .face-section-1 .image-gallery {
            justify-content: flex-start;
            direction: ltr;
            padding-left: 0.65rem;
            padding-right: 0.65rem;
            scroll-padding-left: 0.65rem;
            scroll-padding-right: 0.65rem;
        }

        .face-page .face-section-1 .image-gallery .image-container {
            flex: 0 0 min(78vw, 360px);
            width: min(78vw, 360px);
            max-width: min(78vw, 360px);
        }
}

@media (hover: hover) and (pointer: fine) {
        .this-state .state-image-gallery .gallery-item {
            overflow: visible;
        }

        .this-state .state-image-gallery .gallery-item:hover {
            transform: none;
            z-index: 5;
        }

        .this-state .state-image-gallery .gallery-item img {
            transition: transform 0.22s ease, box-shadow 0.22s ease;
            transform-origin: center center;
        }

        .this-state .state-image-gallery .gallery-item:hover img {
            transform: scale(1.32);
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
        }
}

        /* Featured hero gallery: bordered scroll area with portrait image cards. */
        @media (max-width: 1199px) {
            #featured-hero .hero-gallery-block .scrollable-gallery {
                padding: 0.9rem 0 1.1rem;
                gap: 1.25rem;
            }

            #featured-hero .hero-gallery-block .gallery-card {
                flex-basis: 200px;
                width: 200px;
                height: 200px;
            }

            #featured-hero .hero-gallery-block .gallery-card img,
            #featured-hero .hero-gallery-block .gallery-card a img {
                height: 100%;
            }
        }

        @media (max-width: 767px) {
            #featured-hero .hero-gallery-block .scrollable-gallery {
                padding: 0.75rem 0 1rem;
                gap: 1rem;
            }

            #featured-hero .hero-gallery-block .gallery-card {
                flex-basis: 200px;
                width: 200px;
                height: 200px;
            }

            #featured-hero .hero-gallery-block .gallery-card img,
            #featured-hero .hero-gallery-block .gallery-card a img {
                height: 100%;
            }
        }

        @media (max-width: 480px) {
            #featured-hero .hero-gallery-block .gallery-card {
                flex-basis: 200px;
                width: 200px;
                height: 200px;
            }

            #featured-hero .hero-gallery-block .gallery-card img,
            #featured-hero .hero-gallery-block .gallery-card a img {
                height: 100%;
            }
        }
/* ===== Research Sources Feature ===== */
.sources-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-page .sources-header h3 {
    color: var(--accent-red);
}

.hero-page .sources-header p {
    color: var(--dark);
}

.sources-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.75rem;
  padding: 0 1rem;
}

.source-tab {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
    border: 2px solid var(--dark);
  border-radius: 999px;
    background: var(--light);
    color: var(--dark);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.source-tab:hover,
.source-tab.is-active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--light);
  transform: translateY(-2px);
}

.sources-gallery {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 1rem 1.5rem 2rem;
  -webkit-overflow-scrolling: touch;
}

.sources-gallery::-webkit-scrollbar {
  height: 8px;
}
.sources-gallery::-webkit-scrollbar-thumb {
    background: var(--accent-red);
  border-radius: 4px;
}

.source-card {
    flex: 0 0 clamp(260px, 30vw, 320px);
    width: clamp(260px, 30vw, 320px);
  scroll-snap-align: start;
    background: var(--light);
    color: var(--dark);
  border-radius: 16px;
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.16);
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease;
  border: 2px solid transparent;
}

/* Hover: background & text color swap */
.source-card:hover {
        background: var(--primary-green);
    color: var(--light);
  transform: translateY(-6px);
    border-color: var(--accent-red);
        box-shadow: 0 0 0 5px var(--dark), 0 12px 28px rgba(17, 17, 17, 0.32);
}

.source-card:hover .card-title a {
    color: var(--gold);
}

.source-card:hover .card-desc {
    color: #f1f1f1;
}

.source-card:hover .social-link {
    background: var(--accent-red);
    color: var(--light);
}

.source-card .card-image {
    aspect-ratio: 16 / 10;
    height: auto;
  overflow: hidden;
        background: #f4f4f4;
}

.source-card .card-image img {
  width: 100%;
  height: 100%;
    object-fit: contain;
  display: block;
}

.card-title {
  margin: 1rem 1rem 0.5rem;
  font-size: 1.15rem;
}

.card-title a {
    color: var(--accent-red);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-desc {
  margin: 0 1rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
    color: #333333;
}

.card-socials {
  display: flex;
    flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 1.25rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
    background: #e9f5ed;
    color: var(--dark);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.social-link:hover {
    background: var(--primary-green);
    color: var(--light);
}

.source-card .card-socials .social-link[aria-label="Facebook"] {
    font-size: 0;
}

.source-card .card-socials .social-link[aria-label*="Facebook"],
.source-card .card-socials .social-link[aria-label*="Instagram"] {
    flex: 0 0 36px;
    background: transparent;
    overflow: hidden;
    padding: 0;
}

.source-card:hover .card-socials .social-link[aria-label*="Facebook"],
.source-card:hover .card-socials .social-link[aria-label*="Instagram"] {
    background: transparent;
}

.source-card .card-socials .social-link img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.source-card .card-socials .social-link[aria-label*="Facebook"] img,
.source-card .card-socials .social-link[aria-label*="Instagram"] img {
    object-fit: contain;
    object-position: center;
    background: transparent;
}

.source-card .card-socials .social-link[aria-label*="Instagram"] {
    order: 2;
}

.source-card .card-socials .social-link[aria-label="YouTube"] {
    order: 3;
}

.source-card .card-socials .social-link[aria-label*="X"] {
    order: 4;
    background-color: #e9f5ed;
    background-image: url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/social/x.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: transparent;
    font-size: 0;
}

.source-card .card-socials .social-link[aria-label="Upscrolled"] {
    order: 5;
    background: transparent;
    overflow: hidden;
    padding: 0;
}

.source-card .card-socials .social-link[aria-label="YouTube"] {
    background: transparent;
    overflow: hidden;
    padding: 0;
}

/* ===== ALL HERO-PAGE SOCIAL-MEDIA LINKS ===== */
.hero-page .card-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
}

.hero-page .card-socials .social-link,
.hero-page .card-socials .social-link[aria-label] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    background-color: #e9f5ed;
}

.hero-page .source-card .card-socials .social-link img,
.hero-page .source-card .card-socials .social-link[aria-label] img,
.hero-page .source-card .card-socials .social-link[aria-label*="Facebook"] img,
.hero-page .source-card .card-socials .social-link[aria-label*="Instagram"] img {
    display: block;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    max-width: none;
    max-height: none;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);
    object-fit: cover;
    object-position: center;
}

.disclaimer {
  max-width: 720px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 600px) {
    .sources-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0 0.25rem 0.5rem;
        scrollbar-width: thin;
    }

    .source-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sources-gallery {
        gap: 1rem;
        padding: 0.75rem 0.25rem 1.5rem;
    }

    .source-card {
        flex-basis: min(82vw, 320px);
        width: min(82vw, 320px);
    }
}

.quest-tabs-toggle {
    display: none;
}

@media (max-width: 600px) {
    .united-page .quest-tabs-toggle {
        display: block;
        width: 100%;
        margin: 0 0 0.75rem;
        padding: 0.6rem 1rem;
        font-family: inherit;
        font-size: 0.9rem;
        font-weight: 700;
        border: 2px solid var(--dark);
        border-radius: 8px;
        background: var(--light);
        color: var(--dark);
        cursor: pointer;
    }

    .united-page .quest-tabs {
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: visible;
        gap: 0.4rem;
        padding: 0.5rem;
    }

    .united-page .quest-tabs.active {
        display: flex;
    }

    .united-page .quest-tabs .source-tab {
        width: 100%;
        flex: none;
        font-size: 0.78rem;
        padding: 0.4rem 0.75rem;
    }

    /* Cap card height so the long descriptions scroll inside the card
       instead of stretching it far past the viewport during swipes. */
    .united-page .source-card {
        display: flex;
        flex-direction: column;
        max-height: 75vh;
    }

    .united-page .source-card .card-desc {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
    }
}

/* Keep the hero section introductions and disclaimer centered on desktop. */
@media (min-width: 769px) {
    .hero-page #section-dedication p,
    .hero-page #section-journalists p,
    .hero-page .sources-header p,
    .hero-page .disclaimer p,
    .hero-page article p,
    .hero-page #section-dedication p > span,
    .hero-page #section-journalists p > span,
    .hero-page .sources-header p > span,
    .hero-page .disclaimer p > span {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center !important;
    }
}

.hero-page #their-voices-gallery {
    background-color: transparent !important;
    background-image: url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/maint/rose.jpg") !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-page #their-voices-gallery > article.memorial-card,
.hero-page #their-voices-gallery > article.memorial-card:hover {
    background-color: rgba(255, 255, 255, 0.82) !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
        url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/maint/rose.jpg") !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Center each Their Voices Remain photo gallery below its article copy. */
.hero-page #their-voices-gallery .memorial-card .memorial-photo-gallery {
    clear: both;
    width: calc(100% - 2rem);
    margin: 0 auto 1rem;
}

.hero-page #their-voices-gallery .memorial-card .memorial-photo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-page #their-voices-gallery .memorial-card .memorial-photo img {
    margin: 0 auto;
}

/* Show Anas's and Saleh's memorial photographs larger without cropping their edges. */
.hero-page #their-voices-1 .memorial-photo,
.hero-page #their-voices-2 .memorial-photo {
    height: clamp(280px, 48vw, 420px);
}

.hero-page #their-voices-1 .memorial-photo img,
.hero-page #their-voices-2 .memorial-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Center paragraph text under heading and video under image in the new section */
.new-section > .section-text p {
    text-align: center;
}

.new-section .video-gallery {
    justify-content: center;
}

/* Independent project investment — Leslie portfolio section */
.project-investment {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 100%;
    padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 4vw, 3rem);
    overflow: hidden;
    background: #32483a url("https://raw.githubusercontent.com/american-nobody999/three-match-image/main/image/Leslie/rose2.jpg") center / cover no-repeat;
}

.project-investment::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(24, 50, 35, .78), rgba(78, 43, 55, .58));
}

.investment-panel {
    width: min(1180px, 100%);
    max-width: 100%;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3.75rem);
    border: 1px solid rgba(255, 247, 229, .68);
    border-radius: 24px;
    background: rgba(255, 249, 235, .93);
    color: #302a27;
    box-shadow: 0 24px 70px rgba(15, 25, 18, .35);
    backdrop-filter: blur(5px);
}

.investment-heading {
    width: min(820px, 100%);
    margin: 0 auto clamp(1.75rem, 4vw, 3rem);
    text-align: center;
}

.investment-heading h2 {
    margin: .4rem 0 1rem;
    color: #4e3039;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.7rem);
    font-weight: 500;
    line-height: 1.08;
}

.investment-heading > p:last-child {
    margin: 0;
    color: #514843;
    font-size: clamp(.98rem, 1.7vw, 1.12rem);
    line-height: 1.75;
    text-align: center;
}

.investment-eyebrow {
    margin: 0;
    color: #875a68;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .19em;
    text-transform: uppercase;
}

.investment-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(112, 78, 87, .24);
    border-radius: 14px;
    background: rgba(255, 253, 247, .78);
    box-shadow: 0 8px 28px rgba(66, 52, 47, .1);
    scrollbar-color: #9c6d7a #eee4d8;
}

.investment-table-wrapper:focus-visible {
    outline: 3px solid #714452;
    outline-offset: 4px;
}

.investment-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    text-align: left;
    font-size: .95rem;
    line-height: 1.55;
}

.investment-table th,
.investment-table td {
    padding: 1rem clamp(.85rem, 2vw, 1.5rem);
    vertical-align: top;
    border-bottom: 1px solid rgba(100, 76, 72, .15);
}

.investment-table thead th {
    background: #5a3b45;
    color: #fff9ed;
    font-size: .76rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.investment-table tbody th[scope="row"] {
    width: 25%;
    color: #4e3039;
    font-weight: 700;
}

.investment-table tbody td:nth-child(2) { width: 50%; }
.investment-table tbody td:last-child { width: 25%; }
.investment-table tbody tr:not(.category-row):not(.cash-total):not(.grand-total):hover { background: rgba(151, 104, 116, .055); }

.table-detail {
    color: #6e625d;
    font-size: .84rem;
}

.investment-table .cash-total th,
.investment-table .cash-total td {
    background: #ede0d9;
    border-top: 2px solid #ba929b;
    border-bottom: 2px solid #ba929b;
}

.investment-table .category-row th {
    padding-block: 1.15rem;
    background: #365242;
    color: #fff9ed;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.18rem;
    font-weight: 500;
    letter-spacing: .045em;
    text-align: center;
}

.investment-table .grand-total th,
.investment-table .grand-total td {
    padding-block: 1.3rem;
    border-top: 3px double #825565;
    border-bottom: 0;
    background: #dfc8cc;
    color: #382329;
    font-size: 1rem;
}

.investment-table .grand-total td:last-child {
    color: #512f3a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    white-space: nowrap;
}

.investment-disclaimer {
    margin-top: clamp(1.5rem, 3vw, 2.4rem);
    padding: clamp(1.15rem, 3vw, 2rem);
    border-left: 4px solid #9a6876;
    border-radius: 0 12px 12px 0;
    background: rgba(238, 226, 213, .76);
}

.investment-disclaimer h3 {
    margin: 0 0 .7rem;
    color: #52323c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.investment-disclaimer p {
    margin: .55rem 0 0;
    color: #4c423e;
    font-size: .92rem;
    line-height: 1.65;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 700px) {
    .project-investment { padding: 2.5rem .75rem; }
    .investment-panel { padding: 1.1rem; border-radius: 16px; }
    .investment-heading { margin-bottom: 1.5rem; }
    .investment-heading h2 { font-size: clamp(1.9rem, 10vw, 2.7rem); }
    .investment-table { min-width: 720px; font-size: .9rem; }
    .investment-table th, .investment-table td { padding: .85rem; }
    .investment-disclaimer { padding: 1rem; }
}

@media (min-width: 1200px) {
    .investment-panel { padding-inline: clamp(3rem, 5vw, 4.5rem); }
    .investment-table th,
    .investment-table td { padding-block: 1.15rem; }
}

@media (min-width: 701px) and (max-width: 1024px) {
    .project-investment { padding: 4rem 1.5rem; }
    .investment-panel { padding: 2rem; border-radius: 20px; }
    .investment-heading { margin-bottom: 2rem; }
    .investment-table { min-width: 700px; font-size: .92rem; }
    .investment-table th,
    .investment-table td { padding: .9rem 1rem; }
}

@media (min-width: 481px) and (max-width: 700px) {
    .project-investment { padding-block: 3rem; }
    .investment-panel { padding: 1.25rem; }
    .investment-table { min-width: 680px; }
    .investment-table-wrapper {
        background-image: linear-gradient(to right, transparent 92%, rgba(92, 59, 69, .1));
    }
}

@media (max-width: 480px) {
    .project-investment { padding: 2rem .5rem; }

    .investment-panel {
        padding: 1rem .75rem;
        border-radius: 13px;
    }

    .investment-heading {
        margin-bottom: 1.25rem;
    }

    .investment-heading h2 {
        margin-top: .55rem;
        font-size: clamp(1.75rem, 9.5vw, 2.35rem);
    }

    .investment-heading > p:last-child {
        font-size: .94rem;
        line-height: 1.6;
    }

    .investment-eyebrow {
        font-size: .68rem;
        letter-spacing: .14em;
    }

    .investment-table {
        min-width: 640px;
        font-size: .86rem;
        line-height: 1.45;
    }

    .investment-table th,
    .investment-table td {
        padding: .75rem;
    }

    .investment-table tbody th[scope="row"] { width: 28%; }
    .investment-table tbody td:nth-child(2) { width: 44%; }
    .investment-table tbody td:last-child { width: 28%; }

    .investment-table .category-row th { font-size: 1.02rem; }
    .investment-table .grand-total td:last-child { font-size: 1.08rem; }

    .investment-disclaimer {
        margin-top: 1.15rem;
        padding: .9rem;
        border-left-width: 3px;
    }

    .investment-disclaimer h3 { font-size: 1.2rem; }
    .investment-disclaimer p { font-size: .86rem; line-height: 1.55; }
}
