/* Homepage presentation. Desktop stays on the approved global system; mobile is intentionally bespoke. */
.home-mobile-projects {
    display: none;
}

.home-page .impact-title {
    margin: 0 0 40px;
    color: #fff;
    font-weight: 800;
    text-align: center;
}

.home-page .impact-title span {
    display: block;
    margin-top: 2px;
    font-size: 1.5rem;
    font-weight: 400;
}

.home-page .impact-section {
    background:
        radial-gradient(circle at 50% 120%, rgba(105, 174, 215, 0.22), transparent 52%),
        linear-gradient(145deg, #245f8c 0%, #0f3759 82%);
    background-attachment: scroll;
}

.home-page .home-project-card__media-link,
.home-page .home-project-card__title-link,
.home-page .news-info h4 a,
.home-page .news-item__image-link {
    color: inherit;
    text-decoration: none;
}

.home-page .news-category {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(15, 55, 89, 0.08);
    color: #0f4f82;
    font-size: 0.7rem;
    font-weight: 800;
}

.home-page .home-empty-state {
    padding: 24px;
    border: 1px solid #e2eaf0;
    border-radius: 14px;
    background: #fff;
    color: #5f7080;
    text-align: center;
}

.home-page .ambassador-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.home-page .ambassador-box {
    justify-content: center;
    text-align: center;
}

.home-page .ambassador-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.home-page .ambassador-join-btn {
    gap: 8px;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(15, 55, 89, 0.18);
}

.home-page .btn-donate.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 767px) {
    .home-page {
        --home-navy: #0f3759;
        --home-blue: #12558a;
        --home-gold: #c28b1e;
        --home-ink: #112f49;
        --home-muted: #617386;
        --home-border: #dce6ee;
        --home-surface: #ffffff;
        overflow: clip;
        background: #fff;
    }

    .home-page .container {
        width: min(100% - 28px, 520px);
        padding-inline: 0;
    }

    /* Hero: show the whole panoramic composition and keep copy in its clear right half. */
    .home-page .hero-slider-section {
        min-height: 252px;
        overflow: hidden;
        border-bottom: 2px solid var(--home-gold);
        background: #f8f4ed;
    }

    .home-page .hero-slider-section .slider-wrapper {
        height: 252px;
        min-height: 252px;
    }

    .home-page .hero-slider-section .hero-slide,
    .home-page .hero-slider-section .hero-slide.active {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 252px;
        min-height: 252px;
        display: flex;
        align-items: stretch;
        padding: 0;
        overflow: hidden;
        isolation: isolate;
        background-color: #f8f4ed;
        background-image: var(--home-hero-image) !important;
        background-position: left top;
        background-repeat: no-repeat;
        background-size: 100% auto;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.42s ease;
    }

    .home-page .hero-slider-section .hero-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    .home-page .hero-slider-section .hero-slide::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background:
            linear-gradient(90deg, transparent 0%, transparent 43%, rgba(250, 247, 241, 0.3) 53%, rgba(250, 247, 241, 0.92) 75%, #faf7f1 100%),
            linear-gradient(0deg, #faf7f1 0%, rgba(250, 247, 241, 0.95) 21%, transparent 46%);
    }

    .home-page .hero-slider-section .hero-slide > .container {
        position: relative;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .home-page .hero-slider-section .hero-grid-layout {
        width: 52%;
        max-width: none;
        margin-right: 0;
        margin-left: auto;
    }

    .home-page .hero-slider-section .hero-content {
        width: 100%;
        min-height: 190px;
        padding: 15px 13px 54px;
        border: 0;
        background: transparent;
        box-shadow: none;
        text-align: start;
    }

    .home-page .hero-slider-section .hero-content .badge {
        display: none;
    }

    .home-page .hero-slider-section .hero-content h1 {
        max-width: 205px;
        margin: 0 0 6px;
        color: var(--home-navy);
        font-size: clamp(1.04rem, 4.8vw, 1.3rem);
        font-weight: 900;
        line-height: 1.31;
        letter-spacing: -0.02em;
        text-wrap: balance;
    }

    .home-page .hero-slider-section .hero-content h1 .highlight {
        color: #aa720d;
    }

    .home-page .hero-slider-section .hero-content p {
        display: -webkit-box;
        max-width: 205px;
        margin: 0;
        overflow: hidden;
        color: #354e64;
        font-size: clamp(0.64rem, 2.55vw, 0.75rem);
        font-weight: 500;
        line-height: 1.55;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .home-page .hero-slider-section .hero-actions {
        position: absolute;
        right: 50%;
        bottom: 15px;
        width: min(84%, 360px);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        transform: translateX(50%);
    }

    .home-page .hero-slider-section .hero-actions .btn {
        min-width: 0;
        min-height: 42px;
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px;
        border-radius: 8px;
        font-size: clamp(0.67rem, 2.65vw, 0.78rem);
        font-weight: 800;
        line-height: 1.25;
        text-align: center;
    }

    .home-page .hero-slider-section .hero-actions .btn-secondary {
        border-color: var(--home-navy);
        background: linear-gradient(135deg, #155b90, var(--home-navy));
        color: #fff;
        box-shadow: 0 7px 17px rgba(15, 55, 89, 0.18);
    }

    .home-page .hero-slider-section .hero-actions .btn-outline {
        border: 1px solid #174f7d;
        background: rgba(255, 255, 255, 0.92);
        color: var(--home-navy);
    }

    .home-page .hero-slider-section .slider-arrow {
        display: none;
    }

    .home-page .hero-slider-section .slider-dots-container {
        right: auto;
        bottom: 3px;
        left: 50%;
        gap: 5px;
        transform: translateX(-50%);
    }

    .home-page .hero-slider-section .dot {
        width: 6px;
        height: 6px;
        padding: 0;
        border: 0;
        background: rgba(15, 55, 89, 0.32);
    }

    .home-page .hero-slider-section .dot.active {
        width: 18px;
        background: var(--home-gold);
    }

    /* Proof points */
    .home-page .pattern-bg-wrapper {
        padding-top: 0;
        background: #fff;
    }

    .home-page .block-spacer {
        height: 20px;
    }

    .home-page .stats-section {
        margin-bottom: 52px;
    }

    .home-page .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .home-page .stat-card {
        min-height: 142px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 16px 10px;
        border: 1px solid rgba(15, 55, 89, 0.17);
        border-radius: 12px;
        box-shadow: 0 8px 22px rgba(15, 55, 89, 0.045);
    }

    .home-page .stat-card:hover {
        transform: none;
    }

    .home-page .stat-icon {
        margin-bottom: 5px;
        color: #315ce7;
        font-size: 1.85rem;
    }

    .home-page .stat-card h3 {
        margin-bottom: 2px;
        color: var(--home-blue);
        font-size: 1.65rem;
        line-height: 1.1;
    }

    .home-page .stat-card p {
        margin-bottom: 3px;
        color: #1b2e3f;
        font-size: 0.87rem;
        line-height: 1.35;
    }

    .home-page .stat-card span {
        max-width: 135px;
        color: var(--home-muted);
        font-size: 0.68rem;
        line-height: 1.4;
    }

    /* One curated donation project on mobile. */
    .home-page .projects-section--desktop {
        display: none;
    }

    .home-page .home-mobile-projects {
        display: block;
        padding: 18px 0 58px;
    }

    .home-page .section-title {
        margin-bottom: 22px;
    }

    .home-page .section-title span {
        margin-bottom: 5px;
        color: var(--home-gold);
        font-size: 0.78rem;
    }

    .home-page .section-title h2 {
        margin-bottom: 7px;
        color: var(--home-blue);
        font-size: clamp(1.28rem, 5.6vw, 1.55rem);
        line-height: 1.35;
        text-wrap: balance;
    }

    .home-page .section-title p {
        max-width: 430px;
        margin-inline: auto;
        color: #4d5e6d;
        font-size: 0.8rem;
        line-height: 1.7;
    }

    .home-page .home-project-card {
        max-width: 450px;
        margin-inline: auto;
        border: 1px solid rgba(15, 55, 89, 0.1);
        border-radius: 18px;
        box-shadow: 0 13px 34px rgba(15, 55, 89, 0.09);
    }

    .home-page .home-project-card:hover {
        transform: none;
    }

    .home-page .home-project-card__media {
        margin: 10px 10px 0;
        overflow: hidden;
        border-radius: 13px;
        background: #edf3f7;
        aspect-ratio: 4 / 3;
    }

    .home-page .home-project-card__media img {
        width: 100%;
        height: 100%;
        max-height: none;
        padding: 0;
        border-radius: 0;
        object-fit: cover;
    }

    .home-page .project-body {
        padding: 14px 16px 17px;
    }

    .home-page .project-body h3 {
        margin: 0 0 7px;
        color: var(--home-blue);
        font-size: 1.15rem;
        line-height: 1.45;
    }

    .home-page .project-body p {
        margin-bottom: 15px;
        color: #5b6b78;
        font-size: 0.82rem;
        line-height: 1.65;
    }

    .home-page .progress-container {
        gap: 10px;
        margin-bottom: 17px;
    }

    .home-page .progress-bar {
        height: 9px;
        background: #e8edf1;
    }

    .home-page .progress-fill {
        background: linear-gradient(90deg, #d6a64d, var(--home-gold));
    }

    .home-page .progress-percentage {
        color: var(--home-blue);
        font-size: 0.83rem;
    }

    .home-page .project-metrics {
        margin-bottom: 15px;
        padding-bottom: 14px;
    }

    .home-page .metric-item {
        min-width: 0;
        padding-inline: 3px;
    }

    .home-page .metric-item span {
        font-size: 0.7rem;
    }

    .home-page .metric-item strong {
        display: block;
        overflow-wrap: anywhere;
        color: var(--home-blue);
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .home-page .donation-controls {
        margin-bottom: 13px;
        border-color: #4386ad;
        border-radius: 9px;
    }

    .home-page .qty-btn,
    .home-page .qty-input {
        min-height: 44px;
        height: 44px;
    }

    .home-page .qty-btn {
        width: 48px;
        background: #4386ad;
    }

    .home-page .quick-amounts {
        gap: 8px;
        margin-bottom: 13px;
    }

    .home-page .quick-btn {
        min-width: 0;
        height: 44px;
        border-radius: 7px;
        background: #4386ad;
        font-size: 0.85rem;
    }

    .home-page .project-actions {
        gap: 9px;
    }

    .home-page .btn-donate,
    .home-page .btn-cart {
        min-height: 47px;
        height: auto;
        border-radius: 8px;
        font-size: 0.94rem;
    }

    .home-page .btn-donate {
        background: #4386ad;
    }

    .home-page .btn-cart {
        background: #cea04b;
    }

    .home-page .home-mobile-projects .center-btn-wrapper {
        margin: 20px 0 0;
    }

    .home-page .home-mobile-projects .btn-outline-alt {
        min-height: 44px;
        padding: 9px 22px;
        border-color: #1b5b91;
        border-radius: 8px;
        color: var(--home-navy);
        font-size: 0.84rem;
        font-weight: 800;
    }

    /* Impact band */
    .home-page .impact-section {
        margin-top: 0;
        padding: 32px 0 34px;
        background:
            radial-gradient(circle at 50% 115%, rgba(105, 174, 215, 0.28), transparent 55%),
            linear-gradient(145deg, #1c628f 0%, #0f3759 78%);
        background-attachment: scroll;
    }

    .home-page .impact-title {
        margin-bottom: 17px;
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .home-page .impact-title span {
        margin-top: 2px;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .home-page .impact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-page .impact-card {
        min-height: 76px;
        display: grid;
        grid-template-columns: 34px 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 8px;
        padding: 11px 10px;
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 8px 18px rgba(4, 30, 49, 0.13);
        text-align: start;
    }

    .home-page .impact-card:hover {
        transform: none;
    }

    .home-page .impact-card i {
        grid-row: 1 / 3;
        margin: 0;
        color: var(--home-gold);
        font-size: 1.45rem;
        text-align: center;
    }

    .home-page .impact-card h3 {
        margin: 0;
        color: #1f6094;
        font-size: 1.05rem;
        line-height: 1.15;
    }

    .home-page .impact-card p {
        color: #4c5d6b;
        font-size: 0.67rem;
        font-weight: 700;
        line-height: 1.3;
    }

    /* Story followed by news, matching reading order. */
    .home-page .news-story-section {
        grid-template-columns: 1fr;
        gap: 54px;
        margin-top: 55px;
        margin-bottom: 52px;
    }

    .home-page .column-title {
        margin-bottom: 20px;
        padding: 0;
        border: 0;
        text-align: center;
    }

    .home-page .column-title::after {
        display: none;
    }

    .home-page .column-title h3 {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 11px;
        color: var(--home-navy);
        font-size: clamp(1.4rem, 6.5vw, 1.8rem);
        line-height: 1.25;
    }

    .home-page .column-title h3::before,
    .home-page .column-title h3::after {
        content: "";
        width: clamp(30px, 12vw, 52px);
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--home-gold));
    }

    .home-page .column-title h3::after {
        transform: scaleX(-1);
    }

    .home-page .story-card {
        overflow: visible;
        border: 0;
        border-radius: 16px;
        box-shadow: none;
    }

    .home-page .video-placeholder {
        height: auto;
        overflow: hidden;
        border-radius: 15px;
        background: #071d2d;
        aspect-ratio: 16 / 9;
        box-shadow: 0 12px 28px rgba(15, 55, 89, 0.12);
    }

    .home-page .video-placeholder img {
        object-fit: cover;
        opacity: 0.92;
    }

    .home-page .play-btn {
        width: 58px;
        height: 58px;
        color: var(--home-navy);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
    }

    .home-page .story-body {
        margin-top: 10px;
        padding: 19px 17px 18px;
        border: 1px solid rgba(15, 55, 89, 0.07);
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 9px 25px rgba(15, 55, 89, 0.07);
        text-align: center;
    }

    .home-page .story-body h4 {
        margin-bottom: 8px;
        color: var(--home-blue);
        font-size: 1.25rem;
        line-height: 1.4;
    }

    .home-page .story-body p {
        margin-bottom: 15px;
        color: #354757;
        font-size: 0.88rem;
        line-height: 1.75;
    }

    .home-page .story-body .btn-outline-sm {
        width: 100%;
        min-height: 50px;
        border: 1px solid var(--home-gold);
        border-radius: 10px;
        background: linear-gradient(135deg, #155b90, var(--home-navy));
        color: #fff;
        font-size: 1rem;
        font-weight: 800;
    }

    .home-page .story-body .btn-outline-sm i {
        color: #f4bd53;
    }

    .home-page .news-column .column-title h3 {
        font-size: clamp(1.25rem, 5.7vw, 1.55rem);
    }

    .home-page .news-list {
        gap: 10px;
    }

    .home-page .news-item {
        min-height: 116px;
        align-items: stretch;
        gap: 10px;
        padding: 5px;
        border: 1px solid rgba(15, 55, 89, 0.14);
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 5px 13px rgba(15, 55, 89, 0.055);
    }

    .home-page .news-item__image-link {
        flex: 0 0 47%;
        overflow: hidden;
        border-radius: 7px;
    }

    .home-page .news-item img {
        width: 100%;
        height: 100%;
        min-height: 104px;
        border-radius: 0;
        object-fit: cover;
    }

    .home-page .news-info {
        min-width: 0;
        padding: 4px 3px 4px 5px;
    }

    .home-page .news-category {
        margin-bottom: 2px;
        padding: 2px 6px;
        font-size: 0.58rem;
    }

    .home-page .news-info h4 {
        display: -webkit-box;
        margin-bottom: 2px;
        overflow: hidden;
        color: var(--home-navy);
        font-size: 0.85rem;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .home-page .news-info p {
        margin: 2px 0;
        color: #536473;
        font-size: 0.68rem;
        line-height: 1.45;
        -webkit-line-clamp: 2;
    }

    .home-page .news-date {
        color: #276796;
        font-size: 0.66rem;
    }

    .home-page .news-column > .btn-outline-full {
        width: fit-content;
        min-width: 190px;
        min-height: 44px;
        margin: 14px auto 0;
        padding: 8px 18px;
        border-color: #1e61a6;
        border-radius: 7px;
        color: var(--home-navy);
        font-size: 0.82rem;
        font-weight: 800;
    }

    /* Closing ambassador invitation */
    .home-page .ambassador-section {
        width: min(100% - 16px, 520px);
        margin-top: 0;
        margin-bottom: 42px;
    }

    .home-page .ambassador-box {
        min-height: 122px;
        padding: 18px 16px;
        border: 1px solid rgba(194, 139, 30, 0.35);
        border-radius: 14px;
        background:
            radial-gradient(circle at 0 100%, rgba(194, 139, 30, 0.08), transparent 32%),
            radial-gradient(circle at 100% 0, rgba(15, 55, 89, 0.06), transparent 34%),
            #fffdf9;
        box-shadow: 0 7px 18px rgba(15, 55, 89, 0.07);
    }

    .home-page .ambassador-content h2 {
        margin-bottom: 5px;
        color: var(--home-navy);
        font-size: 1.32rem;
        line-height: 1.3;
    }

    .home-page .ambassador-content p {
        margin-bottom: 11px;
        color: #526270;
        font-size: 0.74rem;
        line-height: 1.55;
    }

    .home-page .ambassador-join-btn {
        min-height: 40px;
        padding: 8px 17px;
        border-radius: 7px;
        font-size: 0.72rem;
        box-shadow: 0 7px 16px rgba(15, 55, 89, 0.15);
    }

    [dir="ltr"] .home-page .hero-slider-section .hero-content {
        direction: ltr;
    }
}

@media (max-width: 360px) {
    .home-page .hero-slider-section,
    .home-page .hero-slider-section .slider-wrapper,
    .home-page .hero-slider-section .hero-slide,
    .home-page .hero-slider-section .hero-slide.active {
        height: 268px;
        min-height: 268px;
    }

    .home-page .hero-slider-section .hero-grid-layout {
        width: 55%;
    }

    .home-page .hero-slider-section .hero-content {
        padding-inline: 10px;
    }

    .home-page .hero-slider-section .hero-actions {
        width: calc(100% - 24px);
    }

    .home-page .stat-card {
        min-height: 136px;
        padding-inline: 7px;
    }

    .home-page .quick-amounts {
        gap: 5px;
    }

    .home-page .quick-btn {
        font-size: 0.76rem;
    }

    .home-page .news-item__image-link {
        flex-basis: 42%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-page .hero-slider-section .hero-slide {
        transition: none;
    }
}
