/* ============================
   USER HOME (post Get Started)
============================ */

#user-home {
    width: 100%;
    background: #FFFFFF;
    position: relative;
}

/* HERO COVER */
.uh-cover {
    position: relative;
    width: 100%;
    min-height: 450px;
    background: url('../assets/images/Cover/Cov2.jpg') center / cover no-repeat;
    display: flex;
    align-items: center;
}

.uh-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0) 75%);
}

.uh-cover-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 60px 5%;
}

.uh-cover-badge {
    display: inline-flex;
    padding: 3px 7px 3px 5px;
    justify-content: center;
    align-items: center;
    background: #FDC409;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: -1.05px;
    color: #000000;
    margin-bottom: 20px;
    width: fit-content;
}

.uh-cover-title {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: clamp(26px, 5vw, 40px);
    line-height: 100%;
    letter-spacing: -2.8px;
    color: #FFFFFF;
    margin-bottom: 20px;
}

.uh-cover-text {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 13px;
    line-height: 156%;
    letter-spacing: -0.91px;
    color: #FFFFFF;
    max-width: 576px;
    margin-bottom: 24px;
}

.uh-cover-btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.uh-cover-btn {
    display: flex;
    width: 176px;
    height: 39px;
    padding: 12px 46px 13px 45px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: #F47A20;
    border-radius: 7px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
    line-height: 100%;
    color: #FFFBFB;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.uh-cover-btn--dark {
    background: #002148;
    /* "Donate" is much shorter than "Become a Volunteer" — the shared
       .uh-cover-btn width/padding above was sized for that longer label,
       which left this one looking stretched out with a lot of empty
       space around a short word. Dropping the fixed width and using a
       smaller, symmetric padding lets it hug "Donate" instead. */
    width: auto;
    padding: 12px 32px 13px 32px;
}

.uh-cover-btn--dark:hover {
    background: #0A3A73;
}

/* PROGRAMS */
.uh-programs {
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 5%;
}

.uh-eyebrow {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: #F47A20;
    margin-bottom: 12px;
}

.uh-programs-title {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: clamp(22px, 3vw, 28px);
    letter-spacing: -0.02em;
    color: #000000;
    margin-bottom: 16px;
}

.uh-programs-desc {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 156%;
    color: #000000;
    max-width: 400px;
    margin-bottom: 40px;
}

.uh-programs-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.uh-program-card {
    flex: 1 1 300px;
    min-width: 280px;
    background: #FFFAF3;
    box-shadow: 0 3px 10px rgba(244, 122, 32, 0.55);
    border-radius: 20px;
    padding: 32px 24px;
}

.uh-program-icon {
    width: 78px;
    height: 77px;
    background: #F47A20;
    border-radius: 12px;
    box-shadow: 0 2px 2.8px rgba(0, 0, 0, 0.25);
    margin-bottom: 16px;
}

.uh-program-name {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 28px;
    color: #000000;
    margin-bottom: 12px;
}

.uh-program-desc {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 156%;
    color: #000000;
}

/* WHO WE ARE */
.uh-who-we-are {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: flex-start;
    gap: 60px;
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 5%;
}

.uh-wwa-left {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: nowrap;
}

.uh-wwa-right {
    display: flex;
    gap: 40px;
}

.uh-wwa-photo {
    flex: 0 0 300px;
    width: 300px;
    max-width: 100%;
    height: 240px;
    background: #FFFAF3 url('../assets/images/who-we-are.jpg') 50% / cover no-repeat;
    box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 19px;
}

.uh-wwa-content {
    flex: 1 1 400px;
}

.uh-wwa-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: -1.05px;
    color: #F47A20;
    margin-bottom: 12px;
}

.uh-wwa-title {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: -1.68px;
    color: #000000;
    margin-bottom: 16px;
}

.uh-wwa-desc {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 13px;
    line-height: 156%;
    letter-spacing: -0.91px;
    color: #000000;
    max-width: 448px;
}

/* WHO WE ARE - Mission/Vision/Values column */
.uh-wwa-divider {
    width: 1px;
    align-self: stretch;
    background: #FFE6D4;
    flex-shrink: 0;
}

