/* ==============================================
   SUSANA DEL CORRAL - PSICÓLOGA MADRID
   Editorial design system
   ============================================== */

:root {
  /* Palette */
  --cream: #F5F7F8;
  --cream-50: #F8FAFC;
  --cream-100: #EAF1F6;
  --cream-200: #D9E5EE;
  --paper: #FFFFFF;
  --ink: #203644;
  --ink-700: #3C505C;
  --ink-500: #526875;
  --ink-400: #596D79;
  --ink-300: #8A9AA4;
  --line: #D4E0E7;
  --line-soft: #E8EEF2;

  /* The accent names are retained for compatibility with existing pages. */
  --terra: #356C92;
  --terra-soft: #ADCFE7;
  --terra-50: #EAF3F9;
  --sage: #51829C;
  --sage-dark: #356C92;
  --sage-light: #BBD4E4;
  --gold: #84B4D5;

  /* Type */
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter Tight", "Inter", -apple-system, sans-serif;

  /* Shadows */
  --sh-soft: 0 1px 2px rgba(28,27,23,.04), 0 12px 32px -12px rgba(28,27,23,.10);
  --sh-warm: 0 30px 70px -25px rgba(32,54,68,.22);
  --sh-deep: 0 40px 80px -30px rgba(28,27,23,.50);

  /* Radii */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* Layout */
  --max: 1320px;
  --gutter: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--ink); color: var(--cream); }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-sm { max-width: 980px; margin: 0 auto; padding: 0 var(--gutter); }

/* ==============================================
   PROGRESS BAR
   ============================================== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--terra);
  z-index: 200;
  transition: width 0.1s linear;
  width: 0;
}

/* ==============================================
   TOPBAR
   ============================================== */
.topbar {
  background: var(--ink);
  color: var(--cream);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 10px 0;
  position: relative;
  z-index: 50;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.topbar a { color: var(--cream); transition: color 0.25s; }
.topbar a:hover { color: var(--terra-soft); }
.topbar .left { opacity: 0.85; display: flex; align-items: center; gap: 12px; }
.topbar .left::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--sage-light);
  border-radius: 50%;
  display: inline-block;
}
.topbar .phone {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.topbar .phone svg { width: 14px; height: 14px; }

/* ==============================================
   HEADER - MEGA MENU
   ============================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(28,27,23,0.12); }

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 340px;
  aspect-ratio: 1080 / 205;
  overflow: hidden;
}
.logo img {
  position: absolute;
  width: 129.6296%;
  max-width: none;
  height: auto;
  left: -14.8148%;
  top: -48.7805%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
}
.nav-item {
  position: relative;
}
.nav-dropdown-heading { display: flex; align-items: center; }
.nav-dropdown-heading .nav-link { padding-right: 6px; }
.submenu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-radius: 50%;
}
.submenu-toggle:hover { background: var(--cream-100); }
.submenu-toggle svg { width: 11px; transition: transform 0.2s; }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--ink-700);
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--ink);
  background: rgba(28,27,23,0.04);
}
.nav-link svg {
  width: 11px;
  height: 11px;
  transition: transform 0.25s;
}
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

.nav-cta {
  margin-left: 14px;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-cta:hover {
  background: var(--terra);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(53,108,146,0.5);
}

/* Megamenu */
.megamenu {
  position: absolute;
  top: 100%;
  right: 0;
  transform: translateY(-8px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  min-width: 580px;
  box-shadow: var(--sh-warm);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 110;
}
.nav-item.open .megamenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.megamenu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.megamenu-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.megamenu-section-title {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--terra);
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.02em;
}
.megamenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-700);
  transition: all 0.2s;
}
.megamenu a:hover {
  background: var(--cream-50);
  color: var(--ink);
  transform: translateX(2px);
}
.megamenu a::before {
  content: "→";
  font-size: 11px;
  color: var(--terra);
  opacity: 0;
  transition: opacity 0.2s;
}
.megamenu a:hover::before { opacity: 1; }

