/* =========================================
   1. CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --uam-green: #57A519;
    --uam-dark: #458512;
    --text-main: #343A40;
    --bg-body: #F4F6F9;
    --white: #FFFFFF;
}

body {
    background-color: #F4F6F9; /* Color directo por seguridad */
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    color: #343A40;
    overflow-x: hidden;
    margin: 0; /* Reset básico */
}

/* =========================================
   2. CONTENEDOR PRINCIPAL (Tarjeta Blanca)
   ========================================= */
.main-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 30px;
    /* REDUCIDO: De -40px a -25px para que no se encime tanto */
    margin-top: -5px; 
    position: relative;
    z-index: 20;
    min-height: 60vh;
}

/* =========================================
   3. MODAL DE DETALLES (Centrado y Estilizado)
   ========================================= */
#datosGrupo {
    /* 1. Posicionamiento: Centrado perfecto en pantalla */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    
    /* 2. Dimensiones: Tamaño fijo y consistente */
    width: 360px;
    height: 320px; /* Altura fija para uniformidad */
    
    /* 3. Estética: Tarjeta flotante moderna */
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35); /* Sombra profunda */
    padding: 0; /* Quitamos padding global para manejarlo internamente */
    overflow: hidden; /* Para que nada se salga de los bordes redondeados */
    
    /* 4. Flexbox para organizar el contenido internamente */
    display: none; /* Se activa con JS */
    flex-direction: column;
}

/* Barra decorativa superior */
#datosGrupo::before {
    content: '';
    display: block;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #57A519, #a3e635);
}

/* Encabezado del modal */
.modal-header-custom {
    padding: 20px 25px 10px;
    text-align: center;
}

.modal-header-custom h6 {
    color: #57A519;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cuerpo del modal (Donde va la info) */
.modal-body-custom {
    padding: 10px 30px 30px;
    flex-grow: 1; /* Ocupa el espacio restante */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra el contenido verticalmente */
    gap: 12px; /* Espacio entre renglones */
}

/* Estilo de los renglones de texto */
.modal-row {
    font-size: 0.95rem;
    color: #495057;
    border-bottom: 1px dashed #e9ecef;
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-row:last-child {
    border-bottom: none;
}

.modal-row strong {
    color: #57A519;
    font-size: 1.1em;
    margin-right: 10px;
}

.modal-row span {
    text-align: right;
    font-weight: 500;
    color: #212529;
}

/* Botón cerrar animado (Rediseñado) */
.btn-close-custom {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f3f5;
    color: #868e96;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    z-index: 10;
}

.btn-close-custom:hover {
    background-color: #ffe3e3;
    color: #e03131;
    transform: rotate(90deg) scale(1.1);
}

/* =========================================
   4. MENÚ DE OPCIONES
   ========================================= */
.nav-menu-container {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    border: 1px solid #eaeaea;
}

.btn-nav-option {
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.3s;
    color: #343A40;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-nav-option:hover {
    color: #57A519;
    border-color: #57A519;
    transform: translateY(-3px);
}

.btn-nav-option.btn-highlight {
    background-color: #57A519;
    color: white;
}

.btn-nav-option.btn-highlight:hover {
    background-color: #458512;
    color: white;
}

/* =========================================
   5. TABLA DE HORARIOS (Estilos corregidos)
   ========================================= */


/* =========================================
   TABLA HORARIO (ESTILO FINAL)
   ========================================= */
.schedule-container {
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.03);
    overflow: hidden; 
    background: white;
}

.table-schedule {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0;
    table-layout: fixed; 
}

.table-schedule thead th {
    background-color: var(--uam-green);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 15px;
    letter-spacing: 1px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2); 
}

.table-schedule thead th:first-child {
    background-color: var(--uam-dark); 
    border-top-left-radius: 10px;
}
.table-schedule thead th:last-child {
    border-top-right-radius: 10px;
    border-right: none;
}

