/* ============================================================
   Unitec Horarios — calendario académico (horas × días) con pestañas
   Usa las variables del tema si existen, con fallbacks propios.
   ============================================================ */
.uh-cal{
  --uh-accent: var(--accent, #6f8a2f);
  --uh-accent2: var(--accent-2, #59721f);
  --uh-soft: var(--accent-soft, #eef2e2);
  --uh-ink: var(--ink, #181a12);
  --uh-muted: var(--muted, #8b8d80);
  --uh-line: var(--line, #eceae1);
  --uh-cream: var(--cream, #faf9f4);
  --uh-ease: cubic-bezier(.22,.61,.36,1);
  --uh-slot: 42px;              /* alto de cada franja de 30 min */
  margin: 8px 0; font-family: 'Inter', system-ui, sans-serif;
}

/* ---- Pestañas por curso ---- */
.uh-tabs{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:20px; border-bottom:1px solid var(--uh-line); }
.uh-tab{
  appearance:none; background:none; border:0; cursor:pointer; position:relative;
  font-family:'Inter',sans-serif; font-weight:600; font-size:.96rem; color:var(--uh-muted);
  padding:12px 20px; transition:.25s var(--uh-ease); line-height:1;
}
.uh-tab:hover{ color:var(--uh-ink); }
.uh-tab.is-active{ color:var(--uh-ink); }
.uh-tab.is-active::after{ content:""; position:absolute; left:16px; right:16px; bottom:-1px; height:3px; background:var(--uh-accent); border-radius:3px; }

.uh-panel{ display:none; animation:uhfade .4s var(--uh-ease); }
.uh-panel.is-active{ display:block; }
@keyframes uhfade{ from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none} }

/* Cursos apilados: cada curso se muestra directamente con su título */
.uh-course{ margin-bottom:44px; }
.uh-course:last-child{ margin-bottom:0; }
.uh-course-title{
  font-family:'Fraunces','Georgia',serif; font-weight:500; color:var(--uh-ink);
  font-size:1.35rem; line-height:1.1; margin:0 0 16px; padding-left:14px;
  border-left:4px solid var(--uh-accent);
}
.uh-noclass{
  padding:20px 22px; border:1px dashed var(--uh-line); border-radius:12px;
  color:var(--uh-muted); font-size:.95rem;
}
.uh-course.is-empty .uh-course-title{ border-left-color:var(--uh-line); color:var(--uh-muted); }

/* ---- Rejilla académica ---- */
.uh-grid{
  position:relative; display:grid; background:#fff;
  border:1px solid var(--uh-line); border-radius:16px; overflow:hidden;
  box-shadow: 0 1px 2px rgba(24,26,18,.04), 0 20px 50px -34px rgba(24,26,18,.22);
}
.uh-corner{ grid-column:1; grid-row:1; background:var(--uh-ink); }
.uh-dayhead{
  grid-row:1; background:var(--uh-ink); color:#fff;
  font-family:'Fraunces',Georgia,serif; font-weight:500; font-size:1.02rem;
  display:flex; align-items:center; justify-content:center; letter-spacing:.01em;
}
.uh-hour{
  grid-column:1; align-self:start; text-align:right; padding-right:10px;
  font-size:.7rem; font-weight:700; color:var(--uh-muted); letter-spacing:.02em;
  transform:translateY(-.6em); white-space:nowrap;
}
.uh-line{ grid-column:2 / -1; align-self:start; height:0; border-top:1px solid var(--uh-line); pointer-events:none; }
.uh-vline{ grid-row:2 / -1; border-left:1px solid var(--uh-line); pointer-events:none; }

.uh-ev{
  grid-row-end: span 2; margin:2px 4px; padding:7px 10px; z-index:1; overflow:hidden;
  background:var(--uh-soft); border:1px solid #dfe7c9; border-left:3px solid var(--uh-accent);
  border-radius:10px; display:flex; flex-direction:column; justify-content:center;
  transition:.2s var(--uh-ease);
}
.uh-ev:hover{ background:#fff; box-shadow:0 14px 30px -16px rgba(24,26,18,.45); z-index:3; }
.uh-ev-time{ font-size:.66rem; font-weight:700; color:var(--uh-accent2); letter-spacing:.02em; white-space:nowrap; }
.uh-ev b{ font-family:'Fraunces',Georgia,serif; font-weight:500; font-size:.92rem; line-height:1.12; color:var(--uh-ink); margin-top:1px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.uh-ev small{ color:var(--uh-muted); font-size:.72rem; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.uh-empty{
  text-align:center; color:var(--muted,#8b8d80); padding:36px 20px;
  border:1px dashed var(--line,#eceae1); border-radius:16px; background:var(--cream,#faf9f4);
}

@media(max-width:1100px){
  .uh-grid{ overflow-x:auto; }
}

/* Responsive: la parrilla semanal se desplaza horizontalmente en pantallas pequeñas */
@media(max-width:820px){
  .uh-course{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .uh-grid{ min-width:660px; }
  .uh-course-title{ font-size:1.2rem; }
}
