/* ============================================================
   ESTUDIANTES CARDS — Estilos centralizados para tarjetas
   Fuentes heredadas del master (Outfit + Plus Jakarta Sans)
   DEGT - UNAH | v2.0
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --unah-blue-dark:  #003A7D;
    --unah-blue:       #0057C2;
    --unah-blue-light: #EBF2FF;
    --unah-gold:       #F5A623;
    --unah-gold-light: #FEF3DC;
    --unah-gold-dark:  #7a4800;
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --font-display: 'Outfit', 'Segoe UI', sans-serif;
    --font-body:    'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    --transition: 0.18s ease;
}

/* ══════════════════════════════════════════════════════════
   SECCIONES + TARJETAS
══════════════════════════════════════════════════════════ */
.section-block { 
    margin-bottom: 24px; 
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.section-dot {
    width: 10px; 
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* Grid de cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* Card individual */
.card-item {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 140px;
    position: relative;
    user-select: none;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card-item:hover {
    border-color: var(--unah-blue);
    box-shadow: 0 4px 20px rgba(0,87,194,.1);
    transform: translateY(-3px);
}

/* El LinkButton dentro del card no debe capturar eventos */
.card-item a,
.card-item input[type="submit"],
.card-item span.aspNetDisabled {
    pointer-events: none;
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.card-icon {
    width: 42px; 
    height: 42px;
    border-radius: 10px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
    transition: transform .3s ease;
}

.card-item:hover .card-icon {
    transform: perspective(600px) rotateY(12deg) rotateX(-6deg) scale(1.05);
}

.card-icon svg {
    width: 20px; 
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 2.2;
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}

.card-desc {
    font-size: 11px;
    color: var(--gray-400);
    line-height: 1.5;
}

.card-arrow {
    margin-top: auto;
    display: flex;
    align-items: center;
    color: var(--unah-blue);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--transition), transform var(--transition);
}

.card-item:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Colores de iconos */
.ic-green  { background: #28a745; }
.ic-teal   { background: #17a2b8; }
.ic-indigo { background: #6f42c1; }
.ic-dark   { background: #343a40; }
.ic-orange { background: #fd7e14; }
.ic-emerald{ background: #20c997; }
.ic-purple { background: #8b5cf6; }
.ic-amber  { background: #f59e0b; }
.ic-pink   { background: #ec4899; }
.ic-red    { background: #ef4444; }
.ic-slate  { background: #475569; }
.ic-cyan   { background: #06b6d4; }
.ic-blue   { background: #007bff; }

/* ══════════════════════════════════════════════════════════
   ALERTAS
══════════════════════════════════════════════════════════ */
.alert-excepcional {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #4a148c;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-excepcional svg {
    width: 24px;
    height: 24px;
    stroke: #4a148c;
    flex-shrink: 0;
}

.alert-egresar {
    background: linear-gradient(135deg, #2795e9 0%, #0066cc 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(39, 149, 233, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-egresar svg {
    width: 24px;
    height: 24px;
    stroke: white;
    flex-shrink: 0;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
    word-break: break-word;
    white-space: normal;
}

.alert-danger::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    margin-top: 1px;
}

/* ══════════════════════════════════════════════════════════
   SECCIÓN COMBINADA — 2 grupos en una sola fila
══════════════════════════════════════════════════════════ */

/* Contenedor que pone los dos grupos lado a lado */
.section-block--combined {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0 20px;
    align-items: start;
}

/* Cada grupo ocupa su columna */
.combined-group {
    min-width: 0;
}

/* Las tarjetas dentro del grupo combinado: siempre 3 columnas */
.combined-cards {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Separador vertical entre los dos grupos */
.combined-divider {
    width: 1px;
    background: var(--gray-200);
    align-self: stretch;
    margin-top: 4px;
    position: relative;
}

/* Punto decorativo en el centro del separador */
.combined-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-200);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    /* En tablet: los grupos se apilan verticalmente */
    .section-block--combined {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .combined-divider {
        width: auto;
        height: 1px;
        background: var(--gray-200);
        margin: 16px 0;
        align-self: auto;
    }
    .combined-divider::before {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .combined-cards {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .cards-grid { 
        grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); 
        gap: 10px; 
    }
}

@media (max-width: 480px) {
    .cards-grid { 
        grid-template-columns: 1fr 1fr; 
    }
    .combined-cards {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════
   MODO OSCURO — Tarjetas de estudiantes
══════════════════════════════════════════════════════════ */

[data-theme="dark"] .section-title { color: #e2e8f0; }
[data-theme="dark"] .section-line  { background: #334155; }

[data-theme="dark"] .combined-divider {
    background: #334155;
}
[data-theme="dark"] .combined-divider::before {
    background: #334155;
}

[data-theme="dark"] .card-item {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .card-item:hover {
    border-color: var(--unah-blue);
    box-shadow: 0 4px 20px rgba(0,87,194,.2);
}
[data-theme="dark"] .card-title { color: #f1f5f9; }
[data-theme="dark"] .card-desc  { color: #64748b; }
