/* ── IBHM theme.css ──────────────────────────────────────────────────────── */
/* Custom CSS variables, keyframes, and utilities not covered by Tailwind.   */
/* This file is enqueued after tailwind-output.css.                          */

/* ── Design tokens (mirror of src/index.css :root) ──────────────────────── */


/* Fonts are loaded in index.html with preload and display=swap for optimal performance */

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    scroll-behavior: smooth;
  }
  
  :root {
    /* Primary - WCAG AA Compliant Deep Blue (4.5:1 contrast on white) */
    --primary: 215 70% 38%;
    --primary-foreground: 0 0% 100%;
    --primary-light: 215 50% 95%;
    --primary-dark: 215 75% 28%;
    
    /* Secondary - WCAG AA Compliant Teal (4.5:1 contrast on white) - darkened for better contrast */
    --secondary: 174 65% 26%;
    --secondary-foreground: 0 0% 100%;
    --secondary-light: 174 45% 95%;
    
    /* Accent - Teal variant (matches secondary for consistency) */
    --accent: 174 60% 32%;
    --accent-foreground: 0 0% 100%;
    
    /* Backgrounds - Crisp White */
    --background: 0 0% 100%;
    --foreground: 220 30% 15%;
    
    /* Cards and surfaces */
    --card: 0 0% 100%;
    --card-foreground: 220 30% 15%;
    
    --popover: 0 0% 100%;
    --popover-foreground: 220 30% 15%;
    
    /* Muted elements */
    --muted: 210 20% 97%;
    --muted-foreground: 220 15% 45%;
    
    /* Borders and inputs */
    --border: 210 20% 92%;
    --input: 210 20% 92%;
    --ring: 215 65% 45%;
    
    /* Destructive */
    --destructive: 0 65% 55%;
    --destructive-foreground: 0 0% 100%;
    
    /* Radius */
    --radius: 0.75rem;
    
    /* Custom gradients */
    --gradient-hero: linear-gradient(135deg, hsl(215 65% 45% / 0.92) 0%, hsl(174 50% 45% / 0.88) 100%);
    --gradient-card: linear-gradient(180deg, hsl(0 0% 100%) 0%, hsl(210 20% 98%) 100%);
    --gradient-electric: linear-gradient(135deg, hsl(215 65% 45%) 0%, hsl(215 55% 55%) 50%, hsl(174 50% 45%) 100%);
    --gradient-turquoise: linear-gradient(135deg, hsl(174 50% 45%) 0%, hsl(174 45% 55%) 100%);
    --gradient-glass: linear-gradient(135deg, hsl(0 0% 100% / 0.9) 0%, hsl(0 0% 100% / 0.7) 100%);
    
    /* Shadows */
    --shadow-soft: 0 4px 20px -4px hsl(215 65% 45% / 0.1);
    --shadow-card: 0 8px 32px -8px hsl(215 65% 45% / 0.12);
    --shadow-hover: 0 16px 48px -12px hsl(215 65% 45% / 0.15);
    --shadow-glow: 0 0 40px -10px hsl(174 50% 45% / 0.3);
    
    /* Sidebar tokens */
    --sidebar-background: 0 0% 100%;
    --sidebar-foreground: 220 30% 15%;
    --sidebar-primary: 215 65% 45%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 210 20% 97%;
    --sidebar-accent-foreground: 220 30% 15%;
    --sidebar-border: 210 20% 92%;
    --sidebar-ring: 215 65% 45%;
  }

  .dark {
    --primary: 215 55% 55%;
    --primary-foreground: 0 0% 100%;
    --primary-light: 215 40% 20%;
    --primary-dark: 215 60% 65%;
    
    --secondary: 174 45% 50%;
    --secondary-foreground: 0 0% 100%;
    --secondary-light: 174 35% 15%;
    
    --accent: 174 45% 50%;
    --accent-foreground: 0 0% 100%;
    
    --background: 220 30% 8%;
    --foreground: 0 0% 98%;
    
    --card: 220 30% 12%;
    --card-foreground: 0 0% 98%;
    
    --popover: 220 30% 12%;
    --popover-foreground: 0 0% 98%;
    
    --muted: 220 25% 18%;
    --muted-foreground: 210 15% 60%;
    
    --border: 220 25% 20%;
    --input: 220 25% 20%;
    --ring: 215 55% 55%;
    
    --destructive: 0 55% 50%;
    --destructive-foreground: 0 0% 100%;
    
    --sidebar-background: 220 30% 10%;
    --sidebar-foreground: 0 0% 98%;
    --sidebar-primary: 215 55% 55%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 220 25% 18%;
    --sidebar-accent-foreground: 0 0% 98%;
    --sidebar-border: 220 25% 20%;
    --sidebar-ring: 215 55% 55%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  html {
    scroll-behavior: smooth;
    /* Prevent browser scroll anchoring from "adjusting" scroll position when content changes */
    overflow-anchor: none;
  }

  body {
    overflow-anchor: none;
    overflow-x: hidden;
    @apply bg-background text-foreground font-sans antialiased;
    overflow-x: hidden;
  }

  h1, h2, h3, h4, h5, h6 {
    @apply font-sans font-bold tracking-tight;
  }
}

