/* ==========================================================================
   CENTRO AUTOMOTIVO ATIR — style.css
   CSS puro, mobile-first (media queries só com min-width).
   Ordem das seções igual à do index.html.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Cores */
  --navy: #0F1B2D;
  --navy-light: #1A2B45;      /* superfícies sobre o navy */
  --white: #FFFFFF;
  --off-white: #F5F6F8;       /* superfícies sobre o branco */
  --red: #D62828;             /* acento — elevadores vermelhos */
  --wpp: #25D366;             /* EXCLUSIVO dos CTAs de WhatsApp */
  --wpp-dark: #1DA851;        /* hover do WhatsApp */
  --gray: #6B7280;
  --gray-light: #D1D5DB;

  /* Tipografia */
  --font-title: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Espaçamento */
  --space-1: 0.25rem;   /*  4px */
  --space-2: 0.5rem;    /*  8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* Sombra */
  --shadow-sm: 0 1px 3px rgba(15, 27, 45, 0.12);
  --shadow-md: 0 4px 12px rgba(15, 27, 45, 0.16);
  --shadow-lg: 0 8px 24px rgba(15, 27, 45, 0.24);

  /* Layout */
  --header-h: 84px;
  --container: 1140px;

  /* Breakpoints (referência — usar nos @media):
     --bp-sm: 640px | --bp-md: 768px | --bp-lg: 1024px */
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Acessibilidade: foco visível em todos os interativos */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   3. COMPONENTES REUTILIZÁVEIS (badge, botões, títulos)
   -------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}

.badge--red {
  background: var(--red);
  color: var(--white);
}

.section__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.75rem, 5.5vw, 2.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
  text-wrap: balance;
}

.section__copy {
  font-size: 1.0625rem;
  margin-bottom: var(--space-6);
  max-width: 60ch;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-title);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Verde: EXCLUSIVO dos CTAs de WhatsApp */
.btn--wpp {
  background: var(--wpp);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn--wpp:hover {
  background: var(--wpp-dark);
}

.btn--lg {
  min-height: 56px;
  font-size: 1.25rem;
  width: 100%;
}

.btn--sm {
  min-height: 40px;
  font-size: 1rem;
  padding: var(--space-2) var(--space-4);
}

/* Outline navy — CTA de frota (fundo branco) */
.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* Outline branco — botão "Traçar rota" (fundo navy) */
.btn--outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn--outline-light:hover {
  background: var(--white);
  color: var(--navy);
}

/* Ritmo de fundo: seções brancas x navy */
.section {
  padding-block: var(--space-12);
}

.section--white {
  background: var(--white);
  color: var(--navy);
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--navy .section__copy {
  color: var(--gray-light);
}

/* --------------------------------------------------------------------------
   4. HEADER — fixo, 84px
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.header__logo {
  height: 76px;
  width: auto;
  display: block;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

/* Telefone: só no desktop */
.header__phone {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--navy);
}

.header__phone:hover {
  color: var(--red);
}

@media (min-width: 768px) {
  .header__phone {
    display: inline-flex;
  }
}

/* --------------------------------------------------------------------------
   5. S1 — HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 85vh; /* NÃO 100vh — CTA visível sem scroll no iPhone SE */
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background-image: url("../assets/4.jpeg");
  background-size: cover;
  background-position: center;
  color: var(--white);
  isolation: isolate;
}

/* Overlay navy 70% */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 45, 0.7);
  z-index: -1;
}

.hero__content {
  padding-block: var(--space-8);
}

.hero__title {
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  /* 5.6vw ≈ 21px @375px → H1 em no máx. 2 linhas no mobile */
  font-size: clamp(1.375rem, 5.6vw, 3.5rem);
  text-wrap: balance;
  margin-bottom: var(--space-4);
}

.hero__sub {
  font-size: clamp(0.9375rem, 2.6vw, 1.25rem);
  color: var(--gray-light);
  max-width: 56ch;
  margin-bottom: var(--space-6);
}

.hero__micro {
  font-size: 0.8125rem;
  color: var(--gray-light);
  margin-top: var(--space-3);
}

@media (min-width: 768px) {
  .hero {
    min-height: 80vh;
  }

  .hero .btn--lg {
    width: auto;
    padding-inline: var(--space-12);
  }
}