.col-hora {
    background-color: var(--hour-bg); 
    color: #555;
    font-weight: 700;
    font-size: 0.8rem;
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid var(--grid-border);
    border-right: 2px solid #ced4da; 
    width: 80px; 
}

.cell-class {
    border-bottom: 1px solid var(--grid-border); 
    border-right: 1px dashed var(--grid-border); 
    height: 80px; 
    padding: 4px !important;
    vertical-align: middle; 
    transition: background-color 0.2s ease;
    background-color: white;
}

.cell-class:last-child { border-right: none; }
.cell-class:hover { background-color: #fafafa; }

/* TARJETA DE CLASE (Sin borde lateral, limpia) */
.event-card {
    background-color: var(--uam-pastel);
    border: none;
    border-radius: 6px;
    width: 100%;
    height: 100%;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-5px) scale(1.02); 
    background-color: var(--uam-green); 
    box-shadow: 0 8px 15px rgba(87, 165, 25, 0.3); 
    z-index: 10;
}

.event-card .class-siglas {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--uam-dark);
    margin-bottom: 3px;
    transition: color 0.2s;
}

.event-card .class-group {
    font-size: 0.75rem;
    color: #666;
    background: rgba(255,255,255,0.7);
    padding: 2px 8px;
    border-radius: 20px;
    transition: all 0.2s;
}

.event-card:hover .class-siglas { color: white; }
.event-card:hover .class-group { color: var(--uam-green); background: white; }

