/**
 * Component: Featured Activities
 *
 * Premium glass & gold accordion/carousel component.
 * Redesigned with modern glass morphism and refined gold accents.
 */

/* Wrapper reset so the band stays neutral in any layout */
.vu-activity-featured-band {
    margin: 0;
    padding: 0;
}

/* ========================================
   ROOT TOKENS & VARIABLES
   ======================================== */
.vu-activity-featured {
    /* Glass surfaces */
    --fa-glass-light: rgba(255, 255, 255, .7);
    --fa-glass-mid: rgba(255, 255, 255, .55);
    --fa-glass-dark: rgba(15, 24, 52, .03);
    --fa-glass-blur: 16px;
    --fa-glass-border: rgba(255, 255, 255, .6);

    /* Gold spectrum */
    --fa-gold: #ffd900;
    --fa-gold-soft: #fff6a5;
    --fa-gold-glow: rgba(255, 217, 0, .35);
    --fa-gold-subtle: rgba(255, 217, 0, .12);

    /* Ink & surfaces */
    --fa-ink: #0a0f1f;
    --fa-ink-muted: #3d4663;
    --fa-surface: #f8faff;
    --fa-surface-warm: #fffef8;

    /* Shadows - layered for depth */
    --fa-shadow-soft: 0 8px 32px rgba(15, 24, 52, .28);
    --fa-shadow-medium: 0 16px 48px rgba(15, 24, 52, .12);
    --fa-shadow-strong: 0 24px 64px rgba(15, 24, 52, .16);
    --fa-shadow-gold: 0 12px 40px var(--fa-gold-glow);

    /* Layout */
    --fa-shell-max: min(96vw, 1180px);
    --fa-thumb-min: 150px;
    --fa-thumb-max: 200px;
    --fa-panels-ar: 2 / 1;
    --fa-radius-lg: 28px;
    --fa-radius-md: 20px;
    --fa-radius-sm: 14px;

    /* Animation */
    --fa-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --fa-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    position: relative;
    max-width: var(--fa-shell-max);
    margin: clamp(32px, 4vw, 48px) auto;
    width: 100%;
    container-type: inline-size;
    container-name: featured;
    box-sizing: border-box;
}

/* ========================================
   SHELL - The main container
   White glass with gold accents
   ======================================== */
.vu-activity-featured-shell {
    position: relative;
    padding: clamp(5px, .5vw, 10px);
    /* White glass gradient */
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, .35) 10%,
        rgba(255, 255, 255, .78) 30%,
        rgba(250, 252, 255, .69) 86%,
        rgba(255, 255, 255, .60) 90%
    );
    border-radius: var(--fa-radius-lg);
    border: 6px double var(--fa-gold);
    box-shadow:
        /* Soft gold outer glow */
        0 0 50px -10px rgba(255, 217, 0, .35),
        /* White radiance */
        0 0 80px -15px rgba(255, 255, 255, .9),
        /* Soft depth */
        0 20px 50px -15px rgba(0, 0, 0, .12),
        /* Crisp inner highlight */
        inset 0 2px 0 rgba(255, 255, 255, 1),
        /* Inner glass edge */
        inset 0 0 30px rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    isolation: isolate;
    overflow: visible;
}

/* Subtle light accents */
.vu-activity-featured-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        /* Top highlight */
        radial-gradient(ellipse 80% 30% at 50% 0%, rgba(255, 255, 255, .90), transparent 50%),
        /* Corner gold hints */
        radial-gradient(ellipse 40% 30% at 5% 5%, rgba(225, 227, 200, .41), transparent 40%),
        radial-gradient(ellipse 40% 30% at 95% 5%, rgba(255, 217, 0, .1), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* Outer glow aura - contained within parent to prevent horizontal overflow */
.vu-activity-featured-shell::after {
    content: "";
    position: absolute;
    /* Use inset: 0 instead of -10px to prevent overflow; achieve glow via larger blur radius */
    inset: 0;
    border-radius: inherit;
    background: transparent;
    box-shadow:
        /* Soft gold halo - increased blur to compensate for no negative inset */
        0 0 50px 8px rgba(255, 217, 0, .12),
        0 0 80px 12px rgba(255, 255, 255, .10);
    pointer-events: none;
    z-index: -1;
}

.vu-activity-featured-shell > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   SUBHEAD / SECTION TITLE
   ======================================== */
.vu-activity-featured-subhead {
    text-align: center;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    color: var(--fa-ink);
    margin: 10px 0 0 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .35em;
    position: relative;
    text-shadow: 0 1px rgba(255, 255, 255, .8);
    opacity:80%;
}

/* Fun golden underline */
.vu-activity-featured-subhead::after {
    content: "";
    display: block;
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg,
        transparent,
        var(--fa-gold) 20%,
        var(--fa-gold-soft) 50%,
        var(--fa-gold) 80%,
        transparent
    );
    margin: .7rem auto 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 217, 0, .4);
}

