/* ==========================================================================
   KS Elétrica e Ar-Condicionado - Estilos Base & Componentes
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --color-navy-dark: #071325;
  --color-navy-deep: #050d1a;
  --color-blue-electric: #0072ea;
  --color-whatsapp-green: #20ba68;
  --color-whatsapp-green-hover: #1db062;
}

html {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--color-navy-dark);
  color: #ffffff;
}

/* Offset para seções e âncoras compensando o Header fixo */
[id] {
  scroll-margin-top: 80px;
}

/* Redução de movimento para usuários que preferem acessibilidade */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Indicador de foco acessível */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-blue-electric);
  outline-offset: 3px;
}

/* Transições suaves para estados do menu mobile */
#mobile-menu {
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-in-out, visibility 0.3s ease-in-out;
}

#mobile-menu.menu-closed {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#mobile-menu.menu-open {
  max-height: 480px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Animação do ícone hamburger para 'X' */
.hamburger-line {
  transition: transform 0.25s ease-in-out, opacity 0.2s ease-in-out;
  transform-origin: center;
}

.hamburger-active .line-top {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-active .line-middle {
  opacity: 0;
}

.hamburger-active .line-bottom {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   FAQ Accordion - Transições e Estados Acessíveis
   ========================================================================== */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer.is-open {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
}

.faq-button .faq-line-v {
  transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
  transform-origin: center;
}

.faq-button[aria-expanded="true"] .faq-line-v {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-button[aria-expanded="true"] .faq-icon-wrapper {
  background-color: #1683E8;
  color: #ffffff;
}

/* ==========================================================================
   Destaque Suave para Card de Serviço Selecionado por Âncora
   ========================================================================== */
article[id^="servico-"] {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

article[id^="servico-"]:target,
article[id^="servico-"].card-anchor-active {
  border-color: #1683E8 !important;
  box-shadow: 0 0 0 3px rgba(22, 131, 232, 0.25), 0 12px 24px -6px rgba(22, 131, 232, 0.2) !important;
  transform: translateY(-4px) !important;
}

/* ==========================================================================
   Hero Background Image - Enquadramento Mobile & Desktop
   Centraliza o personagem e a logo KS na camisa no mobile (< 768px)
   ========================================================================== */
.hero-bg-img {
  object-position: 72% center;
}

@media (min-width: 768px) {
  .hero-bg-img {
    object-position: center center;
  }
}

/* ==========================================================================
   Carrossel de Depoimentos - Responsivo Mobile & Desktop
   ========================================================================== */
#testimonial-track {
  display: flex !important;
  width: 100% !important;
  will-change: transform;
}

.testimonial-slide {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  box-sizing: border-box !important;
}

.testimonial-avatar {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  aspect-ratio: 1 / 1 !important;
  border: 1px solid #e2e8f0 !important;
  background-color: #f1f5f9 !important;
}

@media (min-width: 640px) {
  .testimonial-avatar {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
  }
}

.testimonial-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border-radius: 9999px !important;
}



