/* ================================================
   PURVANCHAL BIOMEDICAL SOLUTIONS
   Premium Animated Background System
   Clean White + Medical Blue/Cyan/Green
   ================================================ */

/* ── Global base ─────────────────────────────── */
body {
  background: #f0f9ff;
  position: relative;
}

/* ── Page-wide fixed ambient layer ───────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%,  rgba(186,230,255,0.45) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 90%,  rgba(167,243,208,0.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%,  rgba(224,242,254,0.3)  0%, transparent 65%),
    linear-gradient(160deg, #f0f9ff 0%, #e0f2fe 40%, #ecfdf5 100%);
  pointer-events: none;
}

/* ── Shared wave wrapper ─────────────────────── */
.pbs-bg-waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* All direct section content sits above waves */
.pbs-bg-waves ~ * {
  position: relative;
  z-index: 1;
}

/* ── SVG Wave shapes ─────────────────────────── */
.pbs-wave {
  position: absolute;
  width: 100%;
  opacity: 0;           /* animated in */
  will-change: transform, opacity;
}

/* Wave 1 — hero top sweep */
.pbs-wave-1 {
  top: -8%;
  left: -5%;
  width: 110%;
  animation: waveFlow1 20s ease-in-out infinite;
}

/* Wave 2 — mid section swell */
.pbs-wave-2 {
  top: 30%;
  right: -10%;
  width: 90%;
  animation: waveFlow2 25s ease-in-out infinite;
}

/* Wave 3 — bottom curve */
.pbs-wave-3 {
  bottom: -5%;
  left: -5%;
  width: 110%;
  animation: waveFlow3 22s ease-in-out infinite;
}

/* ── Glow orbs ───────────────────────────────── */
.pbs-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  will-change: transform, opacity;
}

.pbs-orb-blue {
  background: radial-gradient(circle, rgba(96,165,250,0.35) 0%, rgba(59,130,246,0.15) 60%, transparent 100%);
  width: 600px;
  height: 600px;
  top: -150px;
  right: -100px;
  animation: orbDrift1 18s ease-in-out infinite;
}

.pbs-orb-cyan {
  background: radial-gradient(circle, rgba(34,211,238,0.3) 0%, rgba(6,182,212,0.12) 60%, transparent 100%);
  width: 500px;
  height: 500px;
  bottom: -100px;
  left: -80px;
  animation: orbDrift2 22s ease-in-out infinite;
}

.pbs-orb-green {
  background: radial-gradient(circle, rgba(16,185,129,0.25) 0%, rgba(5,150,105,0.1) 60%, transparent 100%);
  width: 400px;
  height: 400px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbDrift3 26s ease-in-out infinite;
}

/* ── Glass cards ─────────────────────────────── */
.pbs-glass-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(186,230,255,0.5);
  box-shadow:
    0 4px 24px rgba(37,99,235,0.07),
    0 1px 4px rgba(37,99,235,0.04);
  border-radius: 20px;
}

/* ── Section-level backgrounds ───────────────── */

/* Hero section */
.modern-hero {
  background: transparent !important;
  isolation: isolate;
}
.hero-bg .gradient-orb {
  display: none !important; /* Replace old orbs */
}

/* Services/features sections */
.services-section,
.features-section,
#services {
  position: relative;
  overflow: hidden;
}
.services-section::before,
.features-section::before,
#services::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 50%, rgba(186,230,255,0.4) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 50%, rgba(167,243,208,0.3) 0%, transparent 60%);
  pointer-events: none;
}
.services-section > *,
.features-section > *,
#services > * {
  position: relative;
  z-index: 1;
}

/* About section */
.about-section,
#about {
  position: relative;
  overflow: hidden;
}
.about-section::after,
#about::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(224,242,254,0.6) 0%, transparent 70%);
  pointer-events: none;
}
.about-section > *,
#about > * {
  position: relative;
  z-index: 1;
}

/* Products section */
.products-section,
#products {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 50%, #f0fdf4 100%) !important;
}
.products-section::before,
#products::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #34d399, transparent);
  z-index: 2;
}