/* ========================================
   SCROLL CONTAINER - Centered Carousel
   ======================================== */
.vu-featured-scroll {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    padding-block: clamp(16px, 2vw, 24px);
    padding-inline: 8px;
    margin-inline: -8px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge legacy */
    cursor: grab;
}

.vu-featured-scroll::-webkit-scrollbar {
    display: none;
}

/* ========================================
   THUMBNAIL GRID (Tab List) - Centered Carousel
   ======================================== */
.vu-activity-featured-grid {
    display: flex;
    gap: clamp(14px, 2vw, 22px);
    padding: 1px;
    list-style: none;
    margin: 0;
    width: max-content;
}

/* ========================================
   THUMBNAIL CARDS (Tabs)
   ======================================== */
.vu-activity-featured-link {
    position: relative;
    display: grid;
    place-items: end start;
    padding: clamp(.5rem, .7vw, .85rem);
    border-radius: var(--fa-radius-md);
    overflow: hidden;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    line-height: 1;
    background: var(--fa-ink);
    cursor: pointer;
    flex: 0 0 clamp(var(--fa-thumb-min), 21vw, var(--fa-thumb-max));
    scroll-snap-align: start;
    -webkit-user-select: none;
    user-select: none;
    border: 2px solid transparent;
    isolation: isolate;
    text-decoration: none;
    aspect-ratio: 1.5 / 1;
    transition:
        transform 280ms var(--fa-ease-out),
        box-shadow 280ms var(--fa-ease-out),
        border-color 200ms ease;
}

/* Glass overlay on cards */
.vu-activity-featured-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, .08) 0%,
        transparent 40%
    );
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms ease;
}

/* Gradient for text readability */
.vu-activity-featured-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 15, 31, .95) 0%,
        rgba(10, 15, 31, .4) 45%,
        transparent 100%
    );
    pointer-events:none;
    z-index: 1;
}

/* Card image */
.vu-activity-featured-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transition:
        transform 500ms var(--fa-ease-out),
        filter 200ms ease;
    pointer-events: none;
    z-index: 0;
}

/* Card image - proper img element for srcset/sizes optimization */
.vu-activity-featured-media-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Card title */
.vu-activity-featured-name {
    position: relative;
    z-index: 3;
    text-shadow: 2px 1.5px 1px rgba(0, 0, 0, 1);
    font-size: clamp(.85rem, 1.8vw, 1.2rem);
    text-align: left;
    max-width: 100%;
}

/* ----------------------------------------
   Card Hover State
   ---------------------------------------- */
.vu-activity-featured-link:hover,
.vu-activity-featured-link:focus-visible {
    border-style:double;
    border-color: aquamarine;
    border-width: 5px;
    transform: scale(1.05);
}

.vu-activity-featured-link:hover::before,
.vu-activity-featured-link:focus-visible::before {
    opacity: 1;
}

.vu-activity-featured-link:hover .vu-activity-featured-media,
.vu-activity-featured-link:focus-visible .vu-activity-featured-media {
    filter: brightness(1.25);
}

.vu-activity-featured-link:focus-visible {
    outline: none;
    border-color: var(--fa-gold);
}

/* ----------------------------------------
   Card Active State - The "Selected" Look
   Now centered within the animated frame
   ---------------------------------------- */
.vu-activity-featured-link.is-active {
    /* Active card gets subtle highlight - the frame is the main indicator */
    border-color: transparent;
    box-shadow:
                /* Depth shadow */
        0 0px 1px 5px rgba(255, 217, 0, 1),
        /* Soft glow to show it's selected */
        0 0 15px 5px rgba(255, 250, 0, 1);

    /* Keep the active card above siblings/container for visibility + hit testing. */
    z-index: 2;
    animation: faCenterPulse 2.5s ease-in-out infinite;
    transform: scale(1.06);
}

