/* --- Variables de Colores Actualizadas (Paleta Nude/Tierra) --- */
:root {
  --primary-color: #f3dbc3;    
  --secondary-color: #eacbac;  
  --accent-color: #fdecda;     /* Neutro 1*/
  --vibrant-color: #e9c39e;    
  --bg-light: #fff6ed;         
  --bg-cards: #fff6ed; /* Neutro 2 */        
  --text-dark: #5d544b;        
  --white: #ffffff;
  --shadow: 0 8px 24px rgba(233, 195, 158, 0.25); 
}

/* * */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* a */
.lib-link-clean {
  text-decoration: none !important;
  color: inherit;
}
.lib-link-clean:visited {
  color: inherit;
}

/* TÃ­tulos con identidad */
.lib-title {
  display: block;
  text-align: center;
  width: 100%;
  margin-bottom: 40px;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--lib-dark);
}

.lib-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--lib-primary);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* --- HEADER Y NAVEGACIÃ“N --- */
header {
  height: 100px;           
  background: var(--white);
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;     
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px; 
}

.logo-wrapper img {
  height: 50px;           
  width: auto;
  display: block;
  transition: all 0.3s ease;
  position: relative;
  top: 0;             
  filter: drop-shadow(0px 4px 4px rgba(0,0,0,0.1)); 
}

.logo-wrapper {
  display: flex;
  align-items: center;
  z-index: 1001; 
}

.site-title {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-item {
  position: relative;
  cursor: pointer;
  font-weight: 600; 
  padding: 10px 0;
  font-size: 1.15rem; 
}

.nav-item svg {
  width: 16px;
  vertical-align: middle;
}

.nav-item a {
  color: var(--text-dark); 
}

/* ==========================================================================
   MENÚ INTERACTIVO HAMBURGUESA DEFINITIVO (CORREGIDO Y AJUSTADO AL BORDE)
   ========================================================================== */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease-in-out; /* Animación suave */
}

/* 📱 ADAPTACIÓN PARA CELULARES (Pantallas menores a 768px) */
@media screen and (max-width: 992px) {
    header {
        height: 80px !important;
        padding: 0 24px !important; /* Espaciado limpio en los bordes del logo y botón */
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .logo-wrapper img {
        height: 45px !important;
    }

    /* Forzar a que aparezca el botón de tres líneas */
    .menu-toggle {
        display: flex !important;
    }

    /* DESPLEGABLE VERTICAL: Corregido para pegarse perfectamente a los bordes */
    header nav ul.nav-menu {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 80px !important; /* Empieza justo abajo del header */
        left: -100% !important; /* Escondido a la izquierda */
        
        /* 🔥 Ajuste perimetral para pegarse a los bordes de la pantalla */
        width: 100% !important;
        left: -100% !important;
        right: 0 !important;
        margin: 0 !important; 
        box-sizing: border-box !important;
        
        height: calc(100vh - 80px) !important;
        background-color: var(--white) !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 40px !important;
        padding-top: 60px !important;
        transition: left 0.4s ease-in-out !important;
        box-shadow: 0 15px 20px rgba(93, 84, 75, 0.08) !important;
        z-index: 1500 !important;
    }

    /* Al dar clic, entra a la pantalla pegado a los bordes */
    header nav ul.nav-menu.active {
        left: 0 !important;
    }

    header .nav-item {
        font-size: 1.5rem !important; /* Letras más grandes y legibles al tacto */
        width: 100% !important;
        text-align: center !important;
        padding: 5px 0 !important;
    }

    /* 🎬 ¡LA MAGIA DE LA X REPARADA! (Sin typos) */
    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg) !important;
        background-color: var(--vibrant-color) !important;
    }
    
    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0 !important; /* Desvanece la línea del medio */
        transform: translateX(-10px) !important;
    }
    
    /* 🌟 Corregido de 'nth-cmd' a 'nth-child' para que cruce perfectamente */
    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg) !important;
        background-color: var(--vibrant-color) !important;
    }
}

/*** Carrusel de Imagenes ***/
.lib-carousel {
  position: relative;
  height: var(--lib-carousel-height);
  background: var(--lib-dark);
  overflow: hidden;
}

.lib-carousel-slide {
  display: none;
  transition: opacity 0.8s ease-in-out;
}

.lib-carousel-slide.active {
  display: block;
  animation: libFadeIn 0.8s;
}

.lib-carousel-slide img {
  width: 100%;
  height: var(--lib-carousel-height);
  object-fit: cover;
  opacity: 0.7;
}

.lib-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.3);
  border: none;
  color: var(--lib-white);
  padding: 15px;
  cursor: pointer;
  font-size: 20px;
  z-index: 10;
}

