/* ============================================================
   JAS Tur — estilos
   Fase 2: estilização, responsivo, identidade visual,
   tema claro/escuro via prefers-color-scheme.
   ============================================================ */

/* ---------- Reset básico ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* evita que o header sticky cubra o topo da seção ao navegar por âncora */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--texto);
  transition: background-color .2s ease, color .2s ease;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 .5em;
}

p {
  margin: 0 0 1em;
}

/* ---------- Paleta / tema ----------
   Padrão = tema claro (fundo branco/cinza claro).
   Azul e verde da marca continuam como cor de destaque.
   No modo escuro, o fundo vira azul marinho/petróleo,
   como nas artes originais do cliente. */
:root {
  color-scheme: light dark;

  --bg: #f5f8fa;
  --bg-elevada: #ffffff;
  --bg-alt: #eef3f6;
  --texto: #102a3d;
  --texto-suave: #52697a;
  --borda: #dde6ec;

  --azul: #1f6fd6;
  --azul-claro: #4d94ff;
  --verde: #1f9d5c;
  --gradiente-marca: linear-gradient(135deg, var(--azul) 0%, var(--verde) 100%);

  --header-bg: #0a2540;
  --header-texto: #ffffff;

  --whatsapp: #25d366;
  --whatsapp-hover: #1ebc59;

  --erro: #d6323f;
  --erro-sombra: rgba(214, 50, 63, .15);

  --sombra: 0 4px 16px rgba(10, 37, 64, .08);
  --raio: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1f2e;
    --bg-elevada: #0f2c40;
    --bg-alt: #0d2637;
    --texto: #f2f7fa;
    --texto-suave: #a9c0cf;
    --borda: #1c3b52;

    --azul: #4d94ff;
    --azul-claro: #7fb2ff;
    --verde: #34c77b;

    --header-bg: #071826;
    --header-texto: #ffffff;

    --erro: #ff6b6b;
    --erro-sombra: rgba(255, 107, 107, .18);

    --sombra: 0 4px 20px rgba(0, 0, 0, .35);
  }
}

/* ---------- Layout utilitário ---------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 4rem 0;
}

section .section-lead {
  color: var(--texto-suave);
  max-width: 60ch;
}

/* alterna o fundo entre seções pra criar ritmo visual */
#frota,
#diferenciais {
  background: var(--bg-alt);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.6rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gradiente-marca);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(31, 111, 214, .35);
}

.btn-secondary {
  background: transparent;
  color: var(--texto);
  border: 2px solid var(--borda);
}

.btn-secondary:hover {
  border-color: var(--azul);
  color: var(--azul);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .35);
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  color: var(--header-texto);
  box-shadow: var(--sombra);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .85rem 1.25rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  /* logo.png já é recortado (fundo transparente); sem cor de fundo aqui
     pra não recriar uma "caixa" atrás dele no header/footer escuros */
  background: transparent;
  object-fit: contain;
}

.logo-text {
  color: #ffffff;
  font-size: 1.1rem;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.main-nav a {
  font-size: .95rem;
  color: rgba(255, 255, 255, .85);
  transition: color .15s ease;
}

.main-nav a:hover {
  color: #ffffff;
}

.header-cta {
  padding: .6rem 1.25rem;
  font-size: .9rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-cta-mobile {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--header-bg);
  color: #ffffff;
  padding: 5rem 0;
  text-align: center;
}

/* marca d'água enorme do logo no fundo do hero — mais discreta que as
   cores/texto de cima, mas bem visível (pedido explícito do cliente) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/marca/logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: clamp(240px, 60vw, 630px);
  opacity: .18;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
}

.hero-subtitle {
  color: rgba(255, 255, 255, .8);
  font-size: 1.1rem;
  margin: 0 auto 2rem;
  max-width: 55ch;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero .btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .4);
}

.hero .btn-secondary:hover {
  border-color: #ffffff;
  color: #ffffff;
}

/* ---------- Grids de cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-elevada);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(10, 37, 64, .14);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-alt);
  color: transparent; /* evita o ícone quebrado ficar feio antes das fotos reais */
}

/* carrossel de fotos no topo dos cards da frota: arraste com o mouse ou
   o dedo (touch) pra ver as outras fotos do veículo — sem clicar em nada.
   Ver js/script.js pra lógica do arraste (pointer events). */
.card-img-carousel {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: grab;
  touch-action: pan-y; /* deixa o scroll vertical da página passar; o arraste horizontal é tratado no JS */
}

.card-img-carousel:active {
  cursor: grabbing;
}

.card-img-carousel:focus-visible {
  outline: 3px solid var(--azul-claro);
  outline-offset: -3px;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .3s ease;
}

.card-img-carousel.is-arrastando .carousel-track {
  transition: none;
}

.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none; /* o arraste é ouvido no container, não em cada foto */
}

/* bolinhas indicando quantas fotos tem e em qual o usuário está */
.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: .6rem;
  display: flex;
  justify-content: center;
  gap: .3rem;
  pointer-events: none;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px rgba(10, 37, 64, .25);
  transition: width .2s ease, background-color .2s ease;
}

.carousel-dot.is-ativo {
  width: 16px;
  background: #ffffff;
}

/* setas de ir/voltar, além do arraste — ficam por cima da foto */
.carousel-seta {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 37, 64, .55);
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}

