/* ============================================
   ENDOSCOPIA DIGESTIVA — QUIRÓNSALUD BARCELONA
   Premium Medical Website — Mobile First
   ============================================ */

/* --- CSS RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Color System */
  --color-primary: #0A3D5C;
  --color-primary-light: #13678A;
  --color-primary-dark: #062A3E;
  --color-accent: #C5975B;
  --color-accent-light: #D4AF7A;
  --color-accent-dark: #A67B3D;
  --color-warm: #F7F3ED;
  --color-warm-deep: #EDE6D8;
  --color-bg: #FAFAF7;
  --color-white: #FFFFFF;
  --color-text: #1C2331;
  --color-text-light: #4A5568;
  --color-text-muted: #718096;
  --color-border: #E2DED6;
  --color-success: #2D8A4E;
  --color-urgency: #C53030;

  /* Typography */
  --font-heading: 'Libre Baskerville', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --nav-height: 70px;
  --nav-height-scrolled: 60px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 200ms var(--ease-out);
  --transition-base: 350ms var(--ease-out);
  --transition-slow: 600ms var(--ease-out);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10,61,92,0.06);
  --shadow-md: 0 4px 12px rgba(10,61,92,0.08);
  --shadow-lg: 0 8px 30px rgba(10,61,92,0.12);
  --shadow-xl: 0 20px 60px rgba(10,61,92,0.15);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-light); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--color-primary-dark); }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(1rem, 2vw, 1.2rem); font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: var(--space-md); color: var(--color-text-light); }
strong { color: var(--color-text); font-weight: 600; }

::selection { background: var(--color-accent-light); color: var(--color-primary-dark); }

/* --- UTILITY CLASSES --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); }
.container--narrow { max-width: var(--max-width-narrow); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ============================================
   NAVIGATION
   ============================================ */
.top-bar {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  padding: 6px 0;
  display: none;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: rgba(255,255,255,0.9); }
.top-bar a:hover { color: var(--color-accent-light); }

@media (min-width: 768px) {
  .top-bar { display: block; }
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
}
.nav.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-md);
}
.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo__title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.nav-logo__subtitle {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 4px 0;
  letter-spacing: 0.01em;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}
.nav-links a:hover { color: var(--color-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--color-primary); }
.nav-links a.active::after { width: 100%; }

.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: var(--color-white) !important;
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.nav-phone:hover {
  background: var(--color-primary-light);
  color: var(--color-white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.nav-phone svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: all var(--transition-fast);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--color-white);
  z-index: 999;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
  transition: right 0.4s var(--ease-out);
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.mobile-menu.active { right: 0; }
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.mobile-menu-overlay.active { opacity: 1; pointer-events: all; }

.mobile-menu ul { list-style: none; }
.mobile-menu > ul > li { border-bottom: 1px solid var(--color-border); }
.mobile-menu > ul > li > a {
  display: block;
  padding: var(--space-md) 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
}
.mobile-menu .submenu { padding-left: var(--space-lg); padding-bottom: var(--space-sm); }
.mobile-menu .submenu a {
  display: block;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--color-text-light);
}
.mobile-menu__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-primary);
  color: var(--color-white) !important;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: var(--space-xl);
  text-align: center;
}
.mobile-menu__phone svg { width: 20px; height: 20px; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .mobile-menu, .mobile-menu-overlay { display: none !important; }
  .nav-links { display: flex; }
}

/* --- MOBILE STICKY PHONE BAR --- */
.mobile-phone-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 997;
  background: var(--color-primary);
  padding: 12px var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(10,61,92,0.25);
}
.mobile-phone-bar a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white) !important;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.mobile-phone-bar svg { width: 20px; height: 20px; animation: pulse 2s infinite; }

@media (min-width: 1024px) {
  .mobile-phone-bar { display: none; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  overflow: hidden;
  padding-top: var(--nav-height);
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(197,151,91,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(19,103,138,0.3) 0%, transparent 50%);
  z-index: 1;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, var(--color-bg), transparent);
  z-index: 2;
}
.hero .container {
  position: relative;
  z-index: 3;
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-4xl);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s var(--ease-out) both;
}
.hero__badge svg { width: 14px; height: 14px; }

.hero__title {
  color: var(--color-white);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: var(--space-lg);
  max-width: 700px;
  animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}
.hero__title span { color: var(--color-accent-light); }

.hero__subtitle {
  color: rgba(255,255,255,0.8);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 500;
}
.hero__trust-item svg { width: 18px; height: 18px; color: var(--color-accent-light); flex-shrink: 0; }

