/* =========================================
   MAEW – INTRANET OFICIAL (Estilo Corporativo Clean)
   ========================================= */

.maew-intranet-container {
    font-family: 'Montserrat', sans-serif;
    background: #fdfdfd; /* Fondo limpio */
    min-height: 85vh;
    padding-bottom: 60px;
}

/* --- 1. BARRA DE NAVEGACIÓN --- */
.maew-nav-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    position: relative;
    z-index: 100;
}

.maew-menu {
    list-style: none; margin: 0; padding: 0; display: flex;
}
.maew-menu > li { position: relative; }

/* Enlaces del Menú */
.maew-menu > li > a {
    display: block;
    padding: 25px 20px;
    color: #18233f; /* Azul Oscuro Corporativo */
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

/* Efecto Hover y Activo (Rojo MAEW) */
.maew-menu > li > a:hover,
.maew-menu > li > a.active {
    color: #e3032d;
    background: #fff5f6; /* Fondo rojizo muy sutil */
    border-bottom-color: #e3032d;
}

/* --- DROPDOWN (Submenú) --- */
.maew-menu .dropdown {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background: #ffffff;
    min-width: 240px;
    list-style: none; padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top: 3px solid #e3032d;
    border-radius: 0 0 8px 8px;
}
.has-dropdown:hover .dropdown { display: block; animation: fadeIn 0.2s; }

.dropdown li a {
    display: block; padding: 12px 25px;
    color: #555; text-decoration: none; font-size: 13px; font-weight: 600;
    transition: 0.2s; border-left: 3px solid transparent;
}
.dropdown li a:hover {
    background: #f8fafc;
    color: #e3032d;
    padding-left: 30px;
    border-left-color: #e3032d;
}

/* --- USUARIO (Esquina Derecha) --- */
.maew-user-corner {
    display: flex; align-items: center; gap: 10px; font-size: 14px; color: #18233f;
}
.maew-user-corner strong { color: #18233f; }

.logout-link {
    color: #e3032d; text-decoration: none; font-size: 18px; padding: 5px;
    border: 1px solid #ffebeebb; border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.logout-link:hover { background: #e3032d; color: #fff; border-color: #e3032d; }

/* --- 2. CONTENIDO --- */
.maew-content-area {
    max-width: 1200px; margin: 50px auto; padding: 0 20px;
}

.maew-welcome-hero h1 {
    font-size: 32px; color: #18233f; font-weight: 800; text-transform: uppercase; letter-spacing: -1px; margin-bottom: 10px;
}
.maew-welcome-hero p { color: #64748b; font-size: 16px; margin-top: 0; }

.maew-section-header {
    border-bottom: 2px solid #f1f5f9; padding-bottom: 20px; margin-bottom: 30px;
}
.maew-section-header h2 {
    font-size: 26px; color: #18233f; font-weight: 800; margin: 0;
}
.maew-section-header p { color: #e3032d; font-weight: 600; margin-top: 5px; font-size: 14px; }

/* --- 3. GRILLA DE ARCHIVOS (Tarjetas Blancas) --- */
.maew-file-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 25px;
    list-style: none; padding: 0;
}

.maew-file-grid li a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    position: relative;
    top: 0;
}

.maew-file-grid li a:hover {
    top: -5px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #e3032d; /* Borde rojo al hover */
}
.maew-file-grid li a:hover .file-icon { transform: scale(1.1); }

.file-icon { font-size: 40px; margin-bottom: 15px; transition: 0.2s; }
.file-name { font-size: 13px; font-weight: 700; line-height: 1.4; color: #18233f; }

/* Mensajes de Alerta */
.maew-alert {
    background: #fff; border-left: 4px solid #e3032d; padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); color: #555; font-size: 14px;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Responsivo para Móviles */
@media (max-width: 900px) {
    .maew-nav-bar { flex-direction: column; padding: 20px; gap: 15px; }
    .maew-menu { flex-wrap: wrap; justify-content: center; }
    .maew-menu > li > a { padding: 10px 15px; font-size: 11px; }
    .maew-user-corner { width: 100%; justify-content: center; border-top: 1px solid #eee; padding-top: 10px; }
}