/* ============================================
   Dr. Pedro Ximénez Jiménez — Cirugía Oral
   Design system
   ============================================ */

:root {
  --navy: #1F3A2E;
  --navy-2: #3D6E56;
  --teal: #0E7C86;
  --teal-light: #12A5B0;
  --gold: #C9A24B;
  --gold-light: #E4C77E;
  --bg: #EFEDE3;
  --white: #FFFFFF;
  --text: #1C2B36;
  --text-light: #55707F;
  --border: #E2E8ED;
  --shadow: 0 10px 30px rgba(31, 58, 46, 0.08);
  --shadow-lg: 0 20px 50px rgba(31, 58, 46, 0.16);
  --radius: 14px;
  --max-width: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
}

a { text-decoration: none; color: inherit; }
img, video { max-width: 100%; display: block; }
ul { list-style: none; }

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

.section {
  padding: 96px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(14, 124, 134, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.08rem;
  max-width: 640px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}

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

.btn-outline {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

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

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.header.scrolled {
  background: rgba(31, 58, 46, 0.92);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.header-logo {
  height: 38px;
  width: auto;
  /* logo source file is black artwork; invert to white for the dark header */
  filter: brightness(0) invert(1);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand-role {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--white);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav a:hover { background: rgba(255,255,255,0.1); }

.nav a.nav-cta {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  margin-left: 8px;
}

.nav a.nav-cta:hover { background: var(--gold-light); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--white);
  aspect-ratio: 2048 / 768;
  min-height: 420px;
  max-height: 720px;
  overflow: hidden;
}

.hero-photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31,58,46,0) 0%, rgba(31,58,46,0) 38%, rgba(31,58,46,0.78) 62%, rgba(31,58,46,0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-top: 76px;
  padding-bottom: 24px;
}

.hero-text-block {
  max-width: 460px;
  text-align: left;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 14px;
}

.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--gold-light);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(1.5rem, 2.5vw, 2.3rem);
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero h1 span { color: var(--gold-light); }

.hero-lead {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.9);
}

/* "Cómo trabajamos contigo" section — same gradient treatment as "Para clínicas dentales" */
.how-we-work { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }

/* Bio strip under hero video */
.hero-bio {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.hero-bio-text h3 {
  color: var(--navy);
  font-size: 1.45rem;
  margin-bottom: 22px;
}

.hero-bio-text p {
  color: var(--text);
  font-size: 0.98rem;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-option {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 24px;
}

.service-option-num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.service-option h4 {
  color: var(--navy);
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.service-option p {
  color: var(--text);
  font-size: 0.96rem;
}

.hero-tech {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-tech-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text);
}

.hero-tech-item .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal-light);
  flex-shrink: 0;
}

/* ---------- Stats bar ---------- */
.stats {
  background: var(--navy-2);
  padding: 0;
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  text-align: center;
  padding: 36px 20px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.stat:last-child { border-right: none; }

.stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--gold-light);
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  margin-top: 6px;
}

/* ---------- Cirugía del mes ---------- */
.surgery-month {
  background: var(--white);
}

/* ---------- Presentación / protocolo ---------- */
/* Línea superior: separa esta sección del hero y da borde superior al vídeo,
   que si no parece pegado a la imagen de arriba. */
.presentation {
  overflow: hidden;
  border-top: 1px solid rgba(31, 58, 46, 0.22);
}

/* 3ª columna = margen a la derecha del vídeo (columna vacía, no elemento),
   así el vídeo conserva su ancho y es la columna de texto la que se estrecha. */
.presentation-grid {
  display: grid;
  grid-template-columns: 1fr clamp(300px, 30vw, 420px) clamp(40px, 12vw, 200px);
  align-items: stretch;
}

/* El texto arranca alineado con el container y ocupa menos ancho; el vídeo queda
   hacia el centro, con margen a su derecha. */
.presentation-text {
  padding: 96px 48px 96px max(24px, calc((100vw - var(--max-width)) / 2 + 24px));
}

/* Filete a la izquierda: cierra el "marco" del vídeo contra la columna de texto. */
.presentation-video {
  position: relative;
  border-left: 1px solid rgba(31, 58, 46, 0.22);
}
.presentation-video video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Titular a dos colores: la segunda mitad salta de línea y va en teal.
   text-wrap: balance reparte las líneas para que queden parejas. */
.presentation .section-title {
  /* Algo menor que .section-title para que cada mitad del titular entre en una
     sola línea y las dos queden parejas. */
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  text-wrap: balance;
  line-height: 1.22;
  margin-bottom: 20px;
}
.presentation .section-title span {
  display: block;
  color: var(--gold);
}

.presentation-lead {
  color: var(--text-light);
  max-width: 520px;
  margin-top: 18px;
}