/* Mobile menu */
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  background: transparent;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: 0.3s;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  left: 0;
  transition: 0.3s;
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle.open span { background: transparent; }
.menu-toggle.open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* ==============================================
   TYPOGRAPHY UTILITIES
   ============================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terra);
  font-weight: 500;
  margin-bottom: 24px;
  font-family: var(--sans);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--terra);
}
.eyebrow.no-line::before { display: none; }
.eyebrow.center { justify-content: center; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--ink);
}
h1 { font-size: clamp(40px, 6.2vw, 84px); }
h2 { font-size: clamp(32px, 4.4vw, 54px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; line-height: 1.18; }
h4 { font-size: 20px; font-weight: 500; }

h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--sage-dark);
  font-weight: 400;
}
h1 .quill, h2 .quill {
  display: inline-block;
  width: 0.5em;
  height: 1px;
  background: var(--terra);
  vertical-align: middle;
  margin: 0 0.15em;
}

p { margin-bottom: 1em; color: var(--ink-700); }
p strong { color: var(--ink); font-weight: 600; }

article p { font-size: 17.5px; line-height: 1.75; }
article ul, article ol { margin: 1em 0 1.4em; padding-left: 0; list-style: none; }
article li {
  position: relative;
  padding: 8px 0 8px 32px;
  color: var(--ink-700);
  border-bottom: 1px dashed var(--line-soft);
}
article li:last-child { border-bottom: none; }
article li::before {
  content: "";
  position: absolute;
  left: 0; top: 18px;
  width: 18px;
  height: 1px;
  background: var(--terra);
}
article li strong { color: var(--ink); font-weight: 600; }
article ol { counter-reset: ol-counter; }
article ol li::before {
  content: counter(ol-counter, decimal-leading-zero);
  counter-increment: ol-counter;
  font-family: var(--serif);
  font-style: italic;
  color: var(--terra);
  background: none;
  width: auto;
  height: auto;
  top: 8px;
  font-size: 13px;
}

/* ==============================================
   BUTTONS
   ============================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 32px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--sans);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--terra);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(53,108,146,0.45);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--cream);
}
.btn-cream {
  background: var(--cream);
  color: var(--ink);
}
.btn-cream:hover { background: var(--terra); color: var(--cream); }
.btn-arrow { transition: transform 0.25s; font-size: 16px; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ==============================================
   PAGE HERO (internal pages)
   ============================================== */
.page-hero {
  position: relative;
  padding: 70px 0 60px;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(53,108,146,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(81,130,156,0.06) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-400);
  margin-bottom: 32px;
  margin-inline: auto;
  letter-spacing: 0.02em;
}
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--terra); }
.breadcrumb svg { width: 10px; height: 10px; opacity: 0.6; flex-shrink: 0; }
.breadcrumb .current { color: var(--ink); font-weight: 500; }

.page-hero h1 {
  margin-bottom: 22px;
  font-size: clamp(36px, 5.6vw, 72px);
}
.page-hero .lead {
  font-size: 18px;
  color: var(--ink-500);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.page-hero-image {
  margin-top: 50px;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 21/9;
  box-shadow: var(--sh-warm);
  position: relative;
}
.page-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-image--balanced {
  aspect-ratio: 2/1;
}

/* ==============================================
   ARTICLE LAYOUT (specialty pages)
   ============================================== */
.article-section {
  padding: 80px 0 100px;
  position: relative;
}
.article-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: flex-start;
}

.article-toc {
  position: sticky;
  top: 110px;
  font-size: 13.5px;
}
.article-toc-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--terra);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-toc-label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--terra);
  display: inline-block;
}
.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--line);
}
.article-toc li {
  margin: 0;
  padding: 0;
  border: none;
}
.article-toc li::before { display: none; }
.article-toc a {
  display: block;
  padding: 8px 0 8px 18px;
  color: var(--ink-500);
  margin-left: -1px;
  border-left: 1px solid transparent;
  transition: all 0.2s;
  line-height: 1.4;
}
.article-toc a:hover,
.article-toc a.active {
  color: var(--ink);
  border-left-color: var(--terra);
}

