/* ========== Áreas OCDE ========== */

/* Hero */
.ocde-hero {
  background: #0d1126;
  padding-top: 3rem;
  padding-bottom: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
  position: relative;
  overflow: hidden;
}

.ocde-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 50% 100%, rgba(0, 91, 190, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 15% 30%,  rgba(0, 91, 190, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.ocde-hero-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ocde-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}
.ocde-back:hover { color: rgba(255, 255, 255, 0.8); }

/* ─── Cuerpo centrado ─── */
.ocde-hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  width: 100%;
}

.ocde-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary, #005bbe);
}

.ocde-hero-title {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}
.ocde-hero-title span { color: var(--primary, #005bbe); }

.ocde-hero-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.75;
  max-width: 480px;
  margin: 0;
}

/* ─── Fila de stats ─── */
.ocde-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 1.1rem 2rem;
  backdrop-filter: blur(6px);
}

.ocde-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0 1.75rem;
}

.ocde-stat-n {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.03em;
}

.ocde-stat-l {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
}

.ocde-stat-sep {
  width: 1px;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* ─── Link fuente discreta ─── */
.ocde-source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  margin-top: 0.25rem;
  transition: color 0.2s ease;
}
.ocde-source-link:hover { color: rgba(255, 255, 255, 0.7); }
.ocde-source-link i { font-size: 0.6rem; }

@media (max-width: 600px) {
  .ocde-hero-stats  { padding: 0.9rem 1rem; }
  .ocde-stat        { padding: 0 1rem; }
  .ocde-stat-n      { font-size: 1.8rem; }
}


/* ─── Sección de tarjetas ─── */
.ocde-section {
  background: #f4f6f9;
  padding: 4rem 2rem 5rem;
}

.ocde-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── Tarjeta ─── */
.ocde-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ocde-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 24px 48px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

