/* ==========================================================================
   ESTILOS REPLICA EXACTA - HEADER INSTITUCIONAL ITESHU
   Colores:
   - Azul: #1B396A | Vino: #611232 | Gris: #d6d3d3 / #D6D3D3 | Verde: #476E52
   ========================================================================== */

body {
    padding-top: 140px;
}

@media (max-width: 767px) {
    body {
        padding-top: 180px;
    }
}

.header-institucional {
    width: 100%;
    z-index: 1030;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15);
    background-color: #FFFFFF;
	overflow: visible !important;
}

/* --- 1. BARRA SUPERIOR VINO --- */
.top-bar-vino {
    background-color: #611232;
    padding: 10px 0;
}

.top-bar-vino .logo-gob {
    height: 26px;
    width: auto;
}

/* Banderas sin borde y alineadas */
.idiomas-top img {
    height: 20px;
    width: 20px;
    margin-left: 6px;
    border-radius: 50%;
    border: none !important; /* Quita el borde de las banderas */
    outline: none;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.idiomas-top img:hover {
    transform: scale(1.1);
}

/* --- 2. BARRA MEDIA GRIS --- */
.mid-bar-gris {
    background-color: #d6d3d3; /* Tono de gris claro institucional */
    border-bottom: 1px solid #D6D3D3;
    padding: 12px 0;
}

.logo-iteshu {
    max-height: 58px;
    width: auto;
}

.titulo-institucion {
    color: #1B396A;
    font-size: 1.5em;
    font-weight: 600;
	padding-top: 10px;
    letter-spacing: 0.2px;
    font-family: Arial, Helvetica, sans-serif;
}

/* Botones de Redes Sociales */
.social-icons {
    margin-top: 4px;
}

.social-btn {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    background-color: #1B396A;
    color: #FFFFFF !important;
    text-align: center;
    border-radius: 3px;
    margin-left: 3px;
    font-size: 14px;
    transition: background-color 0.2s ease;
    text-decoration: none !important;
}

.social-btn:hover {
    background-color: #611232;
}

/* --- 3. BARRA AZUL DE NAVEGACIÓN --- */
.navbar-custom {
    background-color: #1B396A;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    min-height: 42px;
	overflow: visible !important;
	position: relative !important;
    z-index: 1030 !important;
}

.navbar-custom .navbar-brand.visible-xs {
    color: #FFFFFF;
    font-size: 0.81em;
    font-weight: 600;
    padding: 20px 15px;
    line-height: 20px;
    text-transform: uppercase;
}

/* Centrado de la lista de opciones */
@media (min-width: 768px) {
    .navbar-custom .navbar-collapse {
        display: flex !important;
        justify-content: center; /* Centra las opciones horizontalmente */
        padding-left: 0;
        padding-right: 0;
        overflow: visible !important;
    }

    .navbar-custom .navbar-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        float: none !important;
        margin: 0 auto;
    }
}

/* Estilo y separación de los enlaces */
.navbar-custom .navbar-nav > li > a {
    color: #FFFFFF;
    font-size: 0.81em;
    font-weight: normal; /* Tipografía normal (sin negrita) como el original */
    padding: 12px 14px;  /* Espaciado más compacto entre accesos */
    letter-spacing: 0.2px;
    text-transform: uppercase;
    position: relative;
    background: transparent;
}

.navbar-custom .navbar-nav > li > a:hover,
.navbar-custom .navbar-nav > li > a:focus,
.navbar-custom .navbar-nav > .open > a {
    background-color: transparent;
    color: #FFFFFF;
}

/* Línea verde corta debajo de la opción activa (Ej: INICIO) */
.navbar-custom .navbar-nav > .active > a,
.navbar-custom .navbar-nav > .active > a:hover,
.navbar-custom .navbar-nav > .active > a:focus {
    background-color: transparent;
    color: #FFFFFF;
    font-weight: 600;
}

.navbar-custom .navbar-nav > .active > a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 20%;
    width: 60%; /* Ancho de la línea centrada */
    height: 3px;
    background-color: #476e52; /* Verde institucional */
    border-radius: 2px;
}

/* --- BOTÓN HAMBURGUESA EN MÓVIL (LÍNEAS VISIBLES) --- */
.navbar-custom .navbar-toggle {
	border: none !important; /* Elimina el borde/recuadro */
    background-color: transparent !important;
    margin-top: 0px;
    margin-bottom: 0px;
    padding: 20px 10px;
}

