/* ==========================================================================
   Dra. Rosemary Guzmán Santa Cruz — Cardiología Pediátrica
   Hoja de estilos principal
   ========================================================================== */

/* ---------- 1. Variables de marca ---------- */
:root {
  --color-primary: #0B2545;      /* Azul marino profundo */
  --color-primary-light: #123566;
  --color-primary-dark: #071830;
  --color-accent: #B33951;       /* Rosa-coral intenso */
  --color-accent-light: #d1546c;
  --color-gold: #C9A227;         /* Dorado champán */
  --color-gold-light: #e0bc4c;
  --color-bg: #FAF9F6;           /* Blanco hueso */
  --color-bg-alt: #F1F2F4;       /* Gris muy claro */
  --color-text: #22262B;         /* Gris grafito */
  --color-text-soft: #55606b;
  --color-white: #ffffff;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 4px 14px rgba(11, 37, 69, 0.08);
  --shadow-md: 0 12px 32px rgba(11, 37, 69, 0.12);
  --shadow-lg: 0 24px 60px rgba(11, 37, 69, 0.18);
  --shadow-gold: 0 8px 24px rgba(201, 162, 39, 0.25);

  --container-w: 1280px;
  --header-h: 92px;
}

/* ---------- 2. Reset ---------- */
* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--color-primary); line-height: 1.2; }

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

section { position: relative; }

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- 3. Utilidades: eyebrow, badges, botones, reveal ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-accent));
}

.section-head {
  max-width: 680px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin-bottom: 18px;
}
.section-head p {
  color: var(--color-text-soft);
  font-size: 1.08rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(179, 57, 81, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(201, 162, 39, 0.4); }

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--color-white); transform: translateY(-3px); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible { transition-delay: 0.1s; }
.reveal-delay-2.is-visible { transition-delay: 0.22s; }
.reveal-delay-3.is-visible { transition-delay: 0.34s; }
.reveal-delay-4.is-visible { transition-delay: 0.46s; }

/* ==========================================================================
   4. Preloader
   ========================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }

.preloader-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-white);
  position: relative;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.4), 0 0 40px rgba(201, 162, 39, 0.35);
}
.preloader-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preloader-spinner {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--color-accent-light);
  border-right-color: rgba(255,255,255,0.25);
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.preloader-text {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ==========================================================================
   5. Header / Navegación
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--transition-base), box-shadow var(--transition-base), height var(--transition-base);
}

.site-header.is-scrolled {
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 28px rgba(11, 37, 69, 0.08);
  height: 78px;
}

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

/* Logo de marca — más grande y con más presencia */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
  flex-shrink: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-white);
  border: 2px solid var(--color-gold);
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.25);
  transition: transform var(--transition-base);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-header:hover .brand-mark,
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.01em;
  transition: color var(--transition-base);
}
.brand-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-gold-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition-base);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.nav-links a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 0;
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
  transition: width var(--transition-base);
}
.nav-links a:hover { color: var(--color-gold-light); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.nav-cta .btn { padding: 13px 24px; font-size: 0.9rem; white-space: nowrap; }

/* Estado con fondo claro (tras hacer scroll): texto oscuro para contraste */
.site-header.is-scrolled .brand-name { color: var(--color-primary); }
.site-header.is-scrolled .brand-role { color: var(--color-accent); }
.site-header.is-scrolled .nav-links a { color: var(--color-primary); }
.site-header.is-scrolled .nav-links a:hover { color: var(--color-accent); }
.site-header.is-scrolled .nav-toggle span { background: var(--color-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  z-index: 2;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast), background var(--transition-base);
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* El menú móvil desplegado siempre tiene fondo claro: forzar texto oscuro sin importar el estado del header */
#navLinks.is-open a { color: var(--color-primary); }

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background: radial-gradient(ellipse at 20% 15%, #123a6b 0%, var(--color-primary) 46%, var(--color-primary-dark) 100%);
  overflow: hidden;
  color: var(--color-white);
}

#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.55;
}

.hero-glow {
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179, 57, 81, 0.35), transparent 70%);
  top: -160px; right: -160px;
  z-index: 1;
  filter: blur(10px);
}
.hero-glow.gold {
  top: auto; right: auto;
  bottom: -220px; left: -160px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.28), transparent 70%);
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.4);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  margin-bottom: 28px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-accent-light);
  box-shadow: 0 0 0 4px rgba(179, 57, 81, 0.25);
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: 1.14;
  margin-bottom: 26px;
  min-height: calc(1.14em * 2);
}
.hero h1 .line-static { display: block; }
.hero h1 .line-dynamic {
  display: block;
  background: linear-gradient(90deg, var(--color-gold-light), var(--color-accent-light), var(--color-gold-light));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s linear infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.typed-cursor {
  display: inline-block;
  width: 3px;
  margin-left: 4px;
  background: var(--color-gold-light);
  animation: blink 0.85s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 52px; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
}
.hero-badge svg { width: 16px; height: 16px; color: var(--color-gold-light); flex-shrink: 0; }

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  aspect-ratio: 4 / 5;
}
.hero-visual-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  transition: transform 6s cubic-bezier(0.16,1,0.3,1);
}
.hero-visual:hover .hero-visual-frame img { transform: scale(1.12); }

