/* ============================================================
   THULASI DENTAL - Premium Custom Stylesheet
   Supplements Tailwind CSS (loaded via CDN)
   ============================================================
   Brand Colors:
     Primary:   #0ea5e9 (sky blue)
     Secondary: #2563eb (blue)
     Accent:    #06b6d4 (cyan)
     Dark:      #0f172a (navy)
     Gold:      #f0b429 / #d4941c (golden gradient)
   
   Fonts (Google Fonts CDN):
     Sans:  'Plus Jakarta Sans'
     Serif: 'Playfair Display'
   ============================================================ */


/* ==========================================================
   § 1. BASE & SMOOTH SCROLLING
   ========================================================== */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
}


/* ==========================================================
   § 2. CUSTOM SELECTION
   ========================================================== */

::selection {
  background: #0ea5e9;
  color: #ffffff;
}

::-moz-selection {
  background: #0ea5e9;
  color: #ffffff;
}


/* ==========================================================
   § 3. CUSTOM SCROLLBAR
   ========================================================== */

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #0ea5e9 #f1f5f9;
}


/* ==========================================================
   § 4. PROGRESS BAR
   ========================================================== */

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9, #06b6d4);
  z-index: 101;
  width: 0%;
  transition: width 0.15s ease-out;
  border-radius: 0 2px 2px 0;
}


/* ==========================================================
   § 5. PAGE LOADER
   ========================================================== */

#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ==========================================================
   § 6. GLASS EFFECTS
   ========================================================== */

/* --- Glass Navigation --- */
.glass-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(14, 165, 233, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
              0 4px 12px rgba(14, 165, 233, 0.06);
}

/* --- Glass Card --- */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 165, 233, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04),
              0 1px 4px rgba(0, 0, 0, 0.02);
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(14, 165, 233, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.1),
              0 2px 8px rgba(0, 0, 0, 0.04);
}


/* ==========================================================
   § 7. GRADIENT TEXT
   ========================================================== */

.text-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; /* fallback */
}

.text-gradient-gold {
  background: linear-gradient(135deg, #b45309 0%, #d97706 40%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}


/* ==========================================================
   § 8. PREMIUM BACKGROUND GRADIENT
   ========================================================== */

.bg-gradient-premium {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
}


/* ==========================================================
   § 10. WHATSAPP FLOATING BUTTON
   ========================================================== */

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

.whatsapp-btn {
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35),
              0 2px 6px rgba(0, 0, 0, 0.1);
  animation: whatsapp-float 2s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5),
              0 4px 10px rgba(0, 0, 0, 0.12);
  animation-play-state: paused;
}

.whatsapp-btn:active {
  transform: scale(0.98);
}

/* Inline WhatsApp buttons (hero, contact section) — no floating animation */
.whatsapp-btn-inline {
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35),
              0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.whatsapp-btn-inline:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45),
              0 4px 12px rgba(0, 0, 0, 0.1);
}

.whatsapp-btn-inline:active {
  transform: scale(0.98);
}


/* ==========================================================
   § 11. GOOGLE MAPS CARD
   ========================================================== */

.maps-card {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
              0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.maps-card:hover {
  box-shadow: 0 12px 40px rgba(14, 165, 233, 0.12),
              0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}


/* ==========================================================
   § 12. SERVICE CARDS WITH IMAGE
   ========================================================== */

.service-card {
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card .service-image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  width: 100%;
  object-fit: cover;
}

.service-card:hover .service-image {
  transform: scale(1.08);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(14, 165, 233, 0.12),
              0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: rgba(14, 165, 233, 0.3);
}


/* ==========================================================
   § 13. DOCTOR PROFILE CARDS
   ========================================================== */

.doctor-card {
  background: #ffffff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
              0 1px 4px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.doctor-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 64px rgba(14, 165, 233, 0.14),
              0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: rgba(14, 165, 233, 0.4);
}

.doctor-card img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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


/* ==========================================================
   § 14. BUTTON RIPPLE EFFECT
   ========================================================== */

@keyframes ripple {
  to {
    transform: scale(10);
    opacity: 0;
  }
}

.btn-ripple {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 10%,
    transparent 10.01%
  );
  transform: scale(0);
  opacity: 1;
  pointer-events: none;
  border-radius: inherit;
}

.btn-ripple:active::after {
  transform: scale(0);
  opacity: 1;
  animation: ripple 0.6s linear forwards;
}


/* ==========================================================
   § 15. FAQ ACCORDION
   ========================================================== */

.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: #ffffff;
}

.faq-item:hover {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.06);
}

.faq-item.active {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
}

.faq-question {
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #0f172a;
  user-select: none;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: #0ea5e9;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s ease;
  padding: 0 24px;
  color: #475569;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

.faq-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-left: 12px;
  color: #94a3b8;
}

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


/* ==========================================================
   § 16. TESTIMONIAL SWIPER
   ========================================================== */

.testimonial-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  width: 10px;
  height: 10px;
  transition: all 0.3s ease;
}

.testimonial-swiper .swiper-pagination-bullet-active {
  background: #0ea5e9;
  width: 24px;
  border-radius: 9999px;
}


/* ==========================================================
   § 17. HERO DOCTOR IMAGE BLENDING
   ========================================================== */

.hero-doctors-image {
  object-fit: cover;
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 60%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 60%,
    transparent 100%
  );
}

.hero-bg-blend {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.4) 40%,
    rgba(15, 23, 42, 0.85) 70%,
    #0f172a 100%
  );
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Side blending for hero doctor images */
.hero-doctors-image-wrapper {
  position: relative;
}

.hero-doctors-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #0f172a 0%,
    transparent 15%,
    transparent 85%,
    #0f172a 100%
  );
  z-index: 1;
  pointer-events: none;
}


/* ==========================================================
   § 18. UTILITY ANIMATIONS
   ========================================================== */

/* Fade-in-up for scroll reveal */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Fade-in for general reveals */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* Subtle pulse for CTAs */
@keyframes subtle-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(14, 165, 233, 0);
  }
}

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


/* ==========================================================
   § 19. RESPONSIVE ADJUSTMENTS
   ========================================================== */

/* --- Tablet & Below (≤768px) --- */
@media (max-width: 768px) {
  .faq-question {
    padding: 16px 20px;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 20px;
  }

  .faq-item.active .faq-answer {
    padding-bottom: 16px;
  }

  .doctor-card:hover {
    transform: translateY(-4px);
  }

  .service-card:hover {
    transform: translateY(-4px);
  }
}

/* --- Small Phones (≤480px) --- */
@media (max-width: 480px) {
  .glass-card:hover {
    transform: translateY(-2px);
  }

  .service-card:hover {
    transform: translateY(-3px);
  }

  .doctor-card:hover {
    transform: translateY(-4px);
  }

  .faq-question {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .faq-answer {
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .faq-item.active .faq-answer {
    max-height: 400px; /* more room for content reflow */
    padding-bottom: 14px;
  }
}


/* ==========================================================
   § 20. PRINT STYLES
   ========================================================== */

@media print {
  .glass-nav,
  .whatsapp-btn,
  #progress-bar,
  #loader {
    display: none !important;
  }

  body {
    overflow: visible;
  }
}
