/* ═══════════════════════════════════════════════════════════════
   1. VARIABLES Y BASE
   ═══════════════════════════════════════════════════════════════ */
.disciplinas-page {
  --dch-bg:           #0a0d12;
  --dch-bg-2:         #11151c;
  --dch-paper:        #fafafa;
  --dch-ink:          #0a0d12;
  --dch-fg:           #f6f4ef;
  --dch-accent:       #2CB037;
  --dch-display:      'Bricolage Grotesque', 'Questrial', sans-serif;
  --dch-text:         'Inter', 'Noto Sans', system-ui, sans-serif;
  
  background: var(--dch-paper);
  color: var(--dch-ink);
  font-family: var(--dch-text);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════
   2. HEADER OSCURO EDITORIAL
   ═══════════════════════════════════════════════════════════════ */
.dc-asc-header {
  background: var(--dch-bg);
  color: var(--dch-fg);
  padding: 100px 0 72px;
  position: relative;
  overflow: hidden;
}

.dc-asc-header__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 600px 380px at 80% -10%, rgba(26,122,36,.22) 0%, transparent 58%), 
    radial-gradient(ellipse 500px 340px at -5% 110%, rgba(44,176,55,.16) 0%, transparent 52%);
}

.dc-asc-header__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26,122,36,.2) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 100% at 80% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 80% 50%, black 0%, transparent 70%);
  opacity: .3;
}

.dc-asc-header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.dc-asc-header__content {
  flex: 1;
  min-width: 300px;
}

.dc-asc-header__eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: #1a7a24;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dc-asc-header__eyebrow span {
  width: 24px;
  height: 1px;
  background: #1a7a24;
}

.dc-asc-header__title {
  font-family: var(--dch-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1.05;
  margin: 0 0 18px;
  color: #ffffff;
}

.dc-asc-header__title em {
  font-style: normal;
  background: linear-gradient(135deg, #5bcf67, #1a7a24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dc-asc-header__lead {
  font-size: 1.05rem;
  color: rgba(246,244,239,.78);
  line-height: 1.6;
  max-width: 48ch;
  margin: 0 0 24px;
}

.dc-asc-header__count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(246,244,239,.35);
  font-weight: 500;
}
.dc-asc-header__count strong { color: #1a7a24; }

.dc-asc-header__stats {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.dc-asc-header__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 22px;
  background: rgba(246,244,239,.04);
  border: 1px solid rgba(246,244,239,.08);
}
.dc-asc-header__stat:first-child { border-radius: 12px 0 0 12px; }
.dc-asc-header__stat:last-child { border-radius: 0 12px 12px 0; }

.dc-asc-header__stat b {
  font-family: var(--dch-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: #f6f4ef;
  line-height: 1;
}

.dc-asc-header__stat span {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(246,244,239,.38);
  margin-top: 4px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   3. LAYOUT DEL EXPLORADOR (SIDEBAR Y GRID)
   ═══════════════════════════════════════════════════════════════ */
.dc-disc-section {
  padding: 44px 0 80px;
}

.dc-disc-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 991px) {
  .dc-disc-layout { flex-direction: column; }
  .dc-filter-sidebar { width: 100% !important; position: static !important; }
}

/* SIDEBAR */
.dc-filter-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px 20px;
  position: sticky;
  top: 24px;
}

.dc-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.dc-filter-header h3 {
  font-family: var(--dch-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-btn-limpiar {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.dc-btn-limpiar:hover { color: #6b7280; }

.dc-filter-section {
  margin-bottom: 24px;
}
.dc-filter-section:last-child { margin-bottom: 0; }

.dc-filter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.dc-filter-search { position: relative; }
.dc-filter-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.9rem;
}
.dc-filter-search input {
  width: 100%;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px 10px 38px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #111827;
  outline: none;
  transition: all 0.2s;
}
.dc-filter-search input:focus {
  background: #ffffff;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.dc-filter-list {
  display: flex;
  flex-direction: column;
}
.dc-filter-item {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: all 0.2s;
  margin-bottom: 4px;
}
.dc-filter-item:hover:not(.is-active) { background: #f9fafb; }
.dc-filter-dot { width: 6px; height: 6px; border-radius: 50%; background: #d1d5db; }
.dc-filter-item.is-active {
  border-color: #22c55e;
  color: #16a34a;
  font-weight: 600;
}
.dc-filter-item.is-active i { color: #22c55e; }

/* ── RESULTADOS Y TOOLBAR ── */
.dc-disc-results {
  flex: 1;
  min-width: 0;
}

.dc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dc-view-toggles {
  display: flex;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 24px;
}
.dc-view-toggles button {
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.dc-view-toggles button.is-active {
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dc-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dc-sort-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dc-sort-wrapper label { font-size: 0.85rem; color: #6b7280; }
.dc-sort-select {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 6px 32px 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

/* ── TARJETAS Y GRID ── */
.dc-disc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.dc-disc-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #111827;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.dc-disc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(17, 24, 39, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}
.dc-disc-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.dc-disc-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.dc-disc-card__name {
  font-family: var(--dch-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.dc-disc-card__cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  font-weight: 600;
}
.dc-disc-card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dc-disc-card__stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}
.dc-disc-card__stat strong { color: #111827; }
.dc-disc-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── ESTADO VACÍO ── */
.dc-empty-state {
  text-align: center;
  padding: 80px 20px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px dashed #d1d5db;
  color: #6b7280;
}
.dc-empty-state i {
  font-size: 3rem;
  color: #e5e7eb;
  display: block;
  margin-bottom: 16px;
}
.dc-empty-state h3 {
  font-size: 1.2rem;
  color: #111827;
  margin: 0 0 8px;
  font-family: var(--dch-display);
}
.dc-empty-state p { margin: 0; font-size: 0.95rem; }

/* ═══════════════════════════════════════════════════════════════
   4. CALL TO ACTION (CTA)
   ═══════════════════════════════════════════════════════════════ */
.dc-asc-cta {
  background: var(--dch-bg);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dc-asc-cta__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 580px 320px at 50% 50%, rgba(26,122,36,.18) 0%, transparent 62%);
  pointer-events: none;
}
.dc-asc-cta__inner { position: relative; }
.dc-asc-cta__eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: #1a7a24;
  display: block;
  margin-bottom: 16px;
}
.dc-asc-cta__title {
  font-family: var(--dch-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #f6f4ef;
  margin: 0 0 14px;
}
.dc-asc-cta__lead {
  color: rgba(246,244,239,.78);
  max-width: 46ch;
  margin: 0 auto 32px;
  font-size: 1rem;
  line-height: 1.55;
}
.dc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--dch-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.3s;
}
.dc-btn-primary:hover {
  background: #22902f;
  color: #fff;
}