/* ============================================
   CLÍNICA EUPNEA - GLOBAL STYLES
   Modern clinic + Sea/Ocean Theme
   Colors: Dark Blue, Pastel Blue, Black, White
   ============================================ */

/* === CSS Variables === */
:root {
  --primary-dark: #0a1628;
  --primary-blue: #1a3a5c;
  --primary-medium: #2a5f8f;
  --primary-light: #4a90c4;
  --pastel-blue: #a8d4e6;
  --pastel-light: #d4eef8;
  --accent-sea: #5bb5d5;
  --accent-foam: #e8f4f8;
  --white: #ffffff;
  --off-white: #f8fbfd;
  --black: #0a0a0a;
  --gray-dark: #333333;
  --gray-medium: #666666;
  --gray-light: #999999;
  --gray-lighter: #e0e6eb;
  --shadow-light: rgba(10, 22, 40, 0.08);
  --shadow-medium: rgba(10, 22, 40, 0.15);
  --shadow-dark: rgba(10, 22, 40, 0.25);
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.8s ease;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 20px;
  --max-width: 1200px;
  --header-height: 80px;
  --font-main: 'Inter', 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;

  /* Blog-compatible aliases */
  --primary: #4a90c4;
  --accent: #5bb5d5;
  --border-light: #e0e6eb;
  --text-body: #333333;
  --text-dark: #0a0a0a;
  --text-muted: #999999;
  --bg-light: #f8fbfd;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  color: var(--gray-dark);
  background-color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); margin-bottom: 0.6rem; }
h4 { font-size: clamp(1rem, 2vw, 1.4rem); margin-bottom: 0.5rem; }
h5 { font-size: 1.1rem; margin-bottom: 0.4rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray-medium);
  font-size: 1rem;
  line-height: 1.8;
}

/* === Page Transition Curtain === */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
  display: flex;
}

.curtain-left, .curtain-right {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.curtain-left {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.curtain-right {
  background: linear-gradient(225deg, var(--primary-dark), var(--primary-blue));
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition.closing .curtain-left {
  transform: translateX(0);
}

.page-transition.closing .curtain-right {
  transform: translateX(0);
}

.page-transition.opening .curtain-left {
  transform: translateX(-100%);
}

.page-transition.opening .curtain-right {
  transform: translateX(100%);
}

/* Wave decoration inside curtains - removed split halves, using single full-width wave on .page-transition instead */
.curtain-left::after, .curtain-right::after {
  display: none;
}

.page-transition::after {
  display: none;
}

.curtain-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.page-transition.closing .curtain-logo {
  opacity: 1;
}

.curtain-logo img {
  width: 180px;
  filter: brightness(0) invert(1);
}

.curtain-logo::after {
  content: '';
  display: flex;
  width: 40px;
  height: 10px;
  background: radial-gradient(circle, var(--pastel-blue) 30%, transparent 31%) 0 0 / 14px 10px,
              radial-gradient(circle, var(--pastel-blue) 30%, transparent 31%) 14px 0 / 14px 10px,
              radial-gradient(circle, var(--pastel-blue) 30%, transparent 31%) 28px 0 / 14px 10px;
  background-repeat: no-repeat;
  animation: curtainDots 1.4s ease-in-out infinite;
}

@keyframes curtainDots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* === Preloader === */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  width: 180px;
  margin-bottom: 30px;
  animation: float 2s ease-in-out infinite;
  filter: brightness(0) invert(1);
}

.preloader-wave {
  width: 200px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preloader-wave span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pastel-blue);
  animation: wave 1.4s ease-in-out infinite;
}

.preloader-wave span:nth-child(1) { animation-delay: 0s; }
.preloader-wave span:nth-child(2) { animation-delay: -1.12s; }
.preloader-wave span:nth-child(3) { animation-delay: -0.84s; }
.preloader-wave span:nth-child(4) { animation-delay: -0.56s; }
.preloader-wave span:nth-child(5) { animation-delay: -0.28s; }

/* === Header === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(10, 22, 40, 0.05);
  transition: all var(--transition-fast);
}

.header.scrolled {
  height: 65px;
  box-shadow: 0 2px 20px var(--shadow-light);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.logo img {
  height: 60px;
  width: auto;
  min-width: 100px;
  object-fit: contain;
  transition: height var(--transition-fast);
}

.header.scrolled .logo img {
  height: 48px;
}

/* Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-dark);
  position: relative;
  padding: 5px 0;
  letter-spacing: 0.3px;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent-sea));
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a:hover {
  color: var(--primary-medium);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-dropdown-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px var(--shadow-medium);
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  border: 1px solid var(--gray-lighter);
  z-index: 100;
  min-width: 260px;
}

/* Multi-column mega-menu for specialties */
.nav-dropdown-menu.mega-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  min-width: 640px;
  padding: 1rem 0.8rem;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover {
  background: var(--accent-foam);
  color: var(--primary-medium);
  border-radius: 6px;
}

/* Language Selector */
/* Language Dropdown */
.lang-dropdown {
  position: relative;
  margin-left: 1rem;
  border-left: 1px solid var(--gray-lighter);
  padding-left: 1rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--gray-lighter);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: all var(--transition-fast);
  font-family: inherit;
}

