/* 
  =========================================
  Ashirvad Hospital - Premium Web Design
  =========================================
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* --- Design Variables --- */
:root {
  --primary: #1e40af;       /* Deep Royal Blue */
  --primary-glow: #3b82f6;   /* Ice Blue / Electric Blue */
  --secondary: #0d9488;      /* Teal for medical actions */
  --accent: #f59e0b;         /* Amber / Gold for stars & highlights */
  --danger: #ef4444;         /* Red for Emergency */
  --dark: #0f172a;           /* Dark Slate */
  --light: #f8fafc;          /* Ice White */
  --white: #ffffff;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 10px 40px -10px rgba(30, 64, 175, 0.08);
  
  --max-width: 1280px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* --- Dark Theme Support (via preference) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --light: #0b0f19;
    --dark: #f8fafc;
    --white: #111827;
    --gray: #94a3b8;
    --gray-light: #334155;
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  }
}

/* --- Base & Reset Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--light);
}
::-webkit-scrollbar-thumb {
  background: rgba(30, 64, 175, 0.3);
  border-radius: 10px;
  border: 2px solid var(--light);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-glow);
}

/* --- Utility Layout Elements --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray);
}

/* --- Mouse Tracking Glow Overlay --- */
.mouse-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--radial-glow);
  z-index: 1;
}

/* --- Scroll Progress Bar --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-glow) 0%, var(--secondary) 100%);
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* --- Sticky glassmorphic navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  padding: 10px 0;
}

@media (prefers-color-scheme: dark) {
  .navbar {
    background: rgba(17, 24, 39, 0.6);
  }
  .navbar.scrolled {
    background: rgba(17, 24, 39, 0.85);
  }
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  transition: var(--transition-smooth);
}

.navbar.scrolled .container {
  height: 65px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--dark);
  transition: var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

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

.nav-links a:hover {
  color: var(--primary-glow);
}

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

.nav-links a.active {
  color: var(--primary-glow);
  font-weight: 600;
}

/* Hamburger menu for mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background-color: var(--dark);
  transition: var(--transition-fast);
  border-radius: 2px;
}

/* Button & Action elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(30, 64, 175, 0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--gray-light);
}

.btn-secondary:hover {
  background: var(--gray-light);
  transform: translateY(-2px);
}

.btn-emergency {
  background: linear-gradient(135deg, var(--danger), #f87171);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}

.btn-emergency:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.35);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px 0;
  background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12), transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(13, 148, 136, 0.08), transparent 35%);
  position: relative;
  overflow: hidden;
}

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

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 64, 175, 0.07);
  border: 1px solid rgba(30, 64, 175, 0.15);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--primary);
  margin-bottom: 24px;
  line-height: 1.15;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--gray);
  margin-bottom: 40px;
  max-width: 550px;
}

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

.hero-stats-quick {
  display: flex;
  gap: 32px;
  border-top: 1px solid var(--gray-light);
  padding-top: 32px;
}

.quick-stat h4 {
  font-size: 1.8rem;
  color: var(--primary);
}

.quick-stat p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* Floating Appointment card in hero */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  perspective: 1000px;
}

.floating-hero-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(30, 64, 175, 0.1);
  border-radius: 24px;
  padding: 36px;
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

.floating-hero-card h3 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 20px;
  text-align: center;
}

.floating-hero-card .form-group {
  margin-bottom: 16px;
}

.floating-hero-card .btn {
  width: 100%;
  margin-top: 8px;
}

/* Floating background decoration */
.floating-element {
  position: absolute;
  pointer-events: none;
  opacity: 0.4;
  z-index: 1;
  animation: bounce-rotate 20s linear infinite;
}

@keyframes bounce-rotate {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, 50px) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* SVG Wave Separator */
.wave-separator {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 10;
  fill: var(--light);
}