.uh-wwa-mvv {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.uh-mvv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.uh-mvv-text {
    flex: 1;
}

.uh-mvv-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.uh-mvv-label--mission {
    color: #F47A20;
}

.uh-mvv-label--vision {
    color: #002148;
}

.uh-mvv-label--values {
    color: #000000;
}

.uh-mvv-desc {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    line-height: 156%;
    letter-spacing: -0.02em;
    color: #000000;
    max-width: 315px;
}

.uh-mvv-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 2px 2.8px rgba(0, 0, 0, 0.25);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================
   RESPONSIVE BREAKPOINTS (HOME)
============================ */

@media (max-width: 1024px) {
    .uh-nav-links {
        gap: 24px;
    }

    .uh-nav-link,
    .uh-login-link,
    .uh-volunteer-btn {
        font-size: 15px;
    }
}

@media (max-width: 900px) {
    .uh-navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 5%;
        gap: 16px;
    }

    .uh-nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .uh-cover {
        min-height: 350px;
    }

    .uh-cover-content {
        max-width: 100%;
        text-align: left;
    }

    .uh-programs-row {
        flex-direction: column;
    }

    .uh-who-we-are {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .uh-wwa-left {
        flex-direction: column;
    }

    .uh-wwa-right {
        width: 100%;
        justify-content: center;
    }

    .uh-wwa-eyebrow {
        justify-content: center;
    }

    .uh-wwa-divider {
        display: none;
    }

    .uh-mvv-row {
        flex-direction: column;
        text-align: center;
    }

    .uh-mvv-desc {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .uh-nav-right {
        gap: 12px;
    }

    .uh-login-link span {
        display: none;
    }

    .uh-volunteer-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .uh-cover-text {
        font-size: 13px;
    }
}

/* STORIES OF IMPACT */
.uh-stories {
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 5%;
}

.uh-stories-title {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: clamp(22px, 3vw, 28px);
    letter-spacing: -0.02em;
    color: #000000;
    margin-bottom: 12px;
}

.uh-stories-desc {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 156%;
    color: #000000;
    max-width: 450px;
    margin-bottom: 40px;
}

.uh-stories-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.uh-story-card {
    background: #FFFFFF;
    box-shadow: 0 3px 10px rgba(244, 122, 32, 0.55);
    border-radius: 20px;
    overflow: hidden;
    padding-bottom: 20px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    /* Fixed height so every card matches the other 3 regardless of how
       long its title/description is, or how many other cards happen to
       share its page — grid's own "stretch to tallest sibling" behavior
       only kicks in when multiple cards share the same row, so a card
       landing alone on its own page (e.g. story #5) would otherwise
       render shorter than the rest. */
    height: 331px;
    display: flex;
    flex-direction: column;
}

.uh-story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(244, 122, 32, 0.65);
}

.uh-story-image {
    width: 100%;
    height: 136px;
    background: #FDE9D7;
    border-radius: 20px 20px 0 0;
}

.uh-story-date {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 156%;
    color: #5C616E;
    margin: 16px 18px 0;
}

.uh-story-title {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: -0.02em;
    color: #000000;
    margin: 12px 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.uh-story-desc {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 156%;
    color: #5C616E;
    margin: 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .uh-stories-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .uh-stories-row {
        grid-template-columns: 1fr;
    }

    .uh-story-card {
        max-width: 100%;
        width: 100%;
    }
}

/* STATS BAR */
.uh-stats {
    max-width: 1400px;
    margin: 60px auto;
    padding: 40px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    border-top: 1px solid #FBD2B4;
}

.uh-stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 200px;
}

.uh-stat-icon {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 2px 2.8px rgba(0, 0, 0, 0.25);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uh-stat-icon svg {
    width: 34px;
    height: auto;
    max-height: 34px;
}

.uh-stat-text {
    display: flex;
    flex-direction: column;
}

.uh-stat-number {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: -0.02em;
    color: #000000;
    margin-bottom: 4px;
}

.uh-stat-label {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 13px;
    line-height: 156%;
    color: #000000;
}

.uh-stat-divider {
    width: 1px;
    height: 45px;
    background: #FBD2B4;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .uh-stats {
        justify-content: center;
    }

    .uh-stat-divider {
        display: none;
    }

    .uh-stat-item {
        flex: 1 1 45%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .uh-stat-item {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* PHOTOS GALLERY */
.uh-photos {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 5%;
}

.uh-photos-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.uh-photos-desc {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 156%;
    color: #000000;
}

.uh-view-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #002148;
    border-radius: 7px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: -0.02em;
    color: #FFFBFB;
    text-decoration: none;
    white-space: nowrap;
}

.uh-photos-belt-wrapper {
    width: calc(100% + 80px);
    margin: 0 -40px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.uh-photos-belt {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: uh-belt-scroll 60s linear infinite;
    --belt-scroll-distance: 50%; /* fallback until JS measures the exact pixel distance */
}

.uh-photos-belt:hover {
    animation-play-state: paused;
}

.uh-photo {
    flex-shrink: 0;
    width: 340px;
    height: 220px;
    background: #FDE9D7;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(244, 122, 32, 0.55);
}

@keyframes uh-belt-scroll {
    from {
        transform: translateX(0);
    }
    to {
        /* Content is duplicated (6 real photos + 6 identical duplicates)
           so the belt loops seamlessly. --belt-scroll-distance is set by
           JS to the EXACT pixel distance from the start of photo 1 to the
           start of its duplicate (photo 7) — a simple 50% doesn't work
           here because 12 items have 11 gaps between them (an odd
           number), so the true midpoint doesn't land exactly on an item
           boundary. That mismatch was the visible "gap/snap" at the end
           of each cycle instead of a truly continuous loop. */
        transform: translateX(calc(-1 * var(--belt-scroll-distance)));
    }
}

@media (max-width: 480px) {
    .uh-photo {
        width: 260px;
        height: 170px;
    }
}

/* UPCOMING EVENTS */
.uh-events {
    max-width: 1400px;
    margin: 60px auto 80px;
    padding: 0 5%;
    text-align: center;
}

.uh-eyebrow--center {
    display: block;
    text-align: center;
    margin-bottom: 24px;
}

.uh-events-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.uh-event-card {
    flex: 1 1 300px;
    max-width: 340px;
    background: #FFFFFF;
    box-shadow: 0 3px 10px rgba(244, 122, 32, 0.55);
    border-radius: 20px;
    padding: 24px;
    text-align: left;
}

.uh-event-name {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: -0.02em;
    color: #000000;
    margin-bottom: 8px;
}

.uh-event-location,
.uh-event-time {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 156%;
    color: #5C616E;
}

@media (max-width: 480px) {
    .uh-photos-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================
   SCROLL REVEAL ANIMATIONS
   Sections and cards start hidden/offset, then smoothly fade + slide
   into place the first time they scroll into view (via IntersectionObserver
   in script.js). Cards within a grid stagger slightly via nth-child delay.
   Purely additive — does not modify any rule above.
============================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for cards within a row/grid */
.scroll-reveal--card:nth-child(1) { transition-delay: 0s; }
.scroll-reveal--card:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal--card:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal--card:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* HERO BACKGROUND SLIDESHOW — up to 4 admin-uploaded images cross-fading
   behind the existing overlay/content, appended without touching any
   rule above. Layers sit first inside .uh-cover so the existing overlay
   and content naturally stack on top without needing z-index changes. */
.uh-cover-bg-layers {
    position: absolute;
    inset: 0;
}

.uh-cover-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.uh-cover-bg-layer--active {
    opacity: 1;
}

/* ============================
   STORY MODAL — clicking a Stories of Impact card opens the full short
   read here, instead of just the preview blurb on the card itself.
   ============================ */
.uh-story-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 30px;
}
.uh-story-modal-overlay--open {
    display: flex;
}
.uh-story-modal-box {
    background: #FFFFFF;
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.uh-story-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #002148;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.uh-story-modal-image {
    width: 100%;
    height: 220px;
    background: #FDE9D7;
    border-radius: 20px 20px 0 0;
    background-size: cover;
    background-position: center;
}
.uh-story-modal-body {
    padding: 28px 32px 36px;
}
.uh-story-modal-date {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: #F47A20;
    display: block;
    margin-bottom: 8px;
}
.uh-story-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 26px);
    color: #002148;
    margin-bottom: 16px;
    line-height: 130%;
}
.uh-story-modal-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 172%;
    color: #3D3D3D;
}
.uh-story-modal-text p {
    margin-bottom: 14px;
}
.uh-story-modal-text p:last-child {
    margin-bottom: 0;
}

/* ============================
   STORIES CAROUSEL NAV — Prev/Next + dots, shown only when there are
   more stories than fit on one page. The row itself fades between
   pages rather than jumping instantly (see .uh-stories-row--transitioning
   in script.js).
   ============================ */
.uh-stories-row {
    transition: opacity 0.25s ease;
}
.uh-stories-row--transitioning {
    opacity: 0;
}

.uh-stories-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.uh-stories-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #E5E5E5;
    background: #FFFFFF;
    color: #002148;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.uh-stories-nav-btn:hover {
    background: #FFF3E9;
    border-color: #F47A20;
}
.uh-stories-nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.uh-stories-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}
.uh-stories-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E5E5E5;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}
.uh-stories-dot--active {
    background: #F47A20;
    transform: scale(1.3);
}
/* The photo belt bleeds past the section padding on desktop via
   width: calc(100% + 80px) with -40px side margins. On a phone that
   overshoots the viewport by ~21px and makes the whole page scroll
   sideways, so the bleed is dropped below 700px. */
/* The breakpoint is 900px, not 700px: the bleed is calc(100% + 80px)
   against a 5% side padding, so it only stops overshooting once 5% of
   the viewport exceeds 40px — i.e. above 800px wide. At 768px it still
   spilled by 2px, which is enough to make the page scroll sideways. */
@media (max-width: 900px) {
    .uh-photos-belt-wrapper {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 700px) {
    .uh-photo { width: 240px; height: 160px; }
}