/* ============================================================
    indexHorario.css — Horario Semanal Satori Jiu Jitsu
    Grilla desktop + vista mobile por tabs
   ============================================================ */

/* ---- Colores por categoría de clase ---- */
.horario-clase-card.bjj-adultos,
.horario-mobile-card.bjj-adultos,
.horario-filtro-pill.bjj-adultos {
  background-color: #1a2744;
  color: #ffffff;
}

.horario-clase-card.boxeo-mma,
.horario-mobile-card.boxeo-mma,
.horario-filtro-pill.boxeo-mma {
  background-color: #8b0000;
  color: #ffffff;
}

.horario-clase-card.satori-kids,
.horario-mobile-card.satori-kids,
.horario-filtro-pill.satori-kids {
  background-color: #1a5c2e;
  color: #ffffff;
}

.horario-clase-card.satori-teens,
.horario-mobile-card.satori-teens,
.horario-filtro-pill.satori-teens {
  background-color: #c0392b;
  color: #ffffff;
}

.horario-clase-card.intro,
.horario-mobile-card.intro,
.horario-filtro-pill.intro {
  background-color: #d8d8d8;
  color: #333333;
}

.horario-clase-card.sparring,
.horario-mobile-card.sparring,
.horario-filtro-pill.sparring {
  background-color: #e8a020;
  color: #ffffff;
}

/* ---- Wrapper principal (dentro de .section-5) ---- */
.horario-section-wrapper {
  padding: 2.5rem 2rem 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* ---- Título ---- */
.horario-titulo {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 500;
  font-style: italic;
  color: white;
}

.horario-legend {
  text-align: center;
  color: white;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

/* ---- Filtros ---- */
.horario-filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
}

.horario-filtro-pill {
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.5px;
  transition:
    opacity 0.2s,
    transform 0.1s;
  text-transform: uppercase;
}

.horario-filtro-pill:hover {
  transform: scale(1.04);
}

.horario-filtro-pill.inactivo {
  opacity: 0.3;
}

/* Botón TODOS */
.horario-filtro-pill.horario-filtro-todos {
  background-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.horario-filtro-pill.horario-filtro-todos:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* ---- DESKTOP GRID (≥600px) ---- */
.horario-grid-container {
  display: block;
  overflow-x: auto;
}

.horario-dias-header {
  display: flex;
  margin-left: 64px;
  margin-bottom: 0;
}

.horario-hora-header {
  flex: 0 0 64px;
}

.horario-dia-header-cell {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-five);
  background-color: rgba(255, 255, 255, 0.08);
  padding: 10px 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.horario-dia-header-cell:first-child {
  border-left: none;
}

.horario-schedule-area {
  display: flex;
}

/* Columna de etiquetas horarias — altura dinámica desde JS */
.horario-hora-col {
  flex: 0 0 64px;
  position: relative;
}

.horario-hora-label {
  position: absolute;
  right: 8px;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
  white-space: nowrap;
  line-height: 1;
}

/* Cuerpo de días */
.horario-dias-body {
  flex: 1;
  display: flex;
  min-width: 560px;
}

/* Columna de día — altura dinámica desde JS */
.horario-dia-col {
  flex: 1;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* Líneas de fondo de la grilla */
.horario-linea-hora {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.horario-linea-media {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

/* Línea de brecha — indica discontinuidad temporal entre bloques de clase */
.horario-linea-brecha {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  background-color: transparent;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

/* Tarjetas de clase (desktop) */
.horario-clase-card {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 4px;
  padding: 4px 5px;
  font-size: 0.65rem;
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
  z-index: 3;
  transition:
    opacity 0.2s,
    transform 0.15s,
    filter 0.15s;
}

.horario-clase-card:hover {
  transform: scale(1.03);
  filter: brightness(1.12);
  z-index: 4;
}

.horario-clase-titulo {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.65rem;
  line-height: 1.2;
  margin-bottom: 1px;
}

.horario-clase-grupo {
  font-size: 0.6rem;
  opacity: 0.9;
  line-height: 1.2;
}

.horario-clase-hora {
  font-size: 0.58rem;
  opacity: 0.8;
  margin-top: 2px;
  line-height: 1.2;
}

/* Estado de filtro */
.horario-clase-card.oculto,
.horario-mobile-card.oculto {
  display: none;
}

/* ---- MOBILE (solo tabs, oculto en desktop) ---- */
.horario-mobile {
  display: none;
}

.horario-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.horario-tab-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 7px 16px;
  color: var(--color-five);
  font-family: 'Raleway', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.horario-tab-btn.activo {
  background: var(--color-one);
  border-color: var(--color-one);
  color: #ffffff;
}

.horario-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.horario-mobile-card {
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition:
    transform 0.15s,
    filter 0.15s;
}

.horario-mobile-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.horario-mobile-card-titulo {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.horario-mobile-card-grupo {
  font-size: 0.82rem;
  opacity: 0.9;
}

.horario-mobile-card-hora {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 2px;
}

.horario-no-clases {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}

.horario-error {
  color: var(--color-one);
  text-align: center;
  padding: 2rem;
}

/* ============================================================
   BREAKPOINTS
   ============================================================ */

@media screen and (min-width: 1300px) and (max-width: 1600px) {
  .horario-titulo {
    font-size: 2.4rem;
  }
}

@media screen and (min-width: 1000px) and (max-width: 1300px) {
  .horario-section-wrapper {
    padding: 2rem 1rem 2.5rem;
  }

  .horario-titulo {
    font-size: 2rem;
    letter-spacing: 4px;
  }

  .horario-dia-header-cell {
    font-size: 0.78rem;
    padding: 8px 2px;
  }

  .horario-clase-titulo {
    font-size: 0.6rem;
  }

  .horario-clase-grupo,
  .horario-clase-hora {
    font-size: 0.55rem;
  }
}

@media screen and (min-width: 600px) and (max-width: 1000px) {
  .horario-section-wrapper {
    padding: 1.5rem 0.75rem 2rem;
  }

  .horario-titulo {
    font-size: 1.6rem;
    letter-spacing: 3px;
  }

  .horario-hora-col {
    flex: 0 0 48px;
  }

  .horario-dias-header {
    margin-left: 48px;
  }

  .horario-hora-label {
    font-size: 0.55rem;
    right: 4px;
  }

  .horario-dia-header-cell {
    font-size: 0.7rem;
    padding: 6px 2px;
  }

  .horario-clase-card {
    padding: 3px 4px;
  }

  .horario-clase-titulo {
    font-size: 0.55rem;
  }

  .horario-clase-grupo,
  .horario-clase-hora {
    font-size: 0.5rem;
  }
}

@media screen and (max-width: 600px) {
  .horario-grid-container {
    display: none;
  }

  .horario-mobile {
    display: block;
  }

  .horario-titulo {
    font-size: 1.4rem;
    letter-spacing: 2px;
  }

  .horario-filtros {
    gap: 6px;
  }

  .horario-filtro-pill {
    font-size: 0.7rem;
    padding: 5px 12px;
  }
}
