/* ==========================================================================
   TPWS NAWABSHAH - ULTRA-PREMIUM MODERN DESIGN SYSTEM & CUSTOM STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-navy: #0f172a;
  --secondary-navy: #1e293b;
  --accent-cyan: #06b6d4;
  --accent-cyan-hover: #0891b2;
  --accent-red: #dc2626;
  --accent-red-hover: #b91c1c;
  --bg-slate: #f8fafc;
  --card-border: rgba(226, 232, 240, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-dark-bg: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Global Smooth Behavior & Typography */
html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  background-color: #f8fafc;
  color: #334155;
  overflow-x: hidden;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #06b6d4;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0891b2;
}

/* --------------------------------------------------------------------------
   GLASSMORPHISM & HEADER EFFECTS
   -------------------------------------------------------------------------- */
#main-navbar {
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              -webkit-backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-navbar.is-scrolling {
  background-color: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1) !important;
}

#main-navbar .navbar-inner-wrap {
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
  position: relative;
  font-weight: 700;
  font-size: 0.825rem;
  color: #0f172a; /* Dark high contrast text */
  transition: color 0.2s ease;
  padding: 0.4rem 0.5rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 1400px) {
  .nav-link {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
  }
}

@media (min-width: 1600px) {
  .nav-link {
    font-size: 0.925rem;
    padding: 0.5rem 0.9rem;
  }
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.4rem;
  right: 0.4rem;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #06b6d4, #14b8a6);
  border-radius: 9999px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  color: #0891b2;
}

.nav-link:hover::after {
  width: calc(100% - 0.8rem);
}

.nav-link.active {
  color: #0891b2;
  font-weight: 800;
}

.nav-link.active::after {
  width: calc(100% - 0.8rem);
}

