/* =====================================================
   PLATAFORMA DDSI - Diseño de Sistemas de Información
   Estilos principales
   UTN Argentina - Todas las regionales
   
   ACCESIBILIDAD:
   - Tipografía OpenDyslexic (dislexia) con fallback Comic Sans
   - Paleta de colores verificada para daltonismo (protanopía, deuteranopía, tritanopía)
   - Contraste WCAG AA mínimo 4.5:1
   - Interlineado mínimo 1.8 (recomendación dislexia)
   - Espaciado entre letras ampliado
   ===================================================== */

/* Fuente OpenDyslexic - diseñada específicamente para dislexia */
@import url('https://fonts.cdnfonts.com/css/opendyslexic');

/* =====================================================
   VARIABLES Y RESET
   ===================================================== */
:root {
    /* Paleta UTN institucional (del manual de marca) adaptada a daltonismo */
    --utn-negro: #1E1E1E;
    --utn-rojo: #B71234;          /* Pantone 200 - institucional */
    --utn-sistemas: #E00034;      /* Pantone 185 - Ing. en Sistemas */

    /* Paleta funcional - verificada para daltonismo */
    --utn-azul: #0039A6;          /* Pantone 286 - Ciencias Básicas - seguro para todos los tipos */
    --utn-azul-claro: #0067C5;    /* Azul accesible - buen contraste, seguro para daltónicos */
    --utn-azul-hover: #004E9A;
    --utn-celeste: #0098DB;       /* Pantone 2925 - seguro */
    --utn-verde: #007A5E;         /* Verde azulado - seguro para protanopía/deuteranopía */
    --utn-rojo-alerta: #C4001A;   /* Rojo más oscuro - mejor contraste */
    --utn-naranja: #D45500;       /* Naranja oscuro - distinguible del rojo para daltónicos */
    --utn-dorado: #8B6D00;        /* Dorado oscuro - buen contraste */

    /* Fondos y superficies */
    --bg-principal: #FAFAFA;
    --bg-tarjeta: #FFFFFF;
    --bg-sidebar: #0f172a;
    --bg-input: #F0F2F5;
    --bg-hover: #E0E4E8;

    /* Texto - contrastes verificados WCAG AA */
    --texto-principal: #1A1A1A;    /* Ratio >15:1 sobre blanco */
    --texto-secundario: #4A5568;   /* Ratio >7:1 sobre blanco */
    --texto-terciario: #6B7280;    /* Ratio >4.5:1 sobre blanco */
    --texto-blanco: #F8FAFC;

    /* Bordes y sombras */
    --borde: #D1D5DB;
    --borde-focus: #0067C5;
    --sombra-sm: 0 1px 2px rgba(0,0,0,0.06);
    --sombra-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --sombra-lg: 0 10px 25px -5px rgba(0,0,0,0.12);
    --sombra-xl: 0 20px 40px -10px rgba(0,0,0,0.15);

    /* Tipografía accesible para dislexia */
    --fuente-principal: 'OpenDyslexic', 'Comic Sans MS', 'Comic Sans', 'Trebuchet MS', sans-serif;
    --fuente-titulo: 'OpenDyslexic', 'Comic Sans MS', 'Comic Sans', 'Trebuchet MS', sans-serif;
    --fuente-mono: 'OpenDyslexic Mono', 'Courier New', monospace;

    /* Espaciado - ampliado para dislexia */
    --radio-sm: 6px;
    --radio-md: 10px;
    --radio-lg: 16px;
    --radio-xl: 24px;

    /* Layout */
    --sidebar-ancho: 260px;
    --header-alto: 64px;
    --toolbar-alto: 48px;
    --contenido-max: 1200px;

    /* Transiciones */
    --transicion: 0.2s ease;

    /* Interlineado accesible (recomendación dislexia: 1.5-2.0) */
    --interlineado: 1.8;
    --interlineado-titulo: 1.5;
    --espaciado-letras: 0.03em;
    --espaciado-palabras: 0.08em;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-principal);
    color: var(--texto-principal);
    background: var(--bg-principal);
    line-height: var(--interlineado);
    min-height: 100vh;
    letter-spacing: var(--espaciado-letras);
    word-spacing: var(--espaciado-palabras);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--utn-azul-claro); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* =====================================================
   TOOLBAR DDSI - Barra superior fija con logo
   ===================================================== */

.toolbar-ddsi {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--toolbar-alto);
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    border-bottom: 2px solid #1a3a1a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.toolbar-ddsi img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.toolbar-ddsi .toolbar-texto {
    color: #4ade80;
    font-family: var(--fuente-titulo);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-left: 12px;
    text-transform: uppercase;
}