/* --- Glass Cards Style --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
  padding: 30px;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(30, 64, 175, 0.15);
  border-color: rgba(30, 64, 175, 0.2);
}

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

.about-text h3 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.about-text p {
  color: var(--gray);
  margin-bottom: 20px;
}

.philosophy-card {
  margin-top: 30px;
  padding: 20px;
  border-left: 4px solid var(--primary-glow);
  background: rgba(30, 64, 175, 0.03);
  border-radius: 0 12px 12px 0;
}

.philosophy-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary);
}

/* Growth Timeline */
.timeline-container {
  margin-top: 40px;
}

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--gray-light);
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  width: 2px;
  height: 0%;
  background: var(--primary-glow);
  transition: height 1.5s ease;
}

.timeline.animated::before {
  height: 100%;
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.active {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -41px;
  top: 4px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border: 3px solid var(--gray);
  border-radius: 50%;
  z-index: 2;
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-dot,
.timeline-item.active .timeline-dot {
  border-color: var(--primary-glow);
  background: var(--primary-glow);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.timeline-year {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.founder-section {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--gray-light);
}

.founder-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-glow);
}

.founder-info h4 {
  font-size: 1.1rem;
  color: var(--dark);
}

.founder-info p {
  font-size: 0.85rem;
  color: var(--gray);
}

/* --- Departments Section --- */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.dept-card {
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dept-icon {
  width: 65px;
  height: 65px;
  background: rgba(30, 64, 175, 0.06);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.8rem;
  transition: var(--transition-smooth);
}

.dept-card:hover .dept-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
}

.dept-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.dept-card p {
  font-size: 0.9rem;
  color: var(--gray);
}

.dept-expanded {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: var(--transition-smooth);
  font-size: 0.85rem;
  margin-top: 12px;
  border-top: 1px solid var(--gray-light);
  padding-top: 12px;
  text-align: left;
}

.dept-card.expanded .dept-expanded {
  max-height: 150px;
  opacity: 1;
}

/* --- Doctors Section --- */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.doctor-card {
  padding: 0;
  overflow: hidden;
}

.doctor-img-container {
  height: 280px;
  overflow: hidden;
  position: relative;
  background-color: var(--gray-light);
}

.doctor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.doctor-card:hover .doctor-img {
  transform: scale(1.08);
}

.doctor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  opacity: 0;
  transition: var(--transition-smooth);
}

.doctor-card:hover .doctor-overlay {
  opacity: 1;
}

.doctor-socials {
  display: flex;
  gap: 12px;
}

.doctor-socials a {
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.doctor-socials a:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

.doctor-info {
  padding: 24px;
}

.doctor-specialty {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
}

.doctor-info h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.doctor-qualification {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.doctor-exp {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 20px;
}

.doctor-info .btn {
  width: 100%;
}

/* --- Why Choose Us --- */
.why-choose-bg {
  background: radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.05), transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(30, 64, 175, 0.06), transparent 45%);
}

.choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.choose-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  transition: var(--transition-smooth);
}

@media (prefers-color-scheme: dark) {
  .choose-card {
    background: rgba(17, 24, 39, 0.5);
  }
}

.choose-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.06);
}

.choose-icon {
  font-size: 1.5rem;
  color: var(--secondary);
  padding: 10px;
  background: rgba(13, 148, 136, 0.08);
  border-radius: 12px;
}

.choose-text h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.choose-text p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* --- Facilities Section --- */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.facility-card {
  padding: 0;
  overflow: hidden;
}

.facility-img-container {
  height: 180px;
  overflow: hidden;
  position: relative;
  background-color: var(--gray-light);
}

.facility-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.facility-card:hover .facility-img {
  transform: scale(1.08);
}

.facility-details {
  padding: 24px;
}

.facility-details h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.facility-details p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* --- Stats Counter Section --- */
.stats-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.stat-item h2 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item p {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.9;
}

/* --- Testimonials Section --- */
.testimonials-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  padding: 20px;
}

.carousel-track-container {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 10px;
}

.testimonial-card {
  text-align: center;
  padding: 40px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 40px rgba(0,0,0,0.02);
}

@media (prefers-color-scheme: dark) {
  .testimonial-card {
    background: rgba(17, 24, 39, 0.5);
  }
}

.patient-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid var(--primary-light);
}