/* Donate Gradient Pill Button */
.btn-donate-glow {
  background: linear-gradient(135deg, #06b6d4 0%, #0d9488 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px 0 rgba(6, 182, 212, 0.35);
}

.btn-donate-glow:hover {
  background: linear-gradient(135deg, #22d3ee 0%, #14b8a6 100%);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 20px 0 rgba(6, 182, 212, 0.45);
}

/* --------------------------------------------------------------------------
   HERO AUTO-CROSSFADE BACKGROUND SLIDER (HIGH VISIBILITY)
   -------------------------------------------------------------------------- */
.hero-slider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  background-color: #0f172a;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 7s ease-out;
  transform: scale(1.02);
  background-size: cover;
  background-position: center 18%;
  z-index: 1;
}

.hero-bg-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.hero-glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Slider Indicators */
.slider-indicator {
  transition: all 0.3s ease;
}
.slider-indicator.active {
  width: 2rem !important;
  background-color: #06b6d4 !important;
}

/* --------------------------------------------------------------------------
   ULTRA-SMOOTH SLOW-MOTION (SLOWMO) HERO ENTRANCE ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes heroSlowMoFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(45px);
    filter: blur(10px);
  }
  30% {
    opacity: 0.4;
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

@keyframes heroSlowMoFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-24px) scale(0.92);
    filter: blur(8px);
  }
  40% {
    opacity: 0.5;
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

@keyframes heroSlowMoBg {
  0% {
    transform: scale(1.18);
    filter: brightness(0.6);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes heroSlowMoPulse {
  0%, 100% {
    transform: scale(1) translate(0, 0);
    opacity: 0.15;
  }
  50% {
    transform: scale(1.3) translate(20px, -20px);
    opacity: 0.3;
  }
}

/* Slow-Motion Classes (Reduced by 1 second for perfect balanced flow) */
.anim-slowmo-bg {
  animation: heroSlowMoBg 6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-slowmo-glow-1 {
  animation: heroSlowMoPulse 11s ease-in-out infinite;
}

.anim-slowmo-glow-2 {
  animation: heroSlowMoPulse 13s ease-in-out infinite reverse;
}

.anim-hero-badge {
  animation: heroSlowMoFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.anim-hero-title {
  animation: heroSlowMoFadeInUp 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.anim-hero-sub {
  animation: heroSlowMoFadeInUp 2.0s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

.anim-hero-metrics {
  animation: heroSlowMoFadeInUp 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;
}

.anim-float-gentle {
  animation: floatGentle 5s ease-in-out infinite;
}

.pulse-ring {
  position: relative;
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background: rgba(220, 38, 38, 0.4);
  animation: pulseRipple 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  z-index: -1;
}

@keyframes pulseRipple {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.card-hover-effect {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover-effect:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.12), 0 0 1px 1px rgba(6, 182, 212, 0.2);
}

/* --------------------------------------------------------------------------
   ANIMATED IMPACT COUNTERS
   -------------------------------------------------------------------------- */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #06b6d4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -5px rgba(6, 182, 212, 0.15);
}

.stat-card:hover::before {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   VIDEO THUMBNAIL PLAY BUTTON OVERLAY
   -------------------------------------------------------------------------- */
.video-card-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-card-thumb:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.15);
  background-color: #dc2626;
  color: #ffffff;
}

.video-card-thumb:hover img {
  transform: scale(1.06);
}

.video-card-thumb img {
  transition: transform 0.5s ease;
}

/* --------------------------------------------------------------------------
   LEADERSHIP CARDS (COMPACT 6-COLUMN DESIGN)
   -------------------------------------------------------------------------- */
.leadership-avatar-img {
  transition: transform 0.35s ease;
}

.leadership-compact-card:hover .leadership-avatar-img {
  transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   SUCCESS STORIES SECTION BACKGROUND & HOVER PREVIEW
   -------------------------------------------------------------------------- */
.stories-bg-layer {
  position: absolute;
  inset: 0;
  background-image: url('../assets/banners/stories-doctor-kids.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.75;
  filter: contrast(1.05) brightness(1);
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
}

/* When View More Stories Button is Hovered */
#success-stories-section.stories-preview-full .stories-bg-layer,
#success-stories-section:has(#view-more-stories-btn:hover) .stories-bg-layer {
  opacity: 1 !important;
  transform: scale(1.02);
  filter: brightness(1.05) contrast(1.08) !important;
}

#success-stories-section.stories-preview-full .stories-overlay-mask,
#success-stories-section:has(#view-more-stories-btn:hover) .stories-overlay-mask {
  opacity: 0 !important;
}

#success-stories-section.stories-preview-full #stories-featured-card,
#success-stories-section:has(#view-more-stories-btn:hover) #stories-featured-card {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

#success-stories-section.stories-preview-full .stories-fade-content,
#success-stories-section:has(#view-more-stories-btn:hover) .stories-fade-content {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.96) translateY(-6px);
  filter: blur(4px);
}

#success-stories-section.stories-preview-full #view-more-stories-btn,
#success-stories-section:has(#view-more-stories-btn:hover) #view-more-stories-btn {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #38bdf8 !important;
  border: 1.5px solid #38bdf8 !important;
  padding: 0.65rem 1.4rem !important;
  border-radius: 9999px !important;
  box-shadow: 0 12px 30px -4px rgba(14, 165, 233, 0.6), 0 0 20px rgba(56, 189, 248, 0.4) !important;
  transform: scale(1.12) !important;
  backdrop-filter: blur(12px) !important;
}

/* --------------------------------------------------------------------------
   MODALS (YOUTUBE, POSTER LIGHTBOX, MESSAGES)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.modal-backdrop.open,
.modal-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-content-box {
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  max-height: 92vh;
  overflow: hidden;
}

.modal-backdrop.open .modal-content-box,
.modal-backdrop.active .modal-content-box {
  transform: scale(1) translateY(0) !important;
  opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   BACK TO TOP BUTTON
   -------------------------------------------------------------------------- */
#back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 20px -3px rgba(6, 182, 212, 0.4);
}

/* --------------------------------------------------------------------------
   MOBILE OFF-CANVAS DRAWER
   -------------------------------------------------------------------------- */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  visibility: hidden;
  transition: visibility 0.35s ease;
}

.mobile-drawer.open {
  visibility: visible;
}

