/* ==========================================================
   1. TEXTOS GENERALES (Merriweather)
   ========================================================== */
body, .com-content-article, p, li {
    font-family: 'Merriweather', Georgia, serif !important;
    color: #616161;
}

/* ==========================================================
   2. ENCABEZADOS 1 a 5 (Andika Basic - Forzado absoluto)
   ========================================================== */
h1, h2, h3, h4, h5, 
.article-title, 
.page-header h1, 
.page-header h2,
.com-content-article h1,
.com-content-article h2,
.com-content-article h3,
.com-content-article h4,
.com-content-article h5,
.container-header h1,
.container-header h2,
.container-header h3,
.container-footer h1,
.container-footer h2,
.container-footer h3 {
    font-family: 'Andika', sans-serif !important;
    font-weight: normal !important;
    font-style: normal !important;
    color: #0F4C81 !important;
}

/* ==========================================================
   3. ENCABEZADO 6 (Cinzel Decorative)
   ========================================================== */
h6, .com-content-article h6 {
    font-family: 'Cinzel Decorative', 'Times New Roman', serif !important;
    font-weight: 400 !important;
    font-size: 1.3rem; 
    color: #897053 !important;
}

/* ==========================================================
   4. COLORES DE FONDO, TEXTO Y ALINEACIÓN (Pie de página)
   ========================================================== */

/* Fondo del pie de página y centrado general */
footer.container-footer, 
.container-footer,
.site-footer {
    background-color: #E9E4D8 !important;
    background-image: none !important;
    color: #616161 !important;
    padding: 3rem 0 !important;
    text-align: center !important;
}

/* Forzar centrado absoluto mediante Flexbox en el contenido del módulo */
.container-footer .grid-child,
.container-footer .custom,
.container-footer [class*="mod-"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
}

/* Estilo y tamaño para el texto general y enlaces del pie */
footer.container-footer p,
footer.container-footer span,
footer.container-footer a,
.container-footer p,
.container-footer span,
.container-footer a {
    color: #616161 !important;
    font-size: 0.9rem !important;
    text-align: center !important;
}

/* Encabezados en el pie de página (Azul Andika Basic) */
footer.container-footer h1,
footer.container-footer h2,
footer.container-footer h3,
footer.container-footer h4,
footer.container-footer h5,
footer.container-footer h6,
.container-footer h1,
.container-footer h2,
.container-footer h3,
.container-footer h4,
.container-footer h5,
.container-footer h6 {
    color: #0F4C81 !important;
    text-align: center !important;
}

/* ==========================================================
   5. Fondo blanco para la cabecera (Zona del logo)
   ========================================================== */

header.header,
.container-header,
.header {
    background-color: #ffffff !important;
    background-image: none !important; /* Elimina el gradiente azul por defecto */
    box-shadow: none !important;        /* Opcional: elimina sombras si las hubiera */
}

/* ==========================================================
   6. ESTILOS DEL MENÚ PRINCIPAL (Cabecera)
   ========================================================== */

/* Estado normal de los enlaces del menú */
header.header .mod-menu a,
.container-header .mod-menu a,
.nav-link {
    background-color: #F5F5F5 !important; /* Background Color */
    color: #0F4C81 !important;            /* Text / Link Color */
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 4px !important;         /* Bordes suavemente redondeados */
    transition: all 0.2s ease-in-out !important;
}

/* Estado al pasar el ratón por encima (Hover) y elemento activo */
header.header .mod-menu a:hover,
header.header .mod-menu a:focus,
.container-header .mod-menu a:hover,
.container-header .mod-menu .active > a,
.nav-link.active {
    background-color: #F5F5F5 !important; /* Se mantiene el fondo claro */
    color: #897053 !important;            /* Link Hover Color (Cinzel Decorative) */
}

/* Centrar la barra del menú en versión escritorio (pantallas grandes) */
@media (min-width: 992px) {
    .container-header .navbar,
    .container-header .mod-menu {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
    }

    .container-header .mod-menu > li,
    .container-header .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem; /* Separación opcional entre los botones del menú */
    }
}

/* ==========================================================
   7. MENÚ MÓVIL (Hamburguesa y Desplegable Centrado)
   ========================================================== */

@media (max-width: 991.98px) {
    /* Forzar al contenedor del menú a centrarse */
    .container-header .mod-menu,
    .container-header .navbar {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* Botón de hamburguesa centrado */
    .navbar-toggler {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
        float: none !important;
        border: 1px solid #0F4C81 !important;
        color: #0F4C81 !important;
        padding: 0.4rem 0.8rem !important;
        border-radius: 4px !important;
    }

    /* SOLO cuando el menú está abierto (.show), lo centramos en columna */
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Lista de enlaces desplegada */
    .navbar-collapse.show .navbar-nav,
    .navbar-collapse.collapsing .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        width: 100% !important;
    }

    /* Elementos individuales centrados */
    .navbar-collapse.show .navbar-nav .nav-item,
    .navbar-collapse.collapsing .navbar-nav .nav-item {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    .navbar-collapse.show .navbar-nav .nav-link,
    .navbar-collapse.collapsing .navbar-nav .nav-link {
        display: inline-block !important;
        margin: 0.25rem auto !important;
        text-align: center !important;
        max-width: 250px !important;
        width: 100% !important;
    }
}
/* ==========================================================
   8. BOTÓN Y VENTANA DE CHAT FLOTANTE DE WHATSAPP (NATIVO)
   ========================================================== */

/* Contenedor principal */
.wa-widget-details {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

/* Quitar la flecha por defecto de la etiqueta details/summary */
.wa-widget-details summary::-webkit-details-marker,
.wa-widget-details summary::marker {
    display: none !important;
}

/* Botón flotante redondo verde */
.whatsapp-float {
    width: 58px;
    height: 58px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    list-style: none !important;
    outline: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.08);
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.35);
}

/* Caja del chat desplegable */
.wa-chat-box {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    max-width: calc(100vw - 40px);
    background-color: #f7f9fa;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    animation: waFadeIn 0.25s ease-out;
}

@keyframes waFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cabecera verde */
.wa-chat-header {
    background-color: #25d366;
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wa-chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
}

/* Cuerpo del chat con los mensajes */
.wa-chat-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wa-msg-bubble {
    background-color: #ffffff;
    color: #333333;
    padding: 12px 16px;
    border-radius: 16px 16px 16px 4px;
    font-size: 0.92rem;
    line-height: 1.45;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Pie del chat con botón de envío */
.wa-chat-footer {
    padding: 12px 18px 18px 18px;
    display: flex;
    justify-content: flex-end;
}

.wa-send-btn {
    background-color: #25d366;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease;
}

.wa-send-btn:hover {
    background-color: #128c7e;
    transform: translateY(-1px);
}

/* Adaptación para móviles */
@media (max-width: 768px) {
    .wa-widget-details {
        bottom: 20px;
        right: 20px;
    }
    .wa-chat-box {
        width: 290px;
    }
}