/* ============================================================
   FisioAvante — Tema Público Premium
   ============================================================ */

/* ── Variables de Diseño ─────────────────────────────────── */
:root {
  /* Colores Corporativos (dinámicos se inyectan en head, estos son defaults) */
  --primary:       #2563a6;
  --primary-rgb:   37, 99, 166;
  --primary-dk:    #164a7a;
  --primary-dk-rgb: 22, 74, 122;
  --primary-lt:    #5aa7d9;
  --primary-lt-rgb: 90, 167, 217;
  --primary-pale:  #eaf4fb;
  --primary-pale-rgb: 234, 244, 251;
  --accent:        #7cc7f2;
  
  /* Colores Neutros y Semánticos */
  --bg:            #fcfdfe;
  --text:          #1b2530;
  --muted:         #4f5e71;
  --light:         #8d9cb0;
  --border:        #e2e8f0;
  --border-light:  #f1f5f9;
  --surface:       #ffffff;
  
  /* Gradientes y Efectos de Cristal */
  --surface-glass: rgba(255, 255, 255, 0.75);
  --shadow-sm:     0 2px 4px rgba(var(--primary-rgb), 0.04);
  --shadow-md:     0 8px 30px rgba(var(--primary-rgb), 0.06);
  --shadow-lg:     0 20px 40px rgba(var(--primary-rgb), 0.1);
  --glow:          0 0 20px rgba(var(--primary-lt-rgb), 0.2);
  
  /* Fuentes e Interacciones */
  --font-head:     'Poppins', sans-serif;
  --font-body:     'Nunito', sans-serif;
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     24px;
  --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset y Estilos Base ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition);
}

a:hover {
  color: var(--primary-lt);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

img.emoji-flag,
.post-single__content img.emoji-flag,
.bio-rich-content img.emoji-flag,
.about-content img.emoji-flag {
  display: inline-block !important;
  width: 1.18em !important;
  height: 1.18em !important;
  max-width: none !important;
  margin: 0 0.08em !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain;
  vertical-align: -0.18em;
}

svg {
  fill: currentColor;
}

/* ── Componentes de Layout ───────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Encabezados de Sección */
.section-label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-lt);
  margin-bottom: 8px;
  display: inline-block;
  position: relative;
}

.section-heading {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-subheading {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 650px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.section-centered {
  text-align: center;
}

.section-centered .section-subheading {
  margin-left: auto;
  margin-right: auto;
}

/* ── Botones Estilizados ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dk);
  color: #ffffff;
}

.btn-outline-white {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

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

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #1da851;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.825rem;
}

/* Alertas */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 0.925rem;
  border: 1px solid transparent;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Toasts */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5000;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  color: var(--text);
  pointer-events: auto;
  animation: toast-in 0.22s ease-out both;
}

.toast--leaving {
  animation: toast-out 0.2s ease-in both;
}

.toast--error {
  border-left-color: #dc2626;
}

.toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 800;
}

.toast--error .toast__icon {
  background: #fee2e2;
  color: #b91c1c;
}

