:root {
  --bg-dark: #090b10;
  --bg-card: #10141d;
  --bg-card-hover: #151a26;
  --bg-paper: #0d1017;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-rule: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(245, 184, 0, 0.38);
  --gold: #f5b800;
  --gold-light: #fcd34d;
  --gold-dim: rgba(245, 184, 0, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --font-editorial: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: var(--font-editorial);
  --font-serif: var(--font-editorial);
  --font-mono: var(--font-editorial);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-editorial);
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header - Crisp white bar to honor the black typography of the official logo */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #0f172a;
  padding: 0.9rem 2.5rem;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 0.85rem;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0f172a;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-links a {
  text-decoration: none;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #b48600;
  border-bottom-color: var(--gold);
}

.nav-links a.nav-cta {
  background: #0f172a;
  color: #ffffff;
  padding: 0.5rem 1.05rem;
  border-radius: 6px;
  border-bottom: none;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-links a.nav-cta:hover {
  background: #1e293b;
  color: var(--gold);
  transform: translateY(-1px);
}

/* Main Container */
main {
  flex: 1;
}

.section-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Editorial Masthead Strip */
.masthead-strip {
  border-bottom: 1px solid var(--border-rule);
  background: rgba(13, 16, 23, 0.85);
  padding: 0.65rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.lang-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-light);
  font-weight: 600;
}

/* Language Column Badges */
.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.9rem;
}

.lang-badge.es {
  color: #090b10;
  background: var(--gold);
}

.lang-badge.en {
  color: var(--gold-light);
  background: rgba(245, 184, 0, 0.12);
  border: 1px solid var(--border-accent);
}

/* Newspaper Two-Column Layout Core */
.newspaper-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 2px solid var(--text-primary);
  border-bottom: 1px solid var(--border-rule);
  background: rgba(13, 16, 23, 0.75);
}

.newspaper-col {
  padding: 2.25rem 2.5rem;
}

.newspaper-col.col-es {
  border-right: 1px solid var(--border-rule);
}

.newspaper-col.col-en {
  background: rgba(255, 255, 255, 0.01);
}

/* Section: Nuestra Misión / Our Mission (Dedicated Page) */
.mission-section {
  padding: 3.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 80% 10%, rgba(245, 184, 0, 0.07), transparent 45%);
}

.section-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  display: block;
}

.mission-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
}

.mission-body {
  font-family: var(--font-serif);
  font-size: clamp(1.06rem, 1.3vw, 1.2rem);
  line-height: 1.75;
  color: var(--text-secondary);
  text-align: justify;
}

.mission-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Section: Metodología / Methodology */
.methodology-section {
  padding: 3.5rem 0 5rem;
}

.methodology-lead-box {
  margin-bottom: 2.25rem;
}

.methodology-col-title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.methodology-col-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.72;
  text-align: justify;
}

/* Three Layers Bilingual Rows */
.layers-stack {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.layer-bilingual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-rule);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.layer-bilingual-card:hover {
  border-color: var(--border-accent);
}

.layer-card-banner {
  background: rgba(245, 184, 0, 0.08);
  border-bottom: 1px solid var(--border-rule);
  padding: 0.6rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.layer-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.layer-pane {
  padding: 1.75rem 2.2rem;
}

.layer-pane.pane-es {
  border-right: 1px solid var(--border-rule);
}

.layer-pane h3 {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.layer-subtitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-light);
  display: block;
  margin-bottom: 0.9rem;
}

.layer-pane p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
}

.math-unit {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(245, 184, 0, 0.14);
  color: var(--gold-light);
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
}

/* Artículos de Análisis (Main Home Page - Newspaper Broadsheet Format) */
.articles-section {
  padding: 2.75rem 0 5.5rem;
}

.articles-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 3px double var(--border-rule);
}

.articles-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.articles-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

.articles-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.42rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-rule);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active,
.filter-pill:hover {
  border-color: var(--gold);
  color: #090b10;
  background: var(--gold);
  font-weight: 600;
}

/* Newspaper Article Sheet */
.newspaper-article {
  background: var(--bg-paper);
  border: 1px solid var(--border-rule);
  border-top: 4px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.article-dateline-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 2.5rem;
  border-bottom: 1px solid var(--border-rule);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.article-dateline-bar .edition-tag {
  color: var(--gold);
  font-weight: 700;
}

.article-columns-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--text-primary);
  background: rgba(245, 184, 0, 0.05);
}

.article-columns-header div {
  padding: 0.65rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.article-columns-header div:first-child {
  border-right: 1px solid var(--border-rule);
}

/* Synchronized Newspaper Rows (Headline, Deck, Body Paragraphs, Tables) */
.article-bilingual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.article-bilingual-row:last-child {
  border-bottom: none;
}

.article-cell {
  padding: 2rem 2.5rem;
  min-width: 0;
}

.article-cell.cell-es {
  border-right: 1px solid var(--border-rule);
}

.article-cell.cell-en {
  background: rgba(255, 255, 255, 0.008);
}

.article-cell h3.article-main-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
}

.article-cell .article-deck {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.06rem;
  color: var(--gold-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border-rule);
}