.lib-carousel-btn.prev { left: 20px; }
.lib-carousel-btn.next { right: 20px; }

@keyframes libFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media screen and (max-width: 768px) {

    /* 1. Forzamos un alto más imponente para el contenedor del carrusel */
    .lib-carousel {
        height: 320px !important; /* Sube a 350px o 400px si quieres que sea aún más alto */
    }

    /* 2. Obligamos a las imágenes a llenar el nuevo espacio sin deformarse */
    .lib-carousel-slide img {
        height: 332px !important;
        object-fit: cover !important; /* Recorta perfectamente los lados manteniendo la calidad */
        object-position: left center !important;
    }

    /* 3. Reajustamos las flechas flotantes de 'anterior' y 'siguiente' */
    .lib-carousel .prev, 
    .lib-carousel .next {
        top: 50% !important; /* Las centra verticalmente en el nuevo alto */
        transform: translateY(-50%) !important;
        background: rgba(255, 255, 255, 0.4) !important; /* Un fondo translúcido más suave para móvil */
        padding: 10px 12px !important;
        border-radius: 50% !important;
        font-size: 16px !important;
    }
}

/*** Banner de bienvenida ****/
.banner-container {
  display: flex;
  min-height: 100vh; 
  background-color: var(--bg-cards);
  padding: 0; 
  overflow: hidden;
}

.banner-image-side {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; 
  min-height: 500px;
  position: relative;
  display: flex;
  align-items: center;
  background-color: #f0f0f0; 
}

.banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra verticalmente en la caja */
  align-items: center;     /* Empuja todo el bloque al centro */
}

.text-wrapper {
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;     /* Centra el título y subtítulo */
  text-align: center;
  width: 100%;
}

.subtitle {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 3px;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-style: italic;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 30px;
  line-height: 1.2;
}

.banner-content .description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-dark);
  opacity: 0.9;
  
  /* Magia del justificado centrado */
  text-align: justify;
  text-align-last: center; 
  max-width: 550px;        /* Límite para que no se haga una tira larga */
  width: 100%;
  margin: 0 auto 25px auto; /* Centra el párrafo en sí mismo */
}

/* Imagen inferior (Textura/DecoraciÃ³n) */
.bottom-texture {
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.bottom-texture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Efecto sutil al pasar el mouse por la foto decorativa */
.bottom-texture:hover img {
  transform: scale(1.05);
}

/* Ajuste para mÃ³viles */
@media (max-width: 768px) {
    .banner-container {
        display: block !important;
        position: relative;
        background-image: url('/static/web/img/bienvenida_1.jpg'); /* O la imagen dinámica */
        background-size: 560px;
        background-position: center;
        min-height: 10px !important;
    }

    .banner-image-side {
        display: none !important; /* Ocultamos la que duplica espacio */
    }

    .banner-content {
        background: rgba(255, 255, 255, 0.80); /* Un velo beige/blanco para leer bien */
        backdrop-filter: blur(3px); /* Efecto difuminado elegante */
        padding: 10px 5px;
        margin: 5px;
        border-radius: 20px;
    }
    .banner-content .description {
        text-align: center !important;
        text-align-last: center !important;
        font-size: 1.0rem !important;
        line-height: 1.2;
    }
    
    .main-title {
        font-size: 2.2rem !important; /* Evita que el título se rompa en 4 renglones */
    }
    .bottom-texture {
        display: none !important;
    }
}

/**** FOOTER ****/
footer {
  background: var(--secondary-color);
  color: var(--text-dark);
  text-align: center;
  padding: 20px 5%;
  margin-top: 90px;
}

/*** GalerÃ­a de imÃ¡genes ****/
.gallery-section {
  padding: 20px 20px;
  background-color: #f9f9f9; 
}

/* Cambiamos column-count por display: grid */
.column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.column img {
  width: 100%;
  aspect-ratio: 1 / 1; 
  object-fit: cover; 
  border-radius: 12px; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.column img:hover {
  transform: scale(1.05); 
  filter: brightness(90%); 
}

/* --- Ajustes de columnas --- */
@media (max-width: 992px) {
  .column { grid-template-columns: repeat(2, 1fr); } /* 2 columnas en tablets */
}

@media (max-width: 600px) {
  .column { grid-template-columns: 1fr; } /* 1 columna en mÃ³viles */
}

/********** UbicaciÃ³n **********/
.contact-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
    min-height: 650px;
}
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Estilo de la CÃ¡psula  */
.info-item {
    background: var(--white);
    padding: 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid var(--primary-color);
    width: 100%; 
    box-sizing: border-box;
}

.info-link-wrapper:hover .info-item {
  transform: scale(1.05); 
  background: var(--accent-color); 
  border-color: var(--vibrant-color); 
}

.green-icon {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-cards); 
    color: var(--vibrant-color); 
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3); 
    transition: all 0.3s ease;
}