/* Protocolo en pasos */
.protocol {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 32px;
  list-style: none;
}
.protocol-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 92px;
  text-align: center;
}
.protocol-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(61,110,86,0.10);
  color: var(--navy);
}
.protocol-icon svg { width: 26px; height: 26px; }
.protocol-label {
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-light);
}
.protocol-sep {
  display: flex;
  align-items: center;
  height: 52px;
  color: var(--gold);
}
.protocol-sep svg { width: 15px; height: 8px; }

.youtube-card {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 440px;
  margin-top: 32px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.youtube-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.youtube-card-photo {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25);
}
.youtube-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.youtube-card-label svg { width: 22px; height: 16px; flex-shrink: 0; }
.youtube-card p {
  font-size: 0.87rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.85);
  margin: 0 0 8px;
}
.youtube-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}
.youtube-card-cta svg { width: 18px; height: 10px; flex-shrink: 0; }

.video-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--navy);
  aspect-ratio: 9 / 16;
  max-height: 640px;
  margin: 0 auto;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-frame-wide {
  aspect-ratio: 16 / 10;
  max-height: none;
}

.video-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 12px;
}

.surgery-month-info .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(201, 162, 75, 0.18);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.surgery-month-info h2 {
  font-size: 1.9rem;
  margin-bottom: 16px;
}

.surgery-month-info p {
  color: var(--text-light);
  margin-bottom: 24px;
}

.checklist { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.96rem;
  color: var(--text);
}
.checklist li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Services teaser grid ---------- */
.services { background: var(--bg); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-num {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.service-card h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.services-more {
  text-align: center;
  margin-top: 44px;
}

/* ---------- Referral / for dentists ---------- */
.referral {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.referral::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,162,75,0.15) 0%, transparent 70%);
  top: -150px; right: -150px;
}

.referral-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.referral .section-label {
  background: rgba(255,255,255,0.1);
  color: var(--gold-light);
}

.referral h2 { color: var(--white); font-size: 1.9rem; margin-bottom: 18px; }
.referral p.lead { color: rgba(255,255,255,0.8); margin-bottom: 26px; }

.referral-points {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.referral-point {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.referral-point .num {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(201,162,75,0.2);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}

.referral-point h4 { color: var(--white); font-size: 1rem; margin-bottom: 4px; }
.referral-point p { color: rgba(255,255,255,0.72); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-info h2 { margin-bottom: 16px; }
.contact-info p { color: var(--text-light); margin-bottom: 28px; }

.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-item .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(14,124,134,0.1);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-item strong { display: block; font-size: 0.92rem; }
.contact-item span { color: var(--text-light); font-size: 0.9rem; }

.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  transition: all 0.2s ease;
}

.social-links a svg { width: 16px; height: 16px; flex-shrink: 0; }

.social-links a:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(14,124,134,0.06);
}

.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
}

.contact-form textarea { resize: vertical; min-height: 100px; }

.form-status {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
}
.form-status.success { color: var(--navy); background: rgba(61,110,86,0.10); border-color: transparent; }
.form-status.error { color: #9B2C2C; background: rgba(155,44,44,0.08); border-color: transparent; }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: auto repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 32px;
  align-items: start;
}

.footer-logo-img {
  height: 88px;
  width: auto;
  /* logo source file is black artwork; invert to white for the dark footer background */
  filter: brightness(0) invert(1);
}

.footer-col h5 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a,
.footer-col p {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Placeholder note (dev only, visible until real content) ---------- */
.dev-note {
  background: #FFF6E5;
  border: 1px dashed var(--gold);
  color: #7A5A00;
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: 8px;
  margin-top: 14px;
}

/* ============ Cirugías page ============ */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 160px 0 70px;
}
.page-header .section-label { background: rgba(255,255,255,0.1); color: var(--gold-light); }
.page-header h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 14px; }
.page-header p { color: rgba(255,255,255,0.78); max-width: 640px; font-size: 1.05rem; }

.procedures-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.procedure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.procedure:nth-child(even) .procedure-media { order: 2; }

.procedure-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--navy-2);
  aspect-ratio: 4 / 3;
}

.procedure-media video,
.procedure-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.procedure-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px;
  background: repeating-linear-gradient(135deg, var(--navy-2), var(--navy-2) 10px, #1F3A2E 10px, #1F3A2E 20px);
}

.procedure-index {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.procedure-info h2 { font-size: 1.5rem; margin-bottom: 14px; }
.procedure-info p { color: var(--text-light); margin-bottom: 16px; }

.procedure-info .indications {
  font-size: 0.88rem;
  color: var(--navy);
  background: rgba(14,124,134,0.08);
  border-radius: 8px;
  padding: 12px 16px;
}
.procedure-info .indications strong { color: var(--teal); }

.procedure-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  margin-top: 16px;
}
.procedure-link:hover { color: var(--navy); }

/* ============ Algunos de nuestros casos ============ */
.cases { background: var(--white); }

