/* ═══════════════════════════════════════════════════════════════
   Mamun's Ortho Dental — Premium Landing Page v2
   Buttery-smooth animations · Scroll-triggered reveals · Micro-interactions
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy: #004591;
  --navy-dark: #003070;
  --navy-deepest: #001630;
  --navy-abyss: #000e22;
  --orange: #EA741B;
  --orange-dark: #cf5e0e;
  --orange-glow: rgba(234, 116, 27, 0.4);
  --body-bg: #F8FAFD;
  --card-shadow: 0 4px 24px rgba(0, 69, 145, 0.07);
  --card-shadow-hover: 0 24px 64px rgba(0, 69, 145, 0.16);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: #fff;
  color: #1a1a2e;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ══════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════ */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  z-index: 9999;
  background: linear-gradient(90deg, var(--orange), var(--navy), var(--orange));
  background-size: 200% 100%;
  animation: progressShimmer 3s linear infinite;
  transform-origin: left;
  transition: none;
  pointer-events: none;
}

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

  100% {
    background-position: -200% 0;
  }
}

/* ══════════════════════════════════
   SCROLL REVEAL SYSTEM
   ══════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s var(--spring), transform 0.9s var(--spring);
  will-change: opacity, transform;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s var(--spring), transform 0.9s var(--spring);
  will-change: opacity, transform;
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.9s var(--spring), transform 0.9s var(--spring);
  will-change: opacity, transform;
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s var(--smooth), transform 0.8s var(--spring);
  will-change: opacity, transform;
}

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

/* Stagger children — set --i via JS or inline style */
[data-stagger]>* {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--spring), transform 0.7s var(--spring);
  will-change: opacity, transform;
}

[data-stagger].visible>* {
  opacity: 1;
  transform: translateY(0);
}

[data-stagger].visible>*:nth-child(1) {
  transition-delay: 0.05s;
}

[data-stagger].visible>*:nth-child(2) {
  transition-delay: 0.1s;
}

[data-stagger].visible>*:nth-child(3) {
  transition-delay: 0.15s;
}

[data-stagger].visible>*:nth-child(4) {
  transition-delay: 0.2s;
}

[data-stagger].visible>*:nth-child(5) {
  transition-delay: 0.25s;
}

[data-stagger].visible>*:nth-child(6) {
  transition-delay: 0.3s;
}

[data-stagger].visible>*:nth-child(7) {
  transition-delay: 0.35s;
}

[data-stagger].visible>*:nth-child(8) {
  transition-delay: 0.4s;
}

[data-stagger].visible>*:nth-child(9) {
  transition-delay: 0.45s;
}

[data-stagger].visible>*:nth-child(10) {
  transition-delay: 0.5s;
}

/* ══════════════════════════════════
   SECTION UTILITIES
   ══════════════════════════════════ */
.gold-bar {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--orange), var(--navy));
  background-size: 200% 100%;
  animation: progressShimmer 4s linear infinite;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
}

/* ══════════════════════════════════
   NAVBAR
   ══════════════════════════════════ */
#navbar {
  transition: top 0.5s var(--spring), padding 0.4s ease;
}

#navbar.nav-hidden {
  top: -100px !important;
}