.rating {
  color: var(--accent);
  margin-bottom: 16px;
}

.review-text {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 24px;
}

.patient-name {
  font-weight: 700;
  color: var(--primary);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border: 1px solid var(--gray-light);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  transition: var(--transition-fast);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

@media (prefers-color-scheme: dark) {
  .carousel-btn {
    background: var(--white);
    color: var(--primary);
  }
}

.carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.05);
}

.btn-prev { left: 0; }
.btn-next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--gray-light);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.carousel-dot.active {
  background-color: var(--primary);
  width: 24px;
  border-radius: 5px;
}

/* --- Gallery Section --- */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--white);
  border: 1px solid var(--gray-light);
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-fast);
  color: var(--gray);
}

@media (prefers-color-scheme: dark) {
  .tab-btn {
    background: rgba(17, 24, 39, 0.5);
    color: var(--gray);
  }
}

.tab-btn.active, .tab-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 250px;
  cursor: pointer;
  background-color: var(--gray-light);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 64, 175, 0.85);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
  padding: 20px;
  text-align: center;
}

.gallery-item:hover .gallery-info {
  opacity: 1;
}

.gallery-info h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.gallery-info p {
  font-size: 0.85rem;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: block;
}

.lightbox-caption {
  color: var(--white);
  text-align: center;
  margin-top: 16px;
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition-fast);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: -80px; }
.lightbox-next { right: -80px; }

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: 16px;
}

.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.faq-header h3 {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding-right: 40px;
}

.faq-item.active .faq-body {
  max-height: 200px; /* Adjust if content is larger */
  opacity: 1;
  padding-top: 10px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-body p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* --- Blog Section --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.blog-card {
  padding: 0;
  overflow: hidden;
}

.blog-img-container {
  height: 200px;
  overflow: hidden;
}

.blog-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.blog-content {
  padding: 24px;
}

.blog-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.blog-content h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-content h3 a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition-fast);
}

.blog-content h3 a:hover {
  color: var(--primary-glow);
}

.blog-content p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.blog-link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.blog-link:hover {
  color: var(--primary-glow);
}

/* --- Contact & Form Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}

.contact-info-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.contact-detail-card {
  padding: 20px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

@media (prefers-color-scheme: dark) {
  .contact-detail-card {
    background: rgba(17, 24, 39, 0.5);
  }
}

.contact-icon {
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 12px;
}

.contact-detail-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--primary);
}

.contact-detail-card p {
  font-size: 0.85rem;
  color: var(--gray);
}

.map-container {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  height: 250px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.floating-input, .floating-select, .floating-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--dark);
  transition: var(--transition-fast);
}

@media (prefers-color-scheme: dark) {
  .floating-input, .floating-select, .floating-textarea {
    background: rgba(17, 24, 39, 0.7);
    border-color: var(--gray-light);
  }
}

.floating-textarea {
  min-height: 100px;
  resize: vertical;
}

.floating-input:focus, .floating-select:focus, .floating-textarea:focus {
  outline: none;
  border-color: var(--primary-glow);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group label {
  position: absolute;
  top: 14px;
  left: 16px;
  color: var(--gray);
  font-size: 0.95rem;
  pointer-events: none;
  transition: var(--transition-fast);
}

.floating-input:focus ~ label,
.floating-input:not(:placeholder-shown) ~ label,
.floating-textarea:focus ~ label,
.floating-textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 10px;
  font-size: 0.75rem;
  padding: 2px 6px;
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

@media (prefers-color-scheme: dark) {
  .floating-input:focus ~ label,
  .floating-input:not(:placeholder-shown) ~ label,
  .floating-textarea:focus ~ label,
  .floating-textarea:not(:placeholder-shown) ~ label {
    background: var(--white);
    color: var(--primary);
  }
}

.floating-select ~ label {
  top: -10px;
  left: 10px;
  font-size: 0.75rem;
  padding: 2px 6px;
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .floating-select ~ label {
    background: var(--white);
    color: var(--primary);
  }
}

/* Form Validation Styling */
.form-group.error .floating-input,
.form-group.error .floating-select,
.form-group.error .floating-textarea {
  border-color: var(--danger);
}

