:root {
    --primary-teal: #005a6a;
    --bg-peach: #fcdfcb;
    --text-black: #1a1a1a;
    --white: #ffffff;
    --accent-yellow-hero: #fff9d1;
    --dark-green: #1a434d;
    --muted-text: #607d8b;
    --card-blue: #e0f0f2;
    --card-yellow: #fffdf0;
    --card-border: #f0f0f0;
    --primary-color: #0b5d66;
    --accent-gradient: linear-gradient(135deg, #20bfc9, #0b5d66);
    --card-bg: #f5f9f9;
    --bg-deep-teal: #004d57;
    --accent-yellow-testi: #fff2c3;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-family: var(--jiilna-font-family);
    color: var(--text-black);
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: var(--jiilna-font-family);
}

/* Font Awesome — body/heading fonts must not override icon glyphs */
.fa-solid, .fas, .fa-regular, .far, .fa-brands, .fab,
.hamburger-menu i, .lang-btn i, .feature-icon-fa, .p-icon i {
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
}

.fa-solid, .fas,
.hamburger-menu .fa-solid,
.lang-btn .fa-solid,
.feature-icon-fa,
.p-icon .fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-regular, .far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-brands, .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* --- 1. Interactions --- */
.btn-interact {
    position: relative;
    padding: 10px 22px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.5s ease;
    cursor: pointer;
    color: inherit;
    font-family: var(--jiilna-font-family);
}

.btn-interact:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.btn-interact:active {
    transform: scale(0.97);
    background-color: rgba(0, 0, 0, 0.1);
}

/* --- 2. Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Landing — hero/nav paint immediately (LCP); below-fold keeps reveal */
.page-index .navbar,
.page-index .hero-section {
    animation: none;
    opacity: 1;
    transform: none;
}

.page-index .hero-text-content h1 {
    min-height: 2.2em;
}

.page-index .desc-area p {
    min-height: 4.5em;
}

/* Below-fold sections: visible immediately (no opacity:0 LCP penalty) */
.page-index .container-features,
.page-index .training-section,
.page-index .testi-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .carousel-track,
    .scroll-col {
        animation: none !important;
    }
}

/* --- HERO --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 80px;
    position: relative;
    z-index: 1000;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--jiilna-logo-color, #000000);
}

.logo a,
.logo-link,
a.logo-brand,
.logo.logo-brand {
    color: var(--jiilna-logo-color, #000000) !important;
    text-decoration: none !important;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.logo a:hover,
.logo-link:hover,
a.logo-brand:hover {
    color: var(--jiilna-logo-hover, #333333) !important;
}

.footer-logo {
    display: inline-block;
    font-size: 40px;
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-black);
    margin: 0 16px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-links a:hover {
    color: var(--primary-teal);
}

.btn-signup {
    background-color: var(--primary-teal);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
}
.btn-signup:hover {
    color: white;
}

.hamburger-menu {
    display: none;
}

.hero-section {
    padding: 20px 50px;
}

.hero-card {
    background-color: var(--bg-peach);
    border-radius: 35px;
    height: 580px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-inline-start: 80px;
}

.hero-text-content {
    position: relative;
    z-index: 10;
}

.hero-text-content h1 {
    font-size: 72px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 35px;
    color: var(--text-black);
}

html[dir="rtl"] .hero-card {
    padding: 0;
    justify-content: center;
    text-align: center;
    padding-right: 0;
    padding-left: 0;
}

html[dir="rtl"] .hero-text-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-join {
    background-color: var(--primary-teal);
    color: white;
    padding: 18px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}
.btn-join:hover {
    color: white;
}

.shape {
    position: absolute;
    pointer-events: none;
}

.circle-top-white {
    width: 200px;
    height: 200px;
    background-color: white;
    border-radius: 50%;
    top: -100px;
    right: 25%;
}

.semi-circle-yellow {
    width: 150px;
    height: 250px;
    background-color: var(--accent-yellow-hero);
    right: 70px;
    top: 70px;
    border-radius: 125px 0 0 125px;
}

.main-circle-teal {
    width: 240px;
    height: 240px;
    background-color: var(--primary-teal);
    border-radius: 50%;
    bottom: 60px;
    right: 18%;
}

/* --- WHY CHOOSE --- */
.container-features {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 20px;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
    margin-bottom: 60px;
}

.title-area,
.desc-area {
    flex: 1 1 0;
    min-width: 0;
}

.title-area h1 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 600;
    color: var(--dark-green);
    line-height: 1.2;
}

html[dir="ltr"] .title-area {
    text-align: left;
}

html[dir="ltr"] .desc-area {
    text-align: left;
}

.desc-area p {
    max-width: none;
    color: var(--muted-text);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* Why Choose — Arabic: title on the right, description on the left */
.why-header {
    align-items: center;
}

html[lang="ar"] .why-header,
html[dir="rtl"] .why-header,
body.lang-ar .why-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    direction: ltr;
    gap: 40px;
}

