/* ============================================================
   DINERO CON CABEZA — Hoja de estilos principal
   Versión: 1.0
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:        #0f2744;
  --navy-dark:   #091c33;
  --blue:        #1d4ed8;
  --blue-hover:  #1e40af;
  --blue-light:  #eff6ff;
  --green:       #15803d;
  --green-hover: #166534;
  --green-light: #f0fdf4;
  --amber:       #b45309;
  --amber-light: #fffbeb;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --container: 1200px;
  --container-text: 760px;
}

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--gray-50);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4rem; }

h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  margin-bottom: 0.5em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

/* ── Utility ────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--narrow {
  max-width: var(--container-text);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.text-muted  { color: var(--gray-500); }
.text-small  { font-size: 0.875rem; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-hover); color: var(--white); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--gray-300);
}
.btn-secondary:hover { border-color: var(--navy); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-dark); color: var(--white); }

.btn-lg { padding: 0.85rem 1.9rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.825rem; }
.ver-mas-btn { display: block; margin-left: auto; margin-right: auto; }

/* ── Labels / Badges ────────────────────────────────────────── */
.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  color: var(--blue);
}
.label--green  { background: var(--green-light); color: var(--green); }
.label--amber  { background: var(--amber-light); color: var(--amber); }
.label--gray   { background: var(--gray-100);    color: var(--gray-600); }
.label--indigo { background: #e0e7ff;            color: #4338ca; }

/* ── Section layout ─────────────────────────────────────────── */
.section      { padding: 4rem 0; }
.section--sm  { padding: 2.5rem 0; }
.section--lg  { padding: 5.5rem 0; }
.section--alt { background: var(--white); }
.section--dark {
  background: var(--navy);
  color: var(--white);
}
.section--dark h2,
.section--dark h3,
.section--dark p { color: var(--white); }

.section-header {
  margin-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.section-header h2 { margin-bottom: 0.25rem; }
.section-kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.4rem;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
section[id] { scroll-margin-top: 5rem; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  max-width: var(--container);
  margin: 0 auto;
}
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-decoration: none;
}
.logo-main {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
}
.logo-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-logo:hover { text-decoration: none; }

/* ── Nav ────────────────────────────────────────────────────── */
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.nav-cta {
  margin-left: 0.5rem;
  background: var(--green) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--green-hover) !important; }

/* ── Dropdown Herramientas ──────────────────────────────────── */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.dropdown-arrow { font-size: 0.7rem; transition: transform 0.2s; display: inline-block; }
.nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 230px;
  background: var(--navy-dark);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  padding: 0.4rem;
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; flex-direction: column; }

.nav-dropdown-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active { color: var(--white); background: rgba(255,255,255,0.1); }

/* ── Mobile menu toggle ─────────────────────────────────────── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1a3f6f 100%);
  color: var(--white);
  padding: 5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  position: relative;
  max-width: 700px;
}
.hero-kicker {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  line-height: 1.18;
  margin-bottom: 1rem;
  font-weight: 800;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 540px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  display: block;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  display: block;
}

/* ── Ad units ───────────────────────────────────────────────── */
.ad-unit {
  background: var(--gray-100);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--gray-400);
  text-align: center;
  overflow: hidden;
}
.ad-unit--banner { width: 100%; min-height: 90px; margin: 1.5rem 0; }
.ad-unit--rect   { width: 100%; min-height: 250px; }
.ad-unit--wide   { width: 100%; min-height: 120px; margin: 2rem 0; }