.hero-visual-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11,37,69,0.75) 100%);
}

.hero-visual-card {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  width: calc(100% - 44px);
  background: rgba(250, 249, 246, 0.97);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.hero-visual-card .icon-circle {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero-visual-card .icon-circle svg { width: 20px; height: 20px; color: #fff; }
.hero-visual-card strong { display: block; color: var(--color-primary); font-size: 0.95rem; }
.hero-visual-card span { display: block; font-size: 0.78rem; color: var(--color-text-soft); }

.scroll-indicator {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scroll-indicator .mouse {
  width: 24px; height: 38px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.4);
  position: relative;
}
.scroll-indicator .mouse::before {
  content: "";
  position: absolute; top: 7px; left: 50%;
  width: 4px; height: 8px; border-radius: 2px;
  background: var(--color-gold-light);
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease infinite;
}
@keyframes scrollDot { 0% { opacity: 1; top: 7px; } 70% { opacity: 0; top: 20px; } 100% { opacity: 0; top: 7px; } }

/* ==========================================================================
   7. Sobre la doctora
   ========================================================================== */
.about { padding: 140px 0 120px; background: var(--color-bg); }

.about .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}

.about-visual { position: relative; }
.about-visual-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-lg);
}
.about-visual-frame img { width: 100%; height: 100%; object-fit: cover; }

.about-visual-badge {
  position: absolute;
  bottom: -28px; right: -28px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  box-shadow: var(--shadow-lg);
  border-bottom: 3px solid var(--color-gold);
  text-align: center;
  max-width: 190px;
}
.about-visual-badge strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 6px;
}
.about-visual-badge span { font-size: 0.78rem; color: var(--color-text-soft); font-weight: 500; }

.about-body h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: 24px; }
.about-body p { color: var(--color-text-soft); margin-bottom: 18px; font-size: 1.04rem; }
.about-body p strong { color: var(--color-primary); }

/* ==========================================================================
   8. Especialidades
   ========================================================================== */
.specialties { padding: 120px 0; background: var(--color-bg-alt); }

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

.specialty-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  border: 1px solid rgba(11, 37, 69, 0.06);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}
.specialty-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-gold));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-base);
}
.specialty-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.specialty-card:hover::before { transform: scaleY(1); }

.specialty-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(179,57,81,0.1), rgba(11,37,69,0.08));
  margin-bottom: 24px;
  transition: transform var(--transition-base);
}
.specialty-card:hover .specialty-icon { transform: scale(1.08) rotate(-4deg); }
.specialty-icon svg { width: 30px; height: 30px; color: var(--color-accent); }

.specialty-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.specialty-card p { color: var(--color-text-soft); font-size: 0.96rem; }

/* ==========================================================================
   9. Formación / timeline
   ========================================================================== */
.education { padding: 120px 0; background: var(--color-bg); }

.timeline { max-width: 780px; margin: 0 auto; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 27px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-gold), var(--color-accent), var(--color-primary));
  opacity: 0.35;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 26px;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.timeline-dot svg { width: 24px; height: 24px; color: var(--color-primary); }

.timeline-content { padding-top: 6px; }
.timeline-content h3 { font-size: 1.1rem; margin-bottom: 6px; }
.timeline-content span.badge-tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.timeline-content p { color: var(--color-text-soft); font-size: 0.95rem; }

/* ==========================================================================
   10. Banner de credibilidad — imagen de fondo FIJA (parallax)
   ========================================================================== */
.credibility {
  position: relative;
  padding: 130px 0;
  background-image:
    linear-gradient(150deg, rgba(7, 24, 48, 0.93), rgba(11, 37, 69, 0.88)),
    url('https://images.unsplash.com/photo-1631248055158-edec7a3c072b?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Efecto "fixed" solicitado */
  background-color: var(--color-primary); /* Respaldo si la imagen no carga */
  color: var(--color-white);
  text-align: center;
}

.credibility blockquote {
  max-width: 780px;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.5;
  font-weight: 700;
}
.credibility blockquote span.quote-mark {
  color: var(--color-gold-light);
  font-size: 1.4em;
  line-height: 0;
}
.credibility cite {
  display: block;
  margin-top: 22px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--color-gold-light);
}

/* ==========================================================================
   11. Ubicación — imagen de fondo FIJA
   ========================================================================== */
.location { padding: 120px 0; background: var(--color-bg-alt); }

.location .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: stretch;
}

.location-info h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-bottom: 20px; }
.location-info p.lead { color: var(--color-text-soft); margin-bottom: 32px; font-size: 1.02rem; }