.toast__message {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.toast__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.toast__close:hover {
  background: var(--primary-pale);
  color: var(--primary);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

@media (max-width: 640px) {
  .toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ── HEADER & NAVIGATION ─────────────────────────────────── */
.site-topbar {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  position: relative;
  z-index: 1001;
}

.site-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 38px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 7px 24px;
}

.site-topbar__schedule,
.site-topbar__social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-topbar__schedule {
  min-width: 0;
}

.site-topbar__schedule span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-topbar svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.site-topbar__schedule svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-topbar__social {
  justify-content: flex-end;
  flex-shrink: 0;
}

.site-topbar__social span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-topbar__social a {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.site-topbar__social a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .site-topbar__inner {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 7px 16px;
  }

  .site-topbar__schedule {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-topbar__schedule span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.25;
  }

  .site-topbar__social {
    width: auto;
    justify-content: flex-end;
    gap: 6px;
  }
}

@media (max-width: 520px) {
  .site-topbar {
    font-size: 0.76rem;
  }

  .site-topbar__inner {
    padding: 6px 14px;
  }

  .site-topbar__schedule {
    gap: 6px;
  }

  .site-topbar__social span {
    display: none;
  }

  .site-topbar__social a {
    width: 23px;
    height: 23px;
  }
}

@media (max-width: 390px) {
  .site-topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .site-topbar__social {
    justify-content: flex-start;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
}

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

.nav-admin {
  display: flex;
  align-items: center;
  color: var(--light) !important;
}

.nav-admin svg {
  width: 20px;
  height: 20px;
}

.nav-admin:hover {
  color: var(--primary) !important;
}

/* Responsive Header */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    padding: 100px 30px;
    transition: right var(--transition);
    z-index: 1000;
  }
  
  .site-nav.open {
    right: 0;
  }
  
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  
  .site-nav a {
    font-size: 1.15rem;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ── HERO BANNER ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(var(--primary-lt-rgb), 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
}

.hero-grid--content-only {
  grid-template-columns: minmax(0, 760px);
  justify-content: start;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(4px);
}

/* Tarjeta Glassmorphic en Hero (Derecha) */
.hero-glass-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: rotate(1deg);
  transition: all var(--transition);
}

.hero-glass-card:hover {
  transform: translateY(-5px) rotate(0deg);
}

.hero-logo-box {
  width: 70px;
  height: 70px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 24px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.hero-logo-box img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-glass-card h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero-glass-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.hero-mini-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 0 8px #25d366;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

@media (max-width: 992px) {
  .hero {
    padding: 60px 0 80px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual-col {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ── INTRO / VALORACIÓN SECTION ──────────────────────────── */
.intro-section {
  padding: 100px 0;
  background: #ffffff;
  position: relative;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.intro-lead {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--primary);
  margin-bottom: 20px;
}

.intro-text p {
  color: var(--muted);
  margin-bottom: 28px;
}

.intro-modalities-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.intro-modalities-badges span {
  background: var(--primary-pale);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.825rem;
  padding: 8px 20px;
  border-radius: 30px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.intro-visual {
  height: 100%;
  min-height: 300px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, rgba(var(--primary-lt-rgb), 0.03) 100%);
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.intro-visual--image {
  background: var(--primary-dk);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-md);
}

.intro-visual--image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(var(--primary-dk-rgb), 0.18) 0%, rgba(255, 255, 255, 0.1) 55%, rgba(var(--primary-lt-rgb), 0.18) 100%);
  pointer-events: none;
}

.intro-visual__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.intro-stat-card {
  background: #ffffff;
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 280px;
  border: 1px solid var(--border-light);
  transform: translateY(10px);
  position: relative;
  z-index: 1;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  display: block;
  margin-bottom: 10px;
}

.stat-label {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
  display: block;
}

@media (max-width: 768px) {
  .intro-section { padding: 60px 0; }
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .intro-visual { min-height: 250px; }
}

/* ── SERVICIOS SECTION (Cards en Inicio) ───────────────────── */
.services-section {
  padding: 100px 0;
  background:
    linear-gradient(135deg, rgba(var(--primary-pale-rgb), 0.94) 0%, rgba(255, 255, 255, 0.82) 48%, rgba(var(--primary-lt-rgb), 0.14) 100%),
    var(--primary-pale);
  border-top: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.services-section::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.services-section > .container {
  position: relative;
  z-index: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 36px;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-lt-rgb), 0.2);
}

.service-card__icon {
  width: 54px;
  height: 54px;
  background: var(--primary-pale);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-card__icon svg {
  width: 26px;
  height: 26px;
}

.service-card__name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.service-card__desc {
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card__modes {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.service-card__link {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
}

.service-card__link:hover {
  color: var(--primary-lt);
  padding-left: 5px;
}

/* Tarjeta con Imagen en lugar de Icono */
.service-card--img {
  padding: 0;
  overflow: hidden;
}

.service-card__img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.service-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.service-card:hover .service-card__img img {
  transform: scale(1.05);
}

.service-card--img .service-card__name,
.service-card--img .service-card__desc,
.service-card--img .service-card__modes,
.service-card--img .service-card__link {
  margin-left: 28px;
  margin-right: 28px;
}

.service-card--img .service-card__name {
  margin-top: 24px;
}

.service-card--img .service-card__link {
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .services-section { padding: 60px 0; }
}

/* ── NOSOTROS / ABOUT SECTION ────────────────────────────── */
.about-section {
  padding: 100px 0;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
}

.about-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 60px;
}

.about-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.about-portrait-card {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  max-width: 380px;
  width: 100%;
  transform: rotate(-1.5deg);
  transition: all var(--transition);
}

.about-portrait-card:hover {
  transform: rotate(0deg);
}

.about-portrait-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.about-portrait-fallback {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 62%, var(--primary-lt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-portrait-fallback span,
.bio-profile-fallback span {
  color: #ffffff;
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0;
}

.about-portrait-caption h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.about-portrait-caption p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.about-years-badge {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-head);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about-text h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.about-content {
  color: var(--muted);
  margin-bottom: 28px;
}

.about-content p {
  margin-bottom: 16px;
}

.about-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.about-badge {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 992px) {
  .about-section { padding: 60px 0; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
}

/* ── TESTIMONIOS SECTION ─────────────────────────────────── */
.testimonials-section {
  padding: 100px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
}

.testimonials-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.testimonials-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.testimonials-control:hover,
.testimonials-control:focus-visible {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.testimonials-control svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.testimonials-section--carousel .testimonials-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 4px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.testimonials-section--carousel .testimonials-grid::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.testimonials-section--carousel .testimonial-card {
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: 300px;
  scroll-snap-align: start;
}

.testimonial-stars {
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 28px;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  background: var(--primary-pale);
  color: var(--primary);
  font-family: var(--font-head);
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex: 0 0 44px;
  overflow: hidden;
}

.testimonial-avatar--img {
  padding: 0;
  object-fit: cover;
  object-position: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.12);
}

.testimonial-name {
  font-family: var(--font-head);
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text);
}

.testimonial-name__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.testimonial-name__link:hover {
  color: var(--primary);
}

.testimonial-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.08);
  flex: 0 0 18px;
}

.testimonial-verified svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.testimonial-location {
  font-size: 0.775rem;
  color: var(--light);
}

@media (max-width: 768px) {
  .testimonials-section { padding: 60px 0; }
}

@media (max-width: 900px) {
  .testimonials-section--carousel .testimonial-card {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  .testimonials-section--carousel .testimonial-card {
    flex-basis: 86%;
    min-width: 260px;
  }

  .testimonials-control {
    width: 40px;
    height: 40px;
  }
}

/* ── CONTACTO RAPIDO SECTION ─────────────────────────────── */
.contact-section {
  padding: 100px 0;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contact-info h2 {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 40px;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-detail--link {
  color: inherit;
  border-radius: var(--radius-sm);
  transition: color var(--transition), transform var(--transition);
}

.contact-detail--link:hover,
.contact-detail--link:focus-visible {
  color: inherit;
  outline: none;
  transform: translateX(3px);
}

.contact-detail__icon {
  width: 48px;
  height: 48px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(var(--primary-pale-rgb),0.92) 100%);
  color: var(--primary-dk);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.contact-detail:hover .contact-detail__icon,
.contact-detail:focus-visible .contact-detail__icon {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.18);
  transform: translateY(-1px);
}

.contact-detail__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-detail__label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.contact-detail__value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
}

.contact-detail__value a {
  color: inherit;
}

.contact-detail__value a:hover {
  color: var(--primary);
}

/* Caja de Llamada a la Acción de Consulta */
.contact-cta-box {
  background: #ffffff;
  padding: 50px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.contact-cta-box__eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-lt);
  margin-bottom: 8px;
}

.contact-cta-box h3 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.contact-cta-box p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.contact-cta-box .btn-whatsapp {
  width: 100%;
}

.contact-cta-box__alt {
  margin-top: 24px;
  font-size: 0.825rem;
  color: var(--light);
  text-align: center;
}

.contact-cta-box__alt a {
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 992px) {
  .contact-section { padding: 60px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ── SUBPÁGINAS: BANNER COMÚN ──────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  color: #ffffff;
  height: 320px;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-banner.section-bg {
  background: var(--primary-dk);
}

.page-banner > .container {
  width: 100%;
}

.page-banner__title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.page-banner__intro {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page-banner {
    height: 260px;
  }

  .page-banner__title {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .page-banner__intro {
    font-size: 1rem;
    line-height: 1.45;
  }
}

/* ── Fondos opcionales administrables ─────────────────────── */
.section-bg {
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.section-bg__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-pos--top-left { object-position: top left !important; }
.img-pos--top-center { object-position: top center !important; }
.img-pos--top-right { object-position: top right !important; }
.img-pos--center-left { object-position: center left !important; }
.img-pos--center-center { object-position: center center !important; }
.img-pos--center-right { object-position: center right !important; }
.img-pos--bottom-left { object-position: bottom left !important; }
.img-pos--bottom-center { object-position: bottom center !important; }
.img-pos--bottom-right { object-position: bottom right !important; }

.section-bg--dark::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(var(--primary-dk-rgb), 0.86) 0%, rgba(var(--primary-rgb), 0.74) 58%, rgba(var(--primary-lt-rgb), 0.56) 100%),
    rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.section-bg > .container {
  position: relative;
  z-index: 1;
}

.hero.section-bg {
  background: var(--primary-dk);
}

.hero.section-bg::before {
  z-index: 0;
}

.services-section.section-bg--services {
  background: var(--primary-dk);
  border-top: none;
}

.services-section.section-bg--services .section-label,
.services-section.section-bg--services .section-heading,
.services-section.section-bg--services .section-subheading {
  color: #ffffff;
}

.services-section.section-bg--services .section-label {
  color: rgba(255,255,255,0.72);
}

.services-section.section-bg--services .service-card {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 20px 40px rgba(0,0,0,0.16);
}

@media (max-width: 768px) {
  .section-bg--dark::after {
    background:
      linear-gradient(135deg, rgba(var(--primary-dk-rgb), 0.9) 0%, rgba(var(--primary-rgb), 0.82) 100%),
      rgba(0, 0, 0, 0.22);
  }
}

/* ── SUBPÁGINA: SERVICIOS DETALLE ─────────────────────────── */
.services-detail-section {
  padding: 80px 0;
  background: var(--bg);
}

.services-detail-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.service-detail-item {
  scroll-margin-top: 100px;
}

.service-detail-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  transition: all var(--transition);
}

.service-detail-card:hover {
  box-shadow: var(--shadow-lg);
}

.service-detail-card--reverse {
  grid-template-columns: 1fr 1fr;
}

.service-detail-card--reverse .service-detail-visual {
  order: 2;
}

.service-detail-visual {
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  position: relative;
  overflow: hidden;
}

.service-detail-image-container {
  width: 100%;
  height: 100%;
}

.service-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail-icon-placeholder {
  color: var(--primary);
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-detail-icon-placeholder svg {
  width: 70px;
  height: 70px;
}

.service-detail-content {
  padding: 60px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-detail-number {
  font-family: var(--font-head);
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary-pale);
  line-height: 1;
  position: absolute;
  top: 24px;
  right: 40px;
  pointer-events: none;
}

.service-detail-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.service-detail-lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.service-detail-body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-detail-body p {
  margin-bottom: 12px;
}

.service-detail-meta {
  background: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 30px;
  border-left: 3px solid var(--primary-lt);
}

.service-meta-label {
  font-weight: 700;
  color: var(--light);
  margin-right: 6px;
}

.service-meta-value {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 992px) {
  .service-detail-card,
  .service-detail-card--reverse {
    grid-template-columns: 1fr;
  }
  .service-detail-card--reverse .service-detail-visual {
    order: 0;
  }
  .service-detail-content {
    padding: 40px;
  }
  .service-detail-number {
    top: 20px;
    right: 24px;
    font-size: 4rem;
  }
}

/* ── SUBPÁGINA: BIOGRAFÍA DETALLE ─────────────────────────── */
.bio-detail-section {
  padding: 80px 0;
  background: #ffffff;
}

.bio-detail-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: flex-start;
}

.bio-portrait-col {
  position: sticky;
  top: 120px;
}

.bio-card-wrapper {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.bio-image-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  height: clamp(420px, 48vw, 540px);
  background: var(--primary-pale);
}

.bio-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.bio-profile-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 62%, var(--primary-lt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bio-card-info h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.bio-card-role {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.bio-card-badge {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 20px;
  border-radius: 30px;
}

.bio-text-col h2.bio-text-heading {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 32px;
  line-height: 1.25;
}

.bio-rich-content {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.bio-rich-content p {
  margin-bottom: 20px;
}

.bio-rich-content ul {
  list-style-type: none;
  margin-bottom: 24px;
}

.bio-rich-content ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.bio-rich-content ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--primary-lt);
  border-radius: 50%;
}

/* Pilares / Ventajas */
.bio-features-section {
  padding: 100px 0;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
}

.bio-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.bio-feature-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.bio-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-lt-rgb), 0.15);
}

.bio-feature-card--img {
  padding: 0;
  overflow: hidden;
}

.bio-feature-img {
  width: 100%;
  height: 170px;
  overflow: hidden;
}

.bio-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.bio-feature-card:hover .bio-feature-img img {
  transform: scale(1.05);
}

.bio-feature-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-pale);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.bio-feature-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.bio-feature-card--img .bio-feature-title,
.bio-feature-card--img .bio-feature-desc {
  margin-left: 28px;
  margin-right: 28px;
}

.bio-feature-card--img .bio-feature-title {
  margin-top: 24px;
}

.bio-feature-card--img .bio-feature-desc {
  margin-bottom: 28px;
}

.bio-feature-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .bio-detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .bio-portrait-col { position: relative; top: 0; }
  .bio-image-container { height: min(118vw, 560px); }
  .bio-features-section { padding: 60px 0; }
}

/* ── SUBPÁGINA: CONTACTO COMPLETO ─────────────────────────── */
.cpage-section {
  padding: 80px 0;
  background: #ffffff;
}

.cpage-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: flex-start;
}

.cpage-info {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 44px;
  box-shadow: var(--shadow-sm);
}

.cpage-info__heading {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.cpage-wa-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.cpage-wa-btns .btn-whatsapp {
  justify-content: flex-start;
}

.cpage-form-wrap {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 50px;
  box-shadow: var(--shadow-md);
}

.cpage-map {
  margin-top: 60px;
}

.cpage-map__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.cpage-map__title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.cpage-map__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.cpage-map__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  flex-shrink: 0;
  padding: 10px 16px;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  border-radius: var(--radius-lg);
  background: var(--primary);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.cpage-map__link:hover,
.cpage-map__link:focus-visible {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  outline: none;
  transform: translateY(-1px);
}

.cpage-map__link--waze {
  display: none;
  background: #33ccff;
  border-color: #33ccff;
  color: #07374a;
}

.cpage-map__link--waze:hover,
.cpage-map__link--waze:focus-visible {
  background: #18b8ed;
  border-color: #18b8ed;
  color: #052d3c;
}

.cpage-map__frame {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--primary-pale);
  box-shadow: var(--shadow-sm);
}

.cpage-map__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Formularios Públicos */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
}

.form-group textarea {
  height: 140px;
  resize: vertical;
}

.captcha-strong {
  color: var(--primary);
}

.captcha-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.captcha-question {
  color: var(--muted);
  font-weight: 700;
}

.captcha-refresh-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  padding: 8px 11px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.captcha-refresh-btn:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.captcha-refresh-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 768px) {
  .cpage-grid { grid-template-columns: 1fr; gap: 40px; }
  .cpage-info { padding: 30px; }
  .cpage-form-wrap { padding: 30px; }
  .cpage-map { margin-top: 40px; }
  .cpage-map__header { align-items: flex-start; flex-direction: column; }
  .cpage-map__actions { width: 100%; justify-content: flex-start; }
  .cpage-map__link { flex: 1 1 190px; }
  .cpage-map__link--waze { display: inline-flex; }
  .cpage-map__frame { height: 320px; }
}