.lang-toggle:hover {
  border-color: var(--primary-medium);
  background: rgba(74, 144, 196, 0.05);
}

.lang-flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
  overflow: hidden;
}

.lang-flag[data-lang="ca"] {
  background: repeating-linear-gradient(to bottom,
    #FCDD09 0px, #FCDD09 2.22px,
    #DA121A 2.22px, #DA121A 4.44px);
}

.lang-flag[data-lang="es"] {
  background: linear-gradient(to bottom,
    #AA151B 0%, #AA151B 25%,
    #F1BF00 25%, #F1BF00 75%,
    #AA151B 75%, #AA151B 100%);
}

.lang-flag[data-lang="en"] {
  background: #012169;
  background-image:
    linear-gradient(to bottom, transparent 40%, #fff 40%, #fff 46%, #CF142B 46%, #CF142B 54%, #fff 54%, #fff 60%, transparent 60%),
    linear-gradient(to right, transparent 40%, #fff 40%, #fff 46%, #CF142B 46%, #CF142B 54%, #fff 54%, #fff 60%, transparent 60%);
}

.lang-flag[data-lang="fr"] {
  background: linear-gradient(to right,
    #002395 33.3%, #fff 33.3%, #fff 66.6%, #ED2939 66.6%);
}

.lang-flag[data-lang="ru"] {
  background: linear-gradient(to bottom,
    #fff 33.3%, #0039A6 33.3%, #0039A6 66.6%, #D52B1E 66.6%);
}

.lang-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.lang-dropdown.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.08);
  padding: 6px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.lang-dropdown.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark) !important;
  text-decoration: none !important;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.lang-item:hover {
  background: rgba(74, 144, 196, 0.08);
}

.lang-item.active {
  background: var(--primary-dark);
  color: var(--white) !important;
}

.lang-item::after {
  display: none !important;
}

/* Keep old class for backward compat */
.lang-selector { display: none; }

/* CTA Button in nav */
.nav-cta {
  background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
  color: var(--white) !important;
  padding: 10px 24px !important;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(42, 95, 143, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 95, 143, 0.4);
  color: var(--white) !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 10;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.menu-toggle:hover {
  background: var(--accent-foam);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--primary-dark);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* === Hero Section === */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--primary-dark);
}

/* Animated ocean gradient fallback when video not available */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(42, 95, 143, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(74, 144, 196, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(91, 181, 213, 0.3) 0%, transparent 50%),
    linear-gradient(180deg, #0a1628 0%, #1a3a5c 40%, #2a5f8f 70%, #1a3a5c 100%);
  animation: oceanDrift 15s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes oceanDrift {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-5%, -3%) scale(1.02); }
  66% { transform: translate(3%, -5%) scale(1.01); }
  100% { transform: translate(-2%, 2%) scale(1.03); }
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.15) 0%,
    rgba(10, 22, 40, 0.20) 50%,
    rgba(10, 22, 40, 0.35) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 2rem;
  padding-top: 2rem;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease 0.4s both;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.h1-subtitle {
  display: block;
  font-size: 0.42em;
  font-weight: 300;
  opacity: 0.8;
  margin-top: 0.3rem;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  color: var(--pastel-blue);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s ease 0.8s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 1s both;
  margin-bottom: 5rem;
}

/* Hero Wave Bottom */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 4;
}

.hero-wave svg {
  display: block;
  width: 100%;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(42, 95, 143, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(42, 95, 143, 0.4);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  transform: translateY(-3px);
  color: var(--white);
}

/* WhatsApp CTA Button */
.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  animation: whatsappPulse 2.5s ease-in-out infinite;
  position: relative;
}
.btn-whatsapp svg {
  flex-shrink: 0;
}
.btn-whatsapp:hover {
  background: linear-gradient(135deg, #20bd5a, #0f7a6e);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
  color: #fff !important;
}
@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35); }
  50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1); }
}

