/* ==========================================================================
   Dr. Marcelo Vasconcellos Odontologia — Design System & Custom Styles
   Estética: Clinical Opulence Clean (Hand Design Impeccable 4.0)
   ========================================================================== */

:root {
  --brand-primary: #0072CE;
  --brand-primary-hover: #005FA8;
  --brand-primary-light: #EBF4FC;
  --brand-dark: #0A2540;
  --brand-deep: #051329;
  --brand-accent: #00C2CB;
  --brand-accent-glow: rgba(0, 194, 203, 0.25);
  --brand-gold: #C99A3E;
  --brand-bg: #FAFDFC;
  --brand-surface: #FFFFFF;
  --brand-border: #E2E8F0;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--brand-bg);
  color: #334155;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Background Subtle Grid Texture */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
}

/* ----------------------------------------------------
   Header & Mobile Drawer Auto-Retract
   ---------------------------------------------------- */
#main-header {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

#main-header.nav-hidden {
  transform: translateY(-120%);
}

#main-header.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -10px rgba(10, 37, 64, 0.08);
}

/* Mobile Drawer Overlay */
#mobile-drawer {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#mobile-drawer.drawer-closed {
  transform: translateX(100%);
  pointer-events: none;
  opacity: 0;
}

#mobile-drawer.drawer-open {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}

/* ----------------------------------------------------
   Marquee Ticker Animation
   ---------------------------------------------------- */
.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 2rem;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  min-width: 100%;
  gap: 2rem;
  animation: scrollMarquee 28s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 2rem));
  }
}

/* ----------------------------------------------------
   Interactive Split-Slider (Antes & Depois)
   ---------------------------------------------------- */
.comparison-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(10, 37, 64, 0.18);
  user-select: none;
  background-color: #0F172A;
  aspect-ratio: 16 / 10;
  border: 4px solid #FFFFFF;
}

.comparison-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.comparison-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0.03s ease-out;
}

.comparison-slider-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 30;
  margin: 0;
}

.comparison-divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3.5px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), #FFFFFF, rgba(255,255,255,0.7));
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 0 16px rgba(0, 114, 206, 0.9);
}

.comparison-handle-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #FFFFFF, #F0F7FF);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(0, 114, 206, 0.4);
  pointer-events: none;
  z-index: 25;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.comparison-container:hover .comparison-handle-btn {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(0, 114, 206, 0.5);
}

/* ----------------------------------------------------
   Cards & Hover Effects
   ---------------------------------------------------- */
.card-hover-effect {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.card-hover-effect:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0, 114, 206, 0.12);
  border-color: rgba(0, 114, 206, 0.35);
}

/* ----------------------------------------------------
   Radar Pulse for WhatsApp
   ---------------------------------------------------- */
.radar-pulse {
  position: relative;
}

.radar-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: inherit;
  opacity: 0.6;
  animation: radarWave 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  z-index: -1;
}

@keyframes radarWave {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* ----------------------------------------------------
   Custom Scrollbar
   ---------------------------------------------------- */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