@layer utilities {
  /* ================================
     GRADIENT UTILITIES
     ================================ */
  .gradient-hero {
    background: var(--gradient-hero);
  }
  
  .gradient-card {
    background: var(--gradient-card);
  }
  
  .gradient-electric {
    background: var(--gradient-electric);
  }
  
  .gradient-turquoise {
    background: var(--gradient-turquoise);
  }
  
  .gradient-glass {
    background: var(--gradient-glass);
  }
  
  /* ================================
     SHADOW UTILITIES
     ================================ */
  .shadow-soft {
    box-shadow: var(--shadow-soft);
  }
  
  .shadow-card {
    box-shadow: var(--shadow-card);
  }
  
  .shadow-hover {
    box-shadow: var(--shadow-hover);
  }
  
  .shadow-glow {
    box-shadow: var(--shadow-glow);
  }
  
  .text-balance {
    text-wrap: balance;
  }
  
  /* ================================
     GLASS MORPHISM
     ================================ */
  .glass {
    background: hsl(0 0% 100% / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  
  /* ================================
     TEXT GRADIENT
     ================================ */
  .text-gradient {
    background: var(--gradient-electric);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* ================================
     SCROLLBAR UTILITIES
     ================================ */
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }

  /* ================================
     CLS PREVENTION - Core Web Vitals
     ================================ */
  
  /* Fixed aspect ratio containers for images */
  .aspect-hero {
    aspect-ratio: 16 / 9;
  }
  
  .aspect-card {
    aspect-ratio: 4 / 3;
  }
  
  .aspect-provider {
    aspect-ratio: 1 / 1;
  }
  
  .aspect-service {
    aspect-ratio: 16 / 10;
  }
  
  /* Font loading stability - prevents text reflow */
  .font-reserve {
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Touch targets - minimum 48px for mobile accessibility */
  .tap-target {
    min-height: 48px;
    min-width: 48px;
  }
  
  /* Image skeleton placeholder */
  .img-skeleton {
    background: linear-gradient(
      90deg,
      hsl(var(--muted)) 0%,
      hsl(var(--muted) / 0.8) 50%,
      hsl(var(--muted)) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
  }
  
  @keyframes skeleton-shimmer {
    0% {
      background-position: 200% 0;
    }
    100% {
      background-position: -200% 0;
    }
  }
  
  /* Zoom-stable text - prevents misalignment on browser zoom */
  .zoom-stable {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: auto;
  }
  
  /* Content visibility for offscreen performance */
  .content-lazy {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
  }
}

/* Custom animations */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes gentle-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px hsl(174 72% 56% / 0.3);
  }
  50% {
    box-shadow: 0 0 40px hsl(174 72% 56% / 0.5);
  }
}

.animate-fade-up {
  animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
  animation: fade-in 0.5s ease-out forwards;
}

/* Hero polish - starts visible, adds subtle refinement without delaying render */
@keyframes hero-polish {
  from {
    opacity: 0.85;
    filter: blur(1px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.animate-hero-polish {
  animation: hero-polish 0.4s ease-out forwards;
}

.animate-gentle-float {
  animation: gentle-float 6s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent 0%, hsl(0 0% 100% / 0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wave animations */
@keyframes wave {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-wave {
  animation: wave 15s linear infinite;
  will-change: transform;
}

.animate-wave-slow {
  animation: wave 20s linear infinite;
  will-change: transform;
}

.animate-wave-slower {
  animation: wave 25s linear infinite;
  will-change: transform;
}

/* 3D Flip Card Utilities */
.perspective-1000 {
  perspective: 1000px;
}

.transform-style-3d {
  transform-style: preserve-3d;
}

.backface-hidden {
  backface-visibility: hidden;
}

.rotate-y-180 {
  transform: rotateY(180deg);
}

.group:hover .group-hover\:rotate-y-180 {
  transform: rotateY(180deg);
}

/* Print styles for PDF download */
@media print {
  @page {
    margin: 1in;
    margin-bottom: 1.5in;
  }
  
  body {
    margin-bottom: 80px;
  }
  
  .print-page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: hsl(220 15% 45%);
    padding: 12px 20px;
    border-top: 1px solid hsl(210 20% 92%);
    background: white;
  }
}

/* Review Marquee Scroll Animations */
@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes scrollRight {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Insurance scroll animation - smooth CSS-based infinite scroll */
@keyframes scrollInsurance {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.333%);
  }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

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

/* Enhanced focus states for keyboard navigation */
:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Skip link enhancement */
.sr-only:focus {
  position: absolute;
  width: auto;
  height: auto;
  padding: 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  z-index: 9999;
}

/* Touch target minimum size (WCAG 2.5.5) - 48px for better mobile UX */
@media (pointer: coarse) {
  button,
  [role="button"],
  a:not(.inline-link),
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 48px;
    min-width: 48px;
  }
  
  /* Ensure clickable cards and interactive elements are tap-friendly */
  .tap-target {
    min-height: 48px;
    min-width: 48px;
  }
}

/* Content visibility for performance - auto-render offscreen content */
.content-visibility-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* CLS Prevention - Fixed aspect ratio containers */
.aspect-hero {
  aspect-ratio: 16 / 9;
}

.aspect-card {
  aspect-ratio: 4 / 3;
}

.aspect-provider {
  aspect-ratio: 1 / 1;
}

/* Reserve space for font loading to prevent text reflow */
.font-reserve {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Image container with fixed dimensions for CLS */
.img-container {
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--muted));
}

.img-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Will-change optimization hints - use sparingly */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: 220 30% 20%;
    --ring: 215 100% 30%;
  }
}

/* Print styles */
@media print {
  .no-print,
  nav,
  footer,
  .back-to-top {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* Flip card utilities */
.perspective-1000 {
  perspective: 1000px;
}

.preserve-3d {
  transform-style: preserve-3d;
}

.backface-hidden {
  backface-visibility: hidden;
}

.rotate-y-180 {
  transform: rotateY(180deg);
}

.group:hover .group-hover\:rotate-y-180 {
  transform: rotateY(180deg);
}

/* 
 * GPU-composited gradient animation for hero sections
 * Uses opacity-based animation instead of background-position for better compositing
 * This avoids non-composited animation warnings in PageSpeed Insights
 */
@keyframes gradient-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

.animate-gradient-shift {
  /* Use GPU-accelerated opacity animation instead of background-position */
  animation: gradient-pulse 8s ease-in-out infinite;
  will-change: opacity;
  transform: translateZ(0); /* Force GPU layer */
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-gradient-shift {
    animation: none;
    will-change: auto;
  }
}



/* ── Named gradient utility classes ─────────────────────────────────────── */
.gradient-hero     { background: var(--gradient-hero); }
.gradient-electric { background: var(--gradient-electric); }
.gradient-turquoise { background: var(--gradient-turquoise); }
.gradient-glass    { background: var(--gradient-glass); }
.gradient-card     { background: var(--gradient-card); }

/* ── Content-visibility utility ──────────────────────────────────────────── */
.content-lazy {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* ── Custom keyframes ────────────────────────────────────────────────────── */

/* Hero content subtle entry (replaces animate-hero-polish in React) */
@keyframes hero-polish {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-hero-polish {
  animation: hero-polish 0.6s ease-out both;
}

/* Fade up (used on section children) */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fade-up 0.5s ease-out both;
}

/* Fade in */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-in {
  animation: fade-in 0.4s ease-out both;
}

/* Insurance logo ticker */
@keyframes scrollInsurance {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

/* Patient review rows */
@keyframes scrollLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scrollRight {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Wave decorations (service cards, why-choose-us) */
@keyframes wave {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes wave-slow {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-wave      { animation: wave 8s linear infinite; }
.animate-wave-slow { animation: wave-slow 14s linear infinite; }

/* Accordion open/close (Radix-compatible) */
@keyframes accordion-down {
  from { height: 0; }
  to   { height: var(--radix-accordion-content-height, auto); }
}
@keyframes accordion-up {
  from { height: var(--radix-accordion-content-height, auto); }
  to   { height: 0; }
}

/* ── Scroll-triggered animation targets ─────────────────────────────────── */
/* ibhm-animations.js adds .is-in-view when element enters viewport.        */

[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-animate].is-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
[data-animate="stagger"] > *:nth-child(1) { transition-delay: 0.10s; }
[data-animate="stagger"] > *:nth-child(2) { transition-delay: 0.25s; }
[data-animate="stagger"] > *:nth-child(3) { transition-delay: 0.40s; }

/* ── Text cycler ──────────────────────────────────────────────────────────── */
.ibhm-text-cycler {
  display: inline-grid;
}
.ibhm-cycle-item {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.ibhm-cycle-item.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Flip card hover (JS adds .is-flipped for touch) ─────────────────────── */
.ibhm-flip-card .ibhm-flip-front  { transition: opacity 0.7s ease; }
.ibhm-flip-card .ibhm-flip-back   { opacity: 0; transition: opacity 0.7s ease; pointer-events: none; }
.ibhm-flip-card:hover .ibhm-flip-front,
.ibhm-flip-card.is-flipped .ibhm-flip-front  { opacity: 0; pointer-events: none; }
.ibhm-flip-card:hover .ibhm-flip-back,
.ibhm-flip-card.is-flipped .ibhm-flip-back   { opacity: 1; pointer-events: auto; }

/* ── FAQ section expand/collapse ─────────────────────────────────────────── */
.ibhm-faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.ibhm-faq-toggle[aria-expanded="true"] .ibhm-faq-chevron {
  transform: rotate(180deg);
}
.ibhm-faq-chevron {
  transition: transform 0.3s ease;
}

/* ── Why Choose Us sticky scroll (desktop) ───────────────────────────────── */
.ibhm-why-sticky-panel {
  transition: opacity 0.4s ease;
}

/* ── Header transparent / solid states ──────────────────────────────────── */
/* JS (ibhm-header.js) toggles these classes based on scroll position.       */

/* ── Nav links: transparent state (white text) ───────────────────────────── */
#ibhm-header.ibhm-header-transparent .ibhm-nav-links {
  color: hsl(0 0% 100% / 0.9);
}
#ibhm-header.ibhm-header-transparent .ibhm-nav-links a:hover {
 background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
}

/* ── Nav links: solid state (dark text matching React source) ─────────────── */
#ibhm-header.ibhm-mini-panel .ibhm-nav-links {
  color: hsl(var(--muted-foreground));
}
#ibhm-header.ibhm-mini-panel .ibhm-nav-links a {
  color: hsl(var(--muted-foreground));
}
#ibhm-header.ibhm-mini-panel .ibhm-nav-links a:hover {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
}

#ibhm-header.ibhm-header-transparent {
  background: transparent;
  border-bottom-color: transparent;
}
#ibhm-header.ibhm-header-transparent .ibhm-logo {
  filter: brightness(0) invert(1);
}
#ibhm-header.ibhm-header-transparent .ibhm-phone-cta {
  background: hsl(0 0% 100% / 0.1);
  border-color: hsl(0 0% 100% / 0.2);
  color: white;
}
#ibhm-header.ibhm-header-transparent .ibhm-phone-cta:hover {
  background: hsl(0 0% 100% / 0.2);
}
#ibhm-header.ibhm-header-transparent .ibhm-book-btn {
  background: white;
  color: hsl(var(--primary));
}
#ibhm-header.ibhm-header-transparent .ibhm-book-btn:hover {
  background: hsl(0 0% 100% / 0.9);
}
#ibhm-header.ibhm-header-transparent .ibhm-hamburger {
  color: white;
}
#ibhm-header.ibhm-header-transparent .ibhm-hamburger:hover {
  background: hsl(0 0% 100% / 0.1);
}