/* --------------------------------------------------------------------------
   6. S2 — BARRA DE CONFIANÇA
   -------------------------------------------------------------------------- */
.trust {
  background: var(--navy);
  color: var(--white);
  border-top: 1px solid var(--navy-light);
  min-height: 100px;
  display: flex;
  align-items: center;
}

.trust__list {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;               /* scroll horizontal no mobile */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: var(--space-4);
}

.trust__list::-webkit-scrollbar {
  display: none;
}

.trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
  min-width: 110px;
  text-align: center;
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-light);
}

.trust__item .icon {
  width: 28px;
  height: 28px;
  color: var(--red);
}

@media (min-width: 1024px) {
  .trust__list {
    justify-content: space-between;
    overflow-x: visible;
  }
}

/* --------------------------------------------------------------------------
   7. S3/S4/S6/S7/S9 — SEÇÕES SPLIT (texto + foto)
   -------------------------------------------------------------------------- */
.split__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

.split__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

@media (min-width: 768px) {
  .split__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }

  /* Padrão: texto à esquerda, foto à direita (S3, S6, S9) */
  .split__text { order: 1; }
  .split__media { order: 2; }

  /* Espelhado: foto à esquerda, texto à direita (S4, S7) */
  .split--reverse .split__text { order: 2; }
  .split--reverse .split__media { order: 1; }
}

/* Checklist de sintomas (S3 e S4) */
.checklist {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-weight: 500;
}

.icon--check {
  color: var(--red);
  margin-top: 0.2em;
}

/* Bloco destacado com borda vermelha à esquerda */
.highlight-block {
  border-left: 4px solid var(--red);
  background: var(--off-white);
  padding: var(--space-4) var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-6);
}

.highlight-block__title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
  margin-bottom: var(--space-1);
}

/* Variante para fundo navy (S4) */
.highlight-block--navy {
  background: var(--navy-light);
}

.highlight-block--navy p {
  color: var(--gray-light);
}

/* --------------------------------------------------------------------------
   8. S5 — DEMAIS SERVIÇOS
   -------------------------------------------------------------------------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 colunas no mobile */
  gap: var(--space-3);
  margin-block: var(--space-6);
}

.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--navy);
}

@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr); /* 3 colunas no desktop */
  }
}