.btn-outline {
  background: transparent;
  color: var(--primary-medium);
  border: 2px solid var(--primary-medium);
}

.btn-outline:hover {
  background: var(--primary-medium);
  color: var(--white);
  transform: translateY(-3px);
}

/* Ripple effect on buttons */
.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.btn:active::after {
  transform: scale(2);
  opacity: 1;
  transition: 0s;
}

/* === Sections === */
.section {
  padding: 6rem 2rem;
  position: relative;
}

.section-alt {
  background: var(--off-white);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-header .section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary-light);
  margin-bottom: 1rem;
  position: relative;
}

.section-header .section-label::before,
.section-header .section-label::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--primary-light);
  vertical-align: middle;
  margin: 0 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--gray-medium);
}

/* Wave separator */
.wave-separator {
  position: relative;
  height: 60px;
  overflow: hidden;
}

.wave-separator svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
}

/* === Services Grid === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--primary-dark);
  border-radius: 20px;
  padding: 0;
  text-align: center;
  transition: all var(--transition-medium);
  border: 3px solid rgba(52, 185, 219, 0.65);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.service-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  z-index: 0;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
  transition: background var(--transition-medium);
}

.service-card:hover::before {
  background: linear-gradient(180deg, rgba(52,185,219,0.1) 0%, rgba(0,0,0,0.65) 100%);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  border-color: rgba(52, 185, 219, 0.9);
}

.service-card:hover .service-card-bg {
  transform: scale(1.08);
}

.service-card-icon {
  display: none;
}

.service-card-icon svg {
  display: none;
}

.service-card h3 {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  position: relative;
  z-index: 2;
  padding: 1.2rem 0.8rem;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* === About Section === */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px var(--shadow-medium);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-image:hover img {
  transform: scale(1.05);
}

.about-image::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border: 3px solid var(--pastel-blue);
  border-radius: 50%;
  opacity: 0.3;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* === Insurance/Mutuals Section === */
.mutuals-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  padding: 4rem 2rem;
}

.mutuals-section .section-header h2 {
  color: var(--white);
}

.mutuals-section .section-header .section-label {
  color: var(--pastel-blue);
}

.mutuals-section .section-header .section-label::before,
.mutuals-section .section-header .section-label::after {
  background: var(--pastel-blue);
}

.mutuals-img {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.mutuals-img img {
  width: 100%;
  border-radius: var(--border-radius);
  margin: 0 auto;
}

/* === Doctors Grid === */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.doctor-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px var(--shadow-medium);
}

.doctor-card-img {
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.doctor-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.doctor-card:hover .doctor-card-img img {
  transform: scale(1.08);
}

.doctor-card-info {
  padding: 1.5rem;
  text-align: center;
}

.doctor-card-info h3 {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.3rem;
}

.doctor-card-info p {
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 0;
  font-weight: 500;
}

/* === Page Hero (inner pages) === */
.page-hero {
  position: relative;
  padding: 10rem 2rem 5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(91, 181, 213, 0.15), transparent 70%);
  border-radius: 50%;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168, 212, 230, 0.1), transparent 70%);
  border-radius: 50%;
}

.page-hero h1 {
  color: var(--white);
  position: relative;
  z-index: 2;
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-hero p {
  color: var(--pastel-blue);
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.1rem;
}

.page-hero .breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.page-hero .breadcrumb a {
  color: var(--pastel-blue);
}

.page-hero .breadcrumb a:hover {
  color: var(--white);
}

.page-hero .breadcrumb span {
  color: rgba(255, 255, 255, 0.4);
}

.page-hero .breadcrumb .current {
  color: var(--white);
}

.page-hero-wave {
  display: none;
}

/* === Specialty Page Content === */
.specialty-content {
  padding: 5rem 2rem;
}

/* Remove double padding on contact page where specialty-content is inside .section */
.section > .container > .specialty-content {
  padding: 0;
}

/* Sidebar social divider */
.sidebar-social-sep {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 1.25rem 0 1rem;
  padding-top: 1rem;
}

.sidebar-social-sep h4 {
  color: var(--pastel-blue, #b8d4e8);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.specialty-content .container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
}

.specialty-main h2 {
  margin-top: 2rem;
}

.specialty-main h4 {
  color: var(--primary-medium);
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2rem;
}

.specialty-main ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.specialty-main ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--gray-medium);
  line-height: 1.7;
}

