/**
 * Homepage "Experiences You'll Talk About" expanding gallery
 * (Views/Home/_ActivityExperiences.cshtml).
 *
 * Plain CSS, no script. A light warm band. Phones: a stack of photo cards, story always shown.
 * Desktop: a row of tall panels - one open (wide, with its story), the rest
 * slim strips with a vertical label; hovering or keyboard focus opens a
 * panel, and the flex-grow change animates the widths. Logical properties
 * keep it correct in RTL; motion stops under prefers-reduced-motion.
 */

.act {
    --act-red: #8B2225;
    --act-gold: #E3B95F;
    --act-bg: #FBF6F1;
    --act-ink: #1F1A17;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: 56px 64px;
    background:
        radial-gradient(60% 70% at 0% 0%, rgba(139, 34, 37, 0.07), transparent 70%),
        radial-gradient(50% 60% at 100% 100%, rgba(227, 185, 95, 0.18), transparent 70%),
        var(--act-bg);
    color: var(--act-ink);
}

.act .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}

/* ---- Heading row ------------------------------------------------------- */

.act-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 26px;
}

.act-title {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.act-subtitle {
    margin: 8px 0 0;
    color: #6B625C;
    font-size: 15px;
    line-height: 1.55;
}

.act-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--act-red);
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none;
}

.act-all-icon {
    transition: transform 0.25s ease;
}

.act-all:hover .act-all-icon {
    transform: translateX(3px);
}

/* ---- Panels: phones (stacked cards) ------------------------------------ */

.act-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.act-link {
    position: relative;
    display: block;
    height: 230px;
    overflow: hidden;
    border-radius: 22px;
    background: #E9E3DD;
    color: #FFFFFF;
    box-shadow: 0 18px 36px -24px rgba(20, 12, 8, 0.55);
    text-decoration: none;
    isolation: isolate;
}

.act-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.act-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(12, 9, 8, 0.72) 0%, rgba(12, 9, 8, 0.18) 45%, rgba(12, 9, 8, 0) 70%);
}

/* The slim-strip label only exists on desktop. */
.act-strip {
    display: none;
}

.act-story {
    position: absolute;
    inset-inline: 18px;
    inset-block-end: 16px;
    display: flex;
    flex-direction: column;
    max-width: 460px;
}

.act-number {
    color: var(--act-gold);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.act-story-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
}

.act-story-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--act-red);
    color: #FFFFFF;
    font-size: 20px !important;
}

.act-story-text {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14.5px;
    line-height: 1.5;
}

.act-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--act-gold);
    font-size: 14px;
    font-weight: 800;
}

.act-cta-icon {
    transition: transform 0.25s ease;
}

.act-link:hover .act-cta-icon {
    transform: translateX(4px);
}

.act-link:focus-visible,
.act-all:focus-visible {
    outline: 3px solid var(--act-red);
    outline-offset: 3px;
}

/* ---- RTL --------------------------------------------------------------- */

[dir="rtl"] .act-all-icon,
[dir="rtl"] .act-cta-icon {
    transform: scaleX(-1);
}

[dir="rtl"] .act-all:hover .act-all-icon {
    transform: scaleX(-1) translateX(3px);
}

[dir="rtl"] .act-link:hover .act-cta-icon {
    transform: scaleX(-1) translateX(4px);
}

/* ---- Desktop: expanding panels ----------------------------------------- */
/* 900px = the site's compact breakpoint. */
@media (min-width: 900px) {
    .act {
        padding-block: 80px 88px;
    }

    .act-head {
        margin-bottom: 34px;
    }

    .act-title {
        font-size: 40px;
    }

    .act-list {
        display: flex;
        gap: 12px;
        height: 460px;
    }

    .act-panel {
        flex: 1 1 0;
        min-width: 0;
        transition: flex-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .act-link {
        height: 100%;
    }

    /* Slim strip: icon at the bottom, title running up the panel. */
    .act-strip {
        position: absolute;
        inset-inline: 0;
        inset-block-end: 22px;
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        gap: 14px;
        transition: opacity 0.3s ease;
    }

    .act-strip-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        font-size: 20px !important;
    }

    .act-strip-label {
        font-size: 17px;
        font-weight: 800;
        letter-spacing: 0.02em;
        white-space: nowrap;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
    }

    /* Story hidden until the panel opens. */
    .act-story {
        inset-inline: 30px;
        inset-block-end: 28px;
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.3s ease, transform 0.4s ease;
        pointer-events: none;
    }

    .act-story-title {
        font-size: 30px;
    }

    .act-story-text {
        font-size: 15.5px;
    }

    /* Open: the default panel while nothing is hovered or focused, otherwise
       whichever panel is hovered or holds keyboard focus. */
    .act-list:not(:hover):not(:focus-within) > .act-panel.is-open,
    .act-list > .act-panel:hover,
    .act-list > .act-panel:focus-within {
        flex-grow: 5;
    }

    .act-list:not(:hover):not(:focus-within) > .act-panel.is-open .act-strip,
    .act-list > .act-panel:hover .act-strip,
    .act-list > .act-panel:focus-within .act-strip {
        opacity: 0;
    }

    .act-list:not(:hover):not(:focus-within) > .act-panel.is-open .act-story,
    .act-list > .act-panel:hover .act-story,
    .act-list > .act-panel:focus-within .act-story {
        opacity: 1;
        transform: none;
        transition-delay: 0.2s;
    }

    .act-list > .act-panel:hover .act-image,
    .act-list > .act-panel:focus-within .act-image {
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .act-panel,
    .act-image,
    .act-strip,
    .act-story,
    .act-cta-icon,
    .act-all-icon {
        transition: none !important;
    }

    .act-list > .act-panel:hover .act-image,
    .act-list > .act-panel:focus-within .act-image {
        transform: none;
    }
}