/* ── SUBPÁGINAS: BLOG LISTING & NOTAS ─────────────────────── */
.blog-section {
  padding: 80px 0 100px;
  background: var(--bg);
}

.blog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 50px;
  flex-wrap: wrap;
  gap: 20px;
}

.blog-header__link {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.blog-header__link:hover {
  color: var(--primary-lt);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.post-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-lt-rgb), 0.15);
}

.post-card__img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--primary-pale);
}

.post-card__img a {
  display: block;
  width: 100%;
  height: 100%;
}

.post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post-card:hover .post-card__img img {
  transform: none;
}

.post-card__img--placeholder {
  width: 100%;
  height: 200px;
  background: var(--primary-pale);
  color: var(--primary-lt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card__img--placeholder svg {
  width: 50px;
  height: 50px;
}

.post-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card__date {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.post-card__title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.post-card__title a {
  color: var(--text);
}

.post-card__title a:hover {
  color: var(--primary);
}

.post-card__excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__link {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.post-card__link:hover {
  color: var(--primary-lt);
}

/* Home preview: same background treatment as .about-section. */
.blog-section--home {
  background: var(--bg);
  border-top: 1px solid var(--border-light);
}

.posts-carousel {
  display: flex;
  position: relative;
}

.posts-carousel__track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: var(--posts-carousel-gap, 30px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* A horizontal scroll area clips vertically too; reserve enough room for
     the card lift and its shadow. */
  padding: 18px 4px 52px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.posts-carousel__track::-webkit-scrollbar {
  display: none;
}

.posts-carousel__track .post-card {
  /* Size against the available track, not the viewport: this keeps three
     complete cards aligned with the services grid at every desktop width. */
  flex: 0 0 calc((100% - (var(--posts-carousel-gap, 30px) * 2)) / 3);
  scroll-snap-align: start;
}

.posts-carousel__track .post-card:hover {
  /* Slightly tighter than the global card shadow so it is fully visible
     inside a horizontally scrolling track. */
  box-shadow: 0 14px 26px rgba(var(--primary-rgb), 0.14);
}

.posts-carousel__track .post-card.is-carousel-dim {
  opacity: 0.55;
  transform: scale(0.96);
}

.posts-carousel__control {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--primary-dk);
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.posts-carousel__control--prev {
  left: -58px;
}

.posts-carousel__control--next {
  right: -58px;
}

.posts-carousel__control:hover:not(:disabled),
.posts-carousel__control:focus-visible {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
  outline: none;
  transform: translateY(calc(-50% - 2px));
}

.posts-carousel__control svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.posts-carousel__control:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* At narrower desktop/tablet widths, keep the buttons above the carousel
   instead of letting the side controls fall outside the viewport. */
@media (max-width: 1230px) {
  .posts-carousel__control {
    top: -42px;
    transform: none;
  }

  .posts-carousel__control--prev {
    left: auto;
    right: 58px;
  }

  .posts-carousel__control--next {
    right: 0;
  }

  .posts-carousel__control:hover:not(:disabled),
  .posts-carousel__control:focus-visible {
    transform: translateY(-2px);
  }
}

@media (max-width: 999px) {
  .posts-carousel__track .post-card {
    /* At tablet widths, show two complete cards. */
    flex-basis: calc((100% - var(--posts-carousel-gap, 30px)) / 2);
  }
}

@media (max-width: 640px) {
  .posts-carousel__control {
    width: 42px;
    height: 42px;
  }

  .posts-carousel__control--prev {
    right: 52px;
  }

  .posts-carousel__control svg {
    width: 18px;
    height: 18px;
  }

  .posts-carousel__track .post-card {
    /* One full news card, with navigation outside its usable width. */
    flex-basis: 100%;
  }
}

/* ── SUBPÁGINA: CURSOS ─────────────────────────────────────── */
.courses-section {
  padding: 80px 0 100px;
  background: var(--bg);
}

.courses-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: start;
}

.courses-main {
  min-width: 0;
}

.courses-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 34px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.courses-filter-field {
  display: grid;
  gap: 7px;
}

.courses-filter-field label {
  color: var(--primary-dk);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 800;
}

.courses-filter-field input,
.courses-filter-field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.courses-filter-field input:focus,
.courses-filter-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.09);
  outline: none;
}

.courses-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  grid-column: 1 / -1;
}

.courses-empty {
  text-align: center;
  padding: 60px 0;
}

.courses-month + .courses-month {
  margin-top: 58px;
}

.courses-month__title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.course-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.courses-sidebar {
  position: sticky;
  top: 112px;
}

.courses-calendar {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.courses-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.courses-calendar__header h2 {
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}

.courses-calendar__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  background: #ffffff;
}

.courses-calendar__nav:hover,
.courses-calendar__nav:focus-visible {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  outline: none;
}

.courses-calendar__nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.courses-calendar__weekdays,
.courses-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.courses-calendar__weekdays {
  margin-bottom: 8px;
  color: var(--light);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.courses-calendar__day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.courses-calendar__day--empty {
  border-color: transparent;
  background: transparent;
}

.courses-calendar__day--has-course {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.18);
}

.courses-calendar__day--today {
  border-color: var(--accent);
}

.courses-calendar__day i {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.courses-calendar__agenda {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.courses-calendar__event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.courses-calendar__event:hover {
  border-color: rgba(var(--primary-rgb), 0.25);
  background: var(--primary-pale);
}

.courses-calendar__event-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dk);
  font-family: var(--font-head);
  font-weight: 800;
}

.courses-calendar__event strong {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
}

.courses-calendar__event small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.courses-calendar__empty {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.course-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-lt-rgb), 0.2);
}