html[lang="ar"] .why-header .desc-area,
html[dir="rtl"] .why-header .desc-area,
body.lang-ar .why-header .desc-area {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    text-align: right;
    direction: rtl;
}

html[lang="ar"] .why-header .title-area,
html[dir="rtl"] .why-header .title-area,
body.lang-ar .why-header .title-area {
    grid-column: 2;
    grid-row: 1;
    flex: none;
    min-width: max-content;
    width: max-content;
    text-align: right;
    direction: rtl;
}

html[lang="ar"] .why-header .why-title,
html[dir="rtl"] .why-header .why-title,
body.lang-ar .why-header .why-title {
    display: block;
    white-space: nowrap;
    font-size: clamp(22px, 2.6vw, 44px);
    line-height: 1.25;
    overflow: visible;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 25px;
    grid-template-areas: "a b c" "d d e";
}

.f-card {
    border-radius: 25px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    background-color: var(--card-blue);
}

.f-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.f1 { grid-area: a; }
.f2 { grid-area: b; background: #fff; border: 1.5px solid var(--card-border); }
.f3 { grid-area: c; }
.f4 { grid-area: d; background: #fff; border: 1.5px solid var(--card-border); }
.f5 { grid-area: e; background: #fffdf5; }

.feature-icon-wrap {
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
    border-radius: 18px;
    background: rgba(0, 90, 106, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-fa {
    font-size: 32px;
    color: var(--primary-teal);
    line-height: 1;
}

.f-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--dark-green);
}

.f-card p {
    color: var(--muted-text);
    font-size: 14px;
    line-height: 1.5;
}

a.f-card-community {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.f-card-community:hover {
    border-color: rgba(0, 90, 106, 0.2);
}

.f-card-community-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--primary-teal);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

a.f-card-community:hover .f-card-community-btn {
    background: #004652;
    transform: translateY(-1px);
}

/* --- TRAINING CAROUSEL --- */
.training-section {
    padding: 80px clamp(16px, 4vw, 40px);
    overflow: hidden;
}

.carousel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 50px;
    width: 100%;
    overflow: hidden;
    direction: ltr;
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    direction: ltr;
    will-change: transform;
}

.track-to-left {
    animation: scrollLeft 32s linear infinite;
}

.track-to-right {
    animation: scrollRight 32s linear infinite;
}

@keyframes scrollLeft {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes scrollRight {
    0% { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.p-card {
    background-color: var(--card-bg);
    padding: 20px 24px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: 280px;
    min-width: 280px;
    border: 1px solid rgba(0,0,0,0.05);
    box-sizing: border-box;
}

html[dir="rtl"] .p-card,
html[lang="ar"] .p-card {
    direction: rtl;
    text-align: right;
}

.p-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: var(--accent-gradient);
    border-radius: 10px;
    margin-inline-end: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.p-icon i {
    font-size: 20px;
    color: #fff;
    line-height: 1;
}

/* --- TESTIMONIALS SECTION --- */
.testi-section {
    background-color: #004d57;
    padding: 80px 5%;
    overflow: hidden;
    position: relative;
}

.testi-container {
    display: flex;
    max-width: 1250px;
    margin: 0 auto;
    gap: 60px;
    align-items: center;
    position: relative;
}

.testi-info-side {
    flex: 1;
    position: relative;
    z-index: 50;
}

.testi-grid-horizontal {
    flex: 1.5;
    display: flex;
    gap: 20px;
    height: 500px;
    position: relative;
    z-index: 10;
}

.scroll-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.up {
    animation: moveUp 18s linear infinite;
}

.down {
    animation: moveDown 18s linear infinite;
}

@keyframes moveUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes moveDown {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

.testi-grid-horizontal:hover .scroll-col {
    animation-play-state: paused;
}

.t-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    min-height: 140px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.t-card h3 {
    color: #004d57;
    margin-bottom: 10px;
    font-weight: 700;
}

html[dir="rtl"] .t-card,
html[lang="ar"] .t-card {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .t-card,
html[lang="en"] .t-card {
    direction: ltr;
    text-align: left;
}

.t-card p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* Specific yellow button inside testimonials */
#yellow-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    background-color: #fff9d1;
    color: #005a6a;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    border: none;
}
#yellow-join-btn:hover {
    filter: brightness(0.95);
    transform: translateY(-2px);
    background-color: #fff9d1;
    color: #005a6a;
}

/* --- FOOTER --- */
footer {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    padding: 60px clamp(20px, 5vw, 80px) 0;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.footer-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 12px;
}

.footer-bottom {
    width: 100vw;
    max-width: 100vw;
    margin-top: 48px;
    margin-inline-start: calc(50% - 50vw);
    padding: 16px clamp(16px, 4vw, 80px);
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: #004d57;
    box-sizing: border-box;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

.footer-copy {
    margin: 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.footer-link {
    display: block;
    text-decoration: none;
    color: #005a6a;
    margin-bottom: 10px;
    font-size: 14px;
    transition: 0.3s;
}

.footer-link:hover {
    padding-inline-start: 5px;
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f4f6;
    color: #005a6a;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.25s, color 0.25s, transform 0.25s;
}

.footer-social-link:hover {
    background: #005a6a;
    color: #fff;
    transform: translateY(-2px);
    padding-inline-start: 0;
}

/* Language Switcher */
.lang-switcher-wrapper {
    display: flex;
    align-items: center;
}

.custom-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-inline-end: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 6px 12px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: rgba(0, 0, 0, 0.03);
    border-color: #005a6a;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    inset-inline-end: 0;
    background: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 12px;
    z-index: 999;
    min-width: 120px;
    overflow: hidden;
}

.lang-dropdown.show {
    display: block;
}
.lang-option {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
}
.lang-option:hover {
    background: #f5f5f5;
}

.goog-te-banner-frame, .goog-te-balloon-frame, #google_translate_element, .skiptranslate {
    display: none !important;
}

/* --- Tablet: compact desktop nav before hamburger --- */
@media (max-width: 1200px) and (min-width: 993px) {
    .navbar {
        padding: 18px 32px;
    }

    .nav-links a {
        margin: 0 10px;
        font-size: 14px;
    }

    .custom-lang-switcher {
        margin-inline-end: 8px;
    }

    .btn-signup {
        padding: 10px 22px;
        font-size: 14px;
    }
}

/* --- Tablet + mobile nav (hamburger) --- */
@media (max-width: 992px) {
    .navbar {
        padding: 14px 20px;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .navbar .logo {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html[dir="rtl"] .navbar .logo {
        text-align: right;
    }

    html[dir="ltr"] .navbar .logo {
        text-align: left;
    }

    .hamburger-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        cursor: pointer;
        color: var(--primary-teal);
        min-width: 44px;
        min-height: 44px;
        border: none;
        background: transparent;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .hamburger-menu:hover {
        background: rgba(0, 90, 106, 0.08);
    }

    .hamburger-menu i {
        pointer-events: none;
    }

    .nav-right {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px 24px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
        border-top: 1px solid #eee;
        z-index: 1001;
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-right.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 4px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 12px;
    }

    .nav-links a {
        margin: 0;
        padding: 14px 12px;
        border-radius: 12px;
        text-align: start;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-links a:hover {
        background: rgba(0, 90, 106, 0.06);
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }

    .nav-actions .custom-lang-switcher {
        margin: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-actions .lang-btn {
        width: 100%;
        justify-content: center;
    }

    .nav-actions .lang-dropdown {
        inset-inline: 0;
        inset-inline-end: auto;
        width: 100%;
    }

    .nav-actions .nav-login-link,
    .nav-actions .nav-account-link {
        width: 100%;
        padding: 14px;
        border: 1px solid #ddd;
        border-radius: 50px;
        text-align: center;
        justify-content: center;
    }

    .nav-actions .nav-signup-link,
    .nav-actions .btn-signup {
        width: 100%;
        padding: 14px;
        text-align: center;
        justify-content: center;
    }
}

/* --- MOBILE RESPONSIVENESS (Max 768px) --- */
@media (max-width: 768px) {
    /* Hero Section */
    .hero-section {
        padding: 20px;
    }

    .hero-card {
        padding: 40px 20px;
        height: auto;
        min-height: 550px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-text-content {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }

    .hero-text-content h1 {
        font-size: 38px;
        line-height: 1.2;
    }

    .shape {
        opacity: 0.4;
    }
    .circle-top-white {
        width: 150px;
        height: 150px;
        top: -20px;
        left: -20px;
    }
    .semi-circle-yellow {
        width: 150px;
        height: 75px;
        border-top-left-radius: 75px;
        border-top-right-radius: 75px;
        bottom: -10px;
        right: -10px;
    }
    .main-circle-teal {
        width: 200px;
        height: 200px;
        top: 20px;
        right: -50px;
    }
    /* Features Section */
    .header-section {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        text-align: center;
    }

    .title-area,
    .desc-area {
        flex: none;
        max-width: 100%;
        grid-column: auto;
        grid-row: auto;
        min-width: 0;
    }

    html[lang="ar"] .why-header,
    html[dir="rtl"] .why-header,
    body.lang-ar .why-header {
        display: flex;
        flex-direction: column;
        direction: rtl;
        gap: 16px;
    }

    html[lang="ar"] .why-header .title-area,
    html[dir="rtl"] .why-header .title-area,
    html[lang="ar"] .why-header .desc-area,
    html[dir="rtl"] .why-header .desc-area,
    body.lang-ar .why-header .title-area,
    body.lang-ar .why-header .desc-area {
        grid-column: auto;
        text-align: center;
        direction: rtl;
    }

    html[lang="ar"] .why-header .why-title,
    html[dir="rtl"] .why-header .why-title,
    body.lang-ar .why-header .why-title {
        white-space: normal;
        font-size: 32px;
    }

    .title-area h1 {
        font-size: 36px;
        margin-bottom: 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        grid-template-areas: none;
    }

    .f1, .f2, .f3, .f4, .f5 {
        grid-area: auto;
    }

    /* Training Section */
    .training-section {
        padding: 60px 16px;
    }

    .training-section h1 {
        font-size: 32px !important;
    }

    .training-section > div:first-child {
        padding-inline: 4px;
    }

    .carousel-container {
        margin-top: 32px;
        gap: 14px;
    }

    .carousel-track {
        gap: 14px;
    }

    /* Same direction + speed on mobile — avoids uneven RTL offset between rows */
    .track-to-right {
        animation-name: scrollLeft;
        animation-duration: 32s;
    }

    .p-card {
        width: min(280px, calc(100vw - 48px));
        min-width: min(280px, calc(100vw - 48px));
        padding: 16px 18px;
    }

    /* Testimonials Section */
    .testi-container {
        flex-direction: column;
        text-align: center;
    }

    .testi-info-side h1 {
        font-size: 36px !important;
    }

    .testi-grid-horizontal {
        height: 400px;
        width: 100%;
        overflow: hidden;
    }

    #yellow-join-btn {
        margin-top: 20px;
    }

    /* Footer — full width, stacked vertically */
    footer {
        padding: 48px 20px 0;
    }

    .footer-grid {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: start;
        gap: 32px;
        max-width: 100%;
    }

    .footer-grid > div {
        width: 100%;
        align-items: flex-start;
    }

    .footer-grid .logo,
    .footer-grid .footer-logo {
        font-size: 32px !important;
        margin-bottom: 0;
    }

    .footer-link {
        font-size: 14px !important;
        white-space: normal;
    }

    .footer-bottom {
        margin-top: 32px;
        margin-inline-start: calc(50% - 50vw);
        padding: 14px 16px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .footer-copy {
        text-align: center;
        font-size: 11px;
        line-height: 1.6;
    }

    .app-release-trigger {
        width: auto;
        max-width: 100%;
        justify-content: center;
        font-size: 12px;
        padding: 8px 14px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        display: grid;
    }
}

/* App release — index footer bar */
.app-release-trigger {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    white-space: normal;
    text-align: center;
}

.app-release-trigger strong {
    color: #fff9d1;
    font-weight: 700;
}

.app-release-trigger:hover,
.app-release-trigger:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    outline: none;
}

.app-release-trigger:active {
    transform: scale(0.98);
}

.app-release-sep {
    color: rgba(255, 255, 255, 0.35);
}

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

.release-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.release-modal-overlay[hidden] {
    display: none !important;
}

.release-modal {
    position: relative;
    width: min(100%, 480px);
    max-height: min(85vh, 560px);
    overflow: auto;
    padding: 28px 24px 24px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    animation: releaseModalIn 0.22s ease;
}

@keyframes releaseModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.release-modal-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f3f6f7;
    color: #005a6a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.release-modal-close:hover,
.release-modal-close:focus {
    background: #e6ecee;
    outline: none;
}

.release-modal-header {
    padding-inline-end: 36px;
    margin-bottom: 18px;
}

.release-modal-header h2 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #005a6a;
    font-weight: 800;
}

.release-modal-meta {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.release-modal-meta strong {
    color: #005a6a;
}

.release-modal-sep {
    color: #ccc;
    margin: 0 4px;
}

.release-modal-list {
    margin: 0;
    padding-inline-start: 20px;
    color: #444;
    font-size: 15px;
    line-height: 1.75;
}

.release-modal-list li {
    margin-bottom: 10px;
}

.release-modal-list li:last-child {
    margin-bottom: 0;
}

html[dir="rtl"] .footer-bottom-inner {
    direction: rtl;
}

@media (min-width: 769px) {
    .footer-bottom-inner {
        justify-content: space-between;
    }

    html[dir="rtl"] .footer-bottom-inner {
        flex-direction: row-reverse;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .footer-bottom-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    html[dir="rtl"] .footer-bottom-inner {
        flex-direction: row-reverse;
    }

    .footer-copy {
        text-align: start;
        flex: 1 1 auto;
        min-width: 0;
    }
}

html[dir="rtl"] .release-modal-header,
html[dir="rtl"] .release-modal-list {
    text-align: right;
}