.form-group.error label {
  color: var(--danger);
}

.error-message {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 4px;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

/* Appointment Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--white);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border-radius: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(-50px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 40px;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray);
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-content h3 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--gray);
  margin-bottom: 24px;
}

/* --- Footer --- */
.footer {
  background: #0b111e;
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-col h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 24px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-glow);
}

.footer-about p {
  margin: 16px 0 24px 0;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.social-links a:hover {
  background: var(--primary-glow);
  transform: translateY(-3px);
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.footer-contact li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.footer-contact li i {
  color: var(--primary-glow);
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--white);
}

/* --- Floating Widgets --- */
.floating-widgets {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 900;
}

.widget-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  border: none;
  font-size: 1.3rem;
  text-decoration: none;
}

.widget-whatsapp {
  background: #25d366;
  color: var(--white);
}

.widget-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.widget-whatsapp::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: pulse-ring 1.5s linear infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.widget-top {
  background: var(--white);
  color: var(--primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

@media (prefers-color-scheme: dark) {
  .widget-top {
    background: var(--white);
    color: var(--primary);
  }
}

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

.widget-top:hover {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1);
}

/* Sticky floating booking CTA for mobile screens */
.sticky-mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  padding: 12px 24px;
  display: none;
  justify-content: center;
  z-index: 800;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.sticky-mobile-cta .btn {
  width: 100%;
  max-width: 400px;
}

/* --- Scroll Reveal & Stagger Animation System --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger reveals */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-container.active .stagger-item {
  opacity: 1;
  transform: translateY(0);
}

/* Generate inline stagger delays (up to 12 items) */
.stagger-container.active .stagger-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-container.active .stagger-item:nth-child(2) { transition-delay: 0.1s; }
.stagger-container.active .stagger-item:nth-child(3) { transition-delay: 0.15s; }
.stagger-container.active .stagger-item:nth-child(4) { transition-delay: 0.2s; }
.stagger-container.active .stagger-item:nth-child(5) { transition-delay: 0.25s; }
.stagger-container.active .stagger-item:nth-child(6) { transition-delay: 0.3s; }
.stagger-container.active .stagger-item:nth-child(7) { transition-delay: 0.35s; }
.stagger-container.active .stagger-item:nth-child(8) { transition-delay: 0.4s; }
.stagger-container.active .stagger-item:nth-child(9) { transition-delay: 0.45s; }
.stagger-container.active .stagger-item:nth-child(10) { transition-delay: 0.5s; }
.stagger-container.active .stagger-item:nth-child(11) { transition-delay: 0.55s; }
.stagger-container.active .stagger-item:nth-child(12) { transition-delay: 0.6s; }


/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }
  .hero-content h1 {
    font-size: 3rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }
  .navbar .container {
    height: 70px;
  }
  .nav-links {
    position: fixed;
    top: 70px;
    left: 100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    padding: 40px 24px;
    gap: 30px;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    align-items: flex-start;
  }
  .nav-links.active {
    left: 0;
  }
  .nav-links .btn {
    width: 100%;
    margin-top: 10px;
  }
  .hamburger {
    display: flex;
  }
  /* Hamburger toggle animation */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-content {
    text-align: center;
  }
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats-quick {
    justify-content: center;
  }
  .hero-visual {
    margin-top: 20px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .sticky-mobile-cta {
    display: flex;
  }
  .floating-widgets {
    bottom: 80px; /* Adjust to stay above mobile sticky CTA */
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .contact-details {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .modal-content {
    padding: 24px;
  }
}

/* 
  =========================================
  Page Transition Overlay
  =========================================
*/
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary), #0f172a);
  z-index: 10000;
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
  pointer-events: none;
}

.page-transition.loaded {
  transform: translateY(-100%);
}