.course-card__media {
  position: relative;
  display: block;
  height: 218px;
  overflow: hidden;
  background: var(--primary-pale);
}

.course-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.course-card:hover .course-card__media img {
  transform: scale(1.04);
}

.course-card__placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.course-card__placeholder svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-date-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  min-width: 62px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.94);
  color: var(--primary-dk);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.course-date-badge strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1;
}

.course-date-badge span {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.course-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-card__title {
  font-family: var(--font-head);
  font-size: 1.22rem;
  line-height: 1.35;
  margin-bottom: 12px;
}

.course-card__title a {
  color: var(--text);
}

.course-card__title a:hover {
  color: var(--primary);
}

.course-card__excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.course-meta,
.course-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.course-meta span,
.course-detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-pale);
  color: var(--primary-dk);
  font-size: 0.8rem;
  font-weight: 800;
}

.course-card__video,
.course-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #0f172a;
  margin-bottom: 18px;
}

.course-card__video iframe,
.course-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.course-video {
  margin: 0 0 34px;
}

@media (max-width: 1080px) {
  .courses-layout {
    grid-template-columns: 1fr;
  }

  .courses-sidebar {
    position: static;
  }

  .courses-filter-field--search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .courses-filters {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .courses-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .courses-filter-actions .btn {
    width: 100%;
  }

  .course-calendar-grid { grid-template-columns: 1fr; }
  .course-card__body { padding: 22px; }
}

/* Paginación */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 60px;
}

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