.article-content {
  max-width: 760px;
}
.article-content > h2,
.article-content > h3 {
  margin: 60px 0 22px;
}
.article-content > h2:first-child,
.article-content > h3:first-child { margin-top: 0; }
.article-content > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 5.4em;
  line-height: 0.85;
  float: left;
  margin: 0.05em 0.12em 0 0;
  color: var(--terra);
  font-weight: 400;
  font-style: italic;
}
.article-content figure {
  margin: 50px 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.article-content figure img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Pull quote */
.pullquote {
  margin: 50px 0;
  padding: 36px 40px;
  border-left: 3px solid var(--terra);
  background: var(--cream-50);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  position: relative;
}
.pullquote::before {
  content: "\201C";
  position: absolute;
  top: 8px;
  left: 18px;
  font-size: 60px;
  color: var(--terra);
  line-height: 1;
  opacity: 0.4;
  font-style: normal;
}

/* ==============================================
   SUB CARDS GRID (hub pages)
   ============================================== */
.cards-section {
  padding: 80px 0 120px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cards-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.cards-grid.four-col { grid-template-columns: repeat(4, 1fr); }

.spec-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 0.4s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.spec-card:hover {
  transform: translateY(-6px);
  border-color: var(--terra-soft);
  box-shadow: var(--sh-warm);
}
.spec-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--cream-100);
  position: relative;
}
.spec-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.spec-card:hover .spec-card-image img { transform: scale(1.06); }
.spec-card-num {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--paper);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.02em;
  z-index: 2;
}
.spec-card-body {
  padding: 24px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spec-card h3 {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.spec-card-arrow {
  margin-top: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--terra);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.25s;
}
.spec-card:hover .spec-card-arrow { gap: 14px; }

/* ==============================================
   RELATED SECTION (article footer)
   ============================================== */
.related-section {
  padding: 80px 0 100px;
  background: var(--cream-50);
  border-top: 1px solid var(--line-soft);
}
.related-header {
  text-align: center;
  margin-bottom: 50px;
}
.related-header h2 { font-size: clamp(28px, 3.4vw, 42px); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--paper);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}
.related-card:hover {
  border-color: var(--terra);
  transform: translateX(4px);
}
.related-card-img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--cream-100);
}
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-text { flex: 1; }
.related-card-text h4 {
  font-size: 15px;
  font-weight: 500;
  font-family: var(--sans);
  margin-bottom: 2px;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.related-card-text span {
  font-size: 12px;
  color: var(--ink-400);
  letter-spacing: 0.02em;
}

/* ==============================================
   CTA BANNER (final)
   ============================================== */
.cta-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.cta-banner-inner {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px var(--gutter);
  background-color: var(--ink);
  background-image: radial-gradient(ellipse at 85% 10%, rgba(132,180,213,0.17), transparent 65%);
  color: var(--cream);
}
.cta-banner h2 {
  color: var(--cream);
  margin-bottom: 24px;
  max-width: 820px;
  font-size: clamp(36px, 5.4vw, 64px);
}
.cta-banner h2 em { color: var(--terra-soft); }
.cta-banner p {
  color: rgba(245,247,248,0.85);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 38px;
}
.cta-banner-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==============================================
   FOOTER
   ============================================== */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 90px var(--gutter) 36px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: -150px; right: -150px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53,108,146,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(245,247,248,0.12);
}
.footer-brand h4 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 300;
  margin-bottom: 16px;
  color: var(--cream);
  letter-spacing: -0.018em;
}
.footer-brand h4 em { font-style: italic; color: var(--terra-soft); }
.footer-brand p {
  color: rgba(245,247,248,0.7);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 22px;
  max-width: 360px;
}
.footer-brand .credentials {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--terra-soft);
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border: 1px solid rgba(173,207,231,0.35);
  border-radius: 999px;
}
.footer-col h5 {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terra-soft);
  margin-bottom: 24px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; }
.footer-col a {
  font-size: 14px;
  color: rgba(245,247,248,0.78);
  transition: all 0.25s;
  display: inline-block;
}
.footer-col a:hover {
  color: var(--terra-soft);
  transform: translateX(3px);
}
.footer-bottom {
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(245,247,248,0.7);
}

/* ==============================================
   SCROLL ANIMATIONS
   ============================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================================
   HOMEPAGE-SPECIFIC
   ============================================== */
