/* ======================= VARIABLES Y ESTILOS GLOBALES ======================= */
:root {
    --color-text: #2c2c2c;
    --color-background: #ffffff;
    --color-light-gray: #f5f5f7;
    --font-main: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-background);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #888;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section {
    padding: 80px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #555;
}

/* ======================= HEADER ======================= */
.header {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    gap: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.header-top a i {
    margin-right: 8px;
}

.header-logo {
    text-align: center;
    margin-bottom: 30px;
}

.header-logo h1 {
    font-size: 4rem;
    font-weight: 500;
    letter-spacing: 15px;
    line-height: 1;
}

.header-logo p {
    font-size: 1rem;
    letter-spacing: 5px;
    color: #777;
}

.header-nav {
    display: flex;
    gap: 40px;
    font-size: 1.1rem;
}

/* ======================= SECCIONES PRINCIPALES ======================= */
.section-text {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    line-height: 1.7;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 3rem;
}

.image-grid img {
    width: 100%;
    object-fit: cover;
}

/* --- Contenedor de cada par de imágenes --- */
.image-card {
    position: relative; /* Clave para superponer las imágenes */
    overflow: hidden;   /* Oculta cualquier parte de la imagen que se salga */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Estilos de ambas imágenes dentro de la tarjeta */
.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra todo el espacio sin deformarse */
    display: block;
    transition: opacity 0.4s ease-in-out; /* Transición suave para el efecto */
}

/* --- Lógica del Hover --- */

/* Por defecto, la imagen de hover está oculta y superpuesta */
.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0; /* Oculta */
}

/* Cuando se hace hover sobre la tarjeta... */
.image-card:hover .img-hover {
    opacity: 1; /* Muestra la imagen de hover */
}

.image-card:hover .img-default {
    opacity: 0; /* Oculta la imagen original */
}


/* --- Media Query para Ordenador --- */
/* Cuando el ancho de la pantalla sea 768px o más... */
@media (min-width: 768px) {
    .image-grid {
        /* Cambiamos el grid a 3 columnas */
        grid-template-columns: repeat(3, 1fr);
    }
}

.section-text-cta {
    font-size: 1.1rem;
    font-weight: 500;
}

/* ======================= BANNER CTA ======================= */
.cta-banner {
    background-color: var(--color-light-gray);
    padding: 50px 20px;
    text-align: center;
}

.cta-banner h2 {
    margin-bottom: 1rem;
}

.cta-banner p {
    margin-bottom: 1.5rem;
}

.cta-links a {
    display: block;
    margin: 0.5rem auto;
    font-weight: 500;
    text-decoration: underline;
}

/* ======================= DÓNDE ESTAMOS / VISÍTANOS ======================= */
.visitanos-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
    align-items: center;
    margin-top: 3rem;
}

.horario {
    margin-top: 2rem;
    line-height: 1.8;
}

/* ======================= RESEÑAS ======================= */
.review-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
.review-stars {
    color: #f9d71c; /* Color dorado para las estrellas */
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.review-text {
    font-style: italic;
    margin-bottom: 15px;
}
.review-author {
    font-weight: bold;
}

/* ======================= FOOTER ======================= */
.footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 60px 40px;
    background-color: var(--color-background);
    border-top: 1px solid #eee;
}

.footer-logo h3 {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 8px;
}

.footer-logo p {
    letter-spacing: 3px;
    font-size: 0.8rem;
    color: #777;
}

.footer-contact h4, .footer-legal h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-contact a, .footer-legal a {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-contact a i {
    margin-right: 10px;
}

/* ======================= DISEÑO RESPONSIVO ======================= */
@media (max-width: 768px) {
    .header {
        padding: 20px;
    }
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .header-logo h1 {
        font-size: 3rem;
        letter-spacing: 10px;
    }
    .header-nav {
        gap: 20px;
    }

    .image-grid,
    .reviews-slider,
    .visitanos-container,
    .footer {
        grid-template-columns: 1fr;
    }

    .footer {
        text-align: center;
    }

    .visitanos-container {
        text-align: center;
    }
}

@media (max-width: 768px) {
  
  .header-nav {
    /* Apila los elementos del menú verticalmente */
    flex-direction: column;
    
    /* Centra los elementos apilados */
    align-items: center; 
    
    /* Reduce el espacio entre los elementos del menú */
    gap: 25px;
    
    /* Añade un poco de espacio extra arriba para separarlo del logo */
    margin-top: 15px; 
  }

}

/* ======================= ESTILOS ADICIONALES DÓNDE ESTAMOS ======================= */

/* Ajustes de espaciado para el bloque de horario */
#donde-estamos .horario {
    margin: 3rem auto;
    line-height: 1.8;
    max-width: 500px;
}

/* Aumenta el tamaño de la invitación final */
#donde-estamos .section-text-cta {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 3rem;
}

/* Contenedor para el mapa para darle un margen superior */
.map-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 900px; /* Opcional: limita el ancho máximo del mapa */
    margin-left: auto;
    margin-right: auto;
}

.tns-nav {
    text-align: center;
    margin-top: 20px;
}
.tns-nav button {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border: none;
    border-radius: 50%;
    margin: 0 5px;
    padding: 0;
}
.tns-nav button.tns-nav-active {
    background-color: #333;
}

.tns-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #333;
    z-index: 10;
}
.tns-controls button[data-controls="prev"] {
    left: -40px;
}
.tns-controls button[data-controls="next"] {
    right: -40px;
}

/* Ajuste final para que la sección tenga espacio para las flechas */
#resenas .section-inner-container { /* Necesitarás añadir esta clase a tu HTML si quieres las flechas fuera */
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}
/* O más fácil, añade padding a la sección principal */
#resenas {
    padding-left: 50px;
    padding-right: 50px;
}

.reviews-slider,
.reviews-slider > .review-card {
    visibility: visible !important;
    opacity: 1 !important;
}

/*
 * Le damos una altura mínima al contenedor para evitar que se colapse
 * verticalmente mientras el script calcula las dimensiones.
*/