.ocde-card--active {
  box-shadow: 0 0 0 2px var(--primary, #005bbe), 0 8px 24px rgba(0, 91, 190, 0.15);
}

/* Top coloreado */
.ocde-card-top {
  padding: 2rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.ocde-card-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.ocde-card-top.natural     { background: #eef4ff; }
.ocde-card-top.engineering { background: #f0eeff; }
.ocde-card-top.agricultural{ background: #edfaf3; }
.ocde-card-top.social      { background: #fff7ed; }

.ocde-card-top.natural::before     { background: #005bbe; }
.ocde-card-top.engineering::before { background: #6d28d9; }
.ocde-card-top.agricultural::before{ background: #059669; }
.ocde-card-top.social::before      { background: #d97706; }

.ocde-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ocde-num {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  opacity: 0.35;
  color: #0d1126;
}

.ocde-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.natural-icon     { background: rgba(0, 91, 190, 0.12);  color: #005bbe; }
.engineering-icon { background: rgba(109, 40, 217, 0.12); color: #6d28d9; }
.agricultural-icon{ background: rgba(5, 150, 105, 0.12);  color: #059669; }
.social-icon      { background: rgba(217, 119, 6, 0.12);  color: #d97706; }

.ocde-card-title {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 800;
  color: #0d1126;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Cuerpo */
.ocde-card-body {
  padding: 1.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ocde-card-body p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
}

/* Disciplinas */
.ocde-disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ocde-disciplines span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}


/* ════════════════════════════════════════════════
   VISUALIZADOR INTERACTIVO: Grupos y Áreas OCDE
   ════════════════════════════════════════════════ */
.ocde-interactive {
  --oci-bg:         #f4f6f9;
  --oci-surface:    #ffffff;
  --oci-border:     #dde3ed;
  --oci-text:       #0d1126;
  --oci-muted:      #4b5563;
  --oci-faint:      #94a3b8;
  --oci-lit-bg:     var(--oci-active-bg,    rgba(0, 91, 190, 0.08));
  --oci-lit-border: var(--oci-active-color, #005bbe);
  --oci-lit-text:   var(--oci-active-text,  #003366);
  --oci-font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --oci-mono:       'IBM Plex Mono', 'Fira Mono', monospace;

  background: var(--oci-bg);
  padding: 4rem 2rem 5rem;
}

.ocde-int-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.ocde-int-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ocde-int-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #0d1126;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.15;
}
.ocde-int-title span { color: var(--primary, #005bbe); }

.ocde-int-hint {
  font-size: 0.875rem;
  color: var(--oci-muted);
  font-style: italic;
}

/* ─── Layout 3 columnas ─── */
.oci-layout {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  gap: 0 24px;
  align-items: start;
  font-family: var(--oci-font);
}

/* ─── Columna central ─── */
.oci-col--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 100px;
}

.oci-center-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--oci-faint);
  margin-bottom: 10px;
  font-weight: 600;
}

.oci-groups {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.oci-group-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  position: relative;
}
.oci-group-section + .oci-group-section {
  border-top: 1px dashed var(--oci-border);
}

.oci-section-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--oci-faint);
  font-weight: 600;
  margin-bottom: 4px;
}

.oci-group-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--oci-muted);
  font-family: var(--oci-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  user-select: none;
  white-space: normal;
  word-break: break-word;
}
.oci-group-btn:hover:not(.oci-active) {
  border-color: var(--primary, #005bbe);
  background: rgba(0, 91, 190, 0.04);
  color: var(--oci-text);
  transform: scale(1.02);
}
.oci-group-btn.oci-active {
  background: var(--oci-active-color, var(--primary, #005bbe));
  border-color: var(--oci-active-color, var(--primary, #005bbe));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}
.oci-group-btn.energia     { border-left: 3px solid #CC5500; }
.oci-group-btn.agricultura { border-left: 3px solid #3B6D11; }
.oci-group-btn.ambiente    { border-left: 3px solid #185FA5; }
.oci-group-btn.oci-active  { border-left-color: rgba(255,255,255,0.45) !important; }

/* ─── Columnas de áreas ─── */
.oci-col--left,
.oci-col--right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oci-area-block {
  display: flex;
  align-items: stretch;
}
.oci-col--left  .oci-area-block { flex-direction: row; }
.oci-col--right .oci-area-block { flex-direction: row-reverse; }

.oci-area-label {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--oci-muted);
  background: #e8edf4;
  border: 1px solid var(--oci-border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 115px;
  max-width: 115px;
  line-height: 1.35;
  transition: all 0.18s ease;
  font-family: var(--oci-font);
}
.oci-col--left  .oci-area-label { border-left: none; }
.oci-col--right .oci-area-label { border-right: none; }
.oci-area-label.oci-lit {
  background: var(--primary, #005bbe);
  border-color: var(--primary, #005bbe);
  color: #ffffff;
}

.oci-subs {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--oci-border);
  background: var(--oci-surface);
  transition: border-color 0.18s;
}
.oci-col--left  .oci-subs { border-right: none; }
.oci-col--right .oci-subs { border-left: none; }
.oci-subs.oci-area-lit { border-color: var(--oci-lit-border); }

.oci-sub-row {
  padding: 4.5px 10px;
  font-size: 11.5px;
  color: var(--oci-muted);
  line-height: 1.6;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.15s ease;
  font-family: var(--oci-font);
}
.oci-sub-row:last-child { border-bottom: none; }
.oci-col--left  .oci-sub-row { text-align: right; }
.oci-col--right .oci-sub-row { text-align: left; }
.oci-sub-row.oci-lit {
  background: var(--oci-lit-bg);
  color: var(--oci-lit-text);
  font-weight: 600;
  border-bottom-color: rgba(0, 91, 190, 0.15);
}

/* ─── Leyenda ─── */
.oci-legend {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--oci-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--oci-font);
}
.oci-legend-blocs {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.oci-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--oci-muted);
}
.oci-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.oci-legend-active {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--oci-muted);
}
.oci-lit-box {
  display: inline-block;
  width: 15px;
  height: 15px;
  background: var(--oci-lit-bg);
  border: 1px solid var(--oci-lit-border);
  border-radius: 3px;
  flex-shrink: 0;
}
.oci-legend-src {
  font-size: 11px;
  color: var(--oci-faint);
}

/* ─── Responsive visualizador ─── */
@media (max-width: 1024px) {
  .oci-layout          { grid-template-columns: 1fr 200px 1fr; gap: 0 16px; }
  .oci-area-label      { min-width: 100px; max-width: 100px; font-size: 10.5px; }
  .oci-sub-row         { font-size: 11px; }
}

@media (max-width: 860px) {
  .oci-layout          { grid-template-columns: 1fr; }
  .oci-col--center     { position: static; margin-bottom: 1.5rem; }
  .oci-groups          { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .oci-group-section   { flex-direction: row; flex-wrap: wrap; justify-content: center; border-top: none; padding: 4px 0; }
  .oci-group-btn       { width: auto; }
  .oci-sub-row         { white-space: normal; font-size: 12px; }
  .oci-area-label      { min-width: 90px; max-width: 90px; font-size: 10px; }
}


/* ─── Responsive ─── */
@media (max-width: 900px) {
  .ocde-hero { padding: calc(140px + 2rem) 1.5rem 3rem; }
  .ocde-section { padding: 3rem 1.5rem 4rem; }
  .ocde-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

@media (max-width: 520px) {
  .ocde-hero { padding: calc(120px + 1.5rem) 1rem 2.5rem; }
  .ocde-section { padding: 2rem 1rem 3rem; }
  .ocde-card-top { padding: 1.5rem 1.5rem 1.25rem; }
  .ocde-card-body { padding: 1.25rem 1.5rem; }
  .ocde-hero-chips { gap: 0.4rem; }
  .ocde-chip { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
}
