.featured-projects {
    position: relative;
    width: 100vw;
    background-color: var(--base-500);
    color: var(--base-100);
    padding: 1rem;
}

.featured-projects .featured-project-card {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
}

.featured-projects-container .featured-projects-header {
    font-size: 3.5rem;
    text-align: center;

}


.featured-projects .featured-project-card-inner {
    position: relative;
    width: calc(100%);
    height: calc(100% - 2rem);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    border-radius: 2rem;
    background-color: var(--base-450);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.03);
    transform-origin: 50% 100%;
    will-change: transform;
    overflow: hidden;
}

.featured-projects .featured-project-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 0 50%;
    max-width: 50%;
}

.featured-projects .featured-project-card-content-main {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.featured-projects .featured-project-card-info {
    width: 50%;
    padding: 1.5rem;
    text-align: left;
    color: var(--base-350);
    font-size: 0.9rem;
}

.featured-projects .featured-project-card-title h2 {
    padding: 1.5rem 0 0.8rem 0;
    font-size: 1.8rem;
}

.featured-projects .featured-project-card-description {
    width: 90%;
    text-align: left;
    color: var(--base-250);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* ─── Amenities ─── */

.featured-project-card-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-top: 1.5rem;
    margin-top: auto;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    color: var(--base-200);
    font-size: 0.75rem;
    font-family: 'Instrument Sans', monospace;
    white-space: nowrap;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.06);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.amenity-item:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.amenity-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: var(--base-200);
}

/* ─── Room Specs Bar ─── */

.room-specs-bar {
    display: flex;
    gap: 1.2rem;
    padding-top: 0.8rem;
    flex-wrap: wrap;
}

.room-spec-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--base-200);
    font-size: 1rem;
    font-family: 'Instrument Sans', monospace;
}

.room-spec-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: var(--base-200);
}

/* ─── Room Detail Info ─── */

.room-detail-info {
    width: 100%;
    margin-top: 0.8rem;
}

.room-area {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--base-100);
    margin-top: 0.8rem;
    margin-bottom: 0.5rem;
    font-family: 'Instrument Sans', monospace;
}

.room-detail-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0;
    color: var(--base-250);
    font-size: 1rem;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 300;
    line-height: 1.6;
}

.room-detail-amenities span::after {
    content: ' • ';
    color: var(--base-350);
    margin: 0 0.3rem;
}

.room-detail-amenities span:last-child::after {
    content: '';
}

.room-detail-description {
    margin-top: 0.5rem;
    color: var(--base-250);
    font-size: 0.9rem;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

/* ─── Image Carousel ─── */

.featured-projects .featured-project-card-img {
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
    height: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
}

.featured-project-card-img .carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-project-card-img .carousel-slide {
    min-width: 100%;
    height: 100%;
}

.featured-project-card-img .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(242, 237, 230, 0.3);
    background: rgba(20, 19, 19, 0.5);
    backdrop-filter: blur(8px);
    color: var(--base-100);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.featured-project-card-img:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(20, 19, 19, 0.75);
    border-color: rgba(242, 237, 230, 0.5);
}

.carousel-arrow svg {
    width: 18px;
    height: 18px;
}

.carousel-arrow-prev {
    left: 0.75rem;
}

.carousel-arrow-next {
    right: 0.75rem;
}

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 3;
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    background: rgba(20, 19, 19, 0.5);
    backdrop-filter: blur(8px);
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(242, 237, 230, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
    background: var(--base-100);
    transform: scale(1.3);
}

.featured-projects .featured-project-card-inner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--base-500);
    opacity: var(--after-opacity, 0);
    will-change: opacity;
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 1000px) {
    .featured-projects .featured-project-card {
        top: 70px;
        height: calc(100svh - 70px);
    }

    .featured-projects .featured-project-card-inner {
        flex-direction: column;
        justify-content: flex-start;
        padding: 0.5rem;
    }

    .featured-projects .featured-project-card-content {
        flex: 0 0 auto;
        max-width: 100%;
        padding: 0.5rem;
    }

    .featured-projects .featured-project-card-img {
        flex: 1;
        max-width: 100%;
        width: 100%;
        min-height: 0;
    }

    .featured-projects .featured-project-card-info {
        width: 100%;
        margin: 0 auto;
        text-align: center;
        padding: 0.4rem 0.5rem;
    }

    .featured-projects .featured-project-card-content-main {
        padding: 0.5rem;
        align-items: center;
    }

    .featured-projects .featured-project-card-title {
        width: 100%;
        max-width: 100%;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .featured-projects .featured-project-card-title h2 {
        padding: 0.3rem 0;
        font-size: 1.5rem;
        color: #ffffff;
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.35), 0 0 30px rgba(255, 255, 255, 0.1);
        /* Allow long titles like "HABITACION DOBLE DE DOS CAMAS" (joined
           with &nbsp;) to wrap on narrow screens instead of overflowing. */
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
        max-width: 100%;
    }

    .featured-projects .featured-project-card-description {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        width: 90%;
        margin: 0 auto;
        text-align: center;
        font-size: 0.75rem;
        line-height: 1.5;
        color: var(--base-300);
    }

    .featured-project-card-amenities {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.35rem;
        padding-top: 0.6rem;
    }

    .featured-project-card-amenities .amenity-item {
        padding: 0.22rem 0.5rem;
        font-size: 0.6rem;
        gap: 0.25rem;
    }

    .featured-project-card-amenities .amenity-item svg {
        width: 11px;
        height: 11px;
    }

    .carousel-arrow {
        width: 2rem;
        height: 2rem;
        opacity: 1;
    }

    .carousel-arrow svg {
        width: 14px;
        height: 14px;
    }

    .room-specs-bar {
        justify-content: center;
        gap: 0.7rem;
        padding-top: 0.5rem;
        flex-wrap: wrap;
    }

    .room-spec-item {
        font-size: 0.62rem;
        gap: 0.25rem;
    }

    .room-spec-item svg {
        width: 12px;
        height: 12px;
    }

    .room-detail-info {
        margin-top: 0.4rem;
        text-align: center;
    }

    .room-detail-amenities {
        display: none; /* Hide excessive details on mobile to fit the image without scrolling */
    }

    .room-more-info-toggle {
        font-size: 0.65rem;
        padding: 0.3rem 0.8rem;
    }

    .room-detail-description {
        font-size: 0.75rem;
        text-align: center;
        margin-top: 0.2rem;
    }

    .room-area {
        font-size: 0.9rem;
        text-align: center;
    }
}

.featured-project-card.hidden {
    display: none !important;
}

/* Filter switch animation */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-project-card.card-enter {
    animation: cardFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
