/* ============================================================================
   CAMPUS NIKA — estilo unificado
   Se carga AL FINAL del <head> de campus, estudio, versus, examen, los hubs, NikaFarma y el glosario,
   para que compartan el lenguaje visual de la Liga, el Foro y la Sala de Ateneos:
   barras superiores con brillo cian/violeta, tarjetas que se elevan, botones en píldora,
   ventanas (modales) con franja de color y barra lateral con acentos.
   Solo agrega detalles visuales: no cambia estructura ni comportamiento.
   ============================================================================ */

:root { --nk-grad: linear-gradient(90deg, #22d3ee, #0284c7, #6366f1); --nk-glow: rgba(56, 189, 248, .35); }

/* ---------- Fondo con resplandor suave (deja el color base de cada página) ---------- */
body { background-image: radial-gradient(900px 420px at 12% -140px, rgba(2, 132, 199, .11), transparent 70%), radial-gradient(800px 420px at 100% -100px, rgba(99, 102, 241, .09), transparent 70%); background-repeat: no-repeat; background-attachment: fixed; }
body.dark-mode { background-image: radial-gradient(900px 420px at 12% -140px, rgba(56, 189, 248, .10), transparent 70%), radial-gradient(800px 420px at 100% -100px, rgba(139, 92, 246, .12), transparent 70%); }

/* ---------- Barras superiores ---------- */
.navbar, .nf-top, header.top {
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--nk-glow) !important;
  box-shadow: 0 10px 28px -20px rgba(2, 132, 199, .7) !important;
}
.navbar { background-image: linear-gradient(90deg, rgba(34, 211, 238, .14), rgba(99, 102, 241, .16)); }
.brand-title, .nf-brand, header.top .brand { letter-spacing: .04em; }
.btn-back, .nf-back, header.top .back, .btn-icon, .nf-ibtn {
  border-radius: 999px !important; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn-back:hover, .nf-back:hover, header.top .back:hover, .btn-icon:hover, .nf-ibtn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px var(--nk-glow); }

/* ---------- Tarjetas ---------- */
.mode-card, .hub-card, .module-card, .action-btn-card, .card {
  border-radius: 20px; transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.mode-card:hover, .hub-card:hover, .module-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(2, 132, 199, .65); border-color: var(--nika-primary, #0284c7); }

/* ---------- Ventanas (modales) ---------- */
.modal-overlay, .nika-modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-content, .nika-modal-card {
  border-radius: 22px !important;
  background-image: var(--nk-grad); background-size: 100% 4px; background-repeat: no-repeat; background-position: top;
  box-shadow: 0 30px 70px -24px rgba(2, 132, 199, .55), 0 0 0 1px rgba(56, 189, 248, .12) !important;
}
.modal-content { padding-top: 34px; }
.btn-module { border-radius: 999px !important; }

/* ---------- Barra lateral del campus ---------- */
.sidebar .sidebar-link {
  border: 1px solid transparent; border-radius: 12px; padding: 10px 14px; gap: 12px; position: relative;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .18s ease;
}
.sidebar .sidebar-link:hover {
  background: linear-gradient(90deg, rgba(56, 189, 248, .20), rgba(56, 189, 248, .03)); border-color: rgba(56, 189, 248, .28); color: #e0f2fe; transform: translateX(3px);
}
.sidebar .sidebar-link:active { transform: translateX(1px) scale(.99); }
.sidebar .sidebar-link::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--nk-grad); opacity: 0; transition: opacity .2s ease; }
.sidebar .sidebar-link:hover::before { opacity: 1; }
.sidebar .sidebar-link .nm-logo { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar .sidebar-link--music { color: #86efac; } .sidebar .sidebar-link--music:hover { color: #bbf7d0; background: linear-gradient(90deg, rgba(29, 185, 84, .22), rgba(29, 185, 84, .03)); border-color: rgba(29, 185, 84, .35); }
.sidebar .sidebar-category { display: flex; align-items: center; gap: 10px; color: #7c8aa5; }
.sidebar .sidebar-category::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(148, 163, 184, .35), transparent); }
.sidebar .sidebar-user-card { transition: box-shadow .2s ease, border-color .2s ease; }
.sidebar .sidebar-user-card:hover { border-color: rgba(56, 189, 248, .6); box-shadow: 0 10px 24px -14px var(--nk-glow); }

/* ---------- Aparición suave de página ---------- */
@keyframes nkFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
main, .container, .app-container { animation: nkFade .35s ease both; }
@media (prefers-reduced-motion: reduce) { main, .container, .app-container { animation: none; } * { transition-duration: .01ms !important; } }

/* ============================================================================
   RESPONSIVE — celulares, tablets y pantallas chicas
   ============================================================================ */
html, body { max-width: 100%; }
body { overflow-x: clip; }
img, video, svg { max-width: 100%; }
* { -webkit-tap-highlight-color: rgba(56, 189, 248, .18); }

/* Tablets */
@media (max-width: 900px) {
  .modal-content { max-height: 92vh; max-height: 92dvh; }
  .navbar { flex-wrap: wrap; gap: 8px; }
}

/* Celulares */
@media (max-width: 640px) {
  /* Formularios: 16 px evita el zoom automático de iOS al tocar un campo */
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { font-size: 16px !important; }
  .btn-module, .plan-btn-balance, .at-btn, .lg-btn, .pl-btn, .btn-back, .nf-ibtn { min-height: 40px; }

  /* Encabezado del campus: todo entra en una fila */
  .top-header { gap: 6px !important; padding: 8px 10px !important; }
  .top-header > div[style*="margin-left"] { gap: 6px !important; min-width: 0; }
  .top-header .account-btn { max-width: 40vw; padding: 8px 12px; }
  #header-auth-btn { font-size: .78rem; }
  [data-nika-net-slot] > * { transform: scale(.9); transform-origin: right center; }

  /* Notificaciones: panel a lo ancho, dentro de la pantalla */
  #notifications-panel { position: fixed !important; left: 10px !important; right: 10px !important; top: 66px !important; width: auto !important; max-height: 72vh; max-height: 72dvh; overflow-y: auto; z-index: 3500 !important; }

  /* Avisos (toast): arriba, a lo ancho y sin tapar botones */
  #toast { top: calc(66px + env(safe-area-inset-top, 0px)); bottom: auto !important; left: 12px !important; right: 12px !important; max-width: none !important; text-align: center; z-index: 30000; }

  /* Botones flotantes: más chicos y en columna, sin pisarse */
  .chat-fab { width: 48px !important; height: 48px !important; right: 12px !important; bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important; }
  .chat-fab svg { width: 22px !important; height: 22px !important; }
  #nika-assistant-btn { width: 48px !important; height: 48px !important; right: 12px !important; bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important; font-size: 1.3rem !important; }
  #nika-assistant-panel { left: 8px !important; right: 8px !important; bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; width: auto !important; }
  body.at-en-llamada .chat-fab { bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important; }
  body.at-en-llamada #nika-assistant-btn { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; }

  /* Sala de Ateneos: dock a lo ancho abajo y videos más chicos */
  #at-dock { left: 8px !important; right: 8px !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; transform: none !important; max-width: none !important; justify-content: space-between; border-radius: 22px !important; gap: 8px !important; }
  .at-d-txt b { display: none; }
  #at-pip { width: min(300px, 64vw) !important; right: 8px !important; top: 66px !important; }
  .at-hero { padding: 18px !important; } .at-pasos { grid-template-columns: 1fr; }

  /* Contenedores y grillas */
  .pl-main { padding-left: 12px !important; padding-right: 12px !important; }
  .lg-header, .fr-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lg-fila-main { gap: 8px !important; } .lg-acciones { width: 100%; } .lg-acciones .lg-btn { flex: 1; }
  .lg-tab { padding: 9px 12px !important; font-size: .78rem !important; }
  .fr-post { padding: 14px !important; }
  .fr-compose-bar select { flex: 1 1 40%; min-width: 0; }
  .at-privada { flex-direction: column; align-items: stretch; } .at-cod { width: 100%; } .at-cod input { flex: 1; width: auto; }
  .at-equipo { grid-template-columns: 1fr; }
  .plan-card-header { flex-direction: column; align-items: flex-start; }
  .plan-item { flex-wrap: wrap; } .plan-item-acciones { margin-left: 0; }
  .balance-hero-top { flex-direction: column; gap: 6px; }
  .avatar-crop-stage:not(.is-banner) { width: min(320px, 82vw) !important; height: min(320px, 82vw) !important; }
  .nt-tooltip { width: calc(100vw - 20px) !important; }

  /* Barra superior de la sala de estudio, Versus, simuladores y hubs */
  .navbar { padding: 10px 12px !important; }
  .brand-slogan { display: none; }
  .navbar-actions { gap: 6px !important; flex-wrap: wrap; justify-content: flex-end; }

  /* Ventanas emergentes a casi toda la pantalla */
  .modal-content:not(.pp-card) { width: 96vw !important; max-width: 96vw !important; padding: 26px 16px 16px !important; }
  .pp-card { width: 96vw !important; max-width: 96vw !important; }
  .modal-footer-btns { flex-direction: column-reverse; gap: 8px; }
  .modal-footer-btns button { width: 100% !important; min-height: 44px; }
}

/* Celulares muy angostos */
@media (max-width: 380px) {
  .top-header .account-btn { max-width: 34vw; }
  .nika-racha-btn { padding: 6px 10px !important; }
  .lg-podio-nombre { font-size: .72rem !important; }
}

/* Celulares apaisados: alturas cortas */
@media (max-height: 480px) and (orientation: landscape) {
  #nm-panel { max-height: 92vh; max-height: 92dvh; }
  .modal-content { max-height: 96vh; max-height: 96dvh; }
}

/* ==========================================================================
   REVISIÓN DE CONTRASTE — modo oscuro (y algunos ajustes que valen en ambos modos)
   Criterio: texto normal ≥ 4.5:1 y texto grande ≥ 3:1 (WCAG AA) contra el fondo real.
   ========================================================================== */

/* Logo "NIKA" (texto vectorial azul marino): sobre fondo oscuro desaparecía. Se invierte la luminosidad
   conservando el matiz: el marino pasa a celeste claro y el azul del trazo sigue siendo azul. */
body.dark-mode .hero-text-logo { filter: invert(1) hue-rotate(180deg) brightness(1.15) drop-shadow(0 0 10px rgba(56, 189, 248, .35)); }
body.dark-mode .hero-n-logo { filter: drop-shadow(0 0 12px rgba(56, 189, 248, .4)); }

/* Enlaces del pie (política de privacidad, términos): quedaban en el azul por defecto del navegador */
.footer a, footer a { color: var(--nika-primary); text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover, footer a:hover { color: var(--nika-accent); }

/* Insignia NikaMed+: blanco sobre lila claro (2.6:1) → violeta más profundo (≥ 5:1) */
.nika-vip-badge { background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%) !important; }
.account-btn .nika-vip-badge { background: rgba(255, 255, 255, .22) !important; }

/* Racha en 0: gris azulado sobre fondo oscuro (3:1) → gris claro legible */
body.dark-mode .nika-racha-btn.is-cero { color: #cbd5e1; border-color: rgba(148, 163, 184, .5); background: rgba(148, 163, 184, .16); }

/* Administración en el menú lateral: rojo #dc2626 sobre #020617 (4.2:1) → rojo claro */
body.dark-mode #sidebar-admin-category .sidebar-category,
body.dark-mode #sidebar-admin-category .sidebar-link { color: #f87171 !important; }

/* Botón de cuenta con rango (violeta intenso) */
body.dark-mode .account-btn { text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }

/* Textos secundarios que quedaban casi invisibles */
body.dark-mode .suite-hero p { color: #e0f2fe; }

/* Botones/píldoras de cuenta NikaMed+: el extremo claro del degradé bajaba el contraste del texto blanco (3.9:1) */
body.nika-vip .account-btn { background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%); }
body.nika-vip .btn-continue-action { background: linear-gradient(135deg, #6d28d9, #9333ea); }

/* Botones de acción celestes con texto blanco chico: #0284c7 daba 4.1:1 → #0369a1 (6:1) */
.fr-publicar, .fr-filtro.on, .at-btn, .rz-btn { background-color: #0369a1; }
body.dark-mode .at-prev > span { color: #94a3b8; }
body.dark-mode .at-tag { color: #c4b5fd; }
.nf-panic { background: #dc2626; }
a.btn-back .nb-tx, .btn-back .nb-tx { color: #fff; }
a.btn-back:has(.nb-tx) { background-color: #0369a1; }
body.dark-mode .badge-soon { background: rgba(250, 204, 21, .16); color: #fbbf24; }

/* ==========================================================================
   CHAT EN VIVO: mensajes sin leer en el botón flotante + usuarios conectados
   ========================================================================== */
/* Botón flotante del chat: se tiñe de rojo y pulsa cuando hay mensajes sin leer */
.chat-fab.has-unread { background: linear-gradient(135deg, #ef4444, #b91c1c) !important; animation: chat-fab-aviso 1.8s ease-in-out infinite; }
.chat-fab.has-unread .chat-fab-badge { display: block !important; background: #fff; color: #b91c1c; border: 2px solid #ef4444; font-size: .72rem; min-width: 22px; top: -6px; right: -6px; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.chat-fab.rebota { animation: chat-fab-rebote .7s cubic-bezier(.3, 1.6, .5, 1), chat-fab-aviso 1.8s ease-in-out .7s infinite; }
@keyframes chat-fab-aviso { 0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 0 0 0 rgba(239, 68, 68, .55); } 50% { box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 0 0 12px rgba(239, 68, 68, 0); } }
@keyframes chat-fab-rebote { 0% { transform: scale(1); } 30% { transform: scale(1.28) rotate(-10deg); } 60% { transform: scale(.94) rotate(6deg); } 100% { transform: scale(1); } }

/* Contador de conectados junto a "Chat Global" en el menú */
.sidebar-live { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #052e16; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .22); }

/* Franja de conectados dentro del Chat Global */
.chat-conectados { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .3); }
.cc-tit { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; color: var(--text-main); white-space: nowrap; }
.cc-tit i { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: cc-pulso 2s infinite; }
@keyframes cc-pulso { 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.cc-lista { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.cc-lista::-webkit-scrollbar { display: none; }
.cc-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--card-bg, #fff); border: 1px solid var(--border, #e2e8f0); flex-shrink: 0; animation: cc-entra .35s cubic-bezier(.2, .8, .2, 1) both; }
.cc-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #e2e8f0; }
.cc-chip i { position: absolute; left: 20px; bottom: 2px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; border: 2px solid var(--card-bg, #fff); }
.cc-chip em { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--text-main); }
.cc-chip:hover { border-color: #22c55e; }
.cc-mas, .cc-vacio { font-size: .74rem; font-weight: 700; color: var(--text-muted); align-self: center; white-space: nowrap; }
@keyframes cc-entra { from { opacity: 0; transform: translateX(8px) scale(.9); } to { opacity: 1; transform: none; } }

/* Bandeja de mensajes: texto "en línea" */
.dm-inbox-live.on { color: #16a34a; font-weight: 800; }
body.dark-mode .dm-inbox-live.on { color: #4ade80; }
@media (prefers-reduced-motion: reduce) { .chat-fab.has-unread, .chat-fab.rebota, .cc-tit i, .cc-chip { animation: none !important; } }

/* Globito del menú «Chat Global»: mensajes nuevos sin leer (rojo, como el de Mensajes Privados) */
.sidebar-live.rojo { background: #ef4444; color: #fff; box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); animation: cc-pulso-rojo 2s infinite; }
@keyframes cc-pulso-rojo { 70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* ---------- Novedades: badge del menú + banner flotante global ---------- */
#news-unread-badge { background: #ef4444; color: #fff; box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); animation: cc-pulso-rojo 2s infinite; }
#news-banner { position: fixed; top: 18px; right: 18px; z-index: 31000; width: min(360px, calc(100vw - 24px)); display: flex; align-items: stretch;
  background: var(--card-bg, #fff); color: var(--text-main, #0f172a); border: 1px solid rgba(239, 68, 68, .55); border-left: 5px solid #ef4444; border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(239, 68, 68, .55), 0 0 0 0 rgba(239, 68, 68, .5); transform: translateX(120%); opacity: 0; transition: transform .4s cubic-bezier(.2, 1.3, .4, 1), opacity .3s; }
#news-banner.is-in { transform: none; opacity: 1; animation: nb-alerta 1.8s ease-in-out .4s 3; }
@keyframes nb-alerta { 0%, 100% { box-shadow: 0 18px 40px -12px rgba(239, 68, 68, .55), 0 0 0 0 rgba(239, 68, 68, .5); } 50% { box-shadow: 0 18px 40px -12px rgba(239, 68, 68, .55), 0 0 0 10px rgba(239, 68, 68, 0); } }
#news-banner .nb-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 14px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
#news-banner .nb-ico { font-size: 1.5rem; animation: nb-campana 1.2s ease-in-out infinite; }
@keyframes nb-campana { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } }
#news-banner .nb-txt { display: flex; flex-direction: column; min-width: 0; }
#news-banner .nb-txt strong { font-size: .86rem; font-weight: 800; color: #ef4444; }
#news-banner .nb-txt em { font-style: normal; font-size: .8rem; color: var(--text-muted, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#news-banner .nb-x { width: 44px; flex-shrink: 0; background: none; border: 0; border-left: 1px solid rgba(239, 68, 68, .2); color: var(--text-muted, #64748b); font-size: .95rem; cursor: pointer; border-radius: 0 14px 14px 0; }
#news-banner .nb-x:hover { background: rgba(239, 68, 68, .1); color: #ef4444; }
@media (max-width: 768px) { #news-banner { top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; left: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { #news-unread-badge, #news-banner.is-in, #news-banner .nb-ico { animation: none !important; } }

/* Móvil: el aviso (toast) invisible tapaba el panel de notificaciones y se comía los toques (Aceptar solicitud) */
#toast { pointer-events: none; }
#notifications-panel button { touch-action: manipulation; min-height: 34px; padding-left: 12px !important; padding-right: 12px !important; }

/* ============================================================================
   Adaptación a celulares/tablets: nada se corta ni ensancha la pantalla
   ============================================================================ */
.plan-card, .plan-card-cols > *, .plan-lista, .plan-item, .plan-item-main { min-width: 0; max-width: 100%; }
.plan-vacio { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .plan-card-cols { grid-template-columns: minmax(0, 1fr) !important; gap: 18px; }
  .plan-item-title { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .plan-item-main { flex: 1 1 100%; }
  .plan-item-go { width: 100%; justify-content: center; }
  .plan-item-acciones { width: 100%; justify-content: flex-end; }
  .modal-content, .card, [class$="-card"] { max-width: 100%; box-sizing: border-box; }
}

/* Red de seguridad para todas las páginas */
@media (max-width: 900px) {
  .pl-main, .container, .app-container, main { min-width: 0; }
  pre, code { overflow-wrap: anywhere; white-space: pre-wrap; }
  table { max-width: 100%; }
  .table-wrap, .tabla-scroll, [class*="table"] { max-width: 100%; overflow-x: auto; }
  a, p, h1, h2, h3, h4, li, td { overflow-wrap: anywhere; }
  .pilares-panel, .pilares-panel > * { min-width: 0; }
}
@media (max-width: 1100px) { .fr-aside { min-width: 0; } .fr-layout > * { min-width: 0; } }
/* Pantallas táctiles: objetivos de toque cómodos */
@media (hover: none) and (pointer: coarse) {
  button, .btn, [role="button"], select { min-height: 40px; }
}

/* ===== Tablets e iPad (táctil) ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (hover: none) and (pointer: coarse) {
  /* iOS hace zoom al enfocar campos de menos de 16 px: se evita sin bloquear el pellizco para ampliar */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: max(16px, 1em); }
  /* sin retraso de doble toque y con blancos de toque de 44 px (guía de Apple) */
  a, button, [role="button"], summary, label, select, input, .sidebar-link { touch-action: manipulation; -webkit-tap-highlight-color: rgba(2, 132, 199, .18); }
  button, .btn, [role="button"], select { min-height: 44px; }
  /* efectos de "mouse encima" que se quedan pegados al tocar */
  .up-card:hover, .hub-card:hover, .resource-item:hover { transform: none; }
}
/* Tablet (vertical y horizontal): menú lateral del campus más angosto para dar lugar al contenido */
@media (min-width: 901px) and (max-width: 1180px) {
  .sidebar { width: 260px; }
  .main-content { margin-left: 260px; width: calc(100% - 260px); }
  .main-content.expanded { margin-left: 0; width: 100%; }
}
/* Tablet horizontal con poca altura: los modales y paneles no se salen de la pantalla */
@media (max-height: 820px) and (min-width: 901px) { .modal-content { max-height: 90vh; max-height: 90dvh; overflow-y: auto; } }
