/* FUENTES - Importar las tipografías corporativas */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

/* Definición de variables de color según manual corporativo */
:root {
    /* Colores principales basados en PANTONE 1505 C y colores corporativos */
    --color-primary: #FF6B35;       /* PANTONE 1505 C - Naranja principal */
    --color-primary-dark: #E05A2A;  /* Versión oscura para hover */
    --color-primary-light: #FF8C5A; /* Versión clara para efectos */
    --color-secondary: #2A3F54;     /* Azul oscuro corporativo */
    --color-secondary-light: #3A6C9B; /* Azul claro para gradientes */
    --color-accent: #55B0E2;        /* Azul claro/acento */
    --color-dark: #06263F;          /* Azul muy oscuro */
    --color-text: #333333;          /* Color de texto principal */
    --color-text-light: #555555;    /* Color de texto secundario */
    --color-background: #FFFFFF;    /* Fondo blanco */
    --color-background-alt: #F8F9FA; /* Fondo alternativo */
}

header {
    width: 100%;
    height: auto;
    position: fixed;
    z-index: 100;
    transition: all 0.5s ease-out;
    background-color: var(--color-background); /* Fondo blanco */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Montserrat', sans-serif;
}

#header-info {
    width: 100%;
    padding: 8px 5%;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    background-color: var(--color-secondary); /* Mantiene el azul corporativo en la barra superior */
}

#header-info-redes {
    width: auto;
    display: flex;
}

.header-red {
    color: var(--color-background);
    margin: 0 8px;
    font-size: 0.7em;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    border-radius: 50%;
    transition: all 0.3s ease-out;
    cursor: pointer;
}

.header-red a {
    color: var(--color-background);
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.red-facebook {
    background-color: #3b5998;
}

.red-whatsapp {
    background-color: #25D366;
}

.red-youtube {
    background-color: #FF0000;
}

.red-youtube a {
    color: var(--color-background);
}

.header-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#header-contenedor {
    width: 100%;
    padding: 15px 5%;
    box-sizing: border-box;
    position: relative;
    background-color: var(--color-background); /* Fondo blanco */
}

.header-contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#menu-mobile {
    position: absolute;
    display: none;
}

#menumob-mobile {
    display: none;
}

#logo {
    opacity: 1;
    position: relative;
    transition: opacity 0.5s ease-out;
    width: 150px;
    text-align: center;
}

#logo a img {
    width: 180px;
    height: auto;
}

/* Menu */
nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

nav a, nav p, nav span {
    color: var(--color-secondary); /* Texto en azul corporativo */
    text-align: center;
    padding: 8px 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    width: auto;
    font-size: 0.95rem;
    box-sizing: border-box;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

nav a:first-letter, nav p:first-letter, nav span:first-letter {
    text-transform: uppercase;
}

nav a:hover, nav p:hover, nav span:hover {
    border-bottom: 3px solid var(--color-primary);
    color: var(--color-primary);
}

.nav-scroll a,
.nav-scroll span {
    color: var(--color-secondary);
}

.nav-scroll a:hover,
.nav-scroll span:hover {    
    border-bottom: 3px solid var(--color-primary);
}

.navActivo {
    border-bottom: 3px solid var(--color-primary);
    color: var(--color-primary);
}

#header-borde {
    width: 100%;
    height: 90px;
}

.submenu {
    width: 280px;
    position: absolute;
    padding: 20px;
    box-sizing: border-box;
    height: auto;
    background-color: var(--color-background);
    border-radius: 0 8px 8px 8px;
    left: 0;
    text-align: left;
    top: 25px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--color-primary);
}

.submenu::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 16px;
    top: -16px;
    left: 0;
}

.submenu::after {
    content: "";
    width: 0;
    height: 0;
    border-bottom: 15px solid var(--color-background);
    border-right: 15px solid transparent;
    position: absolute;
    top: -15px;
    left: 0;
}

.submenu-op {
    width: 100%;
    padding: 10px 0;
    color: var(--color-secondary) !important;
    display: block;
    position: relative;
    text-align: left;
    margin-top: 8px;
    border-bottom: 1px dashed rgba(42, 63, 84, 0.3);
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease-out;
    font-size: 0.9rem;
}

.submenu-op:hover {
    border-bottom: 1px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    padding-left: 8px;
}

nav span:hover .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    top: 55px;
}

