/* ==========================================================================
   INTAZAR WELLNESS LADIES CLINIC - CUSTOM STYLESHEET
   Doctor: Dr. Sumaira Intazar | Dietitian & Weight Loss Expert
   Brand: "Be Healthy – Be Positive" | Narowal, Pakistan
   ========================================================================== */

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

:root {
  --primary: #6c2d82;
  --primary-hover: #551e67;
  --primary-dark: #3e124c;
  --primary-light: #8f42a8;
  --primary-50: #fbf5fd;
  --primary-100: #f5eef9;
  --primary-200: #ebd3f5;
  --primary-300: #dfbfee;
  --primary-border: #ebd3f5;
  
  --secondary: #0d9488;
  --secondary-hover: #0f766e;
  --secondary-soft: #f0fdfa;
  --secondary-border: #99f6e4;
  
  --accent-gold: #d97706;
  --accent-rose: #e11d48;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  
  --bg-main: #ffffff;
  --bg-soft: #f8fafc;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px -2px rgba(108, 45, 130, 0.08), 0 2px 6px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 14px 30px -4px rgba(108, 45, 130, 0.12), 0 6px 12px -2px rgba(0,0,0,0.04);
  --shadow-modal: 0 25px 60px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(108, 45, 130, 0.08);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Smooth anchor jump margin offset to prevent header overlap */
section[id], footer[id] {
  scroll-margin-top: 5.5rem;
}

.font-serif {
  font-family: var(--font-heading);
}

.font-display {
  font-family: var(--font-display);
}

/* ==========================================================================
   NAVIGATION & GLASSMORPHISM
   ========================================================================== */
.glass-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(108, 45, 130, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(108, 45, 130, 0.1);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(108, 45, 130, 0.15);
}

/* ==========================================================================
   GRADIENTS & ACCENT STYLES
   ========================================================================== */
.text-gradient {
  background: linear-gradient(135deg, #6c2d82 0%, #a21caf 55%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #541e66 0%, #8f42a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-border {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #6c2d82, #0d9488);
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
  opacity: 0.85;
}

/* ==========================================================================
   BUTTONS & CTAs
   ========================================================================== */
.btn-primary {
  background: linear-gradient(135deg, #6c2d82 0%, #822e9e 100%);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(108, 45, 130, 0.28);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #581d6c 0%, #6c2d82 100%);
  box-shadow: 0 6px 20px rgba(108, 45, 130, 0.4);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #0d7064 100%);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary-border);
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--primary-50);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   DOCTOR HERO PHOTO & RESPONSIVE FLOATING BADGES
   ========================================================================== */
.doctor-portrait-wrapper {
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: 440px;
  margin: 1rem auto 1.5rem;
}

.doctor-frame {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(108, 45, 130, 0.22);
  border: 5px solid #ffffff;
  background: linear-gradient(180deg, #fbf5fd 0%, #ebd3f5 100%);
  aspect-ratio: 4 / 5;
  width: 100%;
}

.doctor-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  box-shadow: inset 0 0 0 1px rgba(108, 45, 130, 0.1);
  pointer-events: none;
}

/* Floating Highlight Badges with Smooth Gentle Floating */
.floating-badge {
  position: absolute;
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 1rem;
  border-radius: 18px;
  box-shadow: 0 10px 25px -4px rgba(108, 45, 130, 0.18), 0 4px 10px -2px rgba(0,0,0,0.06);
  border: 1px solid rgba(235, 211, 245, 0.8);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 250px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: floatSlow 5s ease-in-out infinite;
}

.floating-badge:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 30px -4px rgba(108, 45, 130, 0.28);
}

.badge-top-left {
  top: -12px;
  left: -8px;
  animation-delay: 0s;
}

.badge-bottom-right {
  bottom: -16px;
  right: -8px;
  border-color: rgba(153, 246, 228, 0.8);
  animation-delay: 2.5s;
}

@media (min-width: 640px) {
  .badge-top-left {
    top: -16px;
    left: -20px;
  }
  .badge-bottom-right {
    bottom: -20px;
    right: -20px;
  }
}

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

/* ==========================================================================
   FLOATING ACTION ELEMENTS (WHATSAPP & BACK TO TOP)
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-whatsapp:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #0d7064 100%);
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

.floating-whatsapp .pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50px;
  top: 0;
  left: 0;
  border: 2px solid #25D366;
  animation: pulseAnimation 2s infinite cubic-bezier(0.24, 0, 0.38, 1);
  z-index: -1;
  pointer-events: none;
}

@keyframes pulseAnimation {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(1.12, 1.3); opacity: 0; }
  100% { transform: scale(1.12, 1.3); opacity: 0; }
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 40;
  width: 44px;
  height: 44px;
  background: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary-border);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

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

.back-to-top:hover {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(108, 45, 130, 0.3);
  transform: translateY(-3px);
}

/* Mobile adjustments for floating buttons */
@media (max-width: 640px) {
  .floating-whatsapp {
    bottom: 18px;
    right: 16px;
    padding: 10px 14px;
    font-size: 0.82rem;
  }
  
  .back-to-top {
    bottom: 18px;
    left: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ==========================================================================
   CONDITION CARDS & DEDICATED MODAL STACKING
   ========================================================================== */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 45, 130, 0.25);
}

.condition-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #f1e4f6;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.condition-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6c2d82, #0d9488);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.condition-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px -4px rgba(108, 45, 130, 0.12), 0 6px 12px -2px rgba(0,0,0,0.04);
  border-color: #dfbfee;
}

.condition-card:hover::after {
  opacity: 1;
}

/* Dedicated Isolation Modal - High Stacking Priority */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-content-box {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: var(--shadow-modal);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.92) translateY(24px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

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

/* ==========================================================================
   FILTER TABS & SEARCH
   ========================================================================== */
.filter-tab {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.filter-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.filter-tab.active {
  background: #6c2d82;
  color: #ffffff;
  border-color: #6c2d82;
  box-shadow: 0 4px 12px rgba(108, 45, 130, 0.25);
}

.badge-purple {
  background: #f5eef9;
  color: #6c2d82;
  border: 1px solid #ebd3f5;
}

.badge-teal {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #ccfbf1;
}

/* Stats Counter Box */
.stat-box {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
  border: 1px solid rgba(108, 45, 130, 0.12);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-header {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.faq-header:hover {
  background-color: #fbf5fd;
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-body {
  max-height: 500px;
  opacity: 1;
}

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

/* ==========================================================================
   BMI CALCULATOR METER
   ========================================================================== */
.bmi-meter-bg {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #38bdf8 0%, #22c55e 25%, #eab308 60%, #ef4444 100%);
  position: relative;
}

.bmi-meter-pin {
  position: absolute;
  top: -4px;
  width: 18px;
  height: 18px;
  background: #1e293b;
  border: 2px solid #ffffff;
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 0.4s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Form inputs */
.custom-input {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.custom-input:focus {
  border-color: #6c2d82;
  box-shadow: 0 0 0 3px rgba(108, 45, 130, 0.12);
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
