/* Hacer el desplazamiento suave */
html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    -webkit-text-size-adjust: 100%;
}

/* Ajustar el desplazamiento para secciones con ID */
#hero-image-section,
#main-content,
#description-container,
#events-section,
#blog-section,
#what-to-know-section,
#reservation-section {
    scroll-margin-top: 70px;
}

/* Estilos para la sección de imagen principal */
.hero-video-section {
    width: 100vw;
    height: 100vh; /* Cambiar a 80vh en móviles para mejor visualización */
    overflow: hidden;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra todo el contenedor */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Estilos para los textos sobre la imagen */
.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #F8F1E9;
    z-index: 5;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    width: 90%;
    max-width: 600px; /* Limita el ancho del texto para mejor legibilidad */
    background-color: rgba(29, 60, 90, 0.7); /* Fondo azul transparente */
    padding: 20px; /* Espaciado interno */
    border-radius: 12px; /* Bordes redondeados */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Sombra suave */
}

.hero-text h2 {
    font-size: clamp(1.8rem, 6vw, 2.5rem); /* Ajuste para móviles */
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in, transform 0.8s ease-in;
    transition-delay: 0.2s;
}

.hero-text h4 {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem); /* Ajuste para móviles */
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in, transform 0.8s ease-in;
    transition-delay: 0.4s;
}

.hero-text a {
    display: inline-block;
    font-size: clamp(0.9rem, 3.5vw, 1.1rem); /* Ajuste para móviles */
    padding: 12px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in, transform 0.8s ease-in;
    transition-delay: 0.6s;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Animación al cargar */
.hero-text.loaded h2,
.hero-text.loaded h4,
.hero-text.loaded a {
    opacity: 1;
    transform: translateY(0);
}

/* Navegación */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    background-color: rgba(29, 60, 90, 0.9);
}

/* Contenedor principal */
.container.my-10 {
    position: relative;
    z-index: 5;
    padding: 0 15px;
}

/* Transición de opacidad */
.fade-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-in, transform 0.5s ease-in;
}

.fade-section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Retrasos para secciones */
nav.fade-section { transition-delay: 0.2s; }
.description-container.fade-section { transition-delay: 0.4s; }
.gallery-section.fade-section { transition-delay: 0.6s; }
.pricing-section.fade-section { transition-delay: 0.8s; }
.events-section.fade-section { transition-delay: 1.0s; }
.blog-section.fade-section { transition-delay: 1.2s; }
.places-section.fade-section { transition-delay: 1.4s; }

/* Estilo para el carrusel */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Carrusel principal */
#main-carousel.carousel-container {
    height: clamp(250px, 60vw, 500px);
}

/* Otros carruseles */
#carouselRestaurants.carousel-container,
#carouselActivities.carousel-container {
    height: clamp(150px, 50vw, 300px);
}

#carouselEvents.carousel-container {
    height: clamp(200px, 55vw, 350px);
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
    position: relative;
}

#carouselRestaurants .carousel-item,
#carouselActivities .carousel-item {
    background-color: #F8F1E9;
}

.carousel-item img,
.carousel-item canvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.carousel-item .video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item .video-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.carousel-item .video-container .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F8F1E9;
    font-size: 3rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-item .video-container:hover .play-icon {
    opacity: 1;
}

.carousel-item .event-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(29, 60, 90, 0.7);
    color: #F8F1E9;
    padding: 10px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: clamp(0.75rem, 2.5vw, 0.875rem);
}

.carousel-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E5E7EB;
    border: none;
    cursor: pointer;
}

.carousel-indicators button.active {
    background-color: #4A919E;
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(29, 60, 90, 0.5);
    color: #F8F1E9;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(29, 60, 90, 0.9);
}

.carousel-control-prev { left: 5px; }
.carousel-control-next { right: 5px; }

/* Lista de espacios */
#spaces-list-container {
    position: relative;
    max-width: 95%;
    margin: 0 auto;
}