.hero-home {
  position: relative;
  padding: 64px 0 90px;
  overflow: hidden;
}
.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 85% 35%, rgba(99,159,199,0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}


.hero-home-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

h1.hero-home-title {
  margin-bottom: 26px;
  font-size: clamp(40px, 4.6vw, 66px);
}
.hero-home-lead {
  font-size: 18.5px;
  line-height: 1.65;
  color: var(--ink-500);
  margin-bottom: 18px;
  max-width: 540px;
}
.hero-home-note { color: var(--ink-500); font-size: 15px; }

.hero-meta {
  display: flex;
  gap: 32px;
  margin: 38px 0 40px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-item { flex: 1; }
.meta-num {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  color: var(--terra);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
  font-feature-settings: "ss01";
}
.meta-lbl {
  font-size: 12.5px;
  color: var(--ink-400);
  letter-spacing: 0.04em;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-portrait { position: relative; }
.portrait-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-warm);
  background: var(--cream-100);
  aspect-ratio: 4/4.8;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}
.hero-portrait::before {
  content: "";
  position: absolute;
  top: -22px; right: -22px;
  width: 130px;
  height: 130px;
  border: 1px solid var(--terra);
  border-radius: 50%;
  z-index: -1;
}
.hero-portrait::after {
  content: "DESDE 1998";
  position: absolute;
  bottom: 30px;
  right: -18px;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 500;
  font-family: var(--sans);
}
.hero-badge {
  position: absolute;
  bottom: -28px;
  left: -28px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px 24px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--sh-soft);
}
.hero-badge-dot {
  width: 10px; height: 10px;
  background: var(--sage);
  border-radius: 50%;
  position: relative;
}

.hero-badge-text { font-size: 12.5px; line-height: 1.3; }
.hero-badge-text strong { display: block; color: var(--ink); font-weight: 600; }
.hero-badge-text span { color: var(--ink-400); }

/* Intro section (sobre mi) */
.intro {
  background: var(--paper);
  padding: 100px 0;
  position: relative;
}
.intro-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.intro-text p { color: var(--ink-700); font-size: 17px; }
.intro-image {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-warm);
}

.intro-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 62%; }

/* Story blocks (alternating) */
.story-section { padding: 100px 0; }
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
  margin-bottom: 60px;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}
.story-block:last-child { margin-bottom: 0; }
.story-block.reverse { direction: rtl; }
.story-block.reverse > * { direction: ltr; }
.story-block .story-content p strong { color: var(--ink); }
.story-image {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--cream-100);
  box-shadow: var(--sh-soft);
}
.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.story-image:hover img { transform: scale(1.04); }
.num-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--terra);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  display: block;
}

