/* ===== RESET Y VARIABLES ===== */
:root {
    --dorado: #C5A572;
    --azul-profundo: #1A2A3A;
    --blanco-hueso: #FDF8F2;
    --texto-oscuro: #2E3B2E;
    --gris-claro: #e0d6c5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--blanco-hueso);
    color: var(--texto-oscuro);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--azul-profundo);
}

/* ===== HEADER FIJO CON FONDO SEMITRANSPARENTE ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(26, 42, 58, 0.85);
    backdrop-filter: blur(10px);
    transition: background 0.3s, padding 0.3s;
    border-bottom: 1px solid rgba(197, 165, 114, 0.2);
}

.header.scrolled {
    padding: 0.8rem 5%;
    background: rgba(26, 42, 58, 0.95);
}

.logo {
    width: 140px;
}

.logo img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.nav-menu a:hover {
    color: var(--dorado);
}

/* Botón reserva en header */
.btn-reserva-header {
    background: var(--dorado);
    color: var(--azul-profundo);
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-reserva-header:hover {
    background: #b38f4b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 165, 114, 0.4);
}
/* ===== HERO (IMAGEN ESTÁTICA) ===== */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4.5rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* ===== TÍTULOS CENTRADOS CON LÍNEA DORADA ===== */
.titulo-centrado {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    position: relative;
    display: block;
    width: 100%;
}

.titulo-centrado:after {
    content: '';
    display: block;
    width: 120px;
    height: 3px;
    background: var(--dorado);
    margin: 1rem auto 0;
}

.subtitulo-centrado {
    text-align: center;
    font-size: 1.2rem;
    color: #5a6e5a;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* ===== SECCIONES ===== */
.seccion {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
}

.seccion-clara {
    background-color: var(--blanco-hueso);
}

.seccion-oscura {
    background-color: #F0E9E0;
}

/* Base: la cuadrícula se mantiene en escritorio */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-2 img {
    max-width: 100%;
    height: auto;
    display: block;
}
.grid-2 > * {
    min-width: 0;
}

/* ===== CARRUSEL ===== */
.carrusel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    margin: 2rem 0;
}

.carrusel-slides {
    display: flex;
    transition: transform 0.8s ease;
}

.carrusel-slide {
    flex: 0 0 100%;
    height: 500px;
    overflow: hidden;
}

.carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 2;
    transition: all 0.3s;
}

.carrusel-btn:hover {
    background: var(--dorado);
}

.carrusel-prev { left: 20px; }
.carrusel-next { right: 20px; }

/* ===== GALERÍA GRID ===== */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.galeria-item {
    height: 280px;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.galeria-item:hover {
    transform: scale(1.03);
}

.galeria-item:hover img {
    transform: scale(1.05);
}

/* ===== TARJETAS DE RESERVA (MODALES) ===== */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.servicio-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.servicio-icono {
    background: var(--dorado);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.servicio-icono i {
    font-size: 2.2rem;
    color: var(--azul-profundo);
}

.servicio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--azul-profundo);
}

.servicio-card p {
    color: #5a6e5a;
    margin-bottom: 1rem;
}

/* ===== MODALES - VERSIÓN DEFINITIVA ===== */
.modal-servicio {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-servicio-contenido {
    background: white;
    width: 90%;
    max-width: 1000px;
    border-radius: 20px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-servicio-cerrar {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--dorado);
    z-index: 10;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-servicio-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 1rem;
}

.modal-servicio-slider {
    flex: 1;
    min-width: 0;
}

.slider-container {
    position: relative;
    width: 100%;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.slider-imagenes {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-imagenes img {
    width: 100%;
    height: auto;
    flex-shrink: 0;
    display: block;
}

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 5;
}
.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 5;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: background 0.3s;
}
.slider-dot.active {
    background: var(--dorado);
}

.modal-servicio-info {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.modal-servicio-info h3 {
    font-size: 2rem;
    color: var(--dorado);
    margin-bottom: 1rem;
}
.modal-servicio-info p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--azul-profundo);
}
.modal-botones {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.btn-reservar-modal, .btn-whatsapp-modal {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: none;
}
.btn-reservar-modal {
    background: var(--dorado);
    color: var(--azul-profundo);
}
.btn-reservar-modal:hover {
    background: #b38f4b;
}
.btn-whatsapp-modal {
    background: #25D366;
    color: white;
}
.btn-whatsapp-modal:hover {
    background: #128C7E;
}

/* ===== BOTONES FLOTANTES ===== */
.btn-flotante {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 100;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    color: white;
    animation: subtleGlow 2s infinite ease-in-out;
    right: 25px;
}

@keyframes subtleGlow {
    0% { box-shadow: 0 0 5px rgba(197, 165, 114, 0.3); }
    50% { box-shadow: 0 0 15px rgba(197, 165, 114, 0.8); }
    100% { box-shadow: 0 0 5px rgba(197, 165, 114, 0.3); }
}

.btn-reserva-flotante {
    bottom: 50%;
    transform: translateY(50%);
    background: var(--dorado);
}

.btn-whatsapp-flotante {
    bottom: calc(50% + 70px);
    transform: translateY(50%);
    background: #25D366;
}

.btn-flotante:hover {
    transform: scale(1.1);
}

/* ===== FORMULARIO DE CONTACTO ===== */
.formulario-contacto {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--azul-profundo);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--dorado);
    border-radius: 10px;
    font-family: inherit;
    background: var(--blanco-hueso);
}