/* =====================================================
   LAYOUT PRINCIPAL
   ===================================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--toolbar-alto);
}

.contenido-principal {
    flex: 1;
    margin-left: var(--sidebar-ancho);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--toolbar-alto));
}

.pagina-contenido {
    flex: 1;
    padding: 24px 32px;
    max-width: var(--contenido-max);
    width: 100%;
    margin: 0 auto;
}

/* =====================================================
   SIDEBAR / NAVEGACIÓN LATERAL
   ===================================================== */

.sidebar {
    width: var(--sidebar-ancho);
    background: var(--bg-sidebar);
    position: fixed;
    top: var(--toolbar-alto);
    left: 0;
    height: calc(100vh - var(--toolbar-alto));
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transicion);
    overflow-y: auto;
}

.sidebar-logo {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo .logo-icono {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: white;
    padding: 3px;
}

.sidebar-logo .logo-icono img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-logo .logo-texto {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
    min-width: 0;
}

.sidebar-logo .logo-titulo {
    color: var(--texto-blanco);
    font-family: var(--fuente-titulo);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.sidebar-logo .logo-sub {
    color: var(--texto-terciario);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.3;
}

.sidebar-logo .logo-ddsi {
    width: 64px;
    height: 64px;
    border-radius: var(--radio-md);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .logo-ddsi img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radio-md);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-seccion-titulo {
    color: var(--texto-terciario);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radio-md);
    color: #94a3b8;
    cursor: pointer;
    transition: all var(--transicion);
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--texto-blanco);
    text-decoration: none;
}

.nav-item.activo {
    background: rgba(37,99,235,0.15);
    color: var(--utn-azul-claro);
}

.nav-item .nav-icono {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--utn-azul-claro);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-usuario {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-usuario .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--utn-azul-claro);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-usuario .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-usuario .info-nombre {
    color: var(--texto-blanco);
    font-size: 13px;
    font-weight: 600;
}

.sidebar-usuario .info-rol {
    color: var(--texto-terciario);
    font-size: 11px;
}

/* =====================================================
   HEADER / BARRA SUPERIOR
   ===================================================== */

.header-top {
    height: var(--header-alto);
    border-bottom: 1px solid var(--borde);
    background: var(--bg-tarjeta);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-titulo {
    font-family: var(--fuente-titulo);
    font-size: 20px;
    font-weight: 700;
    color: var(--texto-principal);
}

.header-acciones {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =====================================================
   BOTONES
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radio-md);
    font-family: var(--fuente-principal);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transicion);
    white-space: nowrap;
}

.btn-primario {
    background: var(--utn-azul-claro);
    color: white;
}
.btn-primario:hover { background: var(--utn-azul-hover); transform: translateY(-1px); }

.btn-secundario {
    background: var(--bg-input);
    color: var(--texto-principal);
    border: 1px solid var(--borde);
}
.btn-secundario:hover { background: var(--bg-hover); }

.btn-exito {
    background: var(--utn-verde);
    color: white;
}
.btn-exito:hover { background: #15803d; }

.btn-peligro {
    background: var(--utn-rojo);
    color: white;
}
.btn-peligro:hover { background: #b91c1c; }

.btn-outline {
    background: transparent;
    color: var(--utn-azul-claro);
    border: 1.5px solid var(--utn-azul-claro);
}
.btn-outline:hover { background: rgba(37,99,235,0.06); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =====================================================
   TARJETAS
   ===================================================== */

.tarjeta {
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
    padding: 24px;
    transition: box-shadow var(--transicion);
}

.tarjeta:hover {
    box-shadow: var(--sombra-md);
}

.tarjeta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tarjeta-titulo {
    font-family: var(--fuente-titulo);
    font-size: 18px;
    font-weight: 700;
    color: var(--texto-principal);
}

.tarjeta-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--texto-secundario);
    font-size: 13px;
    margin-top: 12px;
}

.tarjeta-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================
   GRILLA DE TARJETAS
   ===================================================== */

.grilla {
    display: grid;
    gap: 20px;
}

.grilla-2 { grid-template-columns: repeat(2, 1fr); }
.grilla-3 { grid-template-columns: repeat(3, 1fr); }
.grilla-4 { grid-template-columns: repeat(4, 1fr); }

/* =====================================================
   FORMULARIOS
   ===================================================== */

.form-grupo {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--texto-principal);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--borde);
    border-radius: var(--radio-md);
    font-family: var(--fuente-principal);
    font-size: 14px;
    color: var(--texto-principal);
    background: var(--bg-tarjeta);
    transition: border-color var(--transicion);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--borde-focus);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-error {
    color: var(--utn-rojo);
    font-size: 12px;
    margin-top: 4px;
}

