/* =============================
   LAYOUT BASE
   ============================= */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* El contenido central crece, pero NO controla el scroll */
.main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* #index o sección principal */
.main-content>#index {
    flex: 1;
}

/* Footer siempre abajo */
footer {
    flex-shrink: 0;
}

/* Utilidades personalizadas */
.mostrar {
    display: block;
}

.aparecer {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.ocultar {
    display: none;
}

.no-styles {
    text-decoration: none;
}

/* =============================
   VARIABLES
   ============================= */
:root {
    --principal: #003049;
    --secundario: #FFF9E2;
    --terciario: #000000A3;
    --cafe: #BB6F58;
    --negro: #000;
    --negro1: #000000A3;
    --gris-purpura: #79747E;
}

/* =============================
   TIPOGRAFÍAS
   ============================= */
/* (Mantengo tus @font-face tal cual) */

.fuente-g-regular {
    font-family: gilroy-regular, "Gilroy", sans-serif;
}

.fuente-g-medium {
    font-family: gilroy-medium, "Gilroy", sans-serif;
}

.fuente-g-bold {
    font-family: gilroy-bold, "Gilroy", sans-serif;
}

.fuente-i-regular {
    font-family: iowan-regular, "Iowan", sans-serif;
}

.fuente-i-bold {
    font-family: iowan-bold, "Iowan", sans-serif !important;
}

.fuente-montserrat-bold {
    font-family: montserrat-bold, "Montserrat", sans-serif;
}

.fuente-montserrat-medium {
    font-family: montserrat-medium, "Montserrat", sans-serif;
}

.fuente-montserrat-regular {
    font-family: montserrat-regular, "Montserrat", sans-serif;
}

.fuente-montserrat-light {
    font-family: montserrat-light, "Montserrat", sans-serif;
}

.fuente-montserrat-thin {
    font-family: montserrat-thin, "Montserrat", sans-serif;
}

/* Tamaños */
.fuente-16 {
    font-size: 16px;
}

.fuente-22 {
    font-size: 22px;
}

.fuente-24 {
    font-size: 24px;
}

.fuente-28 {
    font-size: 28px;
}

.fuente-30 {
    font-size: 30px;
}

.fuente-32 {
    font-size: 32px !important;
}

/* =============================
   COLORES
   ============================= */
.principal {
    background-color: var(--principal);
}

.texto-principal {
    color: var(--principal);
}

.secundario {
    background-color: var(--secundario);
}

.texto-secundario {
    color: var(--secundario);
}

.texto-terciario {
    color: var(--terciario);
}

.cafe {
    background-color: var(--cafe);
}

.texto-cafe {
    color: var(--cafe);
}

.texto-negro {
    color: var(--negro);
}

/* =============================
   ESPACIADO
   ============================= */
.lh-24 {
    line-height: 24px;
}

.lh-32 {
    line-height: 32px;
}

.lh-40 {
    line-height: 40px;
}

.lh-50 {
    line-height: 50px;
}

.lh-60 {
    line-height: 60px;
}

.lh-100 {
    line-height: 100%;
}

/* =============================
   NAVBAR (Bootstrap compatible)
   ============================= */
header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #fff;
}

/* Sobrescribimos bootstrap sin afectar su estructura */
nav.navbar {
    background-color: var(--principal) !important;
}

#brand-logo {
    position: relative;
}

#main-logo {
    width: 140px;
    height: auto;
}


/* Bootstrap reemplaza display:flex del nav, así que movemos tu flex aquí */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.container {
    max-width: 1240px;
}

/* =============================
   MENU
   ============================= */
#menu {
    font-size: 20px;
    position: relative;
    left: 14rem;
    width: 100%;
}

/* Evita que Bootstrap pinte los enlaces */
.menu .nav-link {
    color: transparent !important;
    padding-bottom: 12px;
}

/* Textura */
.menu .main-menu-item {
    background-image: url("../img/global/textura.svg");
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    position: relative;
}

/* Contenedor del menú */
.menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Indicador */
.menu-indicador {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
}

.main-menu-item.activo .menu-indicador {
    display: block;
    width: 100%;
}

/* Toggler */
.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: none !important;
    width: 24px;
    height: 2px;
    position: relative;
    border-radius: 2px;
    background-color: var(--secundario);
}