.pagination__arrow,
.pagination__link,
.pagination__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.pagination__link,
.pagination__arrow {
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--border);
}

.pagination__link:hover,
.pagination__arrow:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-pale);
}

.pagination__current {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

/* ── DETALLE DE BLOG (NOTA INDIVIDUAL) ─────────────────────── */
.blog-detail-page {
  padding: 80px 0 100px;
  background: #ffffff;
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
}

.blog-detail-back-wrap {
  margin-bottom: 32px;
}

.blog-detail-back {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.blog-detail-back:hover {
  color: var(--primary);
  transform: translateX(-4px);
}

.post-single__header {
  margin-bottom: 40px;
}

.post-single__date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.post-single__title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}

.post-single__subtitle {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 24px;
}

.post-single__rule {
  width: 80px;
  height: 4px;
  background: var(--primary-lt);
  border-radius: 2px;
}

.post-single__img {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 48px;
}

.post-single__img img {
  width: 100%;
  height: auto;
  display: block;
}

.post-single__content {
  font-size: 1.05rem;
  line-height: 1.85;
}

/* ============================================================
   MOBILE REFINEMENTS — Public theme
   ============================================================ */

/* ── Prevent iOS zoom on form inputs ─────────────────────── */
@media (max-width: 480px) {
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="number"],
  .form-group input[type="search"],
  .form-group textarea,
  .cpage-form input[type="text"],
  .cpage-form input[type="email"],
  .cpage-form textarea,
  .courses-filter-field input,
  .courses-filter-field select {
    font-size: 16px !important;
    min-height: 48px;
  }

  .form-group textarea {
    min-height: 120px;
  }
}