.vu-activity-featured-link.is-active::before {
    opacity: 1;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, .15) 50%,
        transparent 60%
    );
}

.vu-activity-featured-link.is-active .vu-activity-featured-media {
    filter: saturate(1.3) brightness(1.08);
}

/* Gold indicator bar at bottom of active card */
.vu-activity-featured-link.is-active::after {
    background: linear-gradient(
        to top,
        rgba(255, 217, 0, .96) 20%,
        rgba(255, 217, 0, .0) 40%,
        transparent 100%
    );
}

/* ========================================
   PANELS CONTAINER
   ======================================== */
.vu-featured-panels {
    margin-top: clamp(12px, 2vw, 20px);
    position: relative;
    width: 100%;
    aspect-ratio: var(--fa-panels-ar, 2 / 1);
    max-height: 350px;
    overflow: visible;
    container-type: inline-size;
    container-name: feature-area;
}

/* ========================================
   PANEL - The Detail View
   Bright and inviting!
   ======================================== */
.vu-feature-panel {
    position: absolute;
    inset: 0;
    display: none;
    grid-template-columns: minmax(100px, 0.32fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 36px);
    padding: clamp(24px, 3vw, 36px);
    /* Bright warm surface */
    background: #fff;
    border: 5px dotted var(--fa-gold);
    border-block: solid var(--fa-gold);
    border-block-width:2px;
    border-radius: var(--fa-radius-lg);
    box-shadow:
        /* Bright gold glow */
        0 0 40px -5px rgba(255, 217, 0, .4),
        /* White radiance */
        0 0 60px -10px rgba(255, 255, 255, .6),
        /* Soft depth */
        0 25px 50px -15px rgba(0, 0, 0, .2),
        /* Crisp top edge */
        inset 0 2px 0 rgba(255, 255, 255, 1);
    z-index: 5;
    align-items: stretch;
    max-width: 100%;
    max-height: 350px;
    overflow: hidden;
}

.vu-feature-panel[data-feature-link] {
    cursor: pointer;
}

.vu-feature-panel[data-feature-link]:focus-visible {
    outline: 3px solid var(--fa-gold);
    outline-offset: 6px;
}

/* Gold accent line at top - now a glow bar */
.vu-feature-panel::before {
    content: "";
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: min(250px, 50%);
    height: 4px;
    background: linear-gradient(90deg,
        transparent,
        var(--fa-gold) 15%,
        var(--fa-gold-soft) 50%,
        var(--fa-gold) 85%,
        transparent
    );
    z-index: 10;
}

.vu-feature-panel > * {
    position: relative;
    z-index: 2;
}

.vu-feature-panel[hidden] {
    display: none;
}

.vu-feature-panel.is-active {
    display: grid;
    animation: faPanelIn 650ms var(--fa-ease-spring) both;
}

@keyframes faPanelIn {
    0% {
        opacity: 0;
        transform: translateY(-100px) scale(0.70);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   PANEL LEFT COLUMN
   ======================================== */
.vu-feature-panel__left {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.5vw, 18px);
    min-height: 0;
}

/* Photo */
.vu-feature-panel__photo {
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--fa-radius-sm);
    max-width: clamp(160px, 24vw, 220px);
    box-shadow: var(--fa-shadow-soft);
    border: 2px solid rgba(255, 255, 255, .95);
}

.vu-feature-panel__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms var(--fa-ease-out);
}

/* ========================================
   PANEL RIGHT COLUMN
   ======================================== */
.vu-feature-panel__right {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: clamp(8px, 1vw, 14px);
}