.location-detail {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}
.location-detail .icon-circle {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
}
.location-detail .icon-circle svg { width: 20px; height: 20px; color: #fff; }
.location-detail strong { display: block; color: var(--color-primary); margin-bottom: 3px; font-size: 1rem; }
.location-detail span, .location-detail p { color: var(--color-text-soft); font-size: 0.95rem; }

.location-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 380px;
  background-image:
    linear-gradient(180deg, rgba(11,37,69,0.15), rgba(11,37,69,0.75)),
    url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?auto=format&fit=crop&w=1400&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Efecto "fixed" solicitado */
  background-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-end;
  padding: 34px;
}
.location-visual-content {
  position: relative;
  color: var(--color-white);
  background: rgba(11, 37, 69, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: var(--radius-md);
  padding: 22px 26px;
}
.location-visual-content strong { display: block; font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 4px; }
.location-visual-content span { font-size: 0.86rem; color: rgba(255,255,255,0.78); }

/* Fixed background sufre en iOS/Android: se desactiva en móvil para evitar bugs de render */
@media (max-width: 900px) {
  .credibility, .location-visual { background-attachment: scroll; }
}

/* ==========================================================================
   12. Contacto
   ========================================================================== */
.contact { padding: 120px 0 100px; background: var(--color-bg); }

.contact .container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}

.contact-cards { display: flex; flex-direction: column; gap: 18px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(11,37,69,0.06);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.contact-card .icon-circle {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  display: flex; align-items: center; justify-content: center;
}
.contact-card .icon-circle svg { width: 22px; height: 22px; color: #fff; }
.contact-card strong { display: block; color: var(--color-primary); font-size: 1rem; margin-bottom: 2px; }
.contact-card span { color: var(--color-text-soft); font-size: 0.92rem; }

.contact-social { display: flex; gap: 14px; margin-top: 8px; }
.contact-social a {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary);
  color: #fff;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.contact-social a:hover { background: var(--color-accent); transform: translateY(-4px); }
.contact-social svg { width: 20px; height: 20px; }

/* Formulario */
.contact-form {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(11,37,69,0.06);
}
.contact-form h3 { font-size: 1.4rem; margin-bottom: 8px; }
.contact-form p.form-sub { color: var(--color-text-soft); margin-bottom: 28px; font-size: 0.95rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--color-primary); }
.form-group input, .form-group select, .form-group textarea {
  padding: 14px 16px;
  border: 1.5px solid rgba(11,37,69,0.14);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(179, 57, 81, 0.12);
  background: var(--color-white);
}
.form-group textarea { resize: vertical; min-height: 110px; }

.contact-form .btn { width: 100%; padding: 17px; font-size: 1rem; margin-top: 4px; }

.form-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--color-text-soft);
}
.form-note svg { width: 16px; height: 16px; color: var(--color-gold); flex-shrink: 0; }

.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(11, 37, 69, 0.06);
  border-left: 3px solid var(--color-gold);
  color: var(--color-primary);
  font-size: 0.92rem;
  font-weight: 500;
}
.form-success.is-visible { display: flex; }
.form-success svg { width: 20px; height: 20px; color: var(--color-accent); flex-shrink: 0; }

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 76px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand-mark { border-color: var(--color-gold); }
.footer-brand { display: flex; flex-direction: column; gap: 18px; max-width: 320px; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: 0.92rem; line-height: 1.7; }

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a, .footer-col span { font-size: 0.92rem; transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--color-gold-light); }

.footer-social { display: flex; gap: 12px; margin-top: 6px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.footer-social a:hover { background: var(--color-accent); transform: translateY(-3px); }
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}
/* ==========================================================================
   14. Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .about .container { grid-template-columns: 1fr; }
  .about-visual { max-width: 420px; margin: 0 auto; }
  .location .container { grid-template-columns: 1fr; }
  .contact .container { grid-template-columns: 1fr; }
  .specialties-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* La nav completa (logo + 6 enlaces + CTA) necesita espacio amplio para no apretarse;
   se usa un margen de seguridad generoso para que nunca se superponga por variaciones
   de fuente, zoom del navegador o densidad de píxeles. */
@media (max-width: 1240px) {
  .nav-links { display: none; }
  .nav-cta .btn-primary { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.is-open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--color-bg);
    padding: 30px 32px 40px;
    gap: 22px;
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 860px) {
  .form-row { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 22px; }
  .about, .specialties, .education, .location, .contact { padding: 90px 0; }
  .credibility { padding: 90px 0; }
  .specialties-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .contact-form { padding: 30px 24px; }
  .brand-name { font-size: 1.1rem; }
  .brand-role { font-size: 0.74rem; }
  .brand-mark { width: 52px; height: 52px; }
  .about-visual-badge { position: static; margin-top: -40px; margin-left: auto; margin-right: auto; }
}