/* Card destacado de funilaria — peso visual maior que os chips */
.services__card {
  display: grid;
  gap: var(--space-4);
  border: 2px solid var(--navy);
  border-left: 6px solid var(--red);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.services__card-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

@media (min-width: 768px) {
  .services__card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   9. S6 — ESTRUTURA (mini-stats)
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.stats__item {
  background: var(--navy-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  display: grid;
  gap: var(--space-1);
}

.stats__item strong {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stats__item span {
  font-size: 0.8125rem;
  color: var(--gray-light);
}

/* --------------------------------------------------------------------------
   10. S8 — COMO FUNCIONA
   -------------------------------------------------------------------------- */
.steps .section__title {
  text-align: center;
  margin-bottom: var(--space-8);
}

.steps__list {
  display: grid;
  grid-template-columns: 1fr; /* vertical no mobile */
  gap: var(--space-4);
  counter-reset: passo;
}

.steps__item {
  background: var(--navy-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-2);
}

.steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
}

.steps__item h3 {
  font-family: var(--font-title);
  font-size: 1.375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.steps__item p {
  color: var(--gray-light);
  font-size: 0.9375rem;
}

/* Destaque visual dos passos 3 e 4 (leva e traz + orçamento antes) */
.steps__item--featured {
  border: 2px solid var(--red);
}

.steps__item--featured .steps__number {
  background: var(--red);
  color: var(--white);
}

@media (min-width: 768px) {
  .steps__list {
    grid-template-columns: repeat(4, 1fr); /* horizontal no desktop */
  }
}

/* --------------------------------------------------------------------------
   11. S9 — DESDE 1997 (timeline)
   -------------------------------------------------------------------------- */
.timeline {
  display: grid;
  gap: var(--space-4);
  border-left: 3px solid var(--red);
  padding-left: var(--space-6);
}

.timeline__item {
  display: grid;
  gap: var(--space-1);
}

.timeline__item strong {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--red);
}

.timeline__item span {
  color: var(--gray);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   12. S10 — FAQ (accordion)
   -------------------------------------------------------------------------- */
.faq__container {
  max-width: 760px;
}

.faq .section__title {
  text-align: center;
  margin-bottom: var(--space-8);
}

.faq__list {
  display: grid;
  gap: var(--space-3);
}

.faq__item {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md);
  background: var(--white);
  overflow: hidden;
}

.faq__item[open] {
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.faq__question {
  cursor: pointer;
  list-style: none;
  padding: var(--space-4) var(--space-6);
  font-weight: 600;
  position: relative;
  padding-right: var(--space-12);
  user-select: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

/* Indicador +/− */
.faq__question::after {
  content: "+";
  position: absolute;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.faq__item[open] .faq__question::after {
  content: "−";
}

.faq__answer {
  padding: 0 var(--space-6) var(--space-4);
  color: var(--gray);
}

/* --------------------------------------------------------------------------
   13. S11 — LOCALIZAÇÃO + CTA FINAL
   -------------------------------------------------------------------------- */
.location__grid {
  display: grid;
  grid-template-columns: 1fr; /* empilha no mobile */
  gap: var(--space-8);
  align-items: start;
}

.location__address,
.location__hours {
  font-style: normal;
  margin-bottom: var(--space-4);
  color: var(--gray-light);
}

.location__address strong,
.location__hours strong {
  color: var(--white);
}

.location__phone {
  margin-bottom: var(--space-2);
}

.location__phone a {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
}

.location__phone a:hover {
  color: var(--wpp);
}

.location__email {
  margin-bottom: var(--space-6);
}

.location__email a {
  color: var(--gray-light);
  word-break: break-word;
}

.location__email a:hover {
  color: var(--wpp);
  text-decoration: underline;
}

.location__map {
  display: grid;
  gap: var(--space-4);
}

.location__map iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: var(--radius-lg);
  display: block;
}

@media (min-width: 768px) {
  .location__grid {
    grid-template-columns: 1fr 1fr;
  }

  .location .btn--lg {
    width: auto;
  }
}

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--navy);
  color: var(--gray-light);
  border-top: 1px solid var(--navy-light);
  padding-block: var(--space-8);
  /* espaço extra pro sticky bar mobile não cobrir o conteúdo */
  padding-bottom: calc(var(--space-8) + 64px);
  font-size: 0.875rem;
}

.footer__inner {
  display: grid;
  gap: var(--space-4);
}

.footer__logo {
  height: 72px;
  width: auto;
  /* logo colorido com fundo transparente — plaquinha branca para legibilidade sobre o navy */
  background: var(--white);
  padding: var(--space-2);
  border-radius: var(--radius-md);
}

.footer__info a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__legal {
  font-size: 0.8125rem;
  color: var(--gray);
}

.footer__credit {
  opacity: 0.8;
}

@media (min-width: 768px) {
  .footer {
    padding-bottom: var(--space-8); /* sticky bar não existe no desktop */
  }
}

/* --------------------------------------------------------------------------
   15. FLUTUANTES — botão WhatsApp + sticky bar mobile
   -------------------------------------------------------------------------- */
/* Botão flutuante: invisível até 30% de scroll (classe .is-visible via JS) */
.float-wpp {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--space-4) + 64px); /* acima da sticky bar no mobile */
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--wpp);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.float-wpp .icon {
  width: 30px;
  height: 30px;
}

.float-wpp.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.float-wpp:hover {
  background: var(--wpp-dark);
}

@media (min-width: 768px) {
  .float-wpp {
    bottom: var(--space-6);
    right: var(--space-6);
  }
}

/* Sticky bar mobile: 56px, aparece quando o hero sai da viewport */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  height: 56px;
  display: flex;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -2px 12px rgba(15, 27, 45, 0.2);
}

.sticky-bar.is-visible {
  transform: translateY(0);
}

.sticky-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-title);
  font-size: 1.0625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sticky-bar__btn--call {
  background: var(--navy);
  color: var(--white);
}

.sticky-bar__btn--wpp {
  background: var(--wpp);
  color: var(--white);
}

@media (min-width: 768px) {
  .sticky-bar {
    display: none; /* desktop: oculta */
  }
}

/* --------------------------------------------------------------------------
   16. PREFERÊNCIAS DO USUÁRIO
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