#spaces-list {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    padding-bottom: 8px;
}

#spaces-list::-webkit-scrollbar {
    display: none;
}

.space-item {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    flex: 0 0 calc((100% - 32px) / 4);
    max-width: 90px;
    min-width: 70px;
}

.space-item:hover {
    transform: scale(1.05);
}

.space-item img {
    transition: opacity 0.2s ease-in-out;
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.space-item:hover img {
    opacity: 0.9;
}

.space-nav-prev,
.space-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(29, 60, 90, 0.7);
    color: #F8F1E9;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.space-nav-prev:hover,
.space-nav-next:hover {
    background: rgba(29, 60, 90, 0.9);
}

.space-nav-prev { left: -20px; }
.space-nav-next { right: -20px; }

.space-nav-prev.hidden,
.space-nav-next.hidden {
    display: none;
}

/* Modal de galería */
#galleryImageModal {
    transition: opacity 0.3s ease-in-out;
}

#galleryImageModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#galleryModalMedia {
    width: 100%;
    height: auto;
    max-height: 600px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#galleryModalMedia img,
#galleryModalMedia video {
    max-height: 80vh;
    width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

#galleryCloseModal:hover {
    color: #D4A017;
}

#galleryModalPrev,
#galleryModalNext {
    background: rgba(29, 60, 90, 0.7);
    color: #F8F1E9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#galleryModalPrev:hover,
#galleryModalNext:hover {
    background: rgba(29, 60, 90, 0.9);
    transform: translateY(-50%) scale(1.1);
}

#galleryModalPrev {
    left: 16px;
}

#galleryModalNext {
    right: 16px;
}

/* Modal de carruseles */
#carouselImageModal {
    transition: opacity 0.3s ease-in-out;
}

#carouselImageModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#carouselModalImage {
    max-height: 80vh;
    width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}

#carouselCloseModal:hover {
    color: #D4A017;
}

.modal-control-prev,
.modal-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(29, 60, 90, 0.5);
    color: #F8F1E9;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 60;
}

.modal-control-prev:hover,
.modal-control-next:hover {
    background: rgba(29, 60, 90, 0.9);
}

.modal-control-prev { left: 5px; }
.modal-control-next { right: 5px; }