#ibhm-header.ibhm-header-solid {
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / 0.3);
  box-shadow: 0 1px 3px hsl(0 0% 0% / 0.05);
}
#ibhm-header.ibhm-header-solid .ibhm-logo {
  filter: none;
}
#ibhm-header.ibhm-header-solid .ibhm-phone-cta {
  background: hsl(var(--primary) / 0.05);
  border-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary));
}
#ibhm-header.ibhm-header-solid .ibhm-phone-cta:hover {
  background: hsl(var(--primary) / 0.1);
}
#ibhm-header.ibhm-header-solid .ibhm-book-btn {
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
  color: hsl(var(--primary-foreground));
}
#ibhm-header.ibhm-header-solid .ibhm-book-btn:hover {
  opacity: 0.9;
}
#ibhm-header.ibhm-header-solid .ibhm-hamburger {
  color: hsl(var(--muted-foreground));
}
#ibhm-header.ibhm-header-solid .ibhm-hamburger:hover {
  background: hsl(var(--muted));
}

/* Pages that never have a dark hero start solid immediately. */
#ibhm-header:not([data-dark-hero]) {
  background: hsl(var(--background) / 0.95);
  border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.ibhm-text-cycler {
    display: inline-grid !important;
    grid-template-columns: max-content !important;
    grid-template-rows: auto !important;
  }
  .ibhm-cycle-item {
    grid-area: 1 / 1 / 2 / 2 !important;  /* row-start/col-start/row-end/col-end */
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
  }
  .ibhm-cycle-item.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  /* ── Fix 2: Flip card hover background gradient ──────────────────── */
  /* These Tailwind hover:from/via/to classes are not in compiled CSS   */
  /* because homepage-preview.html is not in the Tailwind content scan. */
  .ibhm-flip-card-inner {
    background: linear-gradient(to bottom right,
      hsl(var(--primary) / 0.1),
      hsl(var(--muted)),
      hsl(var(--secondary) / 0.1)
    );
    border-color: hsl(var(--primary) / 0.2);
    transition: background 0.7s ease, border-color 0.7s ease,
                transform 0.7s ease, box-shadow 0.7s ease;
  }
  .ibhm-flip-card-inner:hover,
  .ibhm-flip-card.is-flipped .ibhm-flip-card-inner {
    background: linear-gradient(to bottom right,
      hsl(var(--primary)),
      hsl(var(--primary) / 0.9),
      hsl(var(--secondary))
    ) !important;
    border-color: hsl(var(--primary) / 0.4) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 20px 40px -12px hsl(var(--primary) / 0.4) !important;
  }
  /* Decorative circles: change colour on hover */
  .ibhm-flip-card-inner:hover .ibhm-deco-top,
  .ibhm-flip-card-inner:hover .ibhm-deco-bottom {
    background-color: hsl(0 0% 100% / 0.15) !important;
  }

  /* ── Fix 3: Footer gradient (ensure it uses inline fallback) ─────── */
  footer.ibhm-footer {
    background: linear-gradient(to bottom,
      hsl(var(--primary-dark)),
      hsl(var(--primary))
    );
  }

  /* ── Fix 4: Service card hover — ensure opacity transition works ──── */
  .ibhm-service-default { transition: opacity 0.5s ease, transform 0.5s ease; }
  .ibhm-service-hover   { transition: opacity 0.5s ease, transform 0.5s ease; }
  .service-card-wrap:hover .ibhm-service-default { opacity: 0; transform: scale(0.95); }
  .service-card-wrap:hover .ibhm-service-hover   { opacity: 1; transform: scale(1); }

  /* ── Fix 5: FAQ section — start visible (no outer toggle on preview) */
  /* Remove the collapsed state for the preview so content is visible.  */
  #ibhm-faq-content {
    max-height: none !important;
    overflow: visible !important;
  }

  /* ── Fix 6: nav link colour on scroll ───────────────────────────── */
  /* Remove inline text-white/90 override per anchor — handled below.  */
  .ibhm-nav-links a {
    transition: background-color 0.2s, color 0.2s;
  }

  /* ── Fix 7: Patient reviews marquee scrollLeft animation ─────────── */
  @keyframes scrollLeft {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }

  /* ── Fix 8: Mega menu dropdowns ─────────────────────────────────── */
  .ibhm-nav-item { position: relative; }
  .ibhm-dropdown {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
  }
  .ibhm-nav-item:hover .ibhm-dropdown { opacity: 1; visibility: visible; }
  .ibhm-mega-panel {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 20px 60px -12px hsl(0 0% 0% / 0.15);
    width: 600px;
  }
  .ibhm-mini-panel {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 20px 60px -12px hsl(0 0% 0% / 0.15);
    width: 200px;
  }
  .ibhm-mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .ibhm-mega-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-radius: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    transition: background-color 0.2s;
  }
  .ibhm-mega-item:hover { background-color: hsl(var(--muted)); }
  .ibhm-mega-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background-color: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    transition: background-color 0.2s, color 0.2s;
  }
  .ibhm-mega-item:hover .ibhm-mega-icon { background-color: hsl(var(--primary)); color: white; }
  .ibhm-mega-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    transition: color 0.2s;
  }
  .ibhm-mega-item:hover .ibhm-mega-title { color: hsl(var(--primary)); }
  .ibhm-mega-desc {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.5;
    margin-top: 0.25rem;
  }
  .ibhm-mega-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border));
  }
  .ibhm-mega-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(var(--primary));
    text-decoration: none;
    transition: background-color 0.2s;
  }
  .ibhm-mega-view-all:hover { background-color: hsl(var(--primary) / 0.05); }
  .ibhm-mini-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.75rem 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid hsl(var(--border));
  }
  .ibhm-mini-item {
    display: block;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
  }
  .ibhm-mini-item:hover { background-color: hsl(var(--muted)); color: hsl(var(--primary)); }

  /* ── Fix 9: Mobile menu ──────────────────────────────────────────── */
  #ibhm-mobile-menu {
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    overflow-y: auto;
    max-height: calc(100vh - 4rem);
    box-shadow: 0 10px 30px -5px hsl(0 0% 0% / 0.1);
  }
  .ibhm-mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .ibhm-mobile-accordion-content.is-open { max-height: 2000px; }
  .ibhm-mobile-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
  }
  .ibhm-mobile-accordion-trigger:hover,
  .ibhm-mobile-accordion-trigger.is-open { background-color: hsl(var(--muted)); }
  .ibhm-mobile-accordion-trigger .ibhm-chevron { transition: transform 0.3s ease; }
  .ibhm-mobile-accordion-trigger.is-open .ibhm-chevron { transform: rotate(180deg); }
  .ibhm-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
  }
  .ibhm-mobile-link:hover { background-color: hsl(var(--muted) / 0.8); color: hsl(var(--primary)); }
  .ibhm-mobile-link-icon { color: hsl(var(--primary)); flex-shrink: 0; }
  .ibhm-mobile-direct-link {
    display: block;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: background-color 0.2s;
  }
  .ibhm-mobile-direct-link:hover { background-color: hsl(var(--muted)); }
  .ibhm-mobile-view-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(var(--primary));
    text-decoration: none;
    transition: background-color 0.2s;
  }
  .ibhm-mobile-view-all:hover { background-color: hsl(var(--muted) / 0.8); }
  .ibhm-mobile-book-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    text-align: center;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
  }
  .ibhm-mobile-book-btn:hover { opacity: 0.9; }

  /* ── Fix 10: Patient Review cards ──────────────────────────────── */
  .ibhm-review-card {
    border-width: 1px;
    border-style: solid;
    border-radius: 1rem;
    padding: 1.25rem;
    background: hsl(var(--card));
    transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
  }
  .ibhm-review-card:hover {
    box-shadow: 0 20px 40px -12px hsl(0 0% 0% / 0.12);
    transform: scale(1.03);
    position: relative;
    z-index: 20;
  }
  .ibhm-rc-primary  { border-color: hsl(var(--primary)  / 0.2); }
  .ibhm-rc-secondary{ border-color: hsl(var(--secondary) / 0.2); }
  .ibhm-rc-primary:hover  { background-color: hsl(var(--primary)  / 0.08); border-color: hsl(var(--primary)  / 0.5); }
  .ibhm-rc-secondary:hover{ background-color: hsl(var(--secondary) / 0.08); border-color: hsl(var(--secondary) / 0.5); }