/* ── Grid layouts ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── Category cards ─────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
  color: inherit;
}
.cat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}
.cat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.cat-card h3 { font-size: 1.05rem; color: var(--gray-900); margin-bottom: 0; }
.cat-card p  { font-size: 0.875rem; color: var(--gray-500); margin-bottom: 0; line-height: 1.5; }
.cat-card-count {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 600;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-100);
}

/* Color variants for category icons */
.icon-blue   { background: #dbeafe; }
.icon-green  { background: #dcfce7; }
.icon-amber  { background: #fef3c7; }
.icon-purple { background: #ede9fe; }
.icon-rose   { background: #ffe4e6; }
.icon-teal   { background: #ccfbf1; }

/* ── Article cards ──────────────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  cursor: pointer;
}
.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.article-card-img {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3f6f 100%);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.4);
  overflow: hidden;
}
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; gap: 0.5rem; }
.article-card-body .label { align-self: flex-start; }
.article-card-body h3 { font-size: 1rem; color: var(--gray-900); line-height: 1.35; margin: 0; }
.article-card-body h3 a { color: inherit; text-decoration: none; }
.article-card-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.article-card-body h3 a:hover { color: var(--blue); }
.article-card-body p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.55; margin: 0; flex: 1; }
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.775rem;
  color: var(--gray-400);
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}
.article-card-meta span { display: flex; align-items: center; gap: 0.25rem; }

/* Article card — horizontal variant */
.article-card--horiz {
  flex-direction: row;
  align-items: stretch;
  min-height: 100px;
}
.article-card--horiz .article-card-img {
  width: 120px;
  min-width: 120px;
  height: auto;
  font-size: 1.75rem;
  border-radius: 0;
}
.article-card--horiz .article-card-body { padding: 1rem 1.25rem; }
.article-card--horiz h3 { font-size: 0.9rem; }

/* ── Page layout with sidebar ───────────────────────────────── */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.sidebar-widget h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ── Newsletter ─────────────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 100%);
  padding: 4rem 0;
  color: var(--white);
}
.newsletter-inner {
  max-width: 560px;
  text-align: center;
  margin: 0 auto;
}
.newsletter-inner h2 { color: var(--white); font-size: 1.75rem; margin-bottom: 0.5rem; }
.newsletter-inner p  { color: rgba(255,255,255,0.7); margin-bottom: 1.75rem; }
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  background: rgba(255,255,255,0.12);
  color: var(--white);
  outline: none;
  transition: background 0.15s;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.45); }
.newsletter-form input[type="email"]:focus { background: rgba(255,255,255,0.2); }
.newsletter-note {
  font-size: 0.77rem;
  color: rgba(255,255,255,0.45);
  margin-top: 1rem;
}

/* ── Disclaimer banner ──────────────────────────────────────── */
.disclaimer {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.disclaimer-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.disclaimer p {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.55;
  margin: 0;
}
.disclaimer p strong { color: var(--gray-900); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-field-error {
  display: none;
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
  margin-top: 0.25rem;
}
.form-field-error.visible { display: block; }
.form-group input.input-error,
.form-group textarea.input-error,
.form-group select.input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.form-help {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
}

/* ── Article / prose ────────────────────────────────────────── */
.prose h2 { margin-top: 2.25rem; margin-bottom: 0.75rem; }
.prose h3 { margin-top: 1.75rem; margin-bottom: 0.5rem; }
.prose ul, .prose ol { margin: 1rem 0 1.1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose blockquote {
  border-left: 4px solid var(--blue);
  padding: 0.75rem 1.25rem;
  background: var(--blue-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gray-700);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.prose th { background: var(--gray-100); font-weight: 700; text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--gray-300); }
.prose td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--gray-200); }
.prose tr:last-child td { border-bottom: none; }

.tip-box {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.tip-box strong { color: var(--green); }

.article-header { margin-bottom: 2rem; }
.article-header .label { margin-bottom: 0.75rem; }
.article-header h1 { margin-bottom: 0.75rem; }

/* ── Article hero image ─────────────────────────────────────── */
.article-hero-img {
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  background: var(--navy);
}
.article-hero-img img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
  object-fit: cover;
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--gray-500);
  padding: 0.75rem 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin: 0.75rem 0 2rem;
}

.toc {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); margin-bottom: 0.75rem; }
.toc ol { padding-left: 1.2rem; }
.toc li { margin-bottom: 0.3rem; font-size: 0.875rem; }
.toc a { color: var(--blue); }

/* ── Related articles ───────────────────────────────────────── */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}
.related-articles h3 { margin-bottom: 1.25rem; font-size: 1.1rem; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--gray-400);
  padding: 1rem 0;
}
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--gray-300); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.65);
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-about .logo-main { color: var(--white); font-size: 1rem; }
.footer-about p { font-size: 0.85rem; line-height: 1.7; margin-top: 0.75rem; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom p, .footer-bottom a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ── Cookie banner ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gray-900);
  color: var(--white);
  z-index: 9999;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 250px; }