/* Hero pattern decoration */
.hero__pattern {
  position: absolute;
  top: 0;
  right: -10%;
  width: 60%;
  height: 100%;
  z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================
   PAGE HERO (procedure/condition pages)
   ============================================ */
.page-hero {
  position: relative;
  padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-3xl);
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--color-bg), transparent);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-lg);
}
.page-hero__breadcrumb a { color: rgba(255,255,255,0.7); }
.page-hero__breadcrumb a:hover { color: var(--color-accent-light); }
.page-hero__breadcrumb svg { width: 12px; height: 12px; }

.page-hero__title {
  color: var(--color-white);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  max-width: 700px;
  margin-bottom: var(--space-md);
}
.page-hero__lead {
  color: rgba(255,255,255,0.8);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}
.page-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
}
.page-hero__tag svg { width: 14px; height: 14px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197,151,91,0.35);
}

.btn--secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn--secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--outline-light {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn--outline-light:hover {
  background: rgba(255,255,255,0.1);
  color: var(--color-white);
  border-color: rgba(255,255,255,0.7);
}

.btn--phone {
  background: var(--color-primary);
  color: var(--color-white) !important;
}
.btn--phone:hover {
  background: var(--color-primary-light);
  color: var(--color-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10,61,92,0.3);
}

.btn--sm { padding: 10px 20px; font-size: 0.85rem; }
.btn--lg { padding: 18px 36px; font-size: 1.05rem; }

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--space-3xl) 0;
}
.section--warm { background: var(--color-warm); }
.section--dark {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
}
.section--dark h2, .section--dark h3 { color: var(--color-white); }
.section--dark p { color: rgba(255,255,255,0.7); }

.section__header {
  margin-bottom: var(--space-2xl);
}
.section__header--center { text-align: center; }
.section__header--center p { margin-left: auto; margin-right: auto; max-width: 600px; }
.section__overline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.section__title {
  margin-bottom: var(--space-md);
}
.section__desc {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 650px;
}

@media (min-width: 768px) {
  .section { padding: var(--space-4xl) 0; }
}
@media (min-width: 1024px) {
  .section { padding: var(--space-5xl) 0; }
}

/* ============================================
   PHILOSOPHY STRIP
   ============================================ */
.philosophy-strip {
  background: var(--color-warm);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.philosophy-strip blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--color-primary);
  text-align: center;
  font-style: italic;
  line-height: 1.6;
  max-width: 750px;
  margin: 0 auto;
  position: relative;
  padding: 0 var(--space-xl);
}
.philosophy-strip blockquote::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--color-accent-light);
  position: absolute;
  top: -20px;
  left: 0;
  font-family: var(--font-heading);
  line-height: 1;
}
.philosophy-strip cite {
  display: block;
  margin-top: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: normal;
  font-weight: 500;
}

/* ============================================
   PROCEDURES GRID
   ============================================ */
.procedures-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 640px) { .procedures-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .procedures-grid { grid-template-columns: repeat(3, 1fr); } }

.procedure-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.procedure-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}
.procedure-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.procedure-card:hover::before { transform: scaleX(1); }

.procedure-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-warm);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}
.procedure-card__icon svg { width: 24px; height: 24px; }

.procedure-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}
.procedure-card__desc {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex-grow: 1;
}
.procedure-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}
.procedure-card__link svg { width: 16px; height: 16px; transition: transform var(--transition-fast); }
.procedure-card:hover .procedure-card__link svg { transform: translateX(4px); }

/* Urgency card variant */
.procedure-card--urgency {
  border-color: var(--color-urgency);
  background: linear-gradient(135deg, #FFF5F5 0%, var(--color-white) 100%);
}
.procedure-card--urgency .procedure-card__icon { background: #FFF5F5; color: var(--color-urgency); }
.procedure-card--urgency::before { background: var(--color-urgency); }

/* ============================================
   SYMPTOM NAVIGATOR
   ============================================ */
.symptom-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 640px) { .symptom-nav { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .symptom-nav { grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); } }

.symptom-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.symptom-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.symptom-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.symptom-card__text { flex: 1; }
.symptom-card__symptom {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.92rem;
  margin-bottom: 4px;
  display: block;
}
.symptom-card__action {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 500;
}

/* ============================================
   PROCESS STEPS
   ============================================ */
.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  counter-reset: step;
}
@media (min-width: 768px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .process-steps { grid-template-columns: repeat(4, 1fr); }
}

.process-step {
  text-align: center;
  counter-increment: step;
  position: relative;
}
.process-step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 auto var(--space-md);
}
.process-step__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}
.process-step__desc {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.55;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
}
@media (min-width: 768px) { .stats-bar { grid-template-columns: repeat(4, 1fr); } }

.stat-item { text-align: center; }
.stat-item__number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-item__label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ============================================
   CONTENT PAGES (procedure/condition)
   ============================================ */
.content-page {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-4xl);
}
.content-page .container { max-width: var(--max-width-narrow); }

