/* Amenities Page Styles */

.amenities-page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d7a 100%);
    color: white;
   /* padding: 4rem 0 3rem; */
    margin-top: 80px;
}

.amenities-page-header .page-header {
    text-align: center;
}

.amenities-page-header .section-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.amenities-page-header .page-title {
    color: white;
    margin-bottom: 1rem;
}

.amenities-page-header .page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Main Amenities Section */
.amenities-main-section {
    padding: 0;
    background: var(--bg-white);
}

.amenities-detailed-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.amenity-detail-card {
    padding: 5rem 0;
    border-radius: 0;
    margin: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
}

/* Contenedor interno para el grid con max-width y padding como el .container del index */
.amenity-detail-card-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Hacer que el container no limite el ancho */
.amenities-main-section .container {
    max-width: 100%;
    padding: 0;
}

/* Fondos intercalados: blanco y #f8f9fa */
.amenity-golf {
    background: #ffffff;
}

.amenity-beach {
    background: #f8f9fa;
}

.amenity-marina {
    background: #ffffff;
}

.amenity-sports {
    background: #f8f9fa;
}

.amenity-clubhouse {
    background: #ffffff;
}

.amenity-restaurants {
    background: #f8f9fa;
}

.amenity-hospital {
    background: #ffffff;
}

.amenity-detail-card.reverse {
    direction: rtl;
}

.amenity-detail-card.reverse > * {
    direction: ltr;
}

.amenity-detail-image {
    width: 100%;
    aspect-ratio: 4 / 3; /* 12:9 ratio (wide format) */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.amenity-detail-image .amenity-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.amenity-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.amenity-detail-card:hover .amenity-detail-image img {
    transform: scale(1.05);
}

.amenity-detail-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    font-size: 1.1rem;
}

.amenity-detail-content {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.amenity-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.amenity-detail-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.amenity-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.amenity-features-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.amenity-features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Additional Amenities Section */
.additional-amenities-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.additional-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.additional-amenity-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.additional-amenity-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.additional-amenity-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.additional-amenity-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.additional-amenity-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Testimonial TikTok Section */
.testimonial-tiktok-section {
    padding: 5rem 0;
    background: var(--bg-white);
    border-top: 1px solid rgba(26, 77, 122, 0.1);
}

.tiktok-video-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.tiktok-embed {
    margin: 0 auto;
}

/* CTA Section */
.amenities-cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d7a 100%);
    color: white;
}

.amenities-cta-section .cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.amenities-cta-section .cta-title {
    color: white;
    margin-bottom: 1rem;
}

.amenities-cta-section .cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.amenities-cta-section .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Amenity Carousel Styles */
.amenity-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    cursor: grab;
}

.carousel-track:active {
    cursor: grabbing;
}

.carousel-slide {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    flex-grow: 0;
    height: 100%;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    display: block;
    /* Styles will be applied dynamically by JavaScript based on image orientation */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .amenity-detail-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        display: flex;
        flex-direction: column;
        padding: 2rem 1.5rem;
    }

    .amenity-detail-card.reverse {
        direction: ltr;
    }

    /* Reordenar en mobile: título primero, luego imagen, luego detalles */
    /* Usar display: contents para que los hijos de .amenity-detail-content sean hijos directos de .amenity-detail-card */
    .amenity-detail-content {
        display: contents;
    }

    /* Ahora podemos usar order en los elementos directamente */
    .amenity-detail-title {
        order: 1;
        font-size: 2rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid rgba(26, 77, 122, 0.1);
        width: 100%;
    }

    .amenity-detail-image {
        order: 2;
        aspect-ratio: 4 / 3;
        margin: 1rem 0;
        width: 100%;
    }

    .amenity-detail-text {
        order: 3;
        margin-top: 1.5rem;
        width: 100%;
    }

    .amenity-features-list {
        order: 4;
        width: 100%;
    }

    .amenity-detail-content > div {
        order: 5;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .amenities-page-header {
        padding: 4rem 0 3rem;
        margin-top: 70px;
    }

    .amenities-main-section {
        padding: 3rem 0;
    }

    .amenities-detailed-grid {
        gap: 2.5rem;
    }

    .amenity-detail-card {
        padding: 2rem 1rem;
    }

    .amenity-detail-image {
        aspect-ratio: 4 / 3;
    }

    .amenity-detail-title {
        font-size: 1.75rem;
    }

    .additional-amenities-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }


    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

}

@media (max-width: 480px) {

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

}
