/**
 * Safari Directory – Featured Tours Carousel
 */

.sd-ftc-wrap {
    --sd-ftc-gap: 12px;
    --sd-ftc-items: 2.5;
    --sd-ftc-rail: 120px;
    --sd-ftc-ink: #ffffff;
    background: transparent;
    padding: clamp(28px, 4vw, 56px) 0;
    width: 100%;
}

.sd-ftc-wrap *,
.sd-ftc-wrap *::before,
.sd-ftc-wrap *::after {
    box-sizing: border-box;
}

.sd-ftc-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
}

.sd-ftc-anim {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.66s ease, transform 0.66s ease;
}

.sd-ftc-anim.sd-ftc-visible {
    opacity: 1;
    transform: translateY(0);
}

.sd-ftc-carousel-wrap {
    position: relative;
}

.sd-ftc-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    user-select: none;
    -webkit-user-select: none;
}

.sd-ftc-carousel__nav {
    flex: 0 0 var(--sd-ftc-rail);
    width: var(--sd-ftc-rail);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 6;
}

.sd-ftc-carousel__prev,
.sd-ftc-carousel__next {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    flex: 0 0 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(20, 20, 20, 0.45) !important;
    border-radius: 999px !important;
    aspect-ratio: 1 / 1 !important;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    background: transparent !important;
    color: #141414 !important;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sd-ftc-carousel__prev svg,
.sd-ftc-carousel__next svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.sd-ftc-carousel__prev:hover,
.sd-ftc-carousel__next:hover {
    background: #141414 !important;
    border-color: #141414 !important;
    color: #ffffff !important;
}

.sd-ftc-carousel__prev:disabled,
.sd-ftc-carousel__next:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.sd-ftc-carousel__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.sd-ftc-carousel__track {
    display: flex;
    gap: var(--sd-ftc-gap);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.sd-ftc-carousel__slide {
    flex: 0 0 calc((100% - (var(--sd-ftc-gap) * (var(--sd-ftc-items) - 1))) / var(--sd-ftc-items));
    min-width: 0;
}

.sd-ftc-tour-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 0.92 / 1;
    min-height: 380px;
    overflow: hidden;
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    background: #2b5a4a;
    isolation: isolate;
}

.sd-ftc-tour-card__bg {
    position: absolute;
    inset: 0;
    background-color: #2b5a4a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.sd-ftc-tour-card:hover .sd-ftc-tour-card__bg,
.sd-ftc-tour-card:focus-visible .sd-ftc-tour-card__bg {
    transform: scale(1.06);
}

.sd-ftc-tour-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.62) 22%,
        rgba(0, 0, 0, 0.28) 46%,
        rgba(0, 0, 0, 0) 72%
    );
    z-index: 1;
    transition: opacity 0.45s ease;
}

.sd-ftc-tour-card:hover .sd-ftc-tour-card__overlay,
.sd-ftc-tour-card:focus-visible .sd-ftc-tour-card__overlay {
    opacity: 0.92;
}

.sd-ftc-tour-card__content {
    position: absolute;
    inset: auto 0 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0 26px 34px;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sd-ftc-tour-card:hover .sd-ftc-tour-card__content,
.sd-ftc-tour-card:focus-visible .sd-ftc-tour-card__content {
    transform: translateY(-10px);
}

.sd-ftc-tour-card__title {
    margin: 0;
    width: 100%;
    font-family: var(--sd-heading-font, "Queens Air", serif);
    font-size: clamp(24px, 1.9vw, 34px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: 0;
    color: var(--sd-ftc-ink);
}

.sd-ftc-tour-card__caption {
    display: block;
    width: 100%;
    margin: 0;
    font-family: var(--sd-body-font, var(--sd-font-body, sans-serif));
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sd-ftc-ink);
}

/* Two-line overview revealed on hover; collapsed height keeps the title anchored low. */
.sd-ftc-tour-card__overview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    margin: 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(14px);
    font-family: var(--sd-body-font, var(--sd-font-body, sans-serif));
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.4s ease 0.06s,
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sd-ftc-tour-card:hover .sd-ftc-tour-card__overview,
.sd-ftc-tour-card:focus-visible .sd-ftc-tour-card__overview {
    max-height: 4.4em;
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .sd-ftc-tour-card__content,
    .sd-ftc-tour-card__overview,
    .sd-ftc-tour-card__bg,
    .sd-ftc-tour-card__overlay {
        transition: none;
    }
}

@media (max-width: 1024px) {
    .sd-ftc-wrap {
        --sd-ftc-items: 1.6;
        --sd-ftc-rail: 92px;
    }
}

@media (max-width: 768px) {
    .sd-ftc-wrap {
        --sd-ftc-items: 1.15;
        --sd-ftc-rail: 74px;
    }

    .sd-ftc-carousel__nav {
        gap: 12px;
    }

    .sd-ftc-tour-card {
        min-height: 340px;
    }

    .sd-ftc-tour-card__content {
        padding: 0 18px 26px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .sd-ftc-wrap {
        --sd-ftc-items: 1.05;
        --sd-ftc-rail: 60px;
        --sd-ftc-gap: 10px;
    }

    .sd-ftc-carousel__prev,
    .sd-ftc-carousel__next {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        flex: 0 0 38px !important;
    }

    .sd-ftc-tour-card__title {
        font-size: clamp(22px, 6vw, 28px);
    }

    .sd-ftc-tour-card__caption {
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    .sd-ftc-tour-card__overview {
        font-size: 13px;
    }
}
