/* Featured Tabs Component Styles */
.featured-tabs {
    margin: 0;
    position: relative;
}

/* Tab Navigation */
.featured-tabs__navigation {
    background-color: #fff;
    display: flex;
    justify-content: flex-start;
    padding: 0 var(--content-gap);
}

.featured-tabs__tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--neutral-medium);
}

.featured-tabs__tab.active {
    background-color: var(--tertiary-dark);
    color: #ffffff;
}

.featured-tabs__tab:hover {
    color: var(--primary);
}

.featured-tabs__tab.active:hover {
    color: var(--primary-light);
}

/* View All Link */
.featured-tabs__view-all {
    position: absolute;
    top: 0;
    right: 0;
    margin-right: var(--content-gap);
}

.featured-tabs__view-all-link {
    color: #3e6a98;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.featured-tabs__view-all-link i {
    margin-left: 5px;
    font-size: 12px;
}

/* External Navigation Controls */
.featured-tabs__external-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none; /* Allow clicks to pass through to content */
    z-index: 10;
    padding: 0 var(--content-gap);
}

.featured-tabs__nav-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #3e6a98;
    pointer-events: auto; /* Re-enable clicks for buttons */
}

.featured-tabs__nav-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.featured-tabs__nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.featured-tabs__nav-button svg {
    width: 20px;
    height: 20px;
}

.featured-tabs__nav-button--prev {
    margin-left: 0;
}

.featured-tabs__nav-button--next {
    margin-right: 0;
}

/* Tab Content */
.featured-tabs__content {
    background-image: url(/wp-content/uploads/bbg-pattern-dark.png);
    position: relative;
    min-height: 400px; /* Minimum height to prevent layout shifts */
    padding: var(--section-space-m) var(--content-gap);
}

.featured-tabs__slider {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-tabs__slider.active {
    display: block;
    opacity: 1;
}

/* Loading and Empty States */
.featured-tabs__loading,
.featured-tabs__empty {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Resort Card Styles - Updated with overlay text */
.resort-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative; /* Enable positioning for overlay */
}

.resort-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.resort-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
}

.resort-card__image-wrapper {
    position: relative;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
}

.resort-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.resort-card:hover .resort-card__image {
    transform: scale(1.05);
}

.resort-card__content {
    background: linear-gradient(0deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .25) 70%, transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}

.resort-card__name {
    color: var(--white);
    margin: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
}

/* Amenity Card Styles - Updated with overlay text */
.amenity-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative; /* Enable positioning for overlay */
}

.amenity-card:hover {
    transform: translateY(-5px);
}

.amenity-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
}

.amenity-card__image-wrapper {
    position: relative;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
}

.amenity-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.amenity-card:hover .amenity-card__image {
    transform: scale(1.05);
}

.amenity-card__content {
    background: linear-gradient(0deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .25) 70%, transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
}

.amenity-card__name {
    color: var(--white);
    text-align: center;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* Swiper Customization */
.featured-tabs__slider {
    max-width: 90%;
    margin: 0 auto;
    position: relative;
}

.featured-tabs__slider > .swiper {
    position: relative;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.featured-tabs__slider > .swiper.swiper-initialized {
    opacity: 1;
}

.featured-tabs__slider > .swiper .swiper-wrapper {
    display: flex;
}

.featured-tabs__slider > .swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
}

.featured-tabs__slider > .swiper .swiper-slide:not(:last-child) {
    margin-right: 20px;
}

/* Property Card Image Constraint Fix */
.featured-tabs__slider .property-card__img-wrapper {
    height: 200px !important;
    overflow: hidden;
}

.featured-tabs__slider .property-card__img-wrapper .swiper {
    height: 100% !important;
}

.featured-tabs__slider .property-card-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Hide navigation buttons on PropertyCard image sliders */
.property-card .swiper-button-prev,
.property-card .swiper-button-next {
    display: none !important;
}

.property-card .property-card-headline,
.property-card .property-card-headline .property-card__heading-block,
.property-card .property-card-headline .property-card__heading-block a {
    width: 100%;
    text-align: center;
}

/* Remove all internal swiper navigation since we're using external */
.featured-tabs__slider > .swiper .swiper-button-prev,
.featured-tabs__slider > .swiper .swiper-button-next {
    display: none !important;
}

/* Remove pagination since it's not being used */
.featured-tabs__slider > .swiper .swiper-pagination {
    display: none !important;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .featured-tabs__navigation {
        background-color: #fff;
        overflow-x: auto;
        white-space: nowrap;
    }

    .featured-tabs__tab {
        padding: 10px 15px;
        font-size: 14px;
    }

    .featured-tabs__view-all {
        display: none; /* Hide on mobile or show below tabs */
    }

    /* Show view all below tabs on mobile */
    .featured-tabs__view-all--mobile {
        display: block;
        position: static;
        text-align: right;
        margin-bottom: 15px;
    }

    /* Adjust external navigation for mobile */
    .featured-tabs__external-navigation {
        padding: 0 20px;
    }

    .featured-tabs__nav-button {
        width: 40px;
        height: 40px;
    }

    .featured-tabs__nav-button svg {
        width: 16px;
        height: 16px;
    }
}

.resort-card, .amenity-card {
    min-height: 450px;
}

.resort-card__image-wrapper, .amenity-card__image-wrapper {
    height: 100%;
}

.resort-card__name_content {
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 0;
    z-index: 2 !important;
    padding: var(--space-xs);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)) !important;
}