/* 
  =========================================
  Sub-Page Hero Style
  =========================================
*/
.page-hero {
  padding: 140px 0 60px 0;
  background: linear-gradient(135deg, #0b111e 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 60%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: 2.8rem;
  margin-bottom: 12px;
  color: #ffffff;
}

.page-hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* 
  =========================================
  Doctor Directory Page Search & Filter
  =========================================
*/
.directory-controls {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 250px;
}

.search-wrapper i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--gray);
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border-radius: 30px;
  border: 1px solid var(--gray-light);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--dark);
  transition: var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-glow);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Appointment Dedicated Page Form style */
.appointment-page-container {
  max-width: 800px;
  margin: 0 auto;
}

.appointment-page-container .glass-card {
  padding: 48px;
  border-radius: 24px;
}

@media (max-width: 768px) {
  .appointment-page-container .glass-card {
    padding: 24px;
  }
}

/* =========================================================
   ENHANCEMENTS — Modern animations (2026 refresh)
   Appended additively. Safe to remove this block to revert.
   ========================================================= */

/* ---------- 1. "Milestones of Journey" — scroll-driven timeline ---------- */
.journey {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Center spine */
.journey-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

/* Gradient fill that grows with scroll (height set via --fill in JS) */
.journey-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--fill, 0%);
  background: linear-gradient(180deg, var(--primary), var(--primary-glow), var(--secondary));
  border-radius: 4px;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.6);
  transition: height 0.15s linear;
}

.journey-item {
  position: relative;
  width: 50%;
  padding: 24px 48px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.journey-item[data-side="left"]  { left: 0;  text-align: right; }
.journey-item[data-side="right"] { left: 50%; text-align: left;  }

/* Slide from the correct side once reached */
.journey-item[data-side="left"]  { transform: translateX(-40px) translateY(20px); }
.journey-item[data-side="right"] { transform: translateX(40px)  translateY(20px); }
.journey-item.reached {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* Milestone node (the dot with an icon) */
.journey-node {
  position: absolute;
  top: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 3px solid var(--gray-light);
  color: var(--gray);
  z-index: 3;
  transition: var(--transition-smooth);
}
.journey-item[data-side="left"]  .journey-node { right: -23px; }
.journey-item[data-side="right"] .journey-node { left: -23px; }
.journey-node i { width: 20px; height: 20px; }

/* When the scroll line passes a node, light it up + pulse */
.journey-item.reached .journey-node {
  border-color: var(--primary-glow);
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.18);
  animation: journey-pulse 2s ease-out infinite;
}
@keyframes journey-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.journey-card { padding: 22px 24px; border-radius: 14px; display: inline-block; }
.journey-year {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.journey-card h4 { font-size: 1.15rem; color: var(--primary); margin-bottom: 6px; }
.journey-card p  { font-size: 0.92rem; color: var(--gray); margin: 0; }

/* Mobile: single column, spine on the left */
@media (max-width: 768px) {
  .journey-line { left: 22px; }
  .journey-item,
  .journey-item[data-side="left"],
  .journey-item[data-side="right"] {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 18px 0 18px 56px;
    transform: translateX(30px) translateY(20px);
  }
  .journey-item[data-side="left"]  .journey-node,
  .journey-item[data-side="right"] .journey-node { left: 0; right: auto; }
}

/* ---------- 2. Button shine sweep (simple but premium) ---------- */
.btn-primary::after,
.btn-emergency::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::after,
.btn-emergency:hover::after { left: 130%; }

/* ---------- 3. Card hover: gradient glow border + icon lift ---------- */
.dept-card, .doctor-card, .facility-card, .blog-card { position: relative; }
.dept-card::before, .doctor-card::before,
.facility-card::before, .blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.dept-card:hover::before, .doctor-card:hover::before,
.facility-card:hover::before, .blog-card:hover::before { opacity: 1; }

.dept-card .dept-icon { transition: var(--transition-smooth); }
.dept-card:hover .dept-icon { transform: translateY(-4px) scale(1.08) rotate(-4deg); }

/* ---------- 4. Animated shimmer on section-header underline ---------- */
.section-header h2::after {
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary-glow), var(--primary));
  background-size: 250% 100%;
  animation: header-shimmer 4s linear infinite;
}
@keyframes header-shimmer {
  to { background-position: -250% 0; }
}