.specialty-main ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
}

.specialty-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  align-self: start;
}

.specialty-sidebar-img {
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px var(--shadow-light);
}

.specialty-sidebar-img img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.sidebar-cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  color: var(--white);
}

.sidebar-cta h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.sidebar-cta p {
  color: var(--pastel-blue);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* === FAQ / Accordion === */
.faq-section {
  margin-top: 3rem;
}

.faq-section h3 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.faq-item {
  border: 1px solid var(--gray-lighter);
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.8rem;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item.active {
  border-color: var(--primary-light);
  box-shadow: 0 4px 15px var(--shadow-light);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-dark);
  transition: all var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary-medium);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.5rem;
  color: var(--gray-medium);
  line-height: 1.8;
}

/* === Contact Page === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: 0 10px 40px var(--shadow-light);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-lighter);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  background: var(--off-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74, 144, 196, 0.1);
  background: var(--white);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary-medium);
}

.form-check label {
  font-size: 0.8rem;
  color: var(--gray-medium);
  line-height: 1.5;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px var(--shadow-light);
  transition: all var(--transition-fast);
}

.contact-info-item:hover {
  transform: translateX(5px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  background: var(--accent-foam);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary-medium);
}

.contact-info-item h4 {
  font-family: var(--font-main);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  margin-bottom: 0.3rem;
}

.contact-info-item a,
.contact-info-item p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0;
}

.contact-info-item a:hover {
  color: var(--primary-medium);
}

.contact-map {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-light);
  height: 300px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Schedule */
.schedule-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  border-radius: var(--border-radius);
  padding: 2rem;
  color: var(--white);
}

.schedule-card h4 {
  color: var(--pastel-blue);
  margin-bottom: 1rem;
}

.schedule-card p {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Contact Page - Unified Info Cards Row */
.contact-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Contact Form 2-column grid */
.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--primary-medium);
}

.form-checkbox label {
  font-size: 0.85rem;
  color: var(--gray-medium);
  line-height: 1.5;
  font-weight: 400;
}

/* reCAPTCHA responsive container */
.recaptcha-container {
  display: flex;
  justify-content: flex-start;
  margin: 0.5rem 0;
}
.recaptcha-container .g-recaptcha {
  transform-origin: 0 0;
}
@media (max-width: 400px) {
  .recaptcha-container .g-recaptcha {
    transform: scale(0.85);
    -webkit-transform: scale(0.85);
  }
}

/* Parking / Accessibility info badge */
.parking-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #e8f4fd, #f0f7ff);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-medium);
}

.parking-info svg {
  width: 32px;
  height: 32px;
  min-width: 32px;
  color: var(--primary-medium);
}

.parking-info p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--primary-dark);
  line-height: 1.5;
}

/* Contact form wrapper with background */
.contact-form-wrapper {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: 0 10px 40px var(--shadow-light);
}

/* Contact page social */
.contact-social {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-lighter);
}

.contact-social h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}

@media (max-width: 600px) {
  .contact-cards-row {
    grid-template-columns: 1fr;
  }
  .contact-form-grid {
    grid-template-columns: 1fr;
  }
  .contact-form-wrapper {
    padding: 1.5rem;
  }
}

/* === Facilities Photo Gallery === */
.facilities-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  aspect-ratio: 400 / 284;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow-medium);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.8rem 1rem;
  background: linear-gradient(transparent, rgba(10, 22, 40, 0.75));
  color: var(--white);
  font-weight: 600;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

