/* =============================================
   CONTENEDOR PRINCIPAL
   ============================================= */
#aula-recomendador-libros {
  width: 100%;
  max-width: 1040px;
  margin: 32px auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  color: #0f172a;
  font-size: 16px; /* 🔥 antes era ~14px */
}

/* Tarjeta envolvente */
.aula-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 45%, #f1f5f9 100%);
  border-radius: 24px;
  padding: 22px 22px 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* =============================================
   TÍTULOS Y SUBTÍTULOS
   ============================================= */

.aula-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #020617;
}

.aula-subtitle {
  margin: 6px 0 20px;
  color: #6b7280;
  font-size: 16px;
}

/* =============================================
   PANEL SUPERIOR (filtros / inputs)
   ============================================= */

.aula-panel {
  background: #f9fafb;
  border-radius: 18px;
  padding: 16px 16px 18px;
  border: 1px solid #e5e7eb;
  margin-bottom: 18px;
}

.aula-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
}

.aula-tabs-group {
  min-width: 220px;
}

.aula-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
  color: #6b7280;
  display: block;
}

/* =============================================
   TABS
   ============================================= */

.aula-tabs {
  background: #e5e7eb;
  padding: 3px;
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
}

.aula-tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: #4b5563;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.aula-tab-active {
  background: #2563eb;
  color: #f9fafb !important;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

/* =============================================
   CAMPOS DE TEXTO
   ============================================= */

.aula-field {
  margin-bottom: 14px;
}

.aula-field input[type="text"],
.aula-field input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
  color: #0f172a;
  transition: all 0.18s ease;
}

.aula-field input::placeholder {
  color: #9ca3af;
}

.aula-field input:focus {
  border-color: #2563eb;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

/* =============================================
   TOGGLE DE AÑO
   ============================================= */

.aula-toggle-year {
  display: inline-flex;
  gap: 6px;
}

.aula-toggle {
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: #e5e7eb;
  cursor: pointer;
  font-size: 12px;
  color: #4b5563;
  transition: background 0.18s ease, color 0.18s ease;
}

.aula-toggle-active {
  background: #0f172a;
  color: #e5e7eb;
}

/* =============================================
   BOTÓN PRINCIPAL
   ============================================= */

.aula-actions {
  margin-top: 12px;
}

#aula-boton-recomendar {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #f9fafb;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

#aula-boton-recomendar:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.45);
}

#aula-boton-recomendar:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

/* =============================================
   BÚSQUEDAS RECIENTES
   ============================================= */

.aula-recientes {
  margin-top: 20px;
  margin-bottom: 22px;
}

.aula-recientes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: #4b5563;
}

.aula-link {
  background: none;
  color: #2563eb;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.aula-chip {
  background: #e5e7eb;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  margin-right: 6px;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4b5563;
}

/* =============================================
   RESULTADOS
   ============================================= */

.aula-resultados {
  margin-top: 22px;
}

.aula-resultados h3 {
  margin-bottom: 12px;
  color: #020617;
  font-size: 18px;
  font-weight: 700;
}

/* =============================================
   GRID DE TARJETAS
   ============================================= */

.aula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 6px;
}

/* =============================================
   TARJETA INDIVIDUAL
   ============================================= */

.aula-result-card {
  background: #f9fafb;
  border-radius: 20px;
  padding: 14px 14px 11px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.4);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.aula-result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  border-color: #2563eb;
}

.aula-result-cover {
  background: radial-gradient(circle at 20% 20%, #e0f2fe, #e5e7eb);
  border-radius: 16px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.aula-cover-icon {
  font-size: 30px;
  color: #64748b;
}

/* Contenido */
.aula-result-body {
  flex: 1;
}

.aula-result-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: #1d4ed8;
  line-height: 1.25;
}

.aula-result-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 7px;
}

.aula-result-year {
  font-weight: 600;
  color: #111827;
}

.aula-result-desc {
  font-size: 14px;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1.45;
}

.aula-result-rel {
  font-size: 13px;
  color: #4b5563;
}

/* =============================================
   FOOTER DE TARJETA
   ============================================= */

.aula-result-footer {
  margin-top: 9px;
  display: flex;
  justify-content: flex-end;
}

.aula-icon-button {
  background: #e5e7eb;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.16s ease, transform 0.12s ease;
}

.aula-icon-button:hover {
  background: #d1d5db;
  transform: translateY(-1px);
}

/* =============================================
   RESPONSIVO
   ============================================= */

@media (max-width: 768px) {
  .aula-tabs-row {
    flex-direction: column;
  }

  .aula-card {
    padding: 18px 16px 20px;
    border-radius: 18px;
  }
}