/* =====================================================
   BADGES / ETIQUETAS
   ===================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-azul { background: #dbeafe; color: #1e40af; }
.badge-verde { background: #dcfce7; color: #166534; }
.badge-naranja { background: #ffedd5; color: #9a3412; }
.badge-rojo { background: #fee2e2; color: #991b1b; }
.badge-gris { background: #f1f5f9; color: #475569; }
.badge-docente { background: #ede9fe; color: #5b21b6; }

/* =====================================================
   MODALES
   ===================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.visible {
    display: flex;
}

.modal-contenido {
    background: var(--bg-tarjeta);
    border-radius: var(--radio-xl);
    padding: 32px;
    width: 90%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--sombra-xl);
    animation: modalEntrar 0.25s ease;
}

@keyframes modalEntrar {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-titulo {
    font-family: var(--fuente-titulo);
    font-size: 20px;
    font-weight: 700;
}

.modal-cerrar {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-input);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--texto-secundario);
    transition: all var(--transicion);
}

.modal-cerrar:hover {
    background: var(--bg-hover);
    color: var(--texto-principal);
}

/* =====================================================
   NOTIFICACIONES / TOAST
   ===================================================== */

.toast-contenedor {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radio-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--sombra-lg);
    animation: toastEntrar 0.3s ease;
    max-width: 400px;
}