@media (max-width: 1024px) {
  .facilities-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .facilities-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* === Footer === */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255,255,255,0.02)' d='M0,160L48,170.7C96,181,192,203,288,197.3C384,192,480,160,576,154.7C672,149,768,171,864,186.7C960,203,1056,213,1152,202.7C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer-about .footer-logo {
  width: 160px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-contact-info a,
.footer-contact-info span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact-info a:hover {
  color: var(--pastel-blue);
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul a::before {
  content: '›';
  color: var(--primary-light);
  font-size: 1.2rem;
}

.footer-col ul a:hover {
  color: var(--pastel-blue);
  transform: translateX(5px);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-bottom: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--pastel-blue);
}

/* === WhatsApp Button === */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all var(--transition-fast);
  animation: float 3s ease-in-out infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
  width: 30px;
  height: 30px;
  color: white;
}

/* === Scroll to Top === */
.scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary-medium);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

/* === Treatments Grid === */
.treatments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.treatment-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: all var(--transition-medium);
  border: 1px solid var(--gray-lighter);
}

.treatment-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px var(--shadow-medium);
  border-color: transparent;
}

.treatment-card-img {
  height: 200px;
  overflow: hidden;
}

.treatment-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.treatment-card:hover .treatment-card-img img {
  transform: scale(1.1);
}

.treatment-card-content {
  padding: 1.5rem;
}

.treatment-card-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.treatment-card-content p {
  font-size: 0.9rem;
}



/* === Join Team Page === */
.join-section {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.join-section p {
  font-size: 1.1rem;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes waveMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger animation for grid items */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(7) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(8) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(9) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(10) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(11) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(12) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(n+13) { transition-delay: 0.65s; opacity: 1; transform: translateY(0); }

/* === Bubble Decorations (sea) === */
.sea-bubbles {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.sea-bubbles .bubble {
  position: absolute;
  bottom: -20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(168, 212, 230, 0.15);
  animation: bubbleRise 8s ease-in-out infinite;
}

.sea-bubbles .bubble:nth-child(1) { left: 10%; width: 15px; height: 15px; animation-delay: 0s; animation-duration: 7s; }
.sea-bubbles .bubble:nth-child(2) { left: 25%; width: 25px; height: 25px; animation-delay: 1s; animation-duration: 9s; }
.sea-bubbles .bubble:nth-child(3) { left: 40%; width: 10px; height: 10px; animation-delay: 2s; animation-duration: 6s; }
.sea-bubbles .bubble:nth-child(4) { left: 55%; width: 20px; height: 20px; animation-delay: 0.5s; animation-duration: 8s; }
.sea-bubbles .bubble:nth-child(5) { left: 70%; width: 12px; height: 12px; animation-delay: 3s; animation-duration: 10s; }
.sea-bubbles .bubble:nth-child(6) { left: 85%; width: 18px; height: 18px; animation-delay: 1.5s; animation-duration: 7.5s; }

@keyframes bubbleRise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) scale(0.3);
    opacity: 0;
  }
}

/* === Cookie Banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  padding: 1.5rem 2rem;
  box-shadow: 0 -4px 20px var(--shadow-medium);
  z-index: 9999;
  display: none;
  border-top: 3px solid var(--primary-light);
}

.cookie-banner.show {
  display: block;
  animation: fadeInUp 0.5s ease;
}

/* Con el menu movil abierto, el banner (fixed, z-index 9999) quedaba por
   encima del menu (header, z-index 1000) y se comia los toques de los
   enlaces del desplegable que caian sobre el. */
body.menu-open .cookie-banner {
  visibility: hidden;
  pointer-events: none;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-inner p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-accept {
  padding: 10px 24px;
  background: var(--primary-medium);
  color: var(--white);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.cookie-accept:hover {
  background: var(--primary-dark);
}

.cookie-deny {
  padding: 10px 24px;
  background: transparent;
  color: var(--gray-medium);
  border: 1px solid var(--gray-lighter);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.cookie-deny:hover {
  border-color: var(--gray-dark);
  color: var(--gray-dark);
}

/* === Medical Tests Grid === */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.test-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--gray-lighter);
  transition: all var(--transition-fast);
}

.test-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-light);
  border-color: var(--primary-light);
}