/* Stats / numbers bar */
.stats-section,
.numbers-section {
  position: relative;
  background: linear-gradient(135deg, #0f4c81 0%, #0e7490 50%, #047857 100%) !important;
  overflow: hidden;
}
.stats-section::before,
.numbers-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 10% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 90% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.stats-section > *,
.numbers-section > * {
  position: relative;
  z-index: 1;
}

/* Contact section */
.contact-section,
#contact {
  position: relative;
  overflow: hidden;
}
.contact-section::before,
#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 0% 50%, rgba(186,230,255,0.45) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 100% 50%, rgba(167,243,208,0.35) 0%, transparent 55%);
  z-index: 0;
  pointer-events: none;
}
.contact-section > *,
#contact > * {
  position: relative;
  z-index: 1;
}

/* ── Flowing wave animations ─────────────────── */
@keyframes waveFlow1 {
  0%,100% { transform: translate(0, 0)   rotate(0deg)   scaleX(1);    opacity: 1; }
  33%      { transform: translate(2%, -3%) rotate(0.5deg) scaleX(1.02); opacity: 0.9; }
  66%      { transform: translate(-1%, 2%) rotate(-0.3deg) scaleX(0.99); opacity: 0.95; }
}

@keyframes waveFlow2 {
  0%,100% { transform: translate(0, 0)   scaleY(1);    opacity: 1; }
  40%      { transform: translate(-2%, 3%) scaleY(1.03); opacity: 0.85; }
  70%      { transform: translate(1%, -2%) scaleY(0.98); opacity: 0.95; }
}

@keyframes waveFlow3 {
  0%,100% { transform: translate(0, 0) rotate(0deg);    opacity: 1; }
  50%      { transform: translate(1%, -2%) rotate(0.4deg); opacity: 0.9; }
}

/* ── Orb drift animations ────────────────────── */
@keyframes orbDrift1 {
  0%,100% { transform: translate(0, 0);     opacity: 1; }
  33%      { transform: translate(-40px, 30px); opacity: 0.8; }
  66%      { transform: translate(25px, -20px); opacity: 0.9; }
}
@keyframes orbDrift2 {
  0%,100% { transform: translate(0, 0);     opacity: 1; }
  40%      { transform: translate(30px, -40px); opacity: 0.75; }
  75%      { transform: translate(-20px, 15px); opacity: 0.9; }
}
@keyframes orbDrift3 {
  0%,100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.6; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 0.4; }
}

/* ── Divider waves between sections ─────────── */
.section-wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
}
.section-wave-divider svg {
  display: block;
  width: 100%;
}

/* ── Product cards — glass lift ──────────────── */
.product-display-card,
.product-card,
.service-card,
.feature-card {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(186,230,255,0.4) !important;
  box-shadow:
    0 4px 20px rgba(37,99,235,0.06),
    0 1px 3px rgba(0,0,0,0.04) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.product-display-card:hover,
.product-card:hover,
.service-card:hover,
.feature-card:hover {
  transform: translateY(-6px) !important;
  box-shadow:
    0 20px 40px rgba(37,99,235,0.1),
    0 4px 12px rgba(0,0,0,0.06) !important;
}

/* ── Navbar — frosted glass ──────────────────── */
.navbar.scrolled,
.navbar.sticky,
.navbar {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(186,230,255,0.4) !important;
  box-shadow: 0 2px 20px rgba(37,99,235,0.06) !important;
}

/* ── Hero glow behind headline ───────────────── */
.hero-content h1::after,
.hero-content h2::after {
  content: '';
  position: absolute;
  inset: -40px -60px;
  z-index: -1;
  background: radial-gradient(ellipse 100% 80% at 50% 50%, rgba(186,230,255,0.5) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}
.hero-content h1,
.hero-content h2 {
  position: relative;
}

/* ── Reduced-motion accessibility ────────────── */
@media (prefers-reduced-motion: reduce) {
  .pbs-wave, .pbs-orb,
  .pbs-wave-1, .pbs-wave-2, .pbs-wave-3,
  .pbs-orb-blue, .pbs-orb-cyan, .pbs-orb-green {
    animation: none !important;
    transform: none !important;
  }
}

/* ── Mobile adjustments ──────────────────────── */
@media (max-width: 768px) {
  .pbs-orb-blue  { width: 300px; height: 300px; }
  .pbs-orb-cyan  { width: 250px; height: 250px; }
  .pbs-orb-green { width: 200px; height: 200px; }
  body::before { background-attachment: scroll; }
}