/* --- TABS Y SELECTORES --- */
.nav-tabs-uam { border-bottom: 2px solid #e9ecef; }
.nav-tabs-uam .nav-link {
    border: none;
    color: #777;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 10px 10px 0 0;
}
.nav-tabs-uam .nav-link.active {
    color: var(--uam-green);
    background: #e8f5e9;
    border-bottom: 3px solid var(--uam-green);
}

/* Selector de semanas expandido */
.week-selector {
    display: flex;
    width: 100%;
    gap: 5px; 
}
.week-selector .nav-item { flex-grow: 1; }
.week-selector .nav-link {
    width: 100%; 
    border-radius: 8px; 
    margin: 0;
    color: #555;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    padding: 8px 5px;
    transition: all 0.2s;
    text-align: center;
}
.week-selector .nav-link:hover {
    border-color: var(--uam-green);
    color: var(--uam-green);
    background-color: #f8f9fa;
}
.week-selector .nav-link.active {
    background-color: var(--uam-green);
    color: white;
    border-color: var(--uam-green);
    box-shadow: 0 3px 6px rgba(87, 165, 25, 0.3);
}






/* =========================================
   6. LISTA DE UEAS (Tarjetas)
   ========================================= */
.card-uea-custom {
    border: none;
    border-top: 4px solid #e9ecef; /* Default */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.card-uea-custom:hover { transform: translateY(-7px); }

.uea-icon-box {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background-color: #f8f9fa; margin-right: 12px;
}

/* Colores de borde */
.border-cbi { border-top-color: #57A519; }
.border-compu { border-top-color: #0d6efd; }
.border-bio { border-top-color: #20c997; }
.border-elec { border-top-color: #ffc107; }
.border-cbs { border-top-color: #d63384; }
.border-csh { border-top-color: #fd7e14; }
.border-default { border-top-color: #6c757d; }

/* =========================================
   7. FOOTER
   ========================================= */
.footer-container {
    margin-top: 3rem !important;
    padding: 1.5rem 0;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    text-align: center;
}
.footer-logo { height: 90px; margin-bottom: 1rem; transition: transform 0.3s; }
.footer-logo:hover { transform: scale(1.05); }
.footer-link { color: #57A519; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.browser-note {
    font-size: 0.9rem; background: #f1f3f5; padding: 8px 20px;
    border-radius: 30px; display: inline-flex; align-items: center; gap: 10px;
    margin-top: 15px; border: 1px solid #dee2e6;
}
.footer-copy { margin-top: 1.5rem; font-size: 0.8rem; opacity: 0.7; }

/* =========================================
   8. LISTA DE UEAS (Tarjetas de Cursos)
   ========================================= */

/* Animación de entrada escalonada */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-uea-custom {
    border: none;
    background: #fff;
    border-radius: 12px;
    /* Sombra suave */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Borde superior por defecto */
    border-top: 4px solid #e9ecef;
    height: 100%;
    animation: fadeInUp 0.6s ease-out forwards;
}

.card-uea-custom:hover {
    transform: translateY(-7px); /* Flota hacia arriba */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Encabezado de la tarjeta */
.card-uea-header {
    background-color: transparent;
    padding: 1.25rem 1.25rem 0.5rem;
    border-bottom: 1px solid #f1f1f1;
}

.uea-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 12px;
    background-color: #f8f9fa;
    color: var(--text-main);
    transition: all 0.3s;
}

.card-uea-custom:hover .uea-icon-box {
    background-color: var(--uam-green);
    color: white;
    transform: rotate(10deg); /* Pequeña rotación divertida */
}

/* Items de la lista */
.uea-list-item {
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #f0f0f0;
}

.uea-list-item:last-child {
    border-bottom: none;
}

.uea-list-item:hover {
    background-color: #f8f9fa;
    color: var(--uam-green);
    padding-left: 15px; /* Se mueve a la derecha */
}

.siglas-badge {
    font-size: 0.75rem;
    background-color: #e9ecef;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Variantes de Color por Departamento (Borde Superior) */
.border-cbi { border-top-color: #57A519; }   /* Verde UAM */
.border-compu { border-top-color: #0d6efd; } /* Azul */
.border-bio { border-top-color: #20c997; }   /* Turquesa */
.border-elec { border-top-color: #ffc107; }  /* Amarillo */
.border-cbs { border-top-color: #d63384; }   /* Rosa */
.border-csh { border-top-color: #fd7e14; }   /* Naranja */
.border-default { border-top-color: #6c757d; } /* Gris */

/* =========================================
   9. ANIMACIONES Y DETALLES DEL HEADER
   ========================================= */

/* Animación de entrada suave */
@keyframes slideDownFade {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.header-animate {
    animation: slideDownFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ESTILO Y ANIMACIÓN DEL LOGO (Transparente) */
.logo-box {
    /* Eliminamos background, padding, border-radius y box-shadow */
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Transición suave para la animación */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    z-index: 30;
}

/* Efecto al pasar el mouse (Hover) */
.logo-box:hover {
    /* Mantenemos el zoom y la rotación */
    transform: scale(1.1) rotate(-3deg);
    /* Opcional: Añadimos un pequeño brillo alrededor de las letras */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.logo-img {
    height: 60px; /* Un poquito más grande ahora que no tiene marco */
    width: auto;
    display: block;
    /* Asegura que se vea nítido */
    filter: contrast(1.05);
}

/* Retardo para el texto */
.delay-100 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }

/* =========================================
   AGREGAR AL FINAL DE: public/statics/css/public/estilos.css
   ========================================= */

/* Colores de borde superior para las tarjetas UEA */
.border-cbi   { border-top-color: #57A519; }
.border-cbs   { border-top-color: #d63384; }
.border-csh   { border-top-color: #fd7e14; }
.border-compu { border-top-color: #0d6efd; }
.border-bio   { border-top-color: #20c997; }
.border-elec  { border-top-color: #ffc107; }

/* ESTOS SON LOS QUE FALTAN EN LA PARTE PÚBLICA: */
.border-pcyti { border-top-color: #0dcaf0; } /* Cyan */
.border-cc    { border-top-color: #6610f2; } /* Morado */
.border-otros { border-top-color: #343a40; } /* Gris Oscuro */