.test-card h3 {
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  .specialty-content .container {
    grid-template-columns: 1fr;
  }
  
  .specialty-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  
  .about-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--header-height) 2rem 2rem;
    gap: 0;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-menu > a,
  .nav-menu > .nav-dropdown {
    width: 100%;
    text-align: center;
  }

  .nav-menu a {
    padding: 0.8rem 0;
    font-size: 1.1rem;
    width: auto;
    border-bottom: none;
    text-align: center;
    letter-spacing: 0.5px;
  }

  .nav-dropdown-trigger {
    justify-content: center;
    width: 100%;
  }

  .nav-menu a::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .nav-dropdown-menu,
  .nav-dropdown-menu.mega-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-height: 0;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
    transition: max-height var(--transition-medium);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: unset !important;
    grid-template-columns: none !important;
    width: 100% !important;
    background: transparent !important;
    z-index: auto !important;
  }
  
  .nav-dropdown.open .nav-dropdown-menu,
  .nav-dropdown.open .nav-dropdown-menu.mega-menu {
    max-height: 800px;
    padding: 0.5rem 0 !important;
    border-top: 1px solid var(--gray-lighter) !important;
    border-bottom: 1px solid var(--gray-lighter) !important;
    margin: 0.25rem 0;
  }

  .nav-dropdown.open .nav-dropdown-trigger svg {
    transform: rotate(180deg);
  }

  .nav-dropdown-menu a,
  .nav-dropdown-menu.mega-menu a {
    font-size: 0.95rem !important;
    text-align: center !important;
    padding: 0.5rem 1rem !important;
    width: 100% !important;
    display: block !important;
    white-space: normal !important;
  }
  
  .lang-dropdown {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-lighter);
  }

  .lang-toggle {
    width: 100%;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 20px;
  }

  .lang-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    display: none;
    padding: 8px 0 0;
    margin-top: 8px;
    min-width: auto;
  }

  .lang-dropdown.open .lang-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  .lang-item {
    padding: 6px 14px;
    border: 1.5px solid var(--gray-lighter);
    border-radius: 20px;
    font-size: 0.8rem;
  }

  .lang-item.active {
    border-color: var(--primary-dark);
  }

  .lang-selector {
    display: none;
  }

  .nav-cta {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding-top: var(--header-height);
    padding-bottom: 0;
  }

  .hero-content {
    padding: 2rem 1.5rem 1rem;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
    word-break: break-word;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem) !important;
    margin-bottom: 1rem !important;
  }

  .hero-text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
  }
  
  .section {
    padding: 4rem 1.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .service-card {
    padding: 0;
    aspect-ratio: 3 / 2;
  }

  .service-card h3 {
    font-size: 0.85rem;
    padding: 0.8rem 0.5rem;
  }
  
  .doctors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .specialty-sidebar {
    grid-template-columns: 1fr;
  }

  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .doctors-grid {
    grid-template-columns: 1fr;
  }
  
  .treatments-grid {
    grid-template-columns: 1fr;
  }
  
  .tests-grid {
    grid-template-columns: 1fr;
  }
  
}

/* ============================================
   BLOG STYLES
   ============================================ */

/* --- Blog Hero --- */
.blog-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  padding: 8rem 2rem 4rem;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 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='0.05'%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");
  pointer-events: none;
}

.blog-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.blog-hero p {
  color: var(--white);
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Blog Controls (Search + Filters) --- */
.blog-controls {
  max-width: var(--max-width);
  margin: -2rem auto 2rem;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.blog-search-wrap {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px var(--shadow-light);
  padding: 1.5rem 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.blog-search-wrap svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.blog-search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: transparent;
}

.blog-search-wrap input::placeholder {
  color: var(--text-muted);
}

#blog-search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: 50%;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

#blog-search-clear:hover {
  color: var(--primary);
  background: var(--bg-light);
}

/* --- Category Filter Buttons --- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.blog-filter-btn {
  background: var(--white);
  border: 2px solid var(--border-light);
  color: var(--text-body);
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  white-space: nowrap;
}

.blog-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.blog-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* --- Blog Result Count --- */
.blog-result-bar {
  max-width: var(--max-width);
  margin: 0 auto 1rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#blog-result-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Blog Grid --- */
.blog-grid-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

#blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* --- Blog Card --- */
.blog-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--shadow-medium);
}

.blog-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  display: block;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.06);
}

.blog-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-card-reading::before {
  content: '·';
  margin-right: 1rem;
}

.blog-card-title {
  font-size: 1.15rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
}

.blog-card-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: gap var(--transition-fast);
}

.blog-card-link:hover {
  gap: 0.8rem;
}