/* ── Hero: extra-small screens ───────────────────────────── */
@media (max-width: 480px) {
  .hero {
    padding: 48px 0 64px;
  }

  .hero-eyebrow {
    font-size: 0.75rem;
  }

  .hero-title {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
  }

  .hero-tagline {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-badges {
    gap: 6px;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
  }
}

/* ── Page banner: extra-small screens ────────────────────── */
@media (max-width: 480px) {
  .page-banner {
    height: auto;
    min-height: 200px;
    padding: 40px 0;
  }

  .page-banner__title {
    font-size: clamp(1.5rem, 9vw, 2rem);
  }

  .page-banner__intro {
    font-size: 0.92rem;
  }
}

/* ── Contact detail items: stack on mobile ───────────────── */
@media (max-width: 480px) {
  .contact-detail {
    gap: 12px;
    margin-bottom: 20px;
  }

  .contact-detail__icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }

  .contact-detail__icon svg {
    width: 19px;
    height: 19px;
  }

  .contact-detail__label {
    font-size: 0.72rem;
  }

  .contact-detail__value {
    font-size: 0.88rem;
    word-break: break-word;
  }

  .contact-info h2 {
    font-size: 1.6rem;
  }

  .contact-cta-box {
    padding: 30px 20px;
  }

  .contact-cta-box h3 {
    font-size: 1.25rem;
  }
}