.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
  margin-top: 40px;
}

/* Separador entre los dos casos: la línea queda centrada en el hueco
   porque el padding del segundo caso iguala al gap. */
.cases-grid > .case + .case {
  border-left: 1px solid var(--border);
  padding-left: 52px;
}

.case-title {
  font-size: 1.12rem;
  color: var(--navy);
  margin-bottom: 22px;
}

.case-ba {
  position: relative;
  max-width: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.case-ba img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.case-ba figcaption {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(31,58,46,0.85);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 20px;
}

.case-arrow-down {
  display: flex;
  justify-content: center;
  /* width:100% + max-width (y no width:340px) para que en móvil no fuerce el
     ancho mínimo de la columna y se salga del container. */
  width: 100%;
  max-width: 340px;
  padding: 10px 0;
  color: var(--teal);
}
.case-arrow-down svg { width: 15px; height: 30px; }

.case-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
/* Sin overflow:hidden para que la flecha de proceso (::after) no quede recortada;
   el redondeo se aplica sobre la propia imagen. */
.case-step-media { position: relative; }
.case-step-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.case-step:nth-child(odd) .case-step-media::after {
  content: "→";
  position: absolute;
  right: -19px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal);
  font-size: 1rem;
  line-height: 1;
  overflow: visible;
}
.case-step-num {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-step figcaption {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-light);
  margin-top: 9px;
}

/* ============ Legal pages ============ */
.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 1.3rem; margin: 36px 0 14px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--text); margin-bottom: 14px; }
.legal-content ul { margin: 0 0 16px 20px; list-style: disc; }
.legal-content li { color: var(--text); margin-bottom: 6px; }
.legal-content strong { color: var(--navy); }

/* ============ Blog ============ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.blog-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 100%);
  overflow: hidden;
}

.blog-card-img svg { width: 42%; height: 42%; opacity: 0.9; color: var(--gold-light); }

.blog-card-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 18px;
  background: linear-gradient(0deg, rgba(20,17,17,0.82) 0%, rgba(20,17,17,0) 100%);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ============ Article page ============ */
.article-hero {
  aspect-ratio: 16 / 6;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.article-hero svg { width: 18%; height: auto; opacity: 0.9; color: var(--gold-light); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--navy);
  margin: 28px 0;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.article-content { max-width: 760px; }
.article-content h2 { font-size: 1.35rem; margin: 36px 0 14px; }
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { font-size: 1.08rem; margin: 24px 0 10px; color: var(--navy); }
.article-content p { color: var(--text); margin-bottom: 14px; }
.article-content ul { margin: 0 0 16px 20px; list-style: disc; }
.article-content li { color: var(--text); margin-bottom: 8px; }
.article-content strong { color: var(--navy); }

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 24px;
}
.back-to-blog:hover { color: var(--navy); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--navy);
    padding: 16px 24px 24px;
    gap: 4px;
  }
  .hero {
    aspect-ratio: auto;
    min-height: 520px;
    max-height: none;
  }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(31,58,46,0.55) 0%, rgba(31,58,46,0.88) 65%, rgba(31,58,46,0.94) 100%);
  }
  .hero-content {
    justify-content: center;
    padding-left: 24px;
    padding-right: 24px;
    text-align: center;
  }
  .hero-text-block { max-width: 100%; text-align: center; }
  .hero-eyebrow { justify-content: center; }
  .hero-bio { padding: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .presentation-grid,
  .referral-grid,
  .contact-grid,
  .cases-grid,
  .procedure,
  .procedure:nth-child(even) .procedure-media {
    grid-template-columns: 1fr;
    order: 0;
  }
  .cases-grid > .case + .case { border-left: 0; padding-left: 0; }
  .presentation-grid { grid-template-columns: 1fr; }
  .presentation-text { padding: 64px 24px 40px; }
  .presentation-video { aspect-ratio: 9 / 16; max-height: 78vh; border-left: 0; }
  .presentation-video video { position: static; }
  .youtube-card { max-width: 100%; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .btn { width: 100%; justify-content: center; }
  /* El protocolo pasa a lista vertical: en horizontal se parte en varias filas
     y las flechas quedan sueltas al final de cada línea. */
  .protocol { flex-direction: column; align-items: flex-start; gap: 6px; }
  .protocol-step { flex-direction: row; align-items: center; width: auto; text-align: left; gap: 14px; }
  .protocol-sep { height: auto; padding-left: 26px; }
  .protocol-sep svg { transform: rotate(90deg); }
}

/* ============ Aviso de cookies ============ */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1100;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 20px 24px;
}
.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner p {
  flex: 1;
  min-width: 240px;
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
}
.cookie-banner p a { color: var(--teal); text-decoration: underline; }
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-banner-actions .btn {
  padding: 10px 20px;
  font-size: 0.88rem;
}
@media (max-width: 560px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
}