/* Estilos para la sección de reservaciones */
.reservation-section {
    background: linear-gradient(rgba(29, 60, 90, 0.7), rgba(29, 60, 90, 0.7)), url('https://images.pexels.com/photos/13344137/pexels-photo-13344137.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center/cover;
    padding: 80px 0;
    position: relative;
    z-index: 5;
    color: #F8F1E9;
}

.reservation-section .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.contact-box {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    text-align: left;
}

.contact-box h5 {
    color: #D4A017;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.mobile-label {
    display: none;
    color: #1D3C5A;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.contact-box h2 {
    color: #F8F1E9;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.contact-box p {
    color: #E5E7EB;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.info-box {
    flex: 1;
    min-width: 150px;
}

.info-box .icon {
    font-size: 1.5rem;
    color: #D4A017;
    margin-bottom: 10px;
}

.info-box h4 {
    color: #F8F1E9;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.info-box p {
    color: #E5E7EB;
    font-size: 0.875rem;
    line-height: 1.5;
}

.form-box {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-box h2 {
    color: #1D3C5A;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.form-box form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row input {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #1D3C5A;
    background-color: #F8F1E9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-row input:focus {
    border-color: #4A919E;
    box-shadow: 0 0 5px rgba(74, 145, 158, 0.3);
    outline: none;
}

.form-box textarea {
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #1D3C5A;
    background-color: #F8F1E9;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-box textarea:focus {
    border-color: #4A919E;
    box-shadow: 0 0 5px rgba(74, 145, 158, 0.3);
    outline: none;
}

.form-box button {
    padding: 12px 24px;
    background-color: #4A919E;
    color: #F8F1E9;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.form-box button:hover {
    background-color: #3B7A85;
    transform: translateY(-2px);
}

.form-box button:active {
    transform: translateY(0);
}

/* Animaciones de entrada */
.reservation-section.fade-section {
    transition-delay: 1.6s;
}

/* Responsividad */
@media (max-width: 768px) {
    .hero-video-section {
        height: 80vh; /* Reducir altura en móviles para mejor experiencia */
    }

    .hero-text {
        width: 95%; /* Aumentar el ancho para móviles */
        padding: 15px; /* Ajustar padding en móviles */
    }

    .hero-text h2 {
        font-size: clamp(1.5rem, 5vw, 2rem); /* Tamaño más pequeño para móviles */
    }

    .hero-text h4 {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .hero-text a {
        font-size: clamp(0.8rem, 3vw, 1rem);
        padding: 10px 18px; /* Botón más pequeño en móviles */
    }

    .reservation-section {
        padding: 40px 0;
    }

    .mobile-label {
        display: block;
    }

    .form-row.date-row {
        gap: 15px;
    }

    .reservation-section .container {
        flex-direction: column;
        gap: 20px;
    }

    .contact-box,
    .form-box {
        padding: 15px;
    }

    .contact-box h2 {
        font-size: 1.5rem;
    }

    .form-box h2 {
        font-size: 1.25rem;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-row input {
        min-width: 100%;
    }

    /* Ajustar todos los modales */
    #houseRulesModal .bg-off-white,
    #safetyModal .bg-off-white,
    #cancellationModal .bg-off-white,
    #galleryImageModal .bg-white {
        width: 90%;
        max-width: 400px;
        padding: 1rem;
    }

    /* Ajustar el botón de cerrar para todos los modales */
    #houseRulesModalClose,
    #safetyModalClose,
    #cancellationModalClose,
    #galleryCloseModal {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
        padding: 8px;
        line-height: 1;
        z-index: 60;
    }

    #galleryModalMedia {
        max-height: 50vh;
    }

    #galleryModalMedia img,
    #galleryModalMedia video {
        max-height: 50vh;
        width: 100%;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .hero-video-section {
        height: 70vh; /* Ajuste adicional para pantallas muy pequeñas */
    }

    .hero-text {
        padding: 10px; /* Reducir padding en pantallas muy pequeñas */
    }

    .hero-text h2 {
        font-size: clamp(1.2rem, 4.5vw, 1.8rem);
    }

    .hero-text h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-text a {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
        padding: 8px 16px;
    }
}

/* Burbuja Flotante */
.floating-bubble {
    position: fixed;
    top: 85%;
    left: 20px;
    transform: translateY(-50%);
    width: 110px;
    height: 110px;
    background-color: #D4A017;
    border: 1px solid #D4A017;
    border-radius: 50%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, opacity 0.3s ease;
}

.floating-bubble:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 0.9;
}

.bubble-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
}

.popup-message {
    position: fixed;
    top: 85%;
    left: 20px;
    transform: translateY(-50%) translateX(-100%);
    background-color: #1A3C5A;
    color: #F8F1E9;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 40;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
}

.popup-message.show {
    opacity: 1;
    left: 140px;
    transform: translateY(-50%) translateX(0);
}

.popup-message:hover {
    background-color: #4A919E;
    color: #F8F1E9;
}

/* Responsividad para pantallas pequeñas */
@media (max-width: 768px) {
    .floating-bubble {
        width: 70px;
        height: 70px;
        left: 15px;
        top: 85%;
        border: 1px solid #D4A017;
    }

    .bubble-image {
        width: 60px;
        height: 60px;
    }

    .popup-message {
        left: 15px;
        top: 85%;
        font-size: 0.875rem;
        padding: 10px 15px;
        transform: translateY(-50%) translateX(-100%);
    }

    .popup-message.show {
        left: 95px;
        transform: translateY(-50%) translateX(0);
    }
}