/* ==================== 0. RESET Y BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Lora", serif;
  line-height: 1.6;
  color: #533f25;
  background-color: #e5e2da;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
/* ==================== 1. HEADER ==================== */

/* Header con imagen que mantiene proporciones y se ve completa */
.header {
    position: relative;
    width: 100%;
    height: 35vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #b1c9a7; /* Fondo negro por si hay bordes */
}

.header-bg {
    max-width: 150%;
    max-height: 150%;
    object-fit: contain; /* Muestra la imagen completa, sin recortar */
}

/* Ajuste para pantallas estrechas */
@media (max-width: 768px) {
    .header {
        height: 40vh;
    }
}

@media (max-width: 480px) {
    .header {
        height: 35vh;
    }
}

/* Contenido principal */
main {
    padding: 40px;
    text-align: center;
}

main h1 {
    margin-bottom: 20px;
    color: #333;
}
/* ==================== 2. NAVEGACIÓN DE SECCIONES ==================== */
.nav-sections {
  background: #e5e2da;
  padding: 20px 0;
  margin-top: -10px;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 en fila (desktop) */
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.nav-item {
  padding: 6px 4px;
  background: #b1c9a7;
  border-radius: 12px;
  text-decoration: none;
  color: #533f25;
  font-weight: 600;
  font-size: 1rem; /* Texto grande y legible */
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e8e0d0;
  transition: all 0.3s ease;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

.nav-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  background: #e8e0d0;
  border-color: #d4c8b0;
}

/* ==================== RESPONSIVE: PANTALLAS ESTRECHAS ==================== */
/* Este breakpoint activa el modo 2x2 cuando la pantalla es < 950px */

@media (max-width: 400px) {
  nav-grid {
    grid-template-columns: repeat(2, 1fr); 
    max-width: 400px; /* Opcional: Centrar la rejilla de 2x2 para que no se estire demasiado */
    padding: 0 15px; /* Pequeño padding para móviles en los bordes */
  }
  
  .nav-item {
    padding: 10px 8px;
    font-size: 1rem;
    min-height: 30px;
  }
  
  /* --- OPCIONAL: Indicador visual durante desarrollo --- */
  .nav-sections {
    background: #e5e2da !important; /* Fondo ligeramente diferente */
    border-bottom: 2px solid #d4c8b0;
  }
  /* Quita este estilo cuando termines */
}
/* ==================== 2. TITULOS Y TEXTOS ==================== */
h2 {
    color: #533f25;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8em;
}

h3 {
    color: #533f25;
    margin: 15px 0;
}

.about p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Contenedor flex para Bienvenidos y Galería */
.about-flex {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Carrusel */
.carousel-container {
    position: relative;
    width: 100%;
    /* MODIFICADO: Aumentado de 400px a 550px para hacerlo más grande */
    max-width: 475px; 
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Centrar título de Galería con respecto al carrusel (Se mantiene para móviles, aunque puede ser redundante) */
.gallery .container {
    display: flex;
    flex-direction: column;
    align-items: center; /* centra horizontalmente todo el contenido */
    gap: 20px; /* espacio entre título y carrusel */
}

.gallery h2 {
    text-align: center;
    width: 100%;
    max-width: 475px; /* opcional, coincide con el carrusel */
    margin-bottom: 15px;
    color: #533f25;
    font-size: 1.8em;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    aspect-ratio: 4 / 5; /* Proporción 4:5 */
    overflow: hidden;
    background-color: #e6e6e6; /* Fondo neutro para ocultar bordes si los hay */
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubre todo el contenedor */
    object-position: center; /* Centra la imagen */
    border-radius: 8px;
    display: block;
}

/* Botones del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

/* Ubicación siempre debajo */
.location {
    margin-top: 30px;
}

.location h3 {
    margin-bottom: 10px;
}

.location iframe {
    width: 100%;
    /* MODIFICADO: Aumentado para mejor alineación con el carrusel grande */
    height: 350px; 
    border-radius: 8px;
}

/* Desktop: columna izquierda texto + ubicación, columna derecha carrusel + título */
@media (min-width: 768px) {
    .about-flex {
        display: flex;
        flex-direction: row;
        gap: 30px;
        /* MODIFICADO: Asegura que los títulos y contenidos de ambas columnas empiecen a la misma altura. */
        align-items: flex-start; 
    }

    /* Columna izquierda: texto + ubicación */
    .about-block-text {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Bienvenidos arriba y mapa debajo */
        flex: 1;
    }

    /* Columna derecha: título + carrusel */
    .about-block-carousel {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* desplaza título y carrusel hacia arriba */
        align-items: center; /* centra horizontalmente */
        flex: 1;
        gap: 15px; /* espacio entre título y carrusel */
    }

    .about-block-carousel h2 {
        text-align: center;
        margin: 0;
        font-size: 1.8em;
        color: #533f25;
    }

    .carousel-container {
        /* MODIFICADO: Mismo tamaño grande que en la definición global */
        max-width: 475px; 
        width: 100%;
    }
}


.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox.hidden {
    display: none;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}
/* Proporción 4:5 solo en pantallas estrechas */
/* Proporción 4:5 solo en pantallas estrechas */
@media (max-width: 600px) {
    .carousel-container {
        aspect-ratio: 4 / 5 !important;
        height: auto !important;
        padding: 0 !important;
    }

    .carousel-slide {
        aspect-ratio: 4 / 5 !important;
        height: auto !important;
    }

    .carousel-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 0 !important;
    }
}


/* ==================== 3. SERVICIOS ==================== */
.services {
  background: #e5e2da;
  padding: 40px 0;
}

.services h2 {
  text-align: center;
  margin-bottom: 30px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.service-item {
  background: white;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.service-item i {
  font-size: 2.5rem;
  color:  #533f25;
  margin-bottom: 15px;
}

.service-item h3 {
  color: #533f25;
  margin: 10px 0;
  font-size: 1.4rem;
}

.service-item p {
  color: #666;
  line-height: 1.6;
}

/* ==================== 4. CONDICIONES ==================== */
.terms {
  background: #e5e2da;
  padding: 40px 0;
}

.terms h2 {
  text-align: center;
  margin-bottom: 30px;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.term-item {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.term-item h3 {
  color: #533f25;
  margin-bottom: 15px;
  border-bottom: 2px solid #d4c8b0;
  padding-bottom: 10px;
}

.terms ul {
  margin: 15px 0;
  padding-left: 20px;
}

.terms li {
  margin: 8px 0;
  line-height: 1.6;
}

.terms ul ul {
  margin-left: 40px;
  list-style-type: disc;
  padding-left: 20px;
}

.terms ul ul li {
  margin: 6px 0;
}

/* ==================== 5. FORMULARIO ==================== */
form {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 20px auto;
}

label {
  display: block;
  margin: 15px 0 5px;
  font-weight: 600;
  color: #533f25;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="time"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  background: #533f25;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  width: 100%;
}

.btn:hover {
  background: #1e3d22;
}

.info-text {
  font-size: 0.9em;
  color: #555;
  margin-top: 15px;
  text-align: center;
}

/* Formulario multipaso */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grupo horas */
.time-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 15px 0;
}

.time-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.time-field label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 6px;
  text-align: center;
}

.time-field input[type="time"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  background-color: white;
  width: 120px;
  text-align: center;
}

/* Flatpickr input */
#fecha {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  background-color: white;
}
/* Calendario fijo centrado */
#calendar-container {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  margin: 0 auto;
}

.flatpickr-calendar {
  margin: 0 auto !important;
  position: relative !important;
  left: auto !important;
  transform: none !important;
  display: block !important;
  width: 100% !important;
  max-width: 300px; /* Ajusta el tamaño si es necesario */
}

.flatpickr-innerContainer {
  width: 100% !important;
}

.flatpickr-days {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
}


/* ==================== 6. CONTACTO ==================== */
.contact-info {
  max-width: 500px;
  margin: 20px 0; /* Cambiado de 'margin: 20px auto' a 'margin: 20px 0' */
  padding-left: 0;
}

.item {
  margin: 12px 0;
  font-size: 1.1em;
  text-align: left; /* Asegura que el texto dentro esté a la izquierda */
  display: flex; /* Opcional: para alinear icono y texto */
  align-items: center; /* Alinea verticalmente icono y texto */
}

.item i {
  width: 30px;
  color: #533f25;
}

.social {
  margin-top: 20px;
}

.social a {
  font-size: 1.5em;
  margin: 0 10px;
  color: #533f25;
}

.social a:hover {
  color: #533f25;
}

/* ==================== 7. FOOTER ==================== */
.footer {
  background: #b1c9a7;
  color: #533f25;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  width: 90%;
  margin: auto;
}

.footer-col h3,
.footer-col h4 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color:#533f25;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  font-size: 0.95rem;
}

.footer-col ul li {
  margin: 8px 0;
}

.footer-col a {
  color: #533f25;
  text-decoration: none;
}

.footer-col a:hover {
  color: #fff;
}

/* Parte inferior */
.footer-bottom {
  text-align: center;
  margin-top: 25px;
  padding-top: 10px;
  border-top: 1px solid #333;
  font-size: 0.85rem;
}

/* ======== SECCIONES LEGALES ======== */
.legal-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.legal-content {
  background: #fff;
  color: #333;
  max-width: 700px;
  padding: 30px;
  border-radius: 10px;
  position: relative;
}

.close-modal {
  position: absolute;
  right: 18px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}


/* ==================== 8. RESPONSIVE (único bloque) ==================== */
@media (max-width: 768px) {
  h2 {
    font-size: 1.6em;
  }

  .container {
    width: 95%;
    padding: 15px;
  }

  /* Header responsive */
  .header-logo {
    max-width: 60px;
  }

  /* Eliminar márgenes que rompen el diseño */
  .header h1 .palabra1,
  .header h1 .palabra2 {
    margin: 0;
  }

  .carousel-img {
    height: 300px;
  }

  .time-group {
    gap: 10px;
  }

  .time-field {
    min-width: 100px;
  }

  .time-field input[type="time"] {
    width: 100px;
    font-size: 14px;
    padding: 8px;
  }

  .btn {
    padding: 10px 15px;
    font-size: 0.95em;
  }

  form {
    padding: 20px;
  }

  .social a {
    font-size: 1.3em;
    margin: 0 8px;
  }
  
  /* Navegación de secciones */
  .nav-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  /* Servicios y Condiciones */
  .services-grid,
  .terms-grid {
    grid-template-columns: 1fr;
  }
  
  .service-item,
  .term-item {
    padding: 20px;
  }
}

/* Pantallas muy pequeñas (móviles antiguos o en vertical) */
@media (max-width: 768px) {
  .header-logo {
    max-height: 70px;
  }
  .header-title {
    font-size: 1.8em;
  }
  
  .nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .header {
    padding: 40px 15px;
  }

  .header .palabra2 {
    font-size: 1.8em;
  }

  h2 {
    font-size: 1.5em;
  }

  .carousel-img {
    height: 250px;
  }

  .time-field input[type="time"] {
    width: 90px;
    font-size: 13px;
  }

  .footer {
    padding: 15px;
  }
  
  .nav-grid {
    grid-template-columns: 1fr;
  }
}