/* ── Blog / Post single: mobile padding ──────────────────── */
@media (max-width: 576px) {
  .blog-detail-page {
    padding: 40px 0 60px;
  }

  .blog-detail-page .container--narrow {
    padding-left: 20px;
    padding-right: 20px;
  }

  .post-single__header {
    margin-bottom: 28px;
  }

  .post-single__img {
    margin-bottom: 28px;
  }

  .post-single__content {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .post-single__content h2 {
    font-size: 1.4rem;
  }

  .post-single__content h3 {
    font-size: 1.2rem;
  }

  .post-single__content blockquote {
    padding: 16px 20px;
    font-size: 1rem;
  }
}

/* ── Blog cards: show full uploaded image on mobile ───────── */
@media (max-width: 576px) {
  .post-card__img {
    background: var(--primary-pale);
  }
}

/* ── Blog / Course pagination compact ────────────────────── */
@media (max-width: 576px) {
  .pagination {
    flex-direction: column;
    gap: 12px;
  }

  .pagination__pages {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination__link,
  .pagination__current {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .pagination__arrow {
    width: 100%;
    justify-content: center;
  }
}

/* ── Courses calendar on mobile ──────────────────────────── */
@media (max-width: 480px) {
  .courses-calendar {
    padding: 14px;
  }

  .courses-calendar__day {
    font-size: 0.72rem;
    min-height: 32px;
  }

  .courses-calendar__day i {
    right: 3px;
    bottom: 3px;
    width: 4px;
    height: 4px;
  }

  .courses-calendar__event {
    padding: 8px;
    gap: 8px;
  }

  .courses-calendar__event-date {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
  }

  .courses-calendar__event strong {
    font-size: 0.8rem;
  }
}

/* ── Service detail on mobile ────────────────────────────── */
@media (max-width: 576px) {
  .services-detail-section {
    padding: 40px 0;
  }

  .services-detail-list {
    gap: 40px;
  }

  .service-detail-content {
    padding: 28px 20px;
  }

  .service-detail-number {
    font-size: 3rem;
    top: 12px;
    right: 16px;
  }

  .service-detail-title {
    font-size: 1.35rem;
  }

  .service-detail-lead {
    font-size: 0.95rem;
  }

  .service-detail-visual {
    min-height: 220px;
  }
}

/* ── Bio page on mobile ──────────────────────────────────── */
@media (max-width: 576px) {
  .bio-detail-section {
    padding: 40px 0;
  }

  .bio-card-wrapper {
    padding: 16px;
  }

  .bio-text-col h2.bio-text-heading {
    font-size: 1.6rem;
  }

  .bio-features-section {
    padding: 60px 0;
  }

  .bio-features-grid {
    gap: 20px;
  }

  .bio-feature-card {
    padding: 24px;
  }
}

/* ── Footer compact on mobile ────────────────────────────── */
@media (max-width: 576px) {
  .site-footer {
    padding: 48px 0 0;
  }

  .footer-grid {
    gap: 32px;
  }

  .footer-brand-name {
    font-size: 1.1rem;
  }

  .footer-logo {
    width: 32px;
    height: 32px;
  }

  .footer-schedule {
    font-size: 0.78rem;
    padding: 10px 14px;
  }

  .footer-mid {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 20px;
  }

  .footer-payments {
    width: 100%;
  }

  .payments-badges-list {
    width: 100%;
  }

  .payment-badge-pill {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .footer-social-wrapper {
    width: 100%;
  }
}

/* ── FAB on mobile ────────────────────────────────────────── */
@media (max-width: 768px) {
  .fab-group {
    bottom: 18px;
    right: 16px;
    gap: 10px;
  }

  .fab-btn {
    width: 44px;
    height: 44px;
  }

  .fab-btn svg {
    width: 20px;
    height: 20px;
  }

  .fab-btn--menu {
    display: flex;
  }
}

/* ── Very small screens (≤400px) ─────────────────────────── */
@media (max-width: 400px) {
  .section-heading {
    font-size: clamp(1.45rem, 7vw, 1.8rem);
  }

  .intro-section {
    padding: 40px 0;
  }

  .intro-lead {
    font-size: 1.05rem;
  }

  .services-section {
    padding: 40px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 24px;
  }

  .about-section {
    padding: 40px 0;
  }

  .about-portrait-img,
  .about-portrait-fallback {
    height: 280px;
  }

  .testimonials-section {
    padding: 40px 0;
  }

  .testimonial-card {
    padding: 24px;
  }

  .testimonials-section--carousel .testimonial-card {
    flex-basis: 90%;
    min-width: 220px;
  }

  .contact-section {
    padding: 40px 0;
  }

  .blog-section {
    padding: 40px 0;
  }

  .courses-section {
    padding: 40px 0 60px;
  }

  .page-banner {
    min-height: 160px;
    padding: 32px 0;
  }

  .blog-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 28px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-card__body {
    padding: 20px;
  }

  .course-card__body {
    padding: 18px;
  }

  .course-month__title {
    font-size: 1.3rem;
  }

  .footer-grid {
    gap: 28px;
  }

  .footer-nav a {
    font-size: 0.82rem;
  }
}

/* ── Course filters: full width on small screens ──────────── */
@media (max-width: 480px) {
  .courses-filter-field--search {
    grid-column: 1 / -1;
  }
}

.post-single__content p {
  margin-bottom: 24px;
}

.post-single__content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 28px 0;
  -webkit-overflow-scrolling: touch;
}

.post-single__content th,
.post-single__content td {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  vertical-align: top;
}

.post-single__content th {
  color: var(--primary-dk);
  font-weight: 800;
  background: var(--primary-pale);
}

.post-single__content figure.video-embed {
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  margin: 32px 0;
  border-radius: var(--radius-md);
  background: #000000;
}

.post-single__content figure.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-single__content h2,
.post-single__content h3,
.post-single__content h4 {
  font-family: var(--font-head);
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  margin: 48px 0 20px;
}

.post-single__content h2 { font-size: 1.8rem; }
.post-single__content h3 { font-size: 1.45rem; }

.post-single__content ul,
.post-single__content ol {
  margin-bottom: 28px;
  padding-left: 24px;
}

.post-single__content li {
  margin-bottom: 12px;
}

.post-single__content blockquote {
  border-left: 4px solid var(--primary-lt);
  background: var(--primary-pale);
  padding: 24px 30px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--primary-dk);
  margin: 36px 0;
}

.post-single__content blockquote p {
  margin-bottom: 0;
}

.post-single__content img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 36px 0;
  max-width: 100%;
  height: auto;
}

/* Fuentes de la Nota */
.nota-fuentes {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.nota-fuentes__titulo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.nota-fuentes__list {
  list-style: none;
  padding-left: 0;
}

.nota-fuentes__list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.nota-fuentes__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-lt);
  font-weight: 700;
}