.nav-pill {
  transition: all 0.5s var(--spring);
  background: rgba(0, 18, 48, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#navbar.scrolled .nav-pill {
  background: rgba(0, 21, 48, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
}

.nav-link {
  position: relative;
  padding: 8px 18px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  transition: all 0.35s var(--smooth);
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: #fff;
  background: rgba(234, 116, 27, 0.2);
}

/* Mobile menu */
#mobileMenu {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px) scale(0.95);
  transition: all 0.4s var(--spring);
  position: absolute;
  top: calc(100% + 10px);
  left: 16px;
  right: 16px;
}

#mobileMenu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ══════════════════════════════════
   HERO
   ══════════════════════════════════ */
.hero-section {
  background: linear-gradient(135deg, #000e22 0%, #002a60 50%, #004591 100%);
  position: relative; overflow: hidden; min-height: 100vh;
}

/* ── Subtle Dot Grid Texture ── */
.hero-dot-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5; pointer-events: none;
}

.hero-blob {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.15;
  animation: heroFloat 12s ease-in-out infinite;
  will-change: transform;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  33% { transform: translateY(-20px) scale(1.05) rotate(2deg); }
  66% { transform: translateY(15px) scale(0.95) rotate(-2deg); }
}

/* ── Animated Badge ── */
.hero-badge-anim {
  opacity: 0; transform: translateY(20px);
  animation: heroFadeUp 0.8s 0.2s var(--spring) forwards;
}

/* ── Cinematic Text Reveal & Shimmer ── */
.hero-title-line {
  display: block; opacity: 0; transform: translateY(30px);
  animation: heroTextIn 1s var(--spring) forwards;
}
.hero-title-line:nth-child(2) { animation-delay: 0.2s; }
@keyframes heroTextIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero-text-shimmer {
  background: linear-gradient(90deg, #ea741b 0%, #fbd38d 50%, #ea741b 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textShimmer 4s linear infinite;
}
@keyframes textShimmer { to { background-position: 200% center; } }

/* ── Subtitle & Stats ── */
.hero-subtitle {
  opacity: 0; transform: translateY(20px);
  animation: heroFadeUp 0.8s 0.4s var(--spring) forwards;
}
.hero-cta {
  opacity: 0; transform: translateY(20px);
  animation: heroFadeUp 0.8s 0.8s var(--spring) forwards;
}
.hero-stat-anim {
  opacity: 0; transform: translateY(20px);
  animation: heroFadeUp 0.8s 1s var(--spring) forwards;
}
.hero-stat-anim:nth-child(2) { animation-delay: 1.1s; }
.hero-stat-anim:nth-child(3) { animation-delay: 1.2s; }

/* ── Rotating Text Animation ── */
.hero-rotating-wrap {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 16px; border-radius: 99px;
  width: max-content;
  opacity: 0; transform: translateY(20px);
  animation: heroFadeUp 0.8s 0.6s var(--spring) forwards;
}
.hero-rotating-text {
  position: relative; height: 20px; overflow: hidden;
  min-width: 180px; display: inline-block;
}
.hero-rotate-word {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  color: #ea741b; font-weight: 600; font-size: 14px;
  transform: translateY(100%); opacity: 0;
  transition: transform 0.6s var(--spring), opacity 0.6s var(--spring);
}
.hero-rotate-word.active { transform: translateY(0); opacity: 1; }
.hero-rotate-word.prev { transform: translateY(-100%); opacity: 0; }

/* ── 3D Card Tilt ── */
.hero-card-3d {
  opacity: 0; transform: translateX(40px);
  animation: heroFadeLeft 1s 0.6s var(--spring) forwards;
  will-change: transform; transform-style: preserve-3d;
}
@keyframes heroFadeLeft { to { opacity: 1; transform: translateX(0); } }

/* ── Scroll Hint ── */
.hero-scroll-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  opacity: 0; animation: heroFadeUp 1s 1.5s var(--spring) forwards; z-index: 10;
}
.hero-scroll-line {
  width: 1px; height: 40px; background: rgba(255,255,255,0.15);
  position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 50%;
  background: #ea741b; animation: scrollLineDrop 2s ease-in-out infinite;
}
@keyframes scrollLineDrop {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}
.hero-scroll-hint span {
  color: rgba(255,255,255,0.3); font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
}

@keyframes heroFadeUp { to { opacity: 1; transform: translateY(0); } }

.hero-wave {
  position: absolute; bottom: -2px; left: 0; right: 0;
  overflow: hidden; line-height: 0; z-index: 20;
}

/* Pulsing dot */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 116, 27, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(234, 116, 27, 0); }
}

/* Particle canvas */
#heroParticles {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}

/* ══════════════════════════════════
   ABOUT — STAT TILES
   ══════════════════════════════════ */
.about-stat-tile {
  will-change: transform;
}

.about-stat-tile-inner {
  border-radius: 24px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  text-align: center;
  transition: transform 0.5s var(--spring), box-shadow 0.5s ease;
}

.about-stat-tile:hover .about-stat-tile-inner {
  transform: translateY(-10px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
}

.about-stat-icon-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  transition: transform 0.5s var(--spring), background 0.4s;
}

.about-stat-tile:hover .about-stat-icon-ring {
  transform: scale(1.15) rotate(-8deg);
}

/* ══════════════════════════════════
   ABOUT — SERVICE CARDS
   ══════════════════════════════════ */
.about-svc-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 69, 145, 0.06);
  box-shadow: 0 2px 20px rgba(0, 69, 145, 0.06);
  transition: transform 0.5s var(--spring), box-shadow 0.5s ease;
  will-change: transform;
}

.about-svc-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 24px 64px rgba(0, 69, 145, 0.14);
}

/* ══════════════════════════════════
   GALLERY
   ══════════════════════════════════ */
.gallery-item {
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  transition: transform 0.7s var(--spring), filter 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(0.85);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 69, 145, 0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--smooth);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

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

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#lightbox.open {
  display: flex;
}