.content-page h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--color-warm-deep);
}
.content-page h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.content-page h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.content-page p {
  font-size: 1.02rem;
  line-height: 1.8;
}

.content-page ul, .content-page ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}
.content-page li {
  margin-bottom: 10px;
  color: var(--color-text-light);
  line-height: 1.65;
}
.content-page li strong { color: var(--color-text); }

.content-page .step-list {
  list-style: none;
  padding-left: 0;
  counter-reset: steps;
}
.content-page .step-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 50px;
  margin-bottom: var(--space-lg);
}
.content-page .step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Info callout boxes */
.callout {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  border-left: 4px solid;
}
.callout--info {
  background: #EFF6FF;
  border-color: var(--color-primary-light);
}
.callout--warning {
  background: #FFFBEB;
  border-color: var(--color-accent);
}
.callout--urgent {
  background: #FFF5F5;
  border-color: var(--color-urgency);
}
.callout p:last-child { margin-bottom: 0; }

/* CTA box in content */
.content-cta {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: var(--space-2xl) 0;
}
.content-cta p { color: rgba(255,255,255,0.85); margin-bottom: var(--space-md); }
.content-cta .content-cta__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent-light) !important;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-heading);
}
.content-cta .content-cta__phone:hover { color: var(--color-white) !important; }
.content-cta__note {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6) !important;
  margin-top: var(--space-sm);
  margin-bottom: 0 !important;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-list { max-width: var(--max-width-narrow); margin: 0 auto; }
.faq-category { margin-bottom: var(--space-2xl); }
.faq-category__title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--space-lg) 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  line-height: 1.4;
}
.faq-item__question:hover { color: var(--color-primary); }
.faq-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast);
  margin-top: 2px;
}
.faq-item__icon svg { width: 14px; height: 14px; color: var(--color-primary); }
.faq-item.active .faq-item__icon { background: var(--color-primary); transform: rotate(45deg); }
.faq-item.active .faq-item__icon svg { color: var(--color-white); }

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.3s var(--ease-out);
  padding: 0 0 0 40px;
}
.faq-item.active .faq-item__answer {
  max-height: 600px;
  padding-bottom: var(--space-lg);
}
.faq-item__answer p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-light);
}

/* ============================================
   TEAM SECTION
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}
@media (min-width: 768px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

.team-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}
.team-card:hover { box-shadow: var(--shadow-lg); }
.team-card__img {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, var(--color-warm) 0%, var(--color-warm-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-light);
  font-size: 3rem;
}
.team-card__body { padding: var(--space-xl); }
.team-card__name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary-dark);
  margin-bottom: 4px;
}
.team-card__role {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: var(--space-md);
}
.team-card__bio {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Lead doctor card */
.team-card--lead { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .team-card--lead {
    display: grid;
    grid-template-columns: 300px 1fr;
  }
  .team-card--lead .team-card__img { height: 100%; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.7);
  padding: var(--space-3xl) 0 0;
}
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: var(--color-accent-light); }

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer__brand { }
.footer__brand-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}
.footer__brand-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}
.footer__phone-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}
.footer__phone-box a {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent-light) !important;
}
.footer__phone-box svg { width: 20px; height: 20px; color: var(--color-accent-light); flex-shrink: 0; }

.footer__address {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer__col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--space-md);
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 10px; }
.footer__col a { font-size: 0.88rem; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-lg) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* Padding for mobile phone bar */
body { padding-bottom: 60px; }
@media (min-width: 1024px) { body { padding-bottom: 0; } }

/* ============================================
   LEGACY PAGE (EL LEGADO)
   ============================================ */
.legacy-timeline {
  position: relative;
  padding-left: 30px;
}
.legacy-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--color-accent-light);
}
.legacy-timeline__item {
  position: relative;
  margin-bottom: var(--space-2xl);
  padding-left: var(--space-xl);
}
.legacy-timeline__item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-warm);
}
.legacy-timeline__year {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-accent);
  margin-bottom: 4px;
  font-weight: 700;
}
.legacy-timeline__text {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
}
.contact-info-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}
.contact-info-card__icon svg { width: 24px; height: 24px; }

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  height: 350px;
}
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-warm); }
::-webkit-scrollbar-thumb { background: var(--color-primary-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ============================================
   DROPDOWN NAVIGATION
   ============================================ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}
.nav-dropdown__menu a {
  display: block;
  padding: 10px var(--space-lg);
  font-size: 0.85rem;
  color: var(--color-text);
  white-space: nowrap;
}
.nav-dropdown__menu a::after { display: none; }
.nav-dropdown__menu a:hover { background: var(--color-warm); color: var(--color-primary); }
.nav-dropdown__divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-xs) 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .nav, .mobile-phone-bar, .footer, .btn { display: none !important; }
  body { padding: 0; background: white; }
  .hero { min-height: auto; background: white; }
  .hero__title, .page-hero__title { color: black !important; }
}