/* Estilos para móvil */
@media (max-width: 1000px) {
    header {
        z-index: 101;
        background-color: var(--color-background);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    #logo {
        position: initial;
    }
    
    #logo a img {
        position: relative;
        top: 0;
        width: 140px;
        left: auto;
        right: auto;
        transform: translate(0%, 0%);
    }
    
    #header-info {
        display: none;
    }
    
    #header-contenedor {
        justify-content: center;
        padding: 12px 5%;
        background-color: var(--color-background);
    }
    
    #nav {
        display: none;
    }
    
    #header-buscador {
        display: none;
    }
    
    #header-info-email, #header-info-tel {
        display: none;
    }
    
    #menu-mobile {
        display: block;
        top: 27px;
        left: 30px;
        color: var(--color-secondary);
        font-size: 1.5rem;
        z-index: 10;
    }
    
    #menumob-mobile {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        left: -100%;
        z-index: 99;
    }
    
    #menumob-fondo-mobile {
        position: relative;
        width: 100%;
        height: 100%;
        left: -100%;
        opacity: 0;
        background-color: rgba(0, 0, 0, 0.7);
        transition: opacity 0.5s ease-out;
        z-index: 1;
    }
    
    #menumob-opciones-mobile {
        position: absolute;
        width: 300px;
        top: 0;
        height: 100%;
        left: -100%;
        background-color: var(--color-background);
        transition: left 0.5s ease-out;
        z-index: 5;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    #menumob-presentacion-mobile {
        width: 100%;
        height: auto;
        padding: 20px 0;
        box-sizing: border-box;
        background-color: var(--color-secondary);
        text-align: center;
        border-bottom: 2px solid var(--color-primary);
    }
    
    #menumob-presentacion-mobile img {
        width: 120px;
        height: auto;
        display: block;
        margin: 0 auto 15px auto;
    }
    
    #menumob-presentacion-mobile a:nth-child(1) {
        display: block;
        background-color: transparent;
    }
    
    #menumob-presentacion-mobile a:nth-child(2),
    #menumob-presentacion-mobile a:nth-child(3) {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        text-align: center;
        line-height: 40px;
        background-color: var(--color-primary);
        margin: 0 5px;
    }
    
    #menumob-presentacion-mobile a {
        color: var(--color-background);
        text-decoration: none;
        display: inline-block;
    }
    
    #menumob-contenedor-mobile {
        width: 90%;
        box-sizing: border-box;
        margin: 20px auto;
        overflow: auto;
        max-height: calc(100% - 200px);
    }
    
    .menumob-conte-opcion-mobile {
        font-size: 0.95rem;
        text-align: left;
        padding: 12px 0;
        box-sizing: border-box;
        border-bottom: 1px solid rgba(42, 63, 84, 0.1);
        color: var(--color-secondary);
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;
    }
    
    .menumob-conte-opcion-mobile a,
    .menumob-conte-opcion-mobile p,
    .menumob-conte-opcion-mobile span {
        color: var(--color-secondary);
        font-family: 'Montserrat', sans-serif;
        text-decoration: none;
        position: relative;
        display: block;
        padding: 8px 0;
    }
    
    .submenum {
        width: 100%;
        display: block;
        height: 0;
        overflow: hidden;
        transition: all 0.3s ease-out;
        padding-left: 15px;
    }
    
    .submenum a {
        display: block;
        width: 100%;
        padding: 8px 0;
        box-sizing: border-box;
        position: relative;
        transition: all 0.3s ease-out;
        color: var(--color-text-light);
        font-weight: 400;
        font-size: 0.9rem;
    }
    
    .submenum a::before {
        content: "•";
        position: absolute;
        left: -15px;
        top: 8px;
        color: var(--color-primary);
    }
    
    .arriba::before {
        right: 10px;
        top: 0;
        position: absolute;
        transform: rotate(180deg);
    }
    
    #menumob-cerrar-mobile {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: var(--color-primary);
        text-align: center;
        z-index: 7;
        position: relative;
        margin: 15px auto;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #menumob-cerrar-mobile span {
        font-size: 1.3rem;
        color: var(--color-background);
    }
    
    #header-borde {
        width: 100%;
        height: 80px;
    }
}

/* Estilos adicionales para móviles más pequeños */
@media (max-width: 480px) {
    #logo a img {
        width: 120px;
    }
    
    #menu-mobile {
        left: 20px;
        top: 23px;
    }
    
    #menumob-opciones-mobile {
        width: 280px;
    }
    
    #menumob-presentacion-mobile img {
        width: 100px;
    }
}