.btn-enviar {
    background: var(--dorado);
    color: var(--azul-profundo);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-enviar:hover {
    background: #b38f4b;
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--azul-profundo);
    color: var(--gris-claro);
    padding: 3rem 5%;
    text-align: center;
}

.footer-contenido {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gris-claro);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--dorado);
}

.footer-redes {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.footer-redes a {
    color: var(--gris-claro);
    transition: color 0.3s;
}

.footer-redes a:hover {
    color: var(--dorado);
}

/* ===== RESPONSIVE GENERAL ===== */
@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .servicios-grid {
        grid-template-columns: 1fr;
    }
    .nav-menu {
        display: none;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .titulo-centrado {
        font-size: 2rem;
    }
    .titulo-centrado:after {
        width: 80px;
    }
    .carrusel-slide {
        height: 300px;
    }
    .btn-flotante {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .btn-reserva-flotante {
        bottom: 40%;
    }
    .btn-whatsapp-flotante {
        bottom: calc(40% + 60px);
    }
    .logo img {
        max-height: 50px;
        width: auto;
    }
    .logo {
        max-width: 120px;
    }
}

/* Estilo para el botón del hero */
.btn-hero {
    background: linear-gradient(135deg, #d4af37, #b88b2c);
    border: none;
    color: #fff;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-hero:hover {
    background: linear-gradient(135deg, #c2a137, #9e741f);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-hero:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hero responsivo */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        min-height: 70vh;
        background-position: center 20%;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .btn-hero {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .btn-hero {
        padding: 14px 36px;
        font-size: 1.2rem;
    }
}

/* ===== RESPONSIVE MODAL (MÓVIL) ===== */
@media (max-width: 768px) {
    .modal-servicio-layout {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .modal-servicio-slider {
        width: 100%;
    }

    .slider-container {
        border-radius: 12px 12px 0 0;
    }

    .modal-servicio-info {
        padding: 1.5rem;
        text-align: center;
    }

    .modal-servicio-info h3 {
        font-size: 1.5rem;
    }

    .modal-servicio-info p {
        font-size: 0.95rem;
    }

    .modal-botones {
        flex-direction: row;
        justify-content: center;
        margin-top: 1rem;
        gap: 0.8rem;
    }

    .btn-reservar-modal,
    .btn-whatsapp-modal {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        flex: 0 1 auto;
    }

    .modal-servicio-contenido {
        max-height: 85vh;
        overflow-y: auto;
    }
}
/* === AJUSTE FINAL: MODAL MÁS ANCHO Y MENOS ALTO === */
.modal-servicio-contenido {
    max-width: 1200px !important;  /* más ancho (antes 1000px) */
    max-height: 85vh !important;   /* un poco menos de alto (antes 90vh) */
    width: 95% !important;         /* un poco más de ancho relativo */
}

/* En pantallas muy grandes, evitar que sea demasiado ancho */
@media (min-width: 1400px) {
    .modal-servicio-contenido {
        max-width: 1300px !important;
    }
}
/* === AJUSTE FINAL: PROPORCIÓN IMAGEN MÁS ANCHA QUE TEXTO === */
.modal-servicio-layout {
    gap: 2rem;
}

.modal-servicio-slider {
    flex: 2;  /* la imagen ocupa 2/3 del espacio */
}

.modal-servicio-info {
    flex: 1;  /* el texto ocupa 1/3 */
}

/* En móvil, volvemos a la disposición vertical (imagen arriba, texto abajo) */
@media (max-width: 768px) {
    .modal-servicio-layout {
        flex-direction: column;
    }
    .modal-servicio-slider,
    .modal-servicio-info {
        flex: auto;  /* cada uno ocupa su ancho completo */
    }
}
/* === AJUSTE DEFINITIVO: QUE LA IMAGEN SEA COMPLETA CON SU PROPORCIÓN === */
.modal-servicio-slider {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.slider-container {
    position: relative;
    width: 100%;
    /* Eliminamos cualquier altura fija o máxima */
    height: auto !important;
    max-height: none !important;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.slider-imagenes {
    display: flex;
    transition: transform 0.5s ease;
    /* No debe tener altura fija */
    height: auto !important;
}

.slider-imagenes img {
    width: 100%;
    height: auto !important;   /* Altura automática según su relación de aspecto */
    flex-shrink: 0;
    display: block;
    /* Sin object-fit para que no recorte */
}

/* En móvil, que también mantenga proporción */
@media (max-width: 768px) {
    .modal-servicio-slider {
        flex: auto;
        width: 100%;
    }
    .slider-container {
        border-radius: 12px 12px 0 0;
        height: auto !important;
    }
    .slider-imagenes img {
        height: auto !important;
    }
}
/* === SOLUCIÓN DE EMERGENCIA: LIMITAR ALTURA DE IMAGEN === */
.slider-container {
    max-height: 300vh !important;   /* la imagen no será más alta que el 60% de la pantalla */
}
.slider-imagenes img {
    object-fit: contain !important; /* para que la imagen quepa dentro del contenedor sin recortes */
    height: auto !important;
}
/* === AJUSTE FINAL: CONTROLAR ALTURA DEL SLIDER === */
.slider-container {
    max-height: 450px !important;   /* Altura máxima en escritorio, ajustable */
    height: auto !important;         /* Permite que sea menor si la imagen es baja */
}

.slider-imagenes img {
    object-fit: contain !important;  /* La imagen completa dentro del contenedor */
    width: 100% !important;
    height: 100% !important;         /* Ocupa todo el contenedor, respetando contain */
}

/* Para móvil, reducir la altura máxima */
@media (max-width: 768px) {
    .slider-container {
        max-height: 280px !important;
    }
}
/* Hero - ajuste de enfoque para que no se recorte lo importante */
.hero {
    background-size: cover;
    background-position: center 30%; /* cambia el porcentaje según dónde esté el elemento principal (0% arriba, 100% abajo) */
    background-attachment: fixed;
}

/* En móvil, quitar el fixed para evitar problemas de recorte */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        background-position: center 20%; /* puede necesitar ajuste */
        min-height: 70vh; /* si quieres que ocupe menos alto en móvil, pero se mantiene el fondo */
    }
}
/* Hero en móvil: imagen completa sin recortes */
@media (max-width: 768px) {
    .hero {
        background-size: contain !important;;           /* muestra toda la imagen, sin recortes */
        background-position: center center;
        background-repeat: no-repeat;
        background-color: #1A2A3A;          /* color de fondo que combine con tu imagen */
        background-attachment: scroll;
        height: 40vh;                       /* altura que ocupe buena parte de la pantalla, ajústala si quieres */
        min-height: 300px;                  /* evita que se haga muy pequeño */
    }

    /* Asegurar que el overlay cubra toda el área del hero */
    .hero-overlay {
        background: rgba(0, 0, 0, 0.219);        /* oscurece ligeramente para que el texto se lea mejor */
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* El contenido sigue centrado */
    .hero-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        text-align: center;
        z-index: 2;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .btn-hero {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
/* === HERO MÓVIL SIN ESPACIOS NEGROS === */
@media (max-width: 768px) {
    .hero {
        background-size: cover !important;
        background-position: center 35% !important;
        background-attachment: scroll !important;
        background-color: transparent !important;
        height: 55vh !important;
        min-height: 0 !important;
    }
    .hero-overlay {
        background: rgba(0,0,0,0.3);
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .btn-hero {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}
.seccion p {
    text-align: justify;
}
/* Compensación para páginas sin hero (galería, reservas, contacto, santa-helena) */
.seccion:first-of-type {
    padding-top: 200px; /* Ajusta según la altura de tu header */
}

/* En móvil, menos espacio */
@media (max-width: 768px) {
    .seccion:first-of-type {
        padding-top: 90px;
    }
}