/* TeamVibe: common card sizing for all four home experience carousels.
   Load this LAST, after home-platinum.css and unified-experiences.css. */

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) {
    --tv-card-image-height: 250px;
    --tv-card-min-height: 620px;
}

/* Preserve the existing grid/carousel implementation, but stretch its cards. */
:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-event-grid {
    align-items: stretch !important;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-event-card.pl-featured-card {
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    height: auto !important;
    min-height: var(--tv-card-min-height) !important;
    max-height: none !important;
    box-sizing: border-box;
    overflow: hidden;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-image-wrap {
    position: relative;
    flex: 0 0 auto !important;
    width: 100%;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-event-image {
    display: block !important;
    width: 100% !important;
    height: var(--tv-card-image-height) !important;
    min-height: var(--tv-card-image-height) !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    overflow: hidden;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-event-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-event-body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 12px 12px 13px !important;
    gap: 0 !important;
}

/* Reserve the same number of lines for every activity heading. */
:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card h3 {
    min-height: 2.5em !important;
    line-height: 1.25 !important;
    margin-bottom: 8px !important;
}

/* Reserve exactly four lines' worth of space for every description. */
:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-event-description {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden !important;
    height: 5.8em !important;
    min-height: 5.8em !important;
    max-height: 5.8em !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

/* Push all information below descriptions into the same bottom area. */
:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-event-card-footer {
    /* margin-top: auto !important; */
    margin-bottom: 10px !important;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-event-capacity {
    margin-bottom: 10px !important;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-featured-contact-actions {
    margin-bottom: 10px !important;
}

:is(#top-experiences, #top-virtual, #top-unique, #top-recreational) .pl-featured-card .pl-event-loved-by {
    margin-top: 0 !important;
}

/* Responsive sizes: still equal within each carousel. */
@media (max-width: 1199px) {
    :is(#top-experiences, #top-virtual, #top-unique, #top-recreational) {
        --tv-card-image-height: 225px;
        --tv-card-min-height: 595px;
    }
}

@media (max-width: 600px) {
    :is(#top-experiences, #top-virtual, #top-unique, #top-recreational) {
        --tv-card-image-height: 200px;
        --tv-card-min-height: 560px;
    }
}




/* Bigger images for all experience cards */
:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-featured-card .pl-event-image {
    height: 290px !important;
    min-height: 290px !important;
}

:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-featured-card .pl-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
}

/* Keep images proportionate on mobile */
@media (max-width: 600px) {
    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-card .pl-event-image {
        height: 220px !important;
        min-height: 220px !important;
    }
}


/* ============================================
   TEAMVIBE — ALIGN EXPERIENCE CARDS WITH HEADING
   Applies to all four experience sections
============================================ */

:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-featured-carousel-wrap {
    position: relative !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Carousel starts at same position as heading */
:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-event-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Move arrows outside instead of taking card space */
:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-featured-side-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    margin: 0 !important;
}

/* Previous arrow */
:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-featured-side-prev {
    left: -58px !important;
    right: auto !important;
}

/* Next arrow */
:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-featured-side-next {
    right: -58px !important;
    left: auto !important;
}

/* Tablet: keep arrows within available viewport */
@media (max-width: 1199px) {
    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-side-prev {
        left: -16px !important;
    }

    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-side-next {
        right: -16px !important;
    }
}

/* Mobile: arrows below carousel, not over cards */
@media (max-width: 767px) {
    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-carousel-wrap {
        padding-bottom: 58px !important;
    }

    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-side-arrow {
        top: auto !important;
        bottom: 0 !important;
        transform: none !important;
    }

    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-side-prev {
        left: calc(50% - 52px) !important;
    }

    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-side-next {
        right: calc(50% - 52px) !important;
    }
}


/* ==========================================
   TEAMVIBE — FINAL CAROUSEL WIDTH ALIGNMENT
   All four experience sections
========================================== */

:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) {
    --tv-experience-gap: 15px;
}

/* Full container width */
:is(
    #top-experiences,
    #top-virtual,
    #top-unique,
    #top-recreational
) .pl-featured-carousel-wrap {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Four slightly wider cards */
@media (min-width: 1200px) {
    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-event-grid {
        display: grid !important;
        grid-auto-flow: column !important;
        grid-auto-columns: calc(
            (100% - (3 * var(--tv-experience-gap))) / 4
        ) !important;
        grid-template-columns: none !important;
        column-gap: var(--tv-experience-gap) !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-event-grid::-webkit-scrollbar {
        display: none;
    }

    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-event-card.pl-featured-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        scroll-snap-align: start;
    }
}

/* Keep navigation arrows outside */
@media (min-width: 1200px) {
    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-side-prev {
        left: -58px !important;
    }

    :is(
        #top-experiences,
        #top-virtual,
        #top-unique,
        #top-recreational
    ) .pl-featured-side-next {
        right: -58px !important;
    }
}