/* Línea superior */
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: var(--secundario);
    border-radius: 2px;
}

/* Segunda línea */
.navbar-toggler-icon::before {
    top: -7px;
}

/* Tercera línea */
.navbar-toggler-icon::after {
    top: 7px;
}

/* =============================
   FOOTER
   ============================= */
#footer {
    width: 100%;
    min-height: 111px;
}

.contenido-footer {
    justify-items: center;
}

.logos-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
}

.footer-item {
    font-size: 16px;
    font-weight: 600;
}

/* =============================
   BOTONES
   ============================= */
/* .boton-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 50px;
    border-radius: 30px;

    background-image: url('../img/global/boton.svg');
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    background-color: transparent;

    border: none;
    cursor: pointer;
} */

.boton-imagen {
    /* variable para la imagen */
    --boton-bg: none;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 200px;
    height: 50px;
    border-radius: 30px;

    background-image: var(--boton-bg);
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    background-color: transparent;

    border: none;
    cursor: pointer;
}

.boton-imagen:focus,
.boton-imagen:active {
    outline: none;
    background-color: transparent;
}

.boton-imagen span {
    color: var(--principal);
    font-weight: bold;
    pointer-events: none;
    line-height: 24px;
}

.boton-imagen:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================
   Variantes de imagen
   ========================= */

.boton-imagen[data-bg="0"] {
    --boton-bg: url('../img/global/boton.svg');
}

.boton-imagen[data-bg="1"] {
    --boton-bg: url('../img/global/boton2.svg');
}


.error-message {
    color: red;
    font-size: 14px;
    display: none;
}

.form-control {
    background-color: transparent !important;
}

/* Widget open table */

/* ========================= */
/* Fondo overlay (widget) */
/* ========================= */
.widget-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);

    /* 🔑 CLAVE: cuando está cerrado NO existe */
    display: none;

    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Mostrar el widget */
.widget-overlay.activo {
    display: flex;
}

/* ========================= */
/* Modal centrado */
/* ========================= */
.widget-modal {
    background: #fff;
    border-radius: 12px;
    padding-top: 10px;
    width: 250px;
    height: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;

    /* Animación */
    animation: scaleIn 0.4s ease forwards;
}

/* ========================= */
/* Contenedor del widget */
/* ========================= */
#widget-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ========================= */
/* Animación de entrada */
/* ========================= */
@keyframes scaleIn {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================= */
/* Botón de cierre */
/* ========================= */
.widget-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    transition: color 0.2s ease;
    z-index: 10;
}

.widget-close:hover {
    color: #ff4d4f;
}



@media (max-width:992px) {

    .container {
        max-width: 95%;
    }

    #main-logo {
        width: 130px;
        margin-left: -20px;
    }

    #mainMenu {
        margin-left: -1rem;
    }

    .menu {
        gap: 0rem;
    }

    /* .main-menu-item.activo .menu-indicador {
        width: 20%;
        left: 3.5rem;
    } */

    .main-menu-item.activo .menu-indicador {
        display: none !important;
    }

    .menu .nav-link {
        padding-bottom: 0px;
    }

    .navbar-toggler {
        transform: translate(1rem, -0.15rem);
    }
}

@media (max-width:500px) {
    .menu {
        gap: 0rem;
    }

    /* .main-menu-item.activo .menu-indicador {
        width: 30%;
        left: 3.5rem;
    } */

    .navbar-toggler {
        transform: translate(1rem, -0.15rem);
    }

    #main-logo {
        width: 120px;
        margin-left: auto;
        margin-right: auto;
        display: block;
        /* asegura el centrado */
    }

    #mainMenu {
        margin-left: 0rem;
    }

    .footer-item {
        font-size: 14px;
    }

    .footer-secciones-contacto-row {
        margin-top: -0.5rem;
    }

    .item-footer-secciones-contacto-row :first-child {
        margin-bottom: 1rem;
    }
}

/* Menu en x (activo) */

/* Quitar icono por defecto */
.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Base del icono */
.navbar-toggler-icon {
    background-image: none;
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--secundario);
    display: inline-block;
    transition: background-color 0.3s ease;
}

/* Líneas superior e inferior */
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: var(--secundario);
    transition: transform 0.3s ease, top 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    top: 8px;
}

/* ESTADO ACTIVO → X */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    top: 0;
    transform: rotate(-45deg);
}