.carousel-seta:hover {
  background: rgba(10, 37, 64, .75);
}

.carousel-seta:focus-visible {
  outline: 2px solid var(--azul-claro);
  outline-offset: 2px;
}

.carousel-seta:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

.carousel-anterior {
  left: .5rem;
}

.carousel-proxima {
  right: .5rem;
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.card h3 {
  font-size: 1.15rem;
}

.card-meta {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--azul);
  font-weight: 600;
  font-size: .8rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}

.card-features li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: .35rem;
  color: var(--texto-suave);
  font-size: .95rem;
}

.card-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradiente-marca);
}

.card-servico,
.card-diferencial {
  padding: 1.5rem;
}

/* ---------- Galeria de clientes em viagem ---------- */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.galeria-item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--raio);
  overflow: hidden;
  box-shadow: var(--sombra);
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.galeria-item:hover img,
.galeria-item:focus-within img {
  transform: scale(1.08);
}

.galeria-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: .75rem 1rem;
  background: linear-gradient(to top, rgba(10, 37, 64, .85), transparent);
  color: #ffffff;
  font-weight: 600;
  font-size: .9rem;
}

/* item de vídeo: sem zoom no hover (atrapalharia os controles nativos)
   e legenda no topo, pra não cobrir a barra de controle do vídeo */
.galeria-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.galeria-video figcaption {
  top: 0;
  bottom: auto;
  background: linear-gradient(to bottom, rgba(10, 37, 64, .85), transparent);
}

/* ---------- Como funciona ---------- */
.passos-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  counter-reset: passo;
}

.passo {
  text-align: center;
  padding: 1.5rem 1rem;
}

.passo-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradiente-marca);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ---------- Formulário / wizard de pré-reserva ---------- */
.wizard {
  background: var(--bg-elevada);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 2rem;
  margin-top: 2rem;
}

.wizard-progress {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--borda);
}

.wizard-progress-item {
  flex: 1 1 auto;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--texto-suave);
  padding: .5rem .25rem;
  border-bottom: 3px solid var(--borda);
}

.wizard-progress-item.is-active {
  color: var(--azul);
  border-bottom-color: var(--azul);
}

.wizard-progress-item.is-complete {
  color: var(--verde);
  border-bottom-color: var(--verde);
}

.wizard-step legend {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0;
  margin-bottom: 1.5rem;
  color: var(--texto);
}

.wizard-step {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0; /* reseta o min-width padrão de fieldset, que quebra o layout flex/grid */
}

.wizard-step[hidden] {
  display: none;
}

.campo {
  margin-bottom: 1.25rem;
}

.campo label,
.campo-label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
}

.campo input[type="text"],
.campo input[type="number"],
.campo input[type="tel"],
.campo input[type="date"],
.campo input[type="time"],
.campo textarea {
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--borda);
  border-radius: 8px;
  background: var(--bg);
  color: var(--texto);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.campo input:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(31, 111, 214, .15);
}

.campo textarea {
  resize: vertical;
}

.campo-opcoes {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.opcao {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1rem;
  border: 1px solid var(--borda);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  flex: 1 1 220px;
  transition: border-color .15s ease, background .15s ease;
}

.opcao:has(input:checked) {
  border-color: var(--azul);
  background: var(--bg-alt);
}

.opcao input {
  accent-color: var(--azul);
}

.campo-invalido input,
.campo-invalido textarea {
  border-color: var(--erro);
  box-shadow: 0 0 0 3px var(--erro-sombra);
}

.campo-invalido.campo-opcoes .opcao {
  border-color: var(--erro);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--borda);
}

.resumo {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.resumo-lista {
  display: grid;
  gap: .9rem;
  margin: 0;
}

.resumo-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: .5rem 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--borda);
}

.resumo-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resumo-item dt {
  font-weight: 600;
  color: var(--texto-suave);
  font-size: .85rem;
}

.resumo-item dd {
  margin: 0;
  color: var(--texto);
  word-break: break-word;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--header-bg);
  color: rgba(255, 255, 255, .85);
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 3rem 1.25rem;
}

.footer-col h3 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: .75rem;
}

.footer-brand .logo-img {
  margin-bottom: .75rem;
}

.lista-redes li {
  margin-bottom: .4rem;
}

.lista-redes a:hover,
.footer-contato a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
}

.footer-bottom p {
  margin: 0;
}

.footer-credit a {
  color: rgba(255, 255, 255, .8);
  transition: color .18s ease, opacity .18s ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: #ffffff;
}

/* ---------- Responsivo ---------- */
@media (max-width: 720px) {
  section {
    padding: 3rem 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .main-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
  }

  .main-nav.is-aberto {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: .75rem;
    margin-top: .5rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
  }

  .main-nav a {
    display: block;
    padding: .75rem .25rem;
  }

  .nav-cta-mobile {
    display: block;
    margin-top: .5rem;
    padding: .5rem .25rem .25rem;
  }

  .nav-cta-mobile .btn {
    width: 100%;
  }

  .wizard {
    padding: 1.25rem;
  }

  .wizard-progress-item {
    font-size: .7rem;
  }

  .wizard-nav {
    flex-direction: column-reverse;
  }

  .wizard-nav .btn {
    width: 100%;
  }

  .resumo-item {
    grid-template-columns: 1fr;
    gap: .2rem;
  }

}

@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .wizard-progress-item {
    flex-basis: 45%;
  }
}