.cookie-text p { font-size: 0.85rem; color: rgba(255,255,255,0.75); margin: 0; line-height: 1.55; }
.cookie-text a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-actions .btn { font-size: 0.82rem; padding: 0.5rem 1rem; }
.btn-cookie-accept { background: var(--green); color: var(--white); }
.btn-cookie-reject { background: transparent; color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.25); }
.btn-cookie-reject:hover { background: rgba(255,255,255,0.08); color: var(--white); }

/* ── Page hero (inner pages) ─────────────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 3rem 0 2.5rem;
  color: var(--white);
}
.page-hero h1 { color: var(--white); font-size: clamp(1.6rem, 4vw, 2.25rem); margin-bottom: 0.5rem; }
.page-hero p  { color: rgba(255,255,255,0.7); font-size: 1rem; margin: 0; max-width: 540px; }

/* ── Blog filter tags ───────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
}
.filter-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-300);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.filter-tag:hover, .filter-tag.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-top: 3rem;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.15s;
}
.page-btn:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.page-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ── Legal pages ────────────────────────────────────────────── */
.legal-content h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal-content h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal-content p, .legal-content li { font-size: 0.9rem; }
.legal-content ul { margin: 0.75rem 0; }
.legal-content li { margin-bottom: 0.4rem; }

/* ── About page ─────────────────────────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.value-card .icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.value-card h3 { font-size: 1rem; }
.value-card p  { font-size: 0.875rem; color: var(--gray-500); }

/* ── Prose: tablas responsivas (artículos del blog) ─────────── */
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; flex-direction: column; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 1rem;
    gap: 0.15rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.65rem 1rem; border-radius: var(--radius); width: 100%; }
  .nav-cta { margin-left: 0; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    margin-top: 0.15rem;
    padding: 0.25rem 0.5rem;
  }
  .nav-dropdown-menu a { padding: 0.55rem 1rem; }

  .hero { padding: 3rem 0 3rem; }
  .hero-stats { gap: 1.5rem; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
  .article-card--horiz { flex-direction: column; }
  .article-card--horiz .article-card-img { width: 100%; height: 140px; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .sidebar { grid-template-columns: 1fr; }
  .section { padding: 2.75rem 0; }

  .newsletter-form { flex-direction: column; }
  .newsletter-form input[type="email"] { width: 100%; }

  /* Sidebar layout — sidebar pasa debajo del contenido principal */
  .layout-with-sidebar {
    display: flex;
    flex-direction: column;
  }
  .layout-with-sidebar .sidebar { order: 2; }

  /* H2 mínimo legible en móvil (clamp mínimo era 1.4rem) */
  h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }

  /* Botones CTA globales: ancho completo en móvil pequeño */
  .btn { width: 100%; justify-content: center; }
}

/* ── Tool banners (shortcodes) ──────────────────────────────── */
.tool-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-width: 1px;
  border-style: solid;
}

.tool-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(0,0,0,0.06);
}

.tool-banner__body {
  flex: 1;
  min-width: 200px;
}

.tool-banner__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--navy-dark);
  line-height: 1.4;
}