/* Title */
.vu-feature-panel__head h3 {
    margin: 0;
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: .02em;
    color: var(--fa-ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

/* Body content */
.vu-feature-panel__body {
    color: var(--fa-ink-muted);
    line-height: 1.;
    font-size: clamp(.95rem, 1.1vw, 1.05rem);
    position: relative;
    overflow: hidden;
    padding-bottom: 2rem;
    flex: 1 1 auto;
    min-height: 0;
}

/* Fade out for overflow */
.vu-feature-panel__body::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.5rem;
    background: linear-gradient(to bottom, transparent, var(--fa-surface));
    pointer-events: none;
}

/* ========================================
   CTA BUTTON
   ======================================== */
.vu-activity-featured-actions {
    margin: 0;
    display: flex;
    justify-content: stretch;
    margin-top: auto;
}

.vu-activity-featured-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: none;
    padding: 1rem;
    background: linear-gradient(
        135deg,
        var(--fa-gold) 0%,
        #ffe44d 50%,
        var(--fa-gold) 100%
    );
    color: var(--fa-ink);
    font-weight: 800;
    font-size: clamp(.8rem, 2vw, 1rem);
    text-transform: uppercase;
    letter-spacing: .05em;
    border-radius: 999px;
    text-decoration: none;
    box-shadow:
        0 6px 10px rgba(190, 150, 70, .55),
        0 2px 8px rgba(255, 217, 0, .3),
        inset 10px 40px 10px rgba(255, 255, 255, .5);
    transition:
        transform 200ms var(--fa-ease-out),
        box-shadow 200ms var(--fa-ease-out),
        filter 200ms ease;
    width: 100%;
    border: none;
}

.vu-activity-featured-cta:hover,
.vu-activity-featured-cta:focus-visible {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 30px rgba(255, 217, 0, .6),
        0 4px 12px rgba(255, 217, 0, .4),
        inset 0 2px 0 rgba(255, 255, 255, .6);
    filter: brightness(1.08);
    color: var(--fa-ink);
}

.vu-activity-featured-cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px var(--fa-gold-glow);
}

/* Arrow icon for CTA */
.vu-activity-featured-cta::after {
    content: "→";
    font-size: 2rem;
    font-weight: 400;
    transition: transform 200ms ease;
}

.vu-activity-featured-cta:hover::after {
    transform: translateX(4px);
}

/* ========================================
   RESPONSIVE - TABLET & MOBILE
   ======================================== */
@media (max-width: 768px) {
    .vu-featured-panels {
        aspect-ratio: auto;
        max-height: none;
    }

    .vu-feature-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
        padding: clamp(20px, 5vw, 28px);
        position: relative;
        max-height: none;
    }

    .vu-feature-panel__photo {
        display: none;
    }

    .vu-feature-panel__left {
        order: 3;
    }

    .vu-feature-panel__right {
        order: 1;
        display: contents;
    }

    .vu-feature-panel__head {
        order: 1;
    }

    .vu-feature-panel__body {
        order: 2;
        padding-bottom: 1rem;
    }

    .vu-activity-featured-actions {
        order: 3;
        margin-top: .5rem;
    }

    .vu-feature-panel__head h3 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
        text-align: center;
    }

    .vu-feature-panel__body {
        text-align: center;
    }
}

/* ========================================
   CONTAINER QUERIES
   ======================================== */
@container featured (min-width: 768px) {
    .vu-activity-featured {
        --fa-panels-ar: 2.4 / 1;
        --fa-thumb-min: 175px;
        --fa-thumb-max: 240px;
    }
}

@container featured (min-width: 1024px) {
    .vu-activity-featured {
        --fa-panels-ar: 2.8 / 1;
        --fa-thumb-min: 190px;
        --fa-thumb-max: 260px;
    }
}

/* Fallback for browsers without container queries */
@supports not (container-type: inline-size) {
    .vu-featured-panels {
        aspect-ratio: 2 / 1;
    }

    .vu-activity-featured-link {
        flex: 0 0 clamp(160px, 22vw, 220px);
    }

    @media (min-width: 768px) {
        .vu-featured-panels {
            aspect-ratio: 2.4 / 1;
        }

        .vu-activity-featured-link {
            flex: 0 0 clamp(175px, 18vw, 240px);
        }
    }

    @media (min-width: 1024px) {
        .vu-featured-panels {
            aspect-ratio: 2.8 / 1;
        }

        .vu-activity-featured-link {
            flex: 0 0 clamp(190px, 16vw, 260px);
        }
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .vu-feature-panel.is-active {
        animation: none;
    }

    .vu-activity-featured-link,
    .vu-activity-featured-media,
    .vu-activity-featured-cta {
        transition: none;
    }
}
