/* ===============================================
   SECCIÓN INSTALACIONES - ESTILOS PREMIUM
   =============================================== */

.instalaciones-section {
    display: none;
    padding: 200px 0 120px 0;
    background: linear-gradient(135deg, var(--blanco-perla) 0%, var(--beige-claro) 100%);
    position: relative;
    overflow: hidden;
}

.instalaciones-section.active {
    display: block;
    animation: fadeInSection 0.8s ease-out;
}

.instalaciones-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--dorado-sutil) 0%, transparent 70%);
    opacity: 0.03;
    animation: floatSmooth 20s ease-in-out infinite;
}

.instalaciones-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid de Espacios */
.espacios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
    margin-top: 60px;
    padding: 20px;
}

/* Tarjeta de Espacio */
.espacio-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(107, 76, 59, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.espacio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--dorado-sutil), var(--marron-elegante));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.espacio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(107, 76, 59, 0.2);
}

.espacio-card:hover::before {
    transform: scaleX(1);
}

/* VIP Card Especial */
.espacio-card.vip-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: var(--dorado-brillante);
}

.espacio-card.vip-card .espacio-content {
    background: linear-gradient(135deg, rgba(212, 196, 170, 0.05), rgba(201, 169, 97, 0.05));
}

/* Imagen del Espacio */
.espacio-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.espacio-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    position: relative;
}

.espacio-card:hover .espacio-image {
    transform: scale(1.1);
}

/* Overlay de Imagen */
.espacio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.espacio-card:hover .espacio-overlay {
    opacity: 1;
}

.espacio-overlay i {
    font-size: 2.5rem;
    color: white;
    transform: scale(0);
    transition: transform 0.3s ease 0.1s;
}

.espacio-card:hover .espacio-overlay i {
    transform: scale(1);
}

/* Contenido del Espacio */
.espacio-content {
    padding: 30px;
    background: white;
}

.espacio-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--marron-oscuro);
    margin-bottom: 10px;
    font-weight: 700;
}

.espacio-tag {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, var(--dorado-sutil), var(--dorado-brillante));
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.espacio-tag.pet-friendly {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.espacio-tag.vip {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: var(--marron-oscuro);
}

.espacio-description {
    color: var(--gris-elegante);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Features */
.espacio-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.feature-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--beige-claro);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--marron-elegante);
    transition: all 0.3s ease;
}

.feature-item i {
    color: var(--dorado-sutil);
}

.feature-item:hover {
    background: var(--dorado-sutil);
    color: white;
}

.feature-item:hover i {
    color: white;
}

/* Modal de Galería - Diseño Premium Elegante */
.espacio-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(253, 251, 247, 0.92) 0%,
        rgba(212, 196, 170, 0.88) 50%,
        rgba(201, 169, 97, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    overflow-y: auto;
}

/* Patrón decorativo de fondo */
.espacio-modal-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 169, 97, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 196, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.espacio-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.espacio-modal-container {
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    position: relative;
    background: white;
    border-radius: 30px;
    box-shadow:
        0 30px 60px rgba(107, 76, 59, 0.15),
        0 10px 30px rgba(201, 169, 97, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: modalElegantEntry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: auto;
    padding: 25px;
    border: 2px solid rgba(201, 169, 97, 0.3);
    overflow: hidden;
}

/* Decoración dorada en esquinas */
.espacio-modal-container::before,
.espacio-modal-container::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid var(--dorado-sutil);
    opacity: 0.3;
}

.espacio-modal-container::before {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
    border-radius: 15px 0 0 0;
}

.espacio-modal-container::after {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 15px 0;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalElegantEntry {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.espacio-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--dorado-brillante), var(--dorado-sutil));
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow:
        0 4px 15px rgba(201, 169, 97, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

.espacio-modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: linear-gradient(135deg, var(--marron-elegante), var(--marron-oscuro));
    box-shadow:
        0 6px 20px rgba(107, 76, 59, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.2);
}

.espacio-modal-close i {
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Swiper Customization - Diseño Premium */
.espacioSwiper {
    width: 100%;
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--beige-claro), var(--blanco-perla));
    border: 3px solid rgba(201, 169, 97, 0.2);
    box-shadow:
        inset 0 2px 10px rgba(201, 169, 97, 0.1),
        0 5px 20px rgba(107, 76, 59, 0.1);
    position: relative;
}

/* Marco decorativo interno */
.espacioSwiper::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(201, 169, 97, 0.15);
    border-radius: 15px;
    pointer-events: none;
    z-index: 1;
}

.espacioSwiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center,
        rgba(253, 251, 247, 0.95),
        rgba(245, 239, 230, 0.95));
    overflow: hidden;
    padding: 20px;
}

.espacioSwiper .swiper-slide img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.espacioSwiper .swiper-slide-active img {
    transform: scale(1.02);
}

/* Swiper Navigation - Botones Elegantes */
.espacioSwiper .swiper-button-next,
.espacioSwiper .swiper-button-prev {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9),
        rgba(253, 251, 247, 0.9));
    backdrop-filter: blur(10px);
    border: 2px solid var(--dorado-sutil);
    border-radius: 50%;
    color: var(--marron-elegante);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 15px rgba(201, 169, 97, 0.2),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

.espacioSwiper .swiper-button-next:hover,
.espacioSwiper .swiper-button-prev:hover {
    background: linear-gradient(135deg, var(--dorado-brillante), var(--dorado-sutil));
    transform: scale(1.1);
    color: white;
    box-shadow:
        0 6px 20px rgba(201, 169, 97, 0.4),
        0 3px 10px rgba(0, 0, 0, 0.2);
}

.espacioSwiper .swiper-button-next::after,
.espacioSwiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

/* Swiper Pagination - Indicadores Premium */
.swiper-pagination {
    bottom: 15px !important;
}

.espacioSwiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--marron-elegante);
    opacity: 0.3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--dorado-sutil);
}

.espacioSwiper .swiper-pagination-bullet:hover {
    opacity: 0.6;
    transform: scale(1.2);
}

.espacioSwiper .swiper-pagination-bullet-active {
    width: 25px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--dorado-sutil), var(--dorado-brillante));
    opacity: 1;
    border: none;
    box-shadow: 0 2px 10px rgba(201, 169, 97, 0.3);
}

/* Modal Info - Diseño Premium */
.espacio-modal-info {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95),
        rgba(253, 251, 247, 0.95));
    padding: 35px;
    margin-top: 25px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(201, 169, 97, 0.15);
    box-shadow:
        inset 0 2px 10px rgba(201, 169, 97, 0.05),
        0 5px 15px rgba(107, 76, 59, 0.08);
}

/* Decoración superior */
.espacio-modal-info::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        var(--dorado-sutil),
        var(--dorado-brillante),
        var(--dorado-sutil),
        transparent);
    border-radius: 2px;
}

.espacio-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--marron-oscuro), var(--dorado-sutil));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

/* Ornamento bajo el título */
.espacio-modal-title::after {
    content: '❦';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--dorado-sutil);
    font-size: 1.2rem;
    opacity: 0.5;
}

.espacio-modal-description {
    color: var(--marron-elegante);
    line-height: 1.9;
    max-width: 800px;
    margin: 25px auto 0;
    font-size: 1.05rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    position: relative;
    padding: 20px 30px;
}

/* Comillas decorativas */
.espacio-modal-description::before,
.espacio-modal-description::after {
    position: absolute;
    font-size: 3rem;
    color: var(--dorado-sutil);
    opacity: 0.2;
    font-family: 'Playfair Display', serif;
}

.espacio-modal-description::before {
    content: '"';
    top: -5px;
    left: 0;
}

.espacio-modal-description::after {
    content: '"';
    bottom: -5px;
    right: 0;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
}

/* Animaciones AOS Personalizadas */
[data-aos="fade-up"] {
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .espacios-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 10px;
    }

    .espacio-card {
        margin: 0 auto;
        max-width: 400px;
    }

    .espacioSwiper {
        height: 350px;
    }

    .espacio-modal-overlay {
        padding: 10px;
    }

    .espacio-modal-container {
        width: 95%;
        max-height: 95vh;
        margin-top: 20px;
    }

    .espacio-modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .espacio-title {
        font-size: 1.5rem;
    }

    .espacio-features {
        justify-content: center;
    }

    .espacio-modal-info {
        padding: 25px;
        margin-top: 15px;
    }

    .espacio-modal-title {
        font-size: 2rem;
    }

    .espacio-modal-description {
        font-size: 0.95rem;
        padding: 15px 20px;
    }

    .espacio-modal-description::before,
    .espacio-modal-description::after {
        font-size: 2rem;
    }

    /* Ajustes para navegación de Swiper en móvil */
    .espacioSwiper .swiper-button-next,
    .espacioSwiper .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .espacioSwiper .swiper-button-next::after,
    .espacioSwiper .swiper-button-prev::after {
        font-size: 16px;
    }
}

/* Parallax Effect */
.parallax-element {
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effects Premium */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}