.article-cell h4.article-subhead {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(245, 184, 0, 0.28);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-cell h5.article-sub-subhead {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--gold-light);
  margin: 1.35rem 0 0.75rem;
}

.article-cell h5.article-sub-subhead:first-of-type {
  margin-top: 0.5rem;
}

.article-currency-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--gold);
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.25rem;
}

.article-sidebar-box {
  margin: 1.35rem 0 0.5rem;
  padding: 1.15rem 1.35rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
}

.article-sidebar-box p {
  font-size: 0.94rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.article-sidebar-box .article-list {
  margin: 0.65rem 0;
}

.article-sidebar-box .article-list li {
  font-size: 0.92rem;
}

.articles-stack {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.article-cell p {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-secondary);
  text-align: justify;
  margin-bottom: 1rem;
}

.article-cell p:last-child {
  margin-bottom: 0;
}

.article-cell strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* White Underlined Links inside Articles (High Contrast on Dark Background) */
.article-cell a,
.article-cell a:link,
.article-cell a:visited,
.article-cell a:active {
  color: #ffffff !important;
  text-decoration: underline !important;
  text-decoration-color: #ffffff !important;
  text-decoration-thickness: 1.5px !important;
  text-underline-offset: 3px !important;
  font-weight: 600;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.article-cell a:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.14);
  text-decoration: underline !important;
  text-decoration-color: #ffffff !important;
}

.dropcap::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 3.2rem;
  line-height: 0.84;
  padding-top: 0.14rem;
  padding-right: 0.55rem;
  padding-bottom: 0.1rem;
  color: var(--gold);
  font-weight: 700;
}

/* Lists in Newspaper Columns */
.article-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 0.85rem 0 1.15rem;
}

.article-list li {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.72;
  color: var(--text-secondary);
  text-align: justify;
  padding-left: 1.1rem;
  border-left: 2px solid rgba(245, 184, 0, 0.45);
}

.article-list li strong {
  color: var(--text-primary);
}

/* Financial & Parametric Newspaper Tables — Smaller Font & Framed in Solid White Grid */
.table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  background: #090b10;
}

.newspaper-table {
  width: 100%;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  font-family: var(--font-sans);
  font-size: 0.72rem !important;
  line-height: 1.35;
  border: 1px solid #ffffff !important;
}

.newspaper-table thead {
  background: rgba(255, 255, 255, 0.12);
}

.newspaper-table th {
  font-family: var(--font-mono);
  font-size: 0.67rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff !important;
  padding: 0.4rem 0.55rem !important;
  text-align: left;
  border: 1px solid #ffffff !important;
}

.newspaper-table td {
  padding: 0.38rem 0.55rem !important;
  border: 1px solid #ffffff !important;
  color: var(--text-primary);
  vertical-align: middle;
}

.newspaper-table th.num,
.newspaper-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.71rem !important;
  white-space: nowrap;
}

.newspaper-table td.neg {
  color: #fca5a5;
}

.newspaper-table tr.total-row td {
  background: rgba(245, 184, 0, 0.16);
  border: 1px solid #ffffff !important;
  color: #ffffff;
  font-weight: 700;
}

.newspaper-table tr.total-row td.num {
  color: var(--gold-light);
}

/* End-of-article Footnote Box */
.article-footnote {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: rgba(245, 184, 0, 0.05);
  border: 1px solid var(--border-rule);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Services & Direct Contact Section on Mission Page */
.services-contact-section {
  padding: 0 0 5rem;
}

.services-cta-box {
  border-top: 3px solid var(--gold);
  background: linear-gradient(145deg, rgba(18, 23, 34, 0.96), rgba(11, 14, 21, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.service-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.25rem 0 1.75rem;
}

.service-bullets li {
  font-size: 0.94rem;
  color: var(--text-secondary);
  padding-left: 1.1rem;
  border-left: 2px solid var(--gold);
  line-height: 1.55;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--gold);
  color: #090b10 !important;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none !important;
  padding: 0.85rem 1.4rem;
  border-radius: 6px;
  border: 1px solid var(--gold-light);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(245, 184, 0, 0.25);
}

.whatsapp-number-note {
  display: block;
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: #06070a;
  border-top: 1px solid var(--border-rule);
  padding: 3.5rem 2rem 2.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 520px;
}

.footer-logo-pill {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  width: fit-content;
}

.footer-logo-pill img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-tagline {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 960px) {
  .newspaper-two-col,
  .layer-two-col,
  .article-bilingual-row,
  .article-columns-header {
    grid-template-columns: 1fr;
  }
  .newspaper-col.col-es,
  .layer-pane.pane-es,
  .article-cell.cell-es,
  .article-columns-header div:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-rule);
  }
  .newspaper-col,
  .layer-pane,
  .article-cell {
    padding: 1.65rem 1.4rem;
  }
  .article-dateline-bar {
    padding: 0.85rem 1.4rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.85rem 1.2rem;
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 0.6rem;
  }
  .nav-links a {
    font-size: 0.82rem;
  }
  .brand-badge {
    display: none;
  }
  .section-wrapper,
  .masthead-inner {
    padding: 0 1.1rem;
  }
}
