/* ================================================
   LENOG Saúde - Custom Styles
   Beyond Tailwind: animations, glass effects, custom behaviors
   ================================================ */

/* ---- Smooth Scroll ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* ---- Selection Color ---- */
::selection {
  background-color: #0A4D3C;
  color: white;
}

/* ---- Navbar Glass Effect ---- */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#navbar.scrolled .nav-link {
  color: #374151;
}

#navbar:not(.scrolled) {
  background: transparent;
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-100 { transition-delay: 0.1s; }
.reveal-delay-200 { transition-delay: 0.2s; }
.reveal-delay-300 { transition-delay: 0.3s; }

/* ---- Counter Animation ---- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ---- Service Cards ---- */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover::before {
  opacity: 0.15;
}

/* ---- Treatment Cards ---- */
.treatment-card {
  position: relative;
}

.treatment-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #0A4D3C;
  border-radius: 2px;
  transition: height 0.3s ease;
}

.treatment-card:hover::after {
  height: 50%;
}

/* ---- Mobile Menu Animation ---- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.2s ease;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
  display: block;
}

/* ---- WhatsApp Floating Button ---- */
#whatsapp-float {
  opacity: 0;
  transform: scale(0.5) translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.2s ease;
  pointer-events: none;
}

#whatsapp-float.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* ---- Map Iframe ---- */
#contato iframe {
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.3s ease;
}

#contato iframe:hover {
  filter: grayscale(0%) contrast(1);
}

/* ---- Focus Styles (Accessibility) ---- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #0A4D3C;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-delay-100,
  .reveal-delay-200,
  .reveal-delay-300 {
    transition-delay: 0s;
  }
  #whatsapp-float {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
  }
  .animate-float,
  .animate-pulse-slow,
  .animate-ping {
    animation: none;
  }
}

/* ---- Print Styles ---- */
@media print {
  #navbar,
  #whatsapp-float,
  #scroll-progress {
    display: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f0;
}

::-webkit-scrollbar-thumb {
  background: #c5c5bc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0A4D3C;
}
