/* ====================================================
   Emília Góis Fonoaudióloga — Custom Styles
   Cores: Primary #C91C6E (rosa/magenta) | Secondary #00B4C8 (teal)
   ==================================================== */

/* Scroll suave global */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* altura do header fixo */
}

/* Remove outline padrão, substitui por focus visível acessível */
*:focus-visible {
  outline: 2px solid #C91C6E;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Body base */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* =====================
   HEADER
   ===================== */

#header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Hamburger animation */
#mobile-menu-btn.menu-open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#mobile-menu-btn.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#mobile-menu-btn.menu-open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Active nav link */
.nav-link.active {
  color: #C91C6E;
}

/* =====================
   HERO ANIMATIONS
   ===================== */

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 28, 110, 0.3); }
  50% { box-shadow: 0 0 0 12px rgba(201, 28, 110, 0); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero content enters with animation */
#hero .order-2 > * {
  animation: fadeInUp 0.7s ease forwards;
  opacity: 0;
}
#hero .order-2 > *:nth-child(1) { animation-delay: 0.1s; }
#hero .order-2 > *:nth-child(2) { animation-delay: 0.2s; }
#hero .order-2 > *:nth-child(3) { animation-delay: 0.35s; }
#hero .order-2 > *:nth-child(4) { animation-delay: 0.45s; }
#hero .order-2 > *:nth-child(5) { animation-delay: 0.55s; }

/* Hero visual card float */
#hero .order-1 .relative {
  animation: float 6s ease-in-out infinite;
}

/* =====================
   INTERSECTION OBSERVER — Scroll reveal
   ===================== */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =====================
   NEURAL NETWORK BG ANIMATION
   ===================== */

@keyframes neural-pulse {
  0%, 100% { opacity: 0.05; }
  50% { opacity: 0.1; }
}

#neurociencia > div:first-child svg {
  animation: neural-pulse 4s ease-in-out infinite;
}

/* =====================
   TESTIMONIALS — Scroll container (mobile)
   ===================== */

@media (max-width: 767px) {
  #depoimentos .grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  #depoimentos .grid > div {
    scroll-snap-align: start;
    min-width: 280px;
    flex-shrink: 0;
  }
}

/* =====================
   FORM STATES
   ===================== */

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not([value=""]) {
  border-color: #FCA5A5;
}

input.error,
textarea.error,
select.error {
  border-color: #EF4444 !important;
  background-color: #FEF2F2;
}

/* =====================
   WHATSAPP FLOATING BUTTON
   ===================== */

.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  width: 3.5rem;
  height: 3.5rem;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: all 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
  background-color: #128C7E;
}

/* Pulse ring on whatsapp button */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.4);
  animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* =====================
   GRADIENT TEXT HELPER
   ===================== */

.gradient-text {
  background: linear-gradient(135deg, #C91C6E 0%, #00B4C8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================
   SCROLLBAR STYLING (webkit)
   ===================== */

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #C91C6E;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #A31558;
}

/* =====================
   SECTION TRANSITIONS
   ===================== */

section {
  transition: background-color 0.3s ease;
}

/* =====================
   PRINT STYLES
   ===================== */

@media print {
  .whatsapp-float,
  #header,
  #mobile-menu-btn {
    display: none !important;
  }
}