.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-custom .navbar-toggle .icon-bar {
    background-color: #FFFFFF !important; /* Muestra las 3 líneas blancas claramente */
    height: 2px;
    width: 22px;
    display: block;
    border-radius: 1px;
}

/* Menú Desplegable (Dropdown) */
.navbar-custom .dropdown-menu {
    background-color: #1B396A;
    border: none;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 0;
    margin-top: 0;
}

.navbar-custom .dropdown-menu > li > a {
    color: #FFFFFF;
    padding: 9px 15px;
    font-size: 0.8em;
    font-weight: normal;
}

.navbar-custom .dropdown-menu > li > a:hover {
    background-color: #611232; /* Fondo vino en hover */
    color: #FFFFFF;
}

.navbar-custom .dropdown-menu .divider {
    background-color: rgba(255, 255, 255, 0.15);
    margin: 0;
}

.navbar-custom .dropdown-menu .dropdown-header {
    color: #D6D3D3;
    font-size: 0.75em;
    padding: 0px 15px 2px 15px;
}

/* Estilos Responsive */
@media (min-width: 768px) {
    .flex-align-center {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .text-left-responsive { text-align: left; }
    .text-right-responsive { text-align: right; }
}

@media (max-width: 767px) {
    .titulo-institucion {
        font-size: 1.05em;
    }
    .text-left-responsive, .text-right-responsive {
        text-align: center;
    }
    .navbar-custom .navbar-nav > .active > a::after {
        display: none; /* Se oculta la línea en móvil para evitar desfases */
    }
	
	.navbar-custom .navbar-nav > li:first-child {
        display: none !important;
    }
}






/* ==========================================================================
   BOTÓN FLOTANTE LATERAL, MENÚ EMERGENTE Y VOLVER ARRIBA
   ========================================================================== */

/* 1. Botón Pestaña Fijo en la Izquierda (Centrado Y) */
.btn-side-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1040;
    background-color: #1B396A; /* Azul institucional */
    color: #FFFFFF;
    border: none;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: 18px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.25);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none !important;
}

/* Efecto de estiramiento suave en X al pasar el cursor */
.btn-side-toggle:hover {
    padding-left: 11px;
    padding-right: 11px;
    box-shadow: 1px 0 15px rgba(0, 0, 0, 0.35);
}

.btn-side-toggle i {
    font-size: 14px;
    margin-bottom: 8px;
}

.btn-side-toggle span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 9px;
	letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
}

/* 2. Fondo Translúcido (Overlay) */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 3. Panel del Menú Oculto (Drawer) */
.side-menu-drawer {
    position: fixed;
    top: 0;
    left: -380px; /* Escondido a la izquierda */
    width: 350px;
    max-width: 85vw;
    height: 100vh;
    background-color: #F8F9FA;
    z-index: 1050;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-menu-drawer.active {
    left: 0; /* Desliza hacia adentro */
}

/* Encabezado Azul del Menú */
.drawer-header {
    background-color: #1B396A;
    color: #FFFFFF;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.drawer-header-title .icon-header {
    font-size: 24px;
    margin-right: 10px;
}

.drawer-header-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
}

.drawer-header-title p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* Botón Circular de Cierre 'X' */
.btn-close-menu {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-close-menu:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

/* Cuerpo del Menú con Scroll */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px 12px;
}

.enlaces-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.enlaces-lista li {
    margin-bottom: 10px;
}

/* Tarjetas de Enlaces */
.enlace-item {
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #E9ECEF;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.enlace-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(27, 57, 106, 0.12);
    border-color: #1B396A;
}

.item-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background-color: #F8F9FA;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    overflow: hidden;
    padding: 6px;
    border: 1px solid #E2E8F0;
}

.item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1B396A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info span {
    display: block;
    font-size: 11px;
    color: #6C757D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.item-ext {
    font-size: 14px;
    color: #ADB5BD;
    margin-left: 8px;
    transition: color 0.2s ease;
}

.enlace-item:hover .item-ext {
    color: #1B396A;
}

/* 4. Botón "Ir Arriba" (Bottom Left) */
.btn-back-to-top {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1035;
    width: 44px;
    height: 44px;
    background-color: #1B396A;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    outline: none !important;
}

.btn-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
}

.btn-back-to-top i {
    font-size: 18px;
}