/* --- No Results --- */
.blog-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.blog-no-results svg {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.blog-no-results p {
  font-size: 1.1rem;
}

/* --- Pagination --- */
#blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.blog-page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: var(--white);
  color: var(--text-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.blog-page-btn:hover:not([disabled]) {
  border-color: var(--primary);
  color: var(--primary);
}

.blog-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.blog-page-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

.blog-page-ellipsis {
  width: 40px;
  text-align: center;
  color: var(--text-muted);
}

/* --- Blog Article Page --- */
.article-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--accent) 100%);
  padding: 8rem 2rem 3rem;
  color: var(--white);
  text-align: center;
}

.article-hero .breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.article-hero .breadcrumb a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.article-hero .breadcrumb a:hover {
  opacity: 1;
}

.article-hero .breadcrumb span {
  opacity: 0.5;
}

.article-hero .article-category {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.article-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--white);
  opacity: 1;
  flex-wrap: wrap;
  text-shadow: 0 1px 4px rgba(10, 22, 40, 0.45);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- Article Body --- */
.article-body {
  max-width: 920px;
  margin: -2rem auto 0;
  padding: 4.5rem 2.5rem 4rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px var(--shadow-light);
  position: relative;
  z-index: 2;
}

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.article-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.article-body p {
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text-body);
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body li {
  line-height: 1.7;
  margin-bottom: 0.5rem;
  color: var(--text-body);
}

.article-body img {
  width: 100%;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-light);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-style: italic;
  color: var(--text-dark);
}

.article-body img.article-featured-img {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 2.5rem;
  border-radius: 16px;
  object-fit: cover;
  object-position: center;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* --- Article CTA --- */
.article-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  margin-top: 2.5rem;
  color: var(--white);
}

.article-cta h3 {
  color: var(--white);
  margin-top: 0;
}

.article-cta .btn {
  background: var(--white);
  color: var(--primary);
  margin-top: 1rem;
}

/* --- Related Articles --- */
.related-articles {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem;
}

.related-articles h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* --- Article Info Box --- */
.article-info-box {
  background: linear-gradient(135deg, rgba(74,144,196,0.07), rgba(91,181,213,0.07));
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.article-info-box h4 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  margin-top: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-info-box p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.article-info-box p:last-child {
  margin-bottom: 0;
}

.article-info-box ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.article-info-box li {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

/* --- Article Key Takeaways --- */
.article-key-takeaways {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 1.75rem 2rem;
  margin: 2rem 0;
}

.article-key-takeaways h3 {
  color: var(--primary-dark);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.article-key-takeaways ul {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.article-key-takeaways li {
  padding: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}

.article-key-takeaways li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-key-takeaways li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* --- Article Table of Contents --- */
.article-toc {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border-light);
}

.article-toc h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--primary-dark);
}

.article-toc ol {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.article-toc li {
  margin-bottom: 0.4rem;
}

.article-toc a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.article-toc a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* --- Article Author Box --- */
.article-author-box {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 2.5rem 0 0;
  border: 1px solid var(--border-light);
}

.article-author-box .author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin: 0;
}

.article-author-info h4 {
  margin-bottom: 0.2rem;
  margin-top: 0;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.article-author-info p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Article Separator --- */
.article-body hr {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: 2.5rem 0;
}

/* --- Blog Responsive --- */
@media (max-width: 1024px) {
  #blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 7rem 1.5rem 3rem;
  }
  .blog-controls {
    padding: 0 1rem;
    margin-top: -1.5rem;
  }
  .blog-search-wrap {
    padding: 1rem 1.5rem;
  }
  .blog-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  .blog-grid-wrap {
    padding: 0 1rem 3rem;
  }
  .article-body {
    margin-top: -1rem;
    padding: 3rem 1.25rem 3rem;
  }
  .article-body img.article-featured-img {
    max-width: 100%;
    aspect-ratio: 4 / 3;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
  }
  .article-key-takeaways,
  .article-toc {
    padding: 1.25rem 1.5rem;
  }
  .article-author-box {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  #blog-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .blog-hero h1 {
    font-size: 1.8rem;
  }
}

/* === Print Styles === */
@media print {
  .header,
  .footer,
  .whatsapp-btn,
  .scroll-top,
  .cookie-banner,
  .page-transition {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  .page-hero {
    background: #f0f0f0 !important;
    padding: 2rem;
  }
  
  .page-hero h1 {
    color: #000;
  }
}

/* ============================================
   3D INTERACTIVE EFFECTS
   WebGL Ocean Canvas, Tilt Glare, Particles,
   Morphing Blobs, Magnetic Buttons
   ============================================ */

/* --- WebGL Ocean Canvas --- */
.ocean-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* When WebGL is active, hide the CSS fallback */
.hero:has(.ocean-canvas)::before {
  display: none;
}

/* --- 3D Tilt Glare Overlay --- */
.tilt-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

/* Override default card hover transform - the tilt JS handles it */
.service-card:hover,
.doctor-card:hover,
.value-card:hover,
.feature-card:hover,
.info-card:hover,
.test-card:hover {
  transform: none; /* JS controls transform */
}

/* Ensure card children have 3D depth */
.service-card .service-card-icon,
.service-card h3 {
  transform: translateZ(30px);
  transition: transform 0.4s ease;
}

/* --- Sea Particles Canvas --- */
.particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.7;
}

.hero .particles-canvas {
  z-index: 2;
  opacity: 0.5;
}

.page-hero .particles-canvas {
  z-index: 2;
  opacity: 0.4;
}

/* --- Morphing Blob Decorations --- */
.morphing-blob {
  width: 100%;
  height: 100%;
}

.blob-wrap {
  position: absolute;
  width: clamp(200px, 25vw, 380px);
  height: clamp(200px, 25vw, 380px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.blob-left {
  top: -5%;
  left: -5%;
}

.blob-right {
  bottom: -5%;
  right: -5%;
}

/* --- Enhanced Service Cards 3D --- */
.service-card {
  transform-style: preserve-3d;
  perspective: 800px;
}

/* Icons hidden – no 3D lift needed */

/* --- Animated Gradient Border on Cards --- */
.service-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-sea), var(--pastel-blue), var(--primary-light));
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: gradientShift 4s ease infinite;
}