.mobile-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mobile-drawer.open .mobile-drawer-overlay {
  opacity: 1;
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 380px;
  height: 100%;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-drawer.open .mobile-drawer-panel {
  transform: translateX(0);
}

/* --------------------------------------------------------------------------
   ACCORDION SYSTEM (SMOOTH SLIDE & CHEVRON ROTATION)
   -------------------------------------------------------------------------- */
.accordion-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active {
  border-color: #06b6d4 !important;
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.12), 0 8px 10px -6px rgba(6, 182, 212, 0.08);
}

.accordion-header {
  cursor: pointer;
  user-select: none;
}

.accordion-chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
  color: #0891b2;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
}

.accordion-item.active .accordion-content {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   PARTNER FILTER TABS & CARDS
   -------------------------------------------------------------------------- */
.filter-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn.active {
  background: linear-gradient(135deg, #06b6d4 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35) !important;
}

.partner-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(6, 182, 212, 0.25);
}

.partner-card.hidden-partner {
  display: none !important;
}

/* --------------------------------------------------------------------------
   GENESIS TIMELINE & MILESTONE ACCENTS
   -------------------------------------------------------------------------- */
.timeline-stem {
  position: relative;
}

.timeline-stem::before {
  content: '';
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 1.25rem;
  width: 2px;
  background: linear-gradient(180deg, #06b6d4 0%, #3b82f6 50%, #dc2626 100%);
  opacity: 0.3;
}

@media (min-width: 768px) {
  .timeline-stem::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   DISTRICT IMPACT BADGES
   -------------------------------------------------------------------------- */
.district-pill {
  transition: all 0.25s ease;
}

.district-pill:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 16px -4px rgba(6, 182, 212, 0.25);
  border-color: #06b6d4;
}

/* --------------------------------------------------------------------------
   FREE HEALTHCARE SERVICES MODULES & PATIENT JOURNEY STYLING
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(220, 38, 38, 0.25);
    transform: scale(1.02);
  }
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.anim-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

.anim-float-slow {
  animation: floatGentle 6s ease-in-out infinite;
}

/* Service Module Alternating Zig-Zag Card */
.service-module-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(6, 182, 212, 0.25);
}

.service-module-card.hidden-service {
  display: none !important;
}

/* Equipment Inventory Badge */
.equipment-chip {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.equipment-chip:hover {
  transform: translateY(-2px);
  background-color: #e0f2fe;
  color: #0369a1;
  border-color: #38bdf8;
}

/* Patient Journey Step Card */
.patient-step-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.patient-step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.12);
  border-color: #06b6d4;
}

/* Lightbox Trigger Zoom */
.service-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
}

.service-img-wrap img {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-img-wrap:hover img {
  transform: scale(1.05);
}

.service-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-img-wrap:hover .service-img-overlay {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   CLINICAL SCREENING DATA TABLES (CLEAN, RESPONSIVE, NO CLUTTER)
   -------------------------------------------------------------------------- */
.screening-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.screening-table thead th {
  background-color: #0f172a;
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  padding: 0.875rem 0.75rem;
  border-bottom: 2px solid #334155;
  white-space: nowrap;
}

.screening-table tbody tr {
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.screening-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.screening-table tbody tr:hover {
  background-color: #ecfeff !important;
}

.screening-table tbody td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.screening-table tfoot tr {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.875rem;
}

.screening-table tfoot td {
  padding: 0.875rem 0.75rem;
  border-top: 2px solid #06b6d4;
  vertical-align: middle;
}

/* ==========================================================================
   SERVICES PAGE HERO BANNER - MOBILE ZOOM-OUT & CHILD FRAMING
   ========================================================================== */
.services-hero-banner {
  background-image: url('../assets/banners/services-banner.webp');
  background-repeat: no-repeat;
}

/* Mobile Screens (< 768px): Focus & Zoom Out to make child fully visible */
@media (max-width: 767px) {
  .services-hero-banner {
    background-position: 80% 20% !important;
    background-size: cover !important;
  }
}

/* Desktop Screens (>= 768px): Keep original full-screen view exactly as is */
@media (min-width: 768px) {
  .services-hero-banner {
    background-position: center center !important;
    background-size: cover !important;
  }
}