/* ---------- 5. Subtle pop when stat counters are running ---------- */
.counter-val { transition: transform 0.2s ease; }
.stats-section.active .counter-val { animation: stat-pop 0.6s ease; }
@keyframes stat-pop {
  0%   { transform: scale(0.8); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ---------- 6. Optional blur-reveal helper (add class="reveal-blur") ---------- */
.reveal-blur { opacity: 0; filter: blur(8px); transform: translateY(24px);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease; }
.reveal-blur.active { opacity: 1; filter: blur(0); transform: translateY(0); }

/* ---------- 7. Accessibility: respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .journey-item { opacity: 1 !important; transform: none !important; }
  .journey-progress { transition: none !important; }
}

/* =========================================================
   ENHANCEMENTS v2 — Testimonials (photo-free Google reviews)
   ========================================================= */

/* Gold star rating (works for unicode ★ and lucide icons) */
.rating { color: var(--accent); margin-bottom: 16px; font-size: 1.1rem; letter-spacing: 2px; line-height: 1; }

/* Small Google "G" badge */
.g-badge {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #34A853 55%, #FBBC05 80%, #EA4335);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.72rem;
  vertical-align: middle;
}

/* Reviewer block (avatar + name + source) */
.reviewer { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 6px; }
.review-card-top .reviewer-meta h4,
.reviewer-meta .patient-name,
.reviewer-meta h4 { font-size: 1rem; color: var(--primary); margin: 0; font-family: var(--font-heading); }
.review-source { font-size: 0.78rem; color: var(--gray); display: inline-flex; align-items: center; gap: 6px; }

.reviewer-avatar {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-heading);
  font-weight: 700; font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

/* Decorative opening quote mark on carousel cards */
.quote-mark {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 4rem;
  line-height: 0.6;
  color: var(--primary-glow);
  opacity: 0.25;
  margin-bottom: 8px;
}

/* Carousel card review text */
.testimonials-carousel .review-text { min-height: 96px; }

/* ---- Reviews summary banner (testimonials page) ---- */
.reviews-summary {
  max-width: 760px;
  margin: 0 auto 46px;
  padding: 22px 28px;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.reviews-score { display: flex; align-items: center; gap: 16px; }
.reviews-score-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.reviews-stars { color: var(--accent); font-size: 1.3rem; letter-spacing: 3px; }
.reviews-count { font-size: 0.85rem; color: var(--gray); }

/* ---- Reviews grid (testimonials page) ---- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
  max-width: 1100px;
  margin: 0 auto;
}
.review-card {
  position: relative;
  padding: 30px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-card .review-card-top { display: flex; align-items: center; gap: 14px; }
.review-card .reviewer-meta { display: flex; flex-direction: column; gap: 2px; }
.review-card .rating { margin: 0; }
.review-card .review-text {
  font-style: normal;
  font-size: 0.98rem;
  color: var(--dark);
  line-height: 1.7;
  margin: 0;
}
.review-card::after {
  content: '\201D';
  position: absolute;
  top: 14px; right: 22px;
  font-family: Georgia, serif;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--primary-glow);
  opacity: 0.12;
}

@media (max-width: 520px) {
  .reviews-summary { flex-direction: column; text-align: center; }
}

/* =========================================================
   ENHANCEMENTS v3 — Homepage Google rating chip
   ========================================================= */
.google-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 40px;
  padding: 12px 22px;
  border-radius: 50px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  box-shadow: 0 8px 24px -12px rgba(30, 64, 175, 0.25);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.google-rating-chip .g-badge { width: 22px; height: 22px; font-size: 0.85rem; }
.grc-score {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}
.grc-stars { color: var(--accent); letter-spacing: 2px; font-size: 1rem; }
.grc-count { font-size: 0.85rem; color: var(--gray); }

/* Center the homepage reviews grid nicely (max 3-up) */
#testimonials .reviews-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 1080px;
}

@media (max-width: 560px) {
  .google-rating-chip { flex-wrap: wrap; justify-content: center; text-align: center; max-width: 90%; }
  .grc-count { width: 100%; }
}
