/* ==========================================================================
   Hidromarte - CSS Customizado
   Estilos complementares ao Tailwind CSS.
   Apenas efeitos e estilos específicos da marca.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variáveis de marca (Custom Properties)
   -------------------------------------------------------------------------- */
:root {
  --brand-blue: #2354a2;
  --brand-blue-light: #2e6bc4;
  --brand-blue-dark: #1a3f7a;
  --brand-red: #ea3a1c;
  --brand-red-light: #f05a40;
  --brand-red-dark: #c42e15;
  --whatsapp-green: #25d366;
  --font-primary: 'Montserrat', sans-serif;
}

/* --------------------------------------------------------------------------
   Base / Reset
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--brand-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-blue-light);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-blue) #f1f5f9;
}

/* --------------------------------------------------------------------------
   Hero - Gradient overlay
   -------------------------------------------------------------------------- */
.hero-gradient {
  position: relative;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(35, 84, 162, 0.85) 0%,
    rgba(35, 84, 162, 0.5) 50%,
    rgba(35, 84, 162, 0.15) 100%
  );
  z-index: 1;
}

.hero-gradient > * {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   Navbar - Link ativo com underline animado
   -------------------------------------------------------------------------- */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--brand-red);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

.nav-link.active {
  color: var(--brand-red);
}

/* --------------------------------------------------------------------------
   Navbar - Efeito ao rolar (shadow)
   -------------------------------------------------------------------------- */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 16px rgba(35, 84, 162, 0.12);
  backdrop-filter: blur(8px);
}

/* --------------------------------------------------------------------------
   Menu mobile - Transição
   -------------------------------------------------------------------------- */
.mobile-menu-enter {
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.mobile-menu-enter.mobile-menu-active {
  transform: translateX(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   FAQ - Details/Summary
   -------------------------------------------------------------------------- */
details summary::-webkit-details-marker {
  display: none;
}

details summary {
  list-style: none;
}

details summary::marker {
  display: none;
  content: '';
}

/* --------------------------------------------------------------------------
   Cards de serviço - Hover
   -------------------------------------------------------------------------- */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 24px rgba(35, 84, 162, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   "Como Funciona" - Linhas conectoras entre passos
   -------------------------------------------------------------------------- */
.step-connector {
  position: relative;
}

/* Desktop: linha horizontal entre passos */
@media (min-width: 768px) {
  .step-connector:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(
      to right,
      var(--brand-blue),
      var(--brand-blue-light)
    );
    z-index: 0;
  }
}

/* Mobile: linha vertical entre passos */
@media (max-width: 767px) {
  .step-connector:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 24px;
    background: var(--brand-blue);
    z-index: 0;
  }
}

/* --------------------------------------------------------------------------
   Animação fade-in ao scroll
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.7s ease forwards;
}

/* Elementos aguardando animação (invisíveis até entrar na viewport) */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
}

/* --------------------------------------------------------------------------
   Botão flutuante do WhatsApp
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: var(--whatsapp-green);
  color: #fff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 12px rgba(37, 211, 102, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 50;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 20px rgba(37, 211, 102, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.15);
  animation: none;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

@keyframes whatsappPulse {
  0% {
    box-shadow:
      0 4px 12px rgba(37, 211, 102, 0.4),
      0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow:
      0 4px 12px rgba(37, 211, 102, 0.4),
      0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow:
      0 4px 12px rgba(37, 211, 102, 0.4),
      0 0 0 0 rgba(37, 211, 102, 0);
  }
}