.service-card:hover::after {
  opacity: 1;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* --- Subtle Float Animation for decorative elements --- */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes floatRotate {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

.about-image::after {
  animation: floatY 5s ease-in-out infinite;
}

/* --- Page Hero enhanced glow --- */
.page-hero::before {
  animation: floatY 8s ease-in-out infinite;
}

.page-hero::after {
  animation: floatRotate 10s ease-in-out infinite;
}

/* --- Smooth entrance for 3D elements --- */
@keyframes rise3D {
  from {
    opacity: 0;
    transform: perspective(800px) rotateX(8deg) translateY(40px);
  }
  to {
    opacity: 1;
    transform: perspective(800px) rotateX(0) translateY(0);
  }
}

.service-card.revealed,
.doctor-card.revealed,
.test-card.revealed {
  animation: rise3D 0.7s ease-out both;
}

.stagger.revealed .service-card:nth-child(1) { animation-delay: 0.05s; }
.stagger.revealed .service-card:nth-child(2) { animation-delay: 0.10s; }
.stagger.revealed .service-card:nth-child(3) { animation-delay: 0.15s; }
.stagger.revealed .service-card:nth-child(4) { animation-delay: 0.20s; }
.stagger.revealed .service-card:nth-child(5) { animation-delay: 0.25s; }
.stagger.revealed .service-card:nth-child(6) { animation-delay: 0.30s; }
.stagger.revealed .service-card:nth-child(7) { animation-delay: 0.35s; }
.stagger.revealed .service-card:nth-child(8) { animation-delay: 0.40s; }
.stagger.revealed .service-card:nth-child(9) { animation-delay: 0.45s; }
.stagger.revealed .service-card:nth-child(10) { animation-delay: 0.50s; }
.stagger.revealed .service-card:nth-child(11) { animation-delay: 0.55s; }
.stagger.revealed .service-card:nth-child(12) { animation-delay: 0.60s; }
.stagger.revealed .service-card:nth-child(13) { animation-delay: 0.65s; }

/* --- Disable 3D effects on mobile --- */
@media (max-width: 768px) {
  .ocean-canvas,
  .blob-wrap,
  .tilt-glare {
    display: none !important;
  }

  .service-card:hover,
  .doctor-card:hover {
    transform: translateY(-5px) !important;
  }
}