/* Features section (6-card grid) */
.features-section {
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
  padding: 110px 0;
}
.features-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 70px;
  padding: 0 var(--gutter);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-warm);
  border-color: var(--terra-soft);
}
.feature-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--cream-100);
}
.feature-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.feature-card:hover .feature-card-image img { transform: scale(1.06); }
.feature-card-body {
  padding: 26px 28px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.feature-card h3 {
  font-size: 22px;
  margin-bottom: 14px;
  font-weight: 400;
}
.feature-card p {
  font-size: 14.5px;
  line-height: 1.65;
  flex: 1;
}

/* Dual section (duracion / precio) */
.dual-section {
  background: var(--paper);
  padding: 100px 0;
}
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.dual-card {
  background: var(--cream);
  border-radius: var(--r-lg);
  padding: 50px 45px;
  position: relative;
  overflow: hidden;
}
.dual-card.dark { background: var(--ink); color: var(--cream); }
.dual-card.dark h3 { color: var(--cream); }
.dual-card.dark p { color: rgba(245,247,248,0.85); }
.dual-card.dark p strong { color: var(--cream); }
.dual-card.dark .num-tag { color: var(--terra-soft); }
.dual-card .deco {
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(53,108,146,0.08);
}
.dual-card.dark .deco { background: rgba(132,180,213,0.15); }
.dual-card h3 {
  font-size: 30px;
  margin-bottom: 18px;
  position: relative;
  font-weight: 400;
}
.dual-card p { font-size: 15.5px; line-height: 1.7; position: relative; }

/* Testimonials */
.testimonials {
  background: var(--ink);
  color: var(--cream);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: "";
  position: absolute;
  top: -100px; left: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132,180,213,0.10) 0%, transparent 70%);
}
.testimonials::after {
  content: "";
  position: absolute;
  bottom: -100px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53,108,146,0.10) 0%, transparent 70%);
}
.testimonials-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 60px;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}
.testimonials-header h2 { color: var(--cream); }
.testimonials-header h2 em { color: var(--terra-soft); }
.testimonials-header p { color: rgba(245,247,248,0.7); font-size: 17px; }
.google-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  background: rgba(245,247,248,0.06);
  border: 1px solid rgba(245,247,248,0.15);
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 22px;
}
.stars { color: #FBBC04; letter-spacing: 1.5px; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}
.testimonial {
  background: rgba(245,247,248,0.04);
  border: 1px solid rgba(245,247,248,0.10);
  border-radius: var(--r-lg);
  padding: 30px 28px;
  transition: all 0.3s;
}
.testimonial:hover {
  background: rgba(245,247,248,0.07);
  transform: translateY(-4px);
  border-color: rgba(132,180,213,0.4);
}
.testimonial-quote {
  font-family: var(--serif);
  font-size: 38px;
  color: var(--terra-soft);
  line-height: 0;
  position: relative;
  top: 18px;
  font-style: italic;
}
.testimonial-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(245,247,248,0.88);
  margin-bottom: 22px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(245,247,248,0.10);
}
.testimonial-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--cream);
}
.testimonial-stars { color: #FBBC04; font-size: 12px; letter-spacing: 1px; }

.testimonials-cta {
  text-align: center;
  margin-top: 50px;
  position: relative;
  z-index: 1;
}
.testimonials-cta a {
  color: var(--terra-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  border-bottom: 1px solid var(--terra-soft);
  padding-bottom: 4px;
  transition: all 0.25s;
}
.testimonials-cta a:hover { color: var(--cream); border-color: var(--cream); }

/* Location section */
.location {
  background: var(--paper);
  padding: 110px 0;
}
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 70px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.location-image {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--sh-warm);
}
.location-image img { width: 100%; height: 100%; object-fit: cover; }
.location h2 { margin-bottom: 24px; }
.location-modes { display: grid; gap: 20px; margin-top: 36px; }
.location-mode {
  display: flex;
  gap: 22px;
  padding: 26px;
  background: var(--cream);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  transition: all 0.3s;
}
.location-mode:hover { border-color: var(--terra); transform: translateX(4px); }
.location-mode-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: var(--terra);
  color: var(--cream);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 22px;
}
.location-mode.online .location-mode-icon { background: var(--sage); }
.location-mode-content h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.location-mode-content p { font-size: 14.5px; margin: 0; }
.location-mode-content a {
  color: var(--terra);
  border-bottom: 1px solid var(--terra);
  font-weight: 500;
}

/* ==============================================
   CONTACT PAGE
   ============================================== */
.contact-section {
  padding: 80px 0 100px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  align-items: start;
}
.contact-info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 42px 40px;
  position: relative;
  overflow: hidden;
}
.contact-info-card .deco {
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(53,108,146,0.08);
}
.contact-method {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.contact-method:last-child { border-bottom: none; }
.contact-method-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.contact-method-icon svg { width: 20px; height: 20px; color: var(--terra); }
.contact-method-content h4 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-400);
  font-weight: 500;
  margin-bottom: 6px;
}
.contact-method-content a, .contact-method-content p {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}
.contact-method-content a:hover { color: var(--terra); }
.contact-method-content .meta { font-size: 13px; color: var(--ink-500); margin-top: 4px; font-family: var(--sans); }

.contact-image {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--sh-warm);
}
.contact-image img { width: 100%; height: 100%; object-fit: cover; }

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1100px) {
  .article-grid { grid-template-columns: 1fr; gap: 50px; }
  .article-toc { position: static; }
  .megamenu { min-width: 530px; }
}