.info-text h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--vibrant-color); 
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-text p {
  font-size: 0.95rem;
  color: var(--text-dark); 
  line-height: 1.4;
  margin: 0;
}

.info-link-wrapper {
    text-decoration: none;
    display: block;
}

.map-placeholder {
    width: 100%;
    height: 600px; 
    background-color: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    position: relative; 
    z-index: 1;
    box-shadow: var(--shadow);
    border: 8px solid var(--white);
}

/* Ajuste para mÃ³viles */
@media (max-width: 1100px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    .map-placeholder {
        height: 300px;
    }
    .info-item {
        max-width: 95%;
        padding: 20px 20px;
    }
}
/* ==========================================================================
   DISEÑO ULTRA COMPACTO CON MÁRGENES LATERALES PARA UBICACIÓN
   ========================================================================== */
@media screen and (max-width: 768px) {
    
    /* 1. Ampliamos el margen a los costados (35px) para empujar todo hacia el centro */
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-section .lib-title {
        font-size: 1.6rem !important;
        margin-bottom: 20px !important;
    }

    .contact-container {
        row-gap: 20px !important; /* Espacio más estrecho entre mapa y tarjetas */
        padding: 10px;
    }

    /* 2. Hacemos el mapa bastante más bajito (de 300px baja a 230px) */
    .map-placeholder {
        height: 300px;
    }

    /* 3. Encogemos las cápsulas de contacto al mínimo para que se vean esbeltas */
    .contact-info-list {
        gap: 10px !important; /* Menos separación entre tarjeta y tarjeta */
    }

    .info-item {
        padding: 8px 10px !important; /* Súper compactas por dentro */
        border-radius: 16px !important;
        border: 1.5px solid var(--vibrant-color) !important; /* Borde un poquito más fino */
    }

    /* 4. Iconos y círculos más pequeñitos */
    .green-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.85rem !important;
    }

    /* 5. Ajuste fino de textos micro-adaptados */
    .info-text h4 {
        font-size: 0.78rem !important;
        margin-bottom: 0px !important;
    }

    .info-text p {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
}
/**** Contenedor Principal ****/
#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
}

/* --- BotÃ³n Flotante --- */
#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-color);
    color: black;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
    position: relative;
    transition: transform 0.3s ease;
}

#chatbot-toggle:hover { transform: scale(1.1); }

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 50%;
    border: 2px solid white;
}

/* --- Ventana de Chat --- */
#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-header {
    background: var(--secondary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-info { display: flex; gap: 10px; align-items: center; }

.bot-avatar {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.bot-name { font-weight: 600; margin: 0; font-size: 0.9rem; }
.bot-status { font-size: 0.7rem; color: #4caf50; margin: 0; }

.chatbot-messages {
    padding: 15px;
    height: 200px;
    overflow-y: auto;
    background: var(--bg-light);
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    max-width: 85%;
}

.bot-msg {
    background: white;
    color: var(--text-dark);
    border-bottom-left-radius: 2px;
}

.chatbot-options {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #eee;
}

.chatbot-options button {
    background: #f0f0f0;
    border: none;
    padding: 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.chatbot-options button:hover { background: var(--accent-color); color: var(--vibrant-color); }

/* --- BotÃ³n WhatsApp --- */
.btn-agendar-chat {
    background: #25d366; /* Color WhatsApp */
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

.btn-agendar-chat:hover { background: #128c7e; }

.contenedor-servicios {
    display: flex;
    flex-direction: row; /* Uno al lado del otro */
}

/* 📱 DISEÑO PARA CELULARES (Se activa cuando la pantalla es pequeña) */
@media screen and (max-width: 768px) {
    
    .contenedor-servicios {
        flex-direction: column; /* Se apilan uno debajo de otro */
        padding: 10px;
    }

    /* Puedes aprovechar para hacer los textos más pequeños */
    .main-title {
        font-size: 1.5rem;
    }
}

/*CSS MENU*/
.menu-imagen-container {
    text-align: center;
    margin: 40px auto 20px auto; /* Centrado con espacio arriba y abajo */
    max-width: 1500px; /* Límite para que no se deforme en pantallas gigantes */
    padding: 0 20px;
}

.img-menu-servicios {
    width: 100%;
    height: auto;
    border-radius: 15px; /* Esquinas redondeadas */
    box-shadow: var(--shadow); /* Sombra elegante de tu paleta */
    border: 1px solid var(--accent-color);
}