/* ==========================================================================
   Consultants Clinic - Professional Medical Theme & Styling
   www.consultantsclinic.pk
   Colors:
     --color-primary: #0A2F25 (Deep Clinical Emerald)
     --color-primary-dark: #061E17
     --color-accent: #E07A5F (Warm Terracotta Coral / Medical Crimson #C5221F)
     --color-secondary: #D8E2DC (Soft Medical Sage / Mint)
     --color-bg: #FDFBF7 (Warm Clean Clinic Ivory)
     --color-surface: #FFFFFF (Crisp Sterile White)
     --color-border: #E2E8F0 (Subtle Clinical Slate)
   ========================================================================== */

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

img, svg, video, canvas, audio, iframe, embed, object {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}

img {
  height: auto;
}

svg {
  flex-shrink: 0;
}

/* Base styles */
:root {
  --color-primary: #0a2f25;
  --color-primary-dark: #061e17;
  --color-primary-light: #134e3f;
  --color-accent: #e07a5f;
  --color-accent-crimson: #c5221f;
  --color-secondary: #d8e2dc;
  --color-bg: #fdfbf7;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
}

/* Consistent public action buttons: centered labels, a shared height, and clear states. */
button:not(.hidden), .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  line-height: 1.2;
  text-align: center;
}

.btn {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn-primary {
  color: #fff;
  background: var(--color-primary);
}

.btn-primary:hover { background: var(--color-primary-light); }

.btn-secondary {
  color: var(--color-primary);
  background: #fff;
  border-color: var(--color-border);
}

.btn-secondary:hover { background: #f1f5f2; }

.btn:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(10, 47, 37, 0.28);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-primary);
  overflow-x: hidden;
}

/* Subtle Medical Background Pattern */
.bg-medical-grid {
  background-image: radial-gradient(rgba(10, 47, 37, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Professional Medical Cards */
.medical-card {
  background: #ffffff;
  border: 1px solid rgba(216, 226, 220, 0.7);
  box-shadow: 0 4px 20px -2px rgba(10, 47, 37, 0.05);
  border-radius: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.medical-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 122, 95, 0.5);
  box-shadow: 0 20px 30px -10px rgba(10, 47, 37, 0.12);
}

/* Pulse indicator for live availability */
.pulse-available {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Pulse indicator for doctor on leave / off */
.pulse-leave {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-ring-leave 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring-leave {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Medical specialty badge */
.badge-specialty {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: rgba(224, 122, 95, 0.12);
  color: #c5221f;
  border: 1px solid rgba(224, 122, 95, 0.3);
}

.badge-hospital {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  background-color: rgba(10, 47, 37, 0.06);
  color: #0a2f25;
  border: 1px solid rgba(10, 47, 37, 0.15);
}

/* Modern Dialog Guidelines from modern-web-guidance */
dialog:modal {
  overscroll-behavior: contain;
  border: none;
  padding: 0;
  max-width: 90vw;
  max-height: 92vh;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: #ffffff;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(10, 47, 37, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdfbf7;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 40;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.05);
}

/* Mobile Quick Action Bottom Bar */
@media (max-width: 767px) {
  .mobile-bottom-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #e2e8f0;
    z-index: 45;
    padding: 0.5rem 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  }
}

/* ==========================================================================
   Lenis Smooth Scrolling (Luxury Momentum Physics)
   ========================================================================== */
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-smooth iframe {
  pointer-events: none;
}

/* ==========================================================================
   Modern UI Polish (Glow, Card Sheen, High-Def Shadows)
   ========================================================================== */
.medical-card {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.medical-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(10, 47, 37, 0.15), 0 0 0 1px rgba(224, 122, 95, 0.25);
}

.glass-nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 20px -2px rgba(10, 47, 37, 0.04), inset 0 -1px 0 0 rgba(226, 232, 240, 0.8);
}

/* ==========================================================================
   ✨ SHINY MODERN UI STYLING (Magic UI & High-End Polish)
   ========================================================================== */

/* 1. Metallic Shimmer Light-Sweep on Buttons */
@keyframes shimmer-sweep {
  0% { transform: translateX(-150%) skewX(-20deg); }
  50%, 100% { transform: translateX(250%) skewX(-20deg); }
}

.btn-shiny {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(10, 47, 37, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-shiny::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  animation: shimmer-sweep 3.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.btn-shiny:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 47, 37, 0.28), 0 0 15px rgba(224, 122, 95, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* 2. Shiny Metallic Badge */
@keyframes gradient-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.badge-shiny {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 24DF, 245, 0.85));
  border: 1px solid rgba(224, 122, 95, 0.3);
  box-shadow: 0 2px 10px rgba(10, 47, 37, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.badge-shiny-accent {
  background: linear-gradient(90deg, #e07a5f, #c5221f, #e07a5f);
  background-size: 200% auto;
  animation: gradient-rotate 4s ease infinite;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.3);
}

/* 3. Ambient Radial Glow Blobs */
.glow-orb-primary {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(19, 78, 63, 0.12) 0%, rgba(19, 78, 63, 0) 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.glow-orb-accent {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 122, 95, 0.14) 0%, rgba(224, 122, 95, 0) 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* 4. Luxury Specular Card Borders */
.medical-card {
  box-shadow: 0 4px 20px -2px rgba(10, 47, 37, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.7);
}