@media (max-width: 968px) {
  body { font-size: 15.5px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 20px 24px; gap: 4px; border-top: 1px solid var(--line); box-shadow: var(--sh-soft); align-items: stretch; max-height: 80vh; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav-link, .nav-cta { width: 100%; justify-content: flex-start; padding: 14px 18px; }
  .nav-cta { margin-left: 0; margin-top: 10px; }
  .megamenu { position: static; opacity: 1; pointer-events: auto; transform: none; min-width: 0; box-shadow: none; padding: 8px 0 8px 28px; border: none; background: transparent; border-left: 2px solid var(--line); border-radius: 0; margin-left: 18px; display: none; }
  .nav-item.open .megamenu { display: block; }
  .megamenu-grid { grid-template-columns: 1fr !important; }
  .menu-toggle { display: flex; }

  .hero-home { padding: 50px 0 80px; }
  .hero-home::after { display: none; }
  .hero-home-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-portrait { max-width: 420px; margin: 0 auto; }

  .intro-inner, .story-block, .location-grid, .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 50px !important;
  }
  .story-block.reverse { direction: ltr; }

  .features-grid, .testimonials-grid, .related-grid, .cards-grid, .cards-grid.two-col, .cards-grid.four-col {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .dual-grid { grid-template-columns: 1fr; gap: 28px; }
  .dual-card { padding: 38px 28px; }

  .testimonials, .features-section, .dual-section, .location, .intro, .story-section, .cards-section, .article-section, .contact-section, .related-section { padding: 70px 0; }

  .topbar-inner { font-size: 11.5px; padding: 0 24px; gap: 12px; }
  .topbar .left { display: none; }
  .topbar-inner { justify-content: center; }
  .header-inner { padding: 14px 24px; }
  .container, .container-sm { padding: 0 24px; }

  .hero-meta { gap: 20px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; justify-content: center; padding: 16px 24px; }

  .footer { padding: 70px 24px 30px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; padding-bottom: 40px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  .cta-banner-inner { padding: 80px 24px; min-height: 420px; background-attachment: scroll; }
  .page-hero { padding: 50px 0 40px; }
  .page-hero-image { aspect-ratio: 16/9; }

  .pullquote { padding: 28px 28px; font-size: 18px; }
  .article-content > p:first-of-type::first-letter { font-size: 4.4em; }
}

@media (max-width: 540px) {
  :root { --gutter: 20px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .hero-portrait::after { display: none; }
  .hero-portrait::before { display: none; }
  .hero-badge { left: 50%; transform: translateX(-50%); bottom: -25px; }
  .hero-meta { gap: 12px; margin: 24px 0 28px; padding: 18px 0; }
  .meta-lbl { font-size: 11px; letter-spacing: 0; }
  .meta-num { font-size: 26px; }
  .intro-image::after { right: 10px; top: -16px; font-size: 12px; padding: 10px 16px; }
  .pullquote { margin: 30px -8px; padding: 24px 22px; font-size: 16.5px; }
  .article-content figure { margin: 30px 0; border-radius: var(--r-md); }
  .contact-info-card { padding: 32px 26px; }
  .contact-method-content a, .contact-method-content p { font-size: 18px; }
  h2 { font-size: 30px; }
}


/* Brand, contact and accessibility */
.skip-link { position: fixed; left: 16px; top: 12px; padding: 12px 20px; background: var(--ink); color: white; border-radius: var(--r-sm); z-index: 250; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 4px; }
.topbar :focus-visible, .footer :focus-visible, .testimonials :focus-visible, .cta-banner :focus-visible, .dual-card.dark :focus-visible { outline-color: var(--terra-soft); }
.header:not(.navigation-ready) .submenu-toggle { display: none; }
.header:not(.navigation-ready) .nav-item:hover .megamenu,
.header:not(.navigation-ready) .nav-item:focus-within .megamenu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.menu-toggle { min-width: 44px; min-height: 44px; flex-shrink: 0; }
.home-services { padding: 72px 0; background: var(--paper); border-block: 1px solid var(--line-soft); }
.home-services-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.home-services-heading .eyebrow { margin-bottom: 16px; }
.home-services-heading h2 { font-size: clamp(30px, 3vw, 44px); }
.text-link { color: var(--terra); font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 5px; flex-shrink: 0; }
.text-link:hover { border-color: var(--terra); }
.home-services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-service { display: flex; gap: 16px; align-items: center; padding: 26px 22px; background: var(--cream-50); border: 1px solid var(--line); border-radius: var(--r-md); transition: background 0.2s, border-color 0.2s; }
.home-service:hover { background: var(--cream-100); border-color: var(--terra); }
.home-service h3 { font-size: 19px; font-weight: 400; line-height: 1.35; flex: 1; }
.home-service-num { color: var(--terra); font-size: 12px; }
.home-service-arrow { font-size: 21px; color: var(--terra); }
.location-address-card { padding: 52px 42px; background: var(--cream-100); border: 1px solid var(--line); border-radius: var(--r-xl); }
.location-pin { width: 52px; color: var(--terra); margin-bottom: 36px; }
.location-address-card .eyebrow { margin-bottom: 20px; }
.location-address-card h3 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.15; }
.location-address-card address { font-style: normal; font-size: 18px; line-height: 1.8; margin: 28px 0; }
.location-address-card > p { margin: 18px 0 0; font-size: 13px; color: var(--ink-500); }
.contact-method-content { min-width: 0; }
.contact-method-content a.contact-whatsapp { display: inline-block; font-family: var(--sans); font-size: 14px; color: var(--terra); border-bottom: 1px solid var(--line); padding-block: 10px 4px; }
.contact-method-content .meta a { font-size: inherit; font-family: inherit; }
.contact-photo-caption { margin: 14px 0 0; color: var(--ink-500); font-size: 13px; text-align: center; }
.online-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 60px; }
.testimonials { padding: 85px 0; }
.testimonials-header { margin-bottom: 30px; }
.testimonials .eyebrow { color: var(--terra-soft); }
.testimonials .eyebrow::before { background: var(--terra-soft); }
.testimonials-cta { margin-top: 28px; padding-inline: var(--gutter); }
.testimonials-cta a.btn { font-family: var(--sans); font-style: normal; font-size: 14px; border: none; color: var(--ink); }
.testimonials-cta a.btn:hover { background: white; color: var(--ink); }
@media (max-width: 968px) {
  .nav { max-height: var(--nav-height, 80vh); overscroll-behavior: contain; }
  .header:not(.navigation-ready) { position: relative; }
  .header:not(.navigation-ready) .header-inner { flex-wrap: wrap; }
  .header:not(.navigation-ready) .nav { display: flex; position: static; flex-basis: 100%; max-height: none; box-shadow: none; }
  .header:not(.navigation-ready) .megamenu { display: block; opacity: 1; visibility: visible; }
  .header:not(.navigation-ready) .menu-toggle { display: none; }
  .logo { width: min(300px, calc(100vw - 120px)); }
  .nav-dropdown-heading .nav-link { flex: 1; }
  .submenu-toggle { margin-right: 8px; }
  .home-services-heading { align-items: start; flex-direction: column; gap: 18px; }
  .home-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-portrait { width: 100%; }
  .online-steps { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .hero-home { padding: 38px 0 65px; }
  .hero-home-grid { gap: 40px; }
  .hero-home-lead { font-size: 17px; }
  .hero-home .eyebrow { font-size: 10px; letter-spacing: 0.13em; gap: 9px; }
  h1.hero-home-title { font-size: clamp(32px, 8.7vw, 44px); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-badge { white-space: nowrap; padding: 14px 20px; }
  .home-services { padding: 50px 0; }
  .home-services-grid { grid-template-columns: 1fr; gap: 10px; }
  .home-service { padding: 20px; }
  .location-address-card { padding: 36px 28px; }
  .cta-banner-actions { flex-direction: column; align-items: stretch; }
  .cta-banner-actions .btn { justify-content: center; padding-inline: 16px; font-size: 13px; }
  .eyebrow { letter-spacing: 0.16em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .header, .topbar, .scroll-progress, .cta-banner, .skip-link { display: none; }
  .reveal { opacity: 1; transform: none; }
  body { background: white; }
}