/* === V2 UPDATES === */

/* Hero grid: image on right on desktop, stacked on mobile */
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-xl);
  align-items: center;
}
@media (max-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__image {
    order: -1;
    margin-bottom: var(--space-md);
  }
}

/* Nav: make Endoscopia Digestiva prominently bigger than hospital name */
.nav-logo__title {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  line-height: 1.1 !important;
  color: var(--color-primary-dark) !important;
}
.nav-logo__subtitle {
  font-size: 0.65rem !important;
  opacity: 0.6;
  font-weight: 400 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 768px) {
  .nav-logo__title {
    font-size: 1.2rem !important;
  }
}

/* Image placeholder styling */
.image-placeholder {
  border: 2px dashed rgba(0,0,0,0.15);
}

/* Procedure FAQs in procedure pages */
.procedure-faqs .faq-list {
  margin-top: var(--space-lg);
}
.procedure-faqs h2 {
  margin-bottom: var(--space-lg);
}

/* ═══════════════════════════════════════
   CONTENT ARTICLE STYLES
   ═══════════════════════════════════════ */

.content-article {
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.8;
}
.content-article h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--color-primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}
.content-article h2:first-child { margin-top: 0; }
.content-article h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  color: var(--color-heading);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.content-article p {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}
.content-article a { color: var(--color-primary); }

.content-highlight {
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.content-highlight p { margin: 0; font-size: 1.02rem; }

.content-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
@media (max-width: 600px) {
  .content-columns { grid-template-columns: 1fr; }
}

.content-card {
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}
.content-card p { font-size: 0.95rem; line-height: 1.7; }
.content-card p:last-child { margin-bottom: 0; }
.content-card__title { font-weight: 700; margin-bottom: var(--space-sm); }
.content-card--green { background: #f0faf0; }
.content-card--green .content-card__title { color: #2d7d32; }
.content-card--red { background: #fef0f0; }
.content-card--red .content-card__title { color: #c62828; }

.content-aside {
  background: #f8f6f0;
  border-left: 3px solid var(--color-warm);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
}
.content-aside h3 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: var(--space-sm);
  color: var(--color-heading);
}
.content-aside p:last-child { margin-bottom: 0; }

.content-steps {
  line-height: 1.8;
  padding-left: 1.5rem;
  margin: var(--space-md) 0;
}
.content-steps li { margin-bottom: var(--space-sm); }

.content-list {
  line-height: 1.8;
  padding-left: 1.5rem;
  margin: var(--space-md) 0;
}
.content-list li { margin-bottom: 0.3rem; }

.content-tip {
  background: var(--color-accent-light);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
  font-size: 0.95rem;
  line-height: 1.7;
}
.content-tip p { margin: 0; }

.content-table-wrap { overflow-x: auto; margin: var(--space-lg) 0; }
.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.content-table thead tr {
  background: var(--color-primary);
  color: white;
}
.content-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.content-table td { padding: 0.65rem 1rem; }
.content-table tbody tr:nth-child(even) { background: var(--color-accent-light); }

.content-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.content-figure {
  margin: var(--space-xl) 0;
}
.content-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}
.content-figure figcaption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  line-height: 1.5;
}

.content-related {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
}
.content-related__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-md);
}
.content-related__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.content-related__links a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.2s;
}
.content-related__links a:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.page-hero--compact {
  padding: var(--space-xl) 0 var(--space-lg);
}

/* Step-list within content-article (same as content-page) */
.content-article .step-list {
  list-style: none;
  padding-left: 0;
  counter-reset: steps;
}
.content-article .step-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 50px;
  margin-bottom: var(--space-lg);
}
.content-article .step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Callout boxes within content-article */
.content-article .callout {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  border-left: 4px solid;
}
.content-article .callout--info {
  background: #EFF6FF;
  border-color: var(--color-primary-light);
}
.content-article .callout--warning {
  background: #FFFBEB;
  border-color: var(--color-accent);
}
.content-article .callout p:last-child { margin-bottom: 0; }

/* Stat row for content pages */
.content-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding: var(--space-xl) 0;
  margin: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
@media (max-width: 500px) {
  .content-stats { grid-template-columns: 1fr; gap: var(--space-lg); }
}
.content-stat { text-align: center; }
.content-stat__number {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 6px;
}
.content-stat__label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Image placeholder box */
.img-placeholder {
  background: linear-gradient(135deg, #e8edf2 0%, #d5dde6 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  margin: var(--space-xl) 0;
}
.img-placeholder svg { margin-bottom: var(--space-sm); opacity: 0.5; }
.img-placeholder p { color: #6b7d8e; font-size: 0.85rem; margin: 0; }