#lightboxImg {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 16px;
  object-fit: contain;
  animation: lbZoomIn 0.5s var(--spring);
}

@keyframes lbZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ══════════════════════════════════
   SERVICE CARDS
   ══════════════════════════════════ */
.service-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(0, 69, 145, 0.06);
  box-shadow: var(--card-shadow);
  transition: transform 0.5s var(--spring), box-shadow 0.5s ease;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--navy));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--spring);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow-hover);
}

.svc-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fa, #d0e0f5);
  transition: all 0.4s var(--spring);
}

.service-card:hover .svc-icon {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  transform: scale(1.1) rotate(-5deg);
}

.service-card:hover .svc-icon i {
  color: #fff !important;
}

/* ══════════════════════════════════
   DOCTOR CARDS
   ══════════════════════════════════ */
.doctor-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(0, 69, 145, 0.04);
  box-shadow: 0 4px 30px rgba(0, 69, 145, 0.08);
  transition: all 0.5s var(--spring);
  will-change: transform;
}

.doctor-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 24px 64px rgba(0, 69, 145, 0.18);
}

.doctor-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.5s var(--spring), box-shadow 0.4s ease;
}

.doctor-card:hover .doctor-avatar {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* ══════════════════════════════════
   TESTIMONIAL CARDS
   ══════════════════════════════════ */
.testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(0, 69, 145, 0.06);
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform 0.45s var(--spring), box-shadow 0.45s ease;
  border-left: 4px solid var(--orange);
  will-change: transform;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.testimonial-card .quote-mark {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 52px;
  line-height: 1;
  color: rgba(234, 116, 27, 0.08);
  font-family: 'Playfair Display', serif;
  transition: color 0.4s ease;
}

.testimonial-card:hover .quote-mark {
  color: rgba(234, 116, 27, 0.15);
}

/* ══════════════════════════════════
   BEFORE/AFTER CARDS
   ══════════════════════════════════ */
.ba-card {
  border-radius: 24px;
  overflow: hidden;
  background: var(--body-bg);
  border: 1px solid rgba(0, 69, 145, 0.06);
  box-shadow: var(--card-shadow);
  transition: transform 0.45s var(--spring), box-shadow 0.45s ease;
  will-change: transform;
}

.ba-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

/* ══════════════════════════════════
   CONTACT FORM
   ══════════════════════════════════ */
.contact-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  transition: border-color 0.4s var(--smooth), background 0.4s, box-shadow 0.4s;
  outline: none;
}

.contact-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact-input:focus {
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 4px rgba(234, 116, 27, 0.12);
}

.contact-input option {
  color: var(--navy);
  background: #fff;
}

/* ══════════════════════════════════
   GLOW BUTTON
   ══════════════════════════════════ */
.btn-glow {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 4px 25px var(--orange-glow);
  transition: all 0.4s var(--spring);
}

.btn-glow:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 40px var(--orange-glow);
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(45deg) translateX(-100%);
  transition: transform 0.7s ease;
}

.btn-glow:hover::after {
  transform: rotate(45deg) translateX(100%);
}

/* ══════════════════════════════════
   FOOTER
   ══════════════════════════════════ */
.footer-link {
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.35s, padding-left 0.35s var(--spring);
  text-decoration: none;
  font-size: 14px;
  position: relative;
}

.footer-link:hover {
  color: var(--orange);
  padding-left: 6px;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  transition: all 0.4s var(--spring);
  text-decoration: none;
}

.social-icon:hover {
  background: var(--orange);
  color: #fff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(234, 116, 27, 0.3);
}

/* ══════════════════════════════════
   ANIMATED COUNTER
   ══════════════════════════════════ */
.counter-value {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  transition: transform 0.3s var(--spring);
}

/* ══════════════════════════════════
   ANNOUNCEMENT TICKER
   ══════════════════════════════════ */
.ticker-wrapper {
  overflow: hidden;
  height: 22px;
}

.ticker-track {
  transition: transform 0.5s var(--spring);
}

.ticker-item {
  height: 22px;
  display: flex;
  align-items: center;
}

/* ══════════════════════════════════
   SECTION PARALLAX WRAPPER
   ══════════════════════════════════ */
[data-parallax] {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 768px) {
  .hero-section {
    min-height: 100svh;
  }

  .reveal,
  .reveal-left,
  .reveal-right {
    transform: translateY(30px) !important;
  }

  .reveal.visible,
  .reveal-left.visible,
  .reveal-right.visible {
    transform: translateY(0) !important;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}