/* ============================================================
   ECH — Centro de Pensamiento | Custom Styles
   Paleta: Azul Marino #1a2b3c | Dorado Mate #c9a84c
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Root variables ── */
:root {
  --navy:   #1a2b3c;
  --navy-light: #243650;
  --gold:   #c9a84c;
  --gold-light: #e0c06a;
  --cream:  #f5f3ef;
  --dark:   #111827;
  --muted:  #6b7280;
  --border: #e5e0d8;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  background-color: #ffffff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4, .font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── Header & Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: var(--navy);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.nav-logo-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  line-height: 1.2;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.35rem 0;
  position: relative;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Hamburger Menu ── */
#mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: none; /* oculto por defecto; solo visible en móvil */
  flex-direction: column;
  gap: 5px;
}

@media (max-width: 767px) {
  #mobile-menu-btn {
    display: flex;
  }
}

#mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s ease;
  transform-origin: center;
}

#mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
#mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-nav {
  display: none;
  background-color: var(--navy-light);
  border-top: 1px solid rgba(201,168,76,0.3);
}

#mobile-nav.open { display: block; }

#mobile-nav a {
  display: block;
  padding: 0.9rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

#mobile-nav a:hover,
#mobile-nav a.active {
  background-color: rgba(201,168,76,0.1);
  color: var(--gold);
}

/* ── Hero Sections ── */
.hero-overlay {
  background: linear-gradient(135deg, rgba(26,43,60,0.92) 0%, rgba(26,43,60,0.6) 100%);
}

.hero-pattern {
  background-color: var(--navy);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201,168,76,0.05) 0%, transparent 40%);
}

/* ── Metrics Band ── */
.metrics-band {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 100%);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
}

.metric-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
}

.metric-divider {
  width: 1px;
  height: 60px;
  background: rgba(201,168,76,0.3);
}

/* ── Section headings ── */
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.section-title-light {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.gold-bar {
  width: 50px;
  height: 3px;
  background-color: var(--gold);
}

/* ── Cards ── */
.article-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(26,43,60,0.12);
  border-color: var(--gold);
}

.article-card-top {
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
}

/* ── Format Badges ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-analisis    { background: #dbeafe; color: #1e40af; }
.badge-articulo    { background: #d1fae5; color: #065f46; }
.badge-entrevista  { background: #ede9fe; color: #5b21b6; }
.badge-podcast     { background: #ffedd5; color: #9a3412; }
.badge-video       { background: #fee2e2; color: #991b1b; }
.badge-galeria     { background: #fce7f3; color: #9d174d; }
.badge-experiencia { background: #fef9c3; color: #713f12; }
.badge-reportaje   { background: #ccfbf1; color: #134e4a; }
.badge-default     { background: #f3f4f6; color: #374151; }

/* ── Pillar Cards ── */
.pillar-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 4px;
  padding: 2rem 1.5rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.pillar-card:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

/* ── Service Cards ── */
.service-card {
  background: #ffffff;
  border-left: 4px solid var(--gold);
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  border-radius: 0 4px 4px 0;
}

.service-card:hover {
  box-shadow: 0 8px 30px rgba(26,43,60,0.12);
  transform: translateX(4px);
}

/* ── Quote / Pullquote ── */
.pullquote {
  border-left: 4px solid var(--gold);
  padding: 1.5rem 2rem;
  background: var(--cream);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--navy);
  position: relative;
}

/* ── CTA Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.25s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.25s ease;
  background: transparent;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--gold);
  color: var(--navy);
}

/* ── Form Inputs ── */
.form-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

/* ── Footer ── */
.site-footer {
  background-color: var(--navy);
  border-top: 3px solid var(--gold);
  color: rgba(255,255,255,0.7);
}

.footer-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--gold); }

/* ── Filter Tabs (Archivo) ── */
.filter-btn {
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  background: #fff;
  color: var(--muted);
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: var(--navy);
  background-image: radial-gradient(circle at 70% 50%, rgba(201,168,76,0.07) 0%, transparent 60%);
  padding: 5rem 0 4rem;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}

/* ── Timeline ── */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.25);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 22px;
  width: 1px;
  height: calc(100% - 22px);
  background: rgba(201,168,76,0.25);
}

.timeline-item:last-child::after { display: none; }

/* ── Stat boxes ── */
.stat-box {
  background: var(--cream);
  border-top: 3px solid var(--gold);
  padding: 1.75rem 1.5rem;
  text-align: center;
  border-radius: 3px;
}

.stat-box .number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  display: block;
}

.stat-box .label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 0.5rem;
  display: block;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-up-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ── Skeleton loading ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 3px;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive helpers ── */
@media (max-width: 768px) {
  .metric-number { font-size: 1.85rem; }
  .section-title, .section-title-light { font-size: 1.75rem; }
  .metric-divider { display: none; }

  /* Reducir paddings verticales en móvil */
  .page-hero { padding: 3rem 0 2.5rem; }

  /* Botones full-width en contenedores flex en móvil */
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }

  /* Pullquote más compacta */
  .pullquote { padding: 1rem 1.25rem; font-size: 1.05rem; }

  /* Service cards sin desplazamiento lateral */
  .service-card:hover { transform: none; }
}

@media (max-width: 480px) {
  .section-title, .section-title-light { font-size: 1.5rem; }
  .metric-number { font-size: 1.65rem; }
  .nav-logo-text { font-size: 1.25rem; }
  .nav-logo-sub { font-size: 0.55rem; letter-spacing: 0.08em; }

  /* Reducir padding interior de las tarjetas en pantallas muy pequeñas */
  .article-card > div { padding: 1rem; }

  /* Filter buttons más compactos */
  .filter-btn { padding: 0.35rem 0.8rem; font-size: 0.68rem; }
}