/* ── Print styles ─────────────────────────────────────────────────────────── */
@media print {
  header, footer, .print\:hidden { display: none !important; }
}

/* ── Tap target minimum size (accessibility) ─────────────────────────────── */
.tap-target {
  min-height: 44px;
  min-width: 44px;
}
 .sm\:inline {
        display: inline
    }
.bg-white {
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.footer-legal-menu > span:not(:last-child)::after {
    content: "•";
    margin-left: 1rem;
    opacity: 0.3;
    color: hsl(var(--primary-foreground) / .8);
}

@media (max-width: 640px) {
    .footer-legal-menu > span::after {
        display: none;
    }
}

/* Service color gradients */
    .service-gradient-0 { background-image: linear-gradient(135deg, #f43f5e, #db2777); }
    .service-gradient-1 { background-image: linear-gradient(135deg, #8b5cf6, #9333ea); }
    .service-gradient-2 { background-image: linear-gradient(135deg, #0ea5e9, #2563eb); }
    .service-gradient-3 { background-image: linear-gradient(135deg, #10b981, #0d9488); }
    .service-gradient-4 { background-image: linear-gradient(135deg, #f59e0b, #ea580c); }
    .service-gradient-5 { background-image: linear-gradient(135deg, #6366f1, #2563eb); }
    .service-gradient-6 { background-image: linear-gradient(135deg, #06b6d4, #0d9488); }
    .service-gradient-7 { background-image: linear-gradient(135deg, #d946ef, #db2777); }

    .service-dot-0 { background-image: linear-gradient(135deg, #f43f5e, #db2777); }
    .service-dot-1 { background-image: linear-gradient(135deg, #8b5cf6, #9333ea); }
    .service-dot-2 { background-image: linear-gradient(135deg, #0ea5e9, #2563eb); }
    .service-dot-3 { background-image: linear-gradient(135deg, #10b981, #0d9488); }
    .service-dot-4 { background-image: linear-gradient(135deg, #f59e0b, #ea580c); }
    .service-dot-5 { background-image: linear-gradient(135deg, #6366f1, #2563eb); }
    .service-dot-6 { background-image: linear-gradient(135deg, #06b6d4, #0d9488); }
    .service-dot-7 { background-image: linear-gradient(135deg, #d946ef, #db2777); }

    /* Sticky panel for desktop scroll section */
    .services-sticky-panel {
      position: sticky;
      top: 6rem;
      height: calc(100vh - 8rem);
    }
    .ibhm-hamburger:focus {
      outline: none;
    }

    .ibhm-hamburger:focus-visible {
      outline: 2px solid #2563eb;
      outline-offset: 2px;
      border-radius: 0.5rem; /* matches your rounded-lg */
    }