/* =============================================
   DIRECTORIO DE ASISTENCIA — directorio.css
   ============================================= */

/* ===== HERO ===== */
.directorio-hero {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-hover) 100%);
  border-radius: var(--radio);
  padding: 2.5rem 2rem 2rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.directorio-hero::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.directorio-hero h1 {
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.directorio-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 400;
  margin: 0;
}

/* ===== PANEL DE FILTROS ===== */
.filtros-panel {
  background: #fff;
  border: 1px solid #d1dff5;
  border-radius: var(--radio);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--sombra);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

@media (max-width: 900px) {
  .filtros-panel { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .filtros-panel { grid-template-columns: 1fr; }
}

.filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filtro-grupo label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--texto-suave);
}

.filtro-grupo input,
.filtro-grupo select {
  border: 1.5px solid #d1dff5;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--texto);
  background: #f8faff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

.filtro-grupo input:focus,
.filtro-grupo select:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(1,36,99,0.10);
  background: #fff;
}

.btn-limpiar {
  background: #f4f6fb;
  border: 1.5px solid #d1dff5;
  border-radius: 6px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  color: var(--texto-suave);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  height: fit-content;
}

.btn-limpiar:hover {
  background: var(--azul);
  color: #fff;
  border-color: var(--azul);
}

/* ===== STATS BAR ===== */
.dir-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--texto-suave);
  margin-bottom: 1rem;
  padding: 0 2px;
}

.dir-stats strong {
  color: var(--azul);
  font-size: 1rem;
}

/* ===== TABLA ===== */
.tabla-wrap {
  background: #fff;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  overflow-x: auto;
  margin-bottom: 2rem;
}

.dir-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.dir-tabla thead tr {
  background: var(--azul);
  color: #fff;
}

.dir-tabla thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dir-tabla tbody tr {
  border-bottom: 1px solid #e8f0fb;
  transition: background 0.15s;
}

.dir-tabla tbody tr:last-child {
  border-bottom: none;
}

.dir-tabla tbody tr:hover {
  background: #f4f7fc;
}

.dir-tabla td {
  padding: 11px 14px;
  vertical-align: middle;
  color: var(--texto);
}

.td-docente {
  font-weight: 600;
  min-width: 160px;
}

.td-curso {
  min-width: 200px;
}

.td-curso small {
  display: block;
  font-size: 0.75rem;
  color: var(--texto-suave);
  margin-top: 2px;
}

.td-horario {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ===== BADGES ===== */
.badge-dia {
  background: #e8f1fb;
  color: var(--azul);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-sede {
  background: #f0fdf4;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-estado-abierto {
  color: #166534;
  background: #dcfce7;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-estado-cerrado {
  color: #991b1b;
  background: #fee2e2;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ===== BOTÓN FORMULARIO ===== */
.btn-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--azul);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}

.btn-form:hover {
  background: var(--azul-hover);
  transform: translateY(-1px);
}

/* ===== SIN RESULTADOS ===== */
.sin-resultados {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--texto-suave);
}

.sin-resultados i {
  font-size: 2.5rem;
  color: #cbd5e1;
  display: block;
  margin-bottom: 1rem;
}

.sin-resultados p {
  font-size: 0.95rem;
  margin: 0;
}

.sin-resultados small {
  font-size: 0.82rem;
  color: #94a3b8;
  display: block;
  margin-top: 0.4rem;
}

/* ===== RESPONSIVE TABLA ===== */
@media (max-width: 767px) {
  .dir-tabla thead { display: none; }

  .dir-tabla tbody tr {
    display: block;
    border: 1px solid #e8f0fb;
    border-radius: var(--radio);
    margin-bottom: 12px;
    padding: 12px;
  }

  .dir-tabla td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5ff;
    gap: 8px;
  }

  .dir-tabla td:last-child { border-bottom: none; }

  .dir-tabla td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--texto-suave);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
  }

  .td-curso small { display: inline; margin-left: 4px; }
}