.tool-banner__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.tool-banner__cta {
  display: inline-block;
  white-space: nowrap;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.tool-banner__cta:hover { opacity: 0.88; }

/* Variantes de color por herramienta */
.tool-banner--presupuesto {
  background: var(--green-light);
  border-color: #86efac;
}
.tool-banner--presupuesto .tool-banner__icon { color: var(--green); }
.tool-banner--presupuesto .tool-banner__cta  { background: var(--green); color: var(--white); }

.tool-banner--rentabilidad {
  background: var(--blue-light);
  border-color: #93c5fd;
}
.tool-banner--rentabilidad .tool-banner__icon { color: var(--blue); }
.tool-banner--rentabilidad .tool-banner__cta  { background: var(--blue); color: var(--white); }

.tool-banner--sueldo {
  background: var(--amber-light);
  border-color: #fcd34d;
}
.tool-banner--sueldo .tool-banner__icon { color: var(--amber); }
.tool-banner--sueldo .tool-banner__cta  { background: var(--amber); color: var(--white); }

.tool-banner--hipoteca {
  background: var(--blue-light);
  border-color: #93c5fd;
}
.tool-banner--hipoteca .tool-banner__icon { color: var(--blue); }
.tool-banner--hipoteca .tool-banner__cta  { background: var(--blue); color: var(--white); }

.tool-banner--fire {
  background: #fff7ed;
  border-color: #fdba74;
}
.tool-banner--fire .tool-banner__icon { color: #ea580c; }
.tool-banner--fire .tool-banner__cta  { background: #ea580c; color: var(--white); }

@media (max-width: 600px) {
  .tool-banner { flex-direction: column; align-items: flex-start; }
  .tool-banner__cta { width: 100%; text-align: center; }
}

/* ── House Ads (publicidad interna) ────────────────────────── */
.tdi-house-ad {
    display: block;
    text-decoration: none;
    color: var(--gray-900);
    border: 2px solid var(--blue);
    border-radius: var(--radius-lg);
    background-color: var(--gray-50);
    padding: 20px;
    margin: 25px 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    overflow: hidden;
}
.tdi-house-ad:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.tdi-house-ad h4 {
    color: var(--blue);
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}
.tdi-house-ad p {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
}
.tdi-house-ad .ad-btn {
    display: inline-block;
    background-color: var(--blue);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-xl);
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}
.tdi-house-ad:hover .ad-btn {
    background-color: var(--blue-hover);
}
.sidebar .tdi-house-ad { padding: 15px; margin: 15px 0; }
.sidebar .tdi-house-ad h4 { font-size: 1.1rem; }

/* Variante verde — Autónomos */
.tdi-house-ad--green {
    border-color: var(--green);
    background-color: var(--green-light);
}
.tdi-house-ad--green h4 { color: var(--green); }
.tdi-house-ad--green .ad-btn { background-color: var(--green); }
.tdi-house-ad--green:hover .ad-btn { background-color: var(--green-hover); }

/* Variante naranja — Presupuesto / Ahorro */
.tdi-house-ad--orange {
    border-color: var(--amber);
    background-color: var(--amber-light);
}
.tdi-house-ad--orange h4 { color: var(--amber); }
.tdi-house-ad--orange .ad-btn { background-color: var(--amber); }
.tdi-house-ad--orange:hover .ad-btn { background-color: #92400e; }

/* Variante morada — IRPF */
.tdi-house-ad--purple {
    border-color: #7c3aed;
    background-color: #ede9fe;
}
.tdi-house-ad--purple h4 { color: #7c3aed; }
.tdi-house-ad--purple .ad-btn { background-color: #7c3aed; }
.tdi-house-ad--purple:hover .ad-btn { background-color: #5b21b6; }

/* Variante teal — Libertad Financiera / FIRE */
.tdi-house-ad--teal {
    border-color: #0d9488;
    background-color: #ccfbf1;
}
.tdi-house-ad--teal h4 { color: #0d9488; }
.tdi-house-ad--teal .ad-btn { background-color: #0d9488; }
.tdi-house-ad--teal:hover .ad-btn { background-color: #0f766e; }

/* ── Ad Carousel ─────────────────────────────────────────── */
.tdi-ad-carousel {
    position: relative;
    margin: 25px 0;
    padding: 0 30px;   /* espacio para las flechas laterales */
}

.tdi-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--blue);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: var(--white);
    box-shadow: 0 3px 10px rgba(37,99,235,0.40);
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0;
}
.tdi-carousel-btn::before {
    content: '';
    display: block;
    width: 13px;
    height: 13px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
    border-radius: 1px;
}
.tdi-carousel-btn--prev::before { transform: rotate(-135deg) translate(-1px,  1px); }
.tdi-carousel-btn--next::before { transform: rotate(  45deg) translate(-1px, -1px); }
.tdi-carousel-btn:hover {
    background: var(--blue-hover);
    box-shadow: 0 5px 18px rgba(37,99,235,0.50);
    transform: translateY(calc(-50% - 2px));
}
.tdi-carousel-btn--prev { left: -6px; }
.tdi-carousel-btn--next { right: -6px; }

.tdi-carousel-slide        { display: none; }
.tdi-carousel-slide.active { display: block; animation: tdi-fade-in 0.45s ease; }
.tdi-carousel-slide .tdi-house-ad { margin: 0; }

@keyframes tdi-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

.tdi-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}
.tdi-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}
.tdi-carousel-dot.active {
    background: var(--blue);
    transform: scale(1.35);
}