/* Visor de horarios y uso de aulas. Mismo archivo en la web institucional (css/horarios.css)
   y en el sistema (static/css/horarios.css): se usan solo variables con valor por defecto. */
.hx {
    --hx-verde: #2ecc71;  --hx-fucsia: #e84393;  --hx-amarillo: #f1c40f;
    --hx-surface: #ffffff; --hx-muted: rgba(31, 36, 48, .68);
    --hx-line: rgba(0, 0, 0, .10); --hx-head: #f1f3f7;
    --hx-verde-bg: #e8f8ef;  --hx-fucsia-bg: #fdebf4;  --hx-amarillo-bg: #fdf6d8;
    --hx-libre-bg: #f3fbf6;  --hx-radius: .65rem;
    --hx-shadow: 0 4px 12px rgba(0, 0, 0, .06);
    color: inherit;
}
[data-bs-theme="dark"] .hx {
    --hx-surface: #1b1f27; --hx-muted: rgba(255, 255, 255, .62);
    --hx-line: rgba(255, 255, 255, .12); --hx-head: #242a35;
    --hx-verde-bg: rgba(46, 204, 113, .13);  --hx-fucsia-bg: rgba(232, 67, 147, .15);
    --hx-amarillo-bg: rgba(241, 196, 15, .13); --hx-libre-bg: rgba(46, 204, 113, .06);
    --hx-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
/* ---- Selectores tipo pastilla ---- */
.hx-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; max-width: 1200px; margin: 0 auto; padding: .25rem .1rem .6rem; overflow: visible; }
.hx-pills[hidden] { display: none; }
.hx-pill {
    flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: .45rem 1.1rem; cursor: pointer;
    border: 1.5px solid var(--hx-line); border-radius: 2rem; background: var(--hx-surface); color: inherit;
    font-weight: 600; font-size: .95rem; white-space: normal;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.hx-pill:hover { border-color: var(--hx-fucsia); transform: translateY(-1px); box-shadow: var(--hx-shadow); }
.hx-pill:focus-visible { outline: 3px solid rgba(232, 67, 147, .35); outline-offset: 2px; }
.hx-pill[aria-selected="true"], .hx-pill[aria-pressed="true"] {
    background: linear-gradient(135deg, #e84393, #c2185b); border-color: transparent; color: #fff;
    box-shadow: 0 4px 12px rgba(232, 67, 147, .4);
}
.hx-pills.hx-anios .hx-pill { min-width: 52px; padding: .45rem .9rem; }
.hx-pills.hx-anios .hx-pill[aria-selected="true"] { background: linear-gradient(135deg, #2ecc71, #1e8e4e); color: #06260f; box-shadow: 0 4px 12px rgba(46, 204, 113, .4); }
.hx-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hx-muted); font-weight: 700; margin: .25rem 0 .1rem; }

/* ---- Grilla semanal ---- */
.hx-scroll { padding-bottom: .5rem; }
.hx-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; width: 100%; }
.hx-col { min-width: 0; background: #161e2e; border-radius: var(--hx-radius); padding: .6rem; min-height: 8rem; }
.hx-col-title { display: flex; justify-content: space-between; align-items: center; font-weight: 700; padding: .15rem .3rem .55rem; }
.hx-hoy { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #06260f; background: var(--hx-verde); border-radius: 1rem; padding: .1rem .55rem; }
.hx-col.es-hoy { box-shadow: inset 0 0 0 2px var(--hx-verde); }
/* Celulares: se mantiene el scroll horizontal táctil */
@media (max-width: 768px) {
    .hx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
    .hx-grid { grid-template-columns: repeat(5, minmax(200px, 1fr)); min-width: 1040px; }
    .hx-col { scroll-snap-align: start; }
}
.hx-vacio { color: var(--hx-muted); font-size: .88rem; text-align: center; padding: 1.2rem .3rem; }

/* ---- Tarjetas de clase ---- */
.hx-card {
    --acento: var(--hx-verde); background: linear-gradient(135deg, color-mix(in srgb, var(--acento) 13%, transparent) 0%, #151c28 100%), #151c28; color: #ffffff !important;
    border: 1px solid color-mix(in srgb, var(--acento) 27%, transparent); border-left: 5px solid var(--acento); border-radius: 8px;
    padding: .7rem .8rem; margin-bottom: .6rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .4), -2px 0 8px color-mix(in srgb, var(--acento) 45%, transparent);
}
.hx-card:last-child { margin-bottom: 0; }
.hx-card.acento-fucsia { --acento: var(--hx-fucsia); }
.hx-card.acento-amarillo { --acento: var(--hx-amarillo); }
.hx-materia { overflow-wrap: anywhere; font-weight: 800; font-size: 1rem; line-height: 1.25; margin: 0 0 .25rem; }
.hx-franja { font-variant-numeric: tabular-nums; font-size: .88rem; font-weight: 600; color: var(--hx-muted); margin-bottom: .45rem; }
.hx-aula { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: 1rem;
    background: rgba(127, 127, 127, .16); }
.hx-docente { font-size: .88rem; font-weight: 500; margin-top: .45rem; overflow-wrap: anywhere; }
.hx-docente-doble { display: flex; flex-direction: column; gap: .1rem; }
.hx-docente-suplente { font-size: .75rem; font-style: italic; font-weight: 400; color: var(--hx-muted); }
.hx-extra { font-size: .78rem; color: var(--hx-muted); margin-top: .15rem; }

.hx-aviso { border-radius: var(--hx-radius); padding: .65rem .9rem; margin-bottom: 1rem; font-size: .9rem;
    background: var(--hx-amarillo-bg); border: 1px dashed var(--hx-amarillo); }
.hx-error { border-color: var(--hx-fucsia); background: var(--hx-fucsia-bg); }

/* ---- Uso de aulas ---- */
.hx-aulas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.hx-aula-card { background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: var(--hx-radius); padding: .8rem; box-shadow: var(--hx-shadow); }
.hx-aula-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.hx-aula-head h3 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.hx-estado { font-size: .72rem; font-weight: 700; padding: .15rem .6rem; border-radius: 1rem; white-space: nowrap; }
.hx-estado.ocupada { background: var(--hx-fucsia); color: #fff; }
.hx-estado.libre { background: var(--hx-verde); color: #06260f; }
.hx-libre { border: 1.5px dashed var(--hx-verde); background: var(--hx-libre-bg); border-radius: .6rem;
    padding: .5rem .8rem; margin-bottom: .6rem; font-size: .88rem; font-weight: 600; color: var(--hx-muted); }
.hx-libre::before { content: "✔ Libre · "; color: #1e8e4e; }
[data-bs-theme="dark"] .hx-libre::before { color: var(--hx-verde); }
.hx-aula-card .hx-card.ahora { box-shadow: 0 0 0 2px var(--hx-fucsia); }

@media (prefers-reduced-motion: reduce) { .hx-pill { transition: none; } .hx-pill:hover { transform: none; } }

/* ---- Switch "Docente en el aula" ---- */
.hx-switch { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; margin-bottom: .5rem; font-weight: 600; }
.hx-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hx-switch-pista { position: relative; width: 46px; height: 26px; border-radius: 1rem; background: rgba(127, 127, 127, .35); transition: background-color .18s ease; flex: 0 0 auto; }
.hx-switch-pista::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s ease; }
.hx-switch input:checked + .hx-switch-pista { background: var(--hx-verde); }
.hx-switch input:checked + .hx-switch-pista::after { transform: translateX(20px); }
.hx-switch input:focus-visible + .hx-switch-pista { outline: 3px solid rgba(232, 67, 147, .35); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .hx-switch-pista, .hx-switch-pista::after { transition: none; } }

/* ---- Alineación: grilla centrada y acento institucional ---- */
.hx-scroll { max-width: 1200px; margin: 0 auto; }
.hx-card.acento-verde { --acento: var(--hx-verde); }

/* ---- Tipografía en blanco puro sobre fondo oscuro ---- */
.hx-col-title { color: #ffffff !important; font-weight: 700; }
.hx-card .hx-materia { color: #ffffff !important; font-weight: 700; font-size: 1rem; line-height: 1.25; margin-bottom: .35rem; }
.hx-card .hx-franja { color: #ffffff !important; opacity: 1; font-weight: 500; font-size: .85rem; }
.hx-card .hx-aula, .hx-card .hx-docente, .hx-card .hx-docente-suplente, .hx-card .hx-extra { color: #ffffff !important; opacity: 1; font-size: .85rem; }

.hx-card * { color: #ffffff !important; }
.hx-card-meta, .hx-card-time { color: #ffffff !important; }

/* ---- Hero y selectores centrados ---- */
.hx-label { text-align: center; }
.hx-pills { justify-content: center; }
.hx-card * { opacity: 1 !important; }

/* ---- Encabezado institucional en blanco puro ---- */
.hero-page .hero-title, .hero-page .hero-title span, .hero-page .lead, .hero-page p.small,
.hero-page .hero-page-titulo { color: #ffffff !important; opacity: 1 !important; }

/* ---- Selector de carreras fluido ---- */
.hx-pills {
    display: flex !important; flex-wrap: wrap !important; justify-content: center !important;
    gap: 10px !important; max-width: 1100px !important; margin: 0 auto 1.5rem auto !important;
    overflow: visible !important; white-space: normal !important;
}
.hx-pill { white-space: normal !important; overflow: visible !important; max-width: none; padding: .5rem 1.25rem; line-height: 1.25; }
.hero-page, .hero-page * { opacity: 1; }
.hero-page .hero-title, .hero-page .hero-title *, .hero-page h1, .hero-page h2, .hero-page p, .hero-page small, .hero-page span,
.hero-page .lead, .hero-page p.small, .hero-page .hero-page-titulo { color: #ffffff !important; opacity: 1 !important; }