.toast-exito { background: #16a34a; color: white; }
.toast-error { background: #dc2626; color: white; }
.toast-info { background: #2563eb; color: white; }

@keyframes toastEntrar {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =====================================================
   ESTADOS VACÍOS
   ===================================================== */

.estado-vacio {
    text-align: center;
    padding: 60px 20px;
    color: var(--texto-secundario);
}

.estado-vacio .icono {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.estado-vacio h3 {
    font-size: 18px;
    color: var(--texto-principal);
    margin-bottom: 8px;
}

/* =====================================================
   SECCIONES DE LA HOME
   ===================================================== */

.hero-seccion {
    background: linear-gradient(135deg, var(--utn-azul) 0%, #1e3a5f 50%, #2563eb 100%);
    color: white;
    padding: 48px 40px;
    border-radius: var(--radio-xl);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.hero-seccion::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.hero-titulo {
    font-family: var(--fuente-titulo);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    line-height: var(--interlineado-titulo);
}

.hero-descripcion {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    position: relative;
    line-height: var(--interlineado);
}

.seccion-titulo {
    font-family: var(--fuente-titulo);
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: var(--interlineado-titulo);
}

/* =====================================================
   SECCIÓN GAMIFICACIÓN - TARJETAS DE JUEGOS
   ===================================================== */

.juego-tarjeta {
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
    overflow: hidden;
    transition: all var(--transicion);
    cursor: pointer;
}

.juego-tarjeta:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-lg);
}

.juego-tarjeta .juego-imagen {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}

.juego-tarjeta .juego-info {
    padding: 20px;
}

.juego-tarjeta .juego-nombre {
    font-family: var(--fuente-titulo);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.juego-tarjeta .juego-desc {
    font-size: 13px;
    color: var(--texto-secundario);
    line-height: 1.5;
}

.juego-tarjeta.en-construccion {
    opacity: 0.6;
    cursor: not-allowed;
}

.juego-tarjeta.en-construccion:hover {
    transform: none;
    box-shadow: none;
}

/* Colores para cada juego */
.juego-sopa .juego-imagen { background: linear-gradient(135deg, #818cf8, #6366f1); }
.juego-torneo .juego-imagen { background: linear-gradient(135deg, #f97316, #ea580c); }
.juego-escape .juego-imagen { background: linear-gradient(135deg, #10b981, #059669); }
.juego-ahorcado .juego-imagen { background: linear-gradient(135deg, #f43f5e, #e11d48); }

/* =====================================================
   SECCIÓN MATERIALES DOCENTES
   ===================================================== */

.material-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radio-md);
    width: fit-content;
}

.material-tab {
    padding: 8px 18px;
    border: none;
    background: transparent;
    border-radius: var(--radio-sm);
    font-family: var(--fuente-principal);
    font-size: 13px;
    font-weight: 600;
    color: var(--texto-secundario);
    cursor: pointer;
    transition: all var(--transicion);
}

.material-tab.activo {
    background: var(--bg-tarjeta);
    color: var(--texto-principal);
    box-shadow: var(--sombra-sm);
}

.material-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio-md);
    transition: all var(--transicion);
}

.material-item:hover {
    box-shadow: var(--sombra-sm);
}

.material-item .archivo-icono {
    width: 44px;
    height: 44px;
    border-radius: var(--radio-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.material-item .archivo-icono.pdf { background: #fee2e2; }
.material-item .archivo-icono.ppt { background: #ffedd5; }
.material-item .archivo-icono.video { background: #e0e7ff; }
.material-item .archivo-icono.doc { background: #dbeafe; }
.material-item .archivo-icono.otro { background: #f1f5f9; }

.material-item .material-info { flex: 1; min-width: 0; }
.material-item .material-nombre {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.material-item .material-detalle {
    font-size: 12px;
    color: var(--texto-secundario);
}

/* =====================================================
   PÁGINA DE LOGIN / REGISTRO
   ===================================================== */

.auth-pagina {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    padding: 20px;
}

.auth-tarjeta {
    background: var(--bg-tarjeta);
    border-radius: var(--radio-xl);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--sombra-xl);
}

.auth-tarjeta .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-tarjeta .auth-logo h1 {
    font-family: var(--fuente-titulo);
    font-size: 28px;
    font-weight: 800;
    color: var(--utn-azul);
    margin-bottom: 4px;
}

.auth-tarjeta .auth-logo p {
    color: var(--texto-secundario);
    font-size: 14px;
}

.separador-o {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--texto-terciario);
    font-size: 13px;
}

.separador-o::before,
.separador-o::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--borde);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--borde);
    border-radius: var(--radio-md);
    background: white;
    font-family: var(--fuente-principal);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transicion);
    color: var(--texto-principal);
}

.btn-google:hover {
    background: var(--bg-input);
    box-shadow: var(--sombra-sm);
}

/* =====================================================
   LOADING / SPINNER
   ===================================================== */

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--borde);
    border-top-color: var(--utn-azul-claro);
    border-radius: 50%;
    animation: girar 0.8s linear infinite;
}

@keyframes girar {
    to { transform: rotate(360deg); }
}

.cargando-pantalla {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    padding: 60px;
    color: var(--texto-secundario);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Botón hamburguesa (solo visible en mobile) */
.btn-menu-mobile {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--texto-principal);
}

@media (max-width: 1024px) {
    .grilla-3 { grid-template-columns: repeat(2, 1fr); }
    .grilla-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.abierto {
        transform: translateX(0);
    }

    .contenido-principal {
        margin-left: 0;
    }

    .btn-menu-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pagina-contenido {
        padding: 16px;
    }

    .grilla-2,
    .grilla-3,
    .grilla-4 {
        grid-template-columns: 1fr;
    }

    .hero-seccion {
        padding: 28px 20px;
    }

    .hero-titulo {
        font-size: 22px;
    }

    .modal-contenido {
        width: 95%;
        padding: 24px;
    }

    .header-top {
        padding: 0 16px;
    }

    .toolbar-ddsi {
        height: 40px;
    }

    .toolbar-ddsi img {
        height: 28px;
    }

    .toolbar-ddsi .toolbar-texto {
        font-size: 11px;
    }
}

/* =====================================================
   UTILIDADES
   ===================================================== */

.oculto { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; line-height: var(--interlineado); }
.text-muted { color: var(--texto-secundario); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.lista-materiales { display: flex; flex-direction: column; gap: 12px; }

/* =====================================================
   ACCESIBILIDAD - Focus visible, daltonismo, dislexia
   ===================================================== */

/* Focus visible para navegación por teclado */
*:focus-visible {
    outline: 3px solid var(--utn-azul-claro);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Badges con iconos además de color (daltonismo) */
.badge-verde { background: #007A5E; color: white; }
.badge-verde::before { content: '✓ '; }
.badge-azul { background: #0067C5; color: white; }
.badge-gris { background: #6B7280; color: white; }
.badge-docente { background: #8B3A8B; color: white; }
.badge-docente::before { content: '★ '; }

/* Párrafos con interlineado amplio para dislexia */
p, li, td, th, label, .form-input, .form-textarea, .form-select {
    line-height: var(--interlineado);
    letter-spacing: var(--espaciado-letras);
}

/* Inputs más legibles */
.form-input, .form-textarea, .form-select {
    font-size: 15px;
    padding: 12px 14px;
}

/* Skip to content (accesibilidad teclado) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--utn-azul-claro);
    color: white;
    padding: 10px 20px;
    z-index: 9999;
    font-size: 16px;
}
.skip-link:focus { top: 0; }

/* Mejora de contraste para texto sobre fondos de colores */
.hero-seccion { color: #FFFFFF; }
.hero-seccion * { color: inherit; }

/* Toast accesible - no solo color, también icono */
.toast-error::before { content: '⚠ '; }
.toast-exito::before { content: '✓ '; }
.toast-info::before { content: 'ℹ '; }