/* Navegación de Nota */
.nota-nav {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.nota-nav__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.nota-nav__item {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border-light);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.nota-nav__item:hover {
  border-color: var(--primary-lt);
  background: var(--primary-pale);
}

.nota-nav__item--next {
  text-align: right;
  align-items: flex-end;
}

.nota-nav__label {
  font-family: var(--font-head);
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.nota-nav__title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.nota-nav__empty {
  display: block;
}

@media (max-width: 576px) {
  .nota-nav__inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}


/* ── PIE DE PÁGINA (FOOTER) ──────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 0;
  font-size: 0.9rem;
  border-top: 4px solid var(--primary-lt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  opacity: 0.9;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.footer-brand-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-schedule {
  display: block;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.04);
  color: inherit;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.footer-schedule:hover,
.footer-schedule:focus-visible {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  outline: none;
  transform: translateY(-2px);
}

.footer-schedule strong {
  display: block;
  color: #ffffff;
  margin-bottom: 2px;
}

.footer-col-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-contact-list {
  list-style: none;
}

.footer-contact-list li {
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-contact-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: color var(--transition), transform var(--transition);
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: #ffffff;
  outline: none;
  transform: translateX(3px);
}

.footer-contact-text {
  min-width: 0;
  padding-top: 1px;
  overflow-wrap: anywhere;
}

.footer-contact-icon {
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  margin-top: -4px;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.footer-contact-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-contact-link:hover .footer-contact-icon,
.footer-contact-link:focus-visible .footer-contact-icon {
  background: var(--primary-lt);
  border-color: var(--primary-lt);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-contact-list a {
  color: inherit;
}

.footer-contact-list a:hover {
  color: #ffffff;
}

/* Fila Intermedia Footer */
.footer-mid {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-payments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payments-title, .social-title {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.payment-method-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.payment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  padding: 5px 10px 5px 6px;
  font-size: 0.64rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.payment-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 20px;
  flex: 0 0 30px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255,255,255,0.94);
}

.payment-pill__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.payment-pill:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.footer-social-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--primary-lt);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-social a svg {
  width: 16px;
  height: 16px;
}

/* Fila Copyright */
.footer-bottom {
  background: rgba(0, 0, 0, 0.15);
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.footer-copy {
  font-size: 0.775rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.footer-credit {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}

.footer-credit a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.footer-credit a:hover {
  color: var(--accent);
}

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-mid { flex-direction: column; align-items: flex-start; }
}

/* ── BOTONES FLOTANTES (FAB) ─────────────────────────────── */
.fab-group {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.fab-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.18);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  color: #ffffff;
}

.fab-btn:hover {
  color: #ffffff;
}

.fab-btn svg {
  width: 22px;
  height: 22px;
}

.fab-btn--wa {
  background: #25d366;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.28);
}

.fab-btn--wa:hover {
  background: #128c7e;
  box-shadow: 0 14px 28px rgba(18, 140, 126, 0.34);
  transform: translateY(-2px) scale(1.04);
}

.fab-btn--top {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.fab-btn--top.fab-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fab-btn--top:hover {
  background: linear-gradient(135deg, var(--primary-lt) 0%, var(--primary) 100%);
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.32);
  transform: translateY(-2px) scale(1.04);
}

.fab-btn--top svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fab-btn--menu {
  display: none; /* Se oculta por defecto */
}
