/* ==========================================================================
   style.css — estilos proprios da AutoBarrana
   ========================================================================== */

:root {
  --azul-profundo: #0f1c2e;
  --azul-escuro: #14253c;
  --laranja: #ffc107;
  --cinza-claro: #f6f8fb;
  --texto: #1f2937;
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--texto);
  padding-top: 70px;
}

/* Navbar */
.navbar-auto {
  background-color: rgba(15, 28, 46, 0.95);
  backdrop-filter: blur(8px);
  transition: background-color 0.3s ease, padding 0.3s ease;
}
.navbar-auto .nav-link { font-weight: 500; position: relative; transition: color 0.2s ease; }
.navbar-auto .nav-link::after {
  content: ''; position: absolute; left: 50%; bottom: 2px;
  width: 0; height: 2px; background: var(--laranja);
  transition: width 0.25s ease, left 0.25s ease;
}
.navbar-auto .nav-link:hover::after,
.navbar-auto .nav-link.active::after { width: 60%; left: 20%; }
.navbar-auto .nav-link.active { color: var(--laranja) !important; }

/* Hero (imagem local com fallback escuro) */
.hero-auto {
  min-height: 88vh;
  background-color: var(--azul-profundo);
  background-image: linear-gradient(rgba(15, 28, 46, 0.82), rgba(15, 28, 46, 0.9)), url('https://images.unsplash.com/photo-1486006920555-c77dcf18193c?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.page-header { background: linear-gradient(135deg, var(--azul-profundo), var(--azul-escuro)); }

/* Cartoes */
.servico-card, .vantagem-card, .valor-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
}
.servico-card:hover, .vantagem-card:hover, .valor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(15, 28, 46, 0.12) !important;
}
.icone-servico {
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: linear-gradient(135deg, var(--laranja), #ffda6a);
  color: var(--azul-profundo); font-size: 1.8rem;
}
.categoria-badge { background: rgba(255, 193, 7, 0.18); color: #9a7400; font-weight: 600; }
.vantagem-card { border: 1px solid #eef1f6; }

/* CTA e contacto */
.cta-auto { background: linear-gradient(135deg, var(--azul-escuro), #1d3557); }
.icone-contacto {
  width: 48px; height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(255, 193, 7, 0.15); color: #9a7400; font-size: 1.2rem;
}

/* Rodape (contraste melhorado) */
.footer-auto { background: var(--azul-profundo); }
.footer-auto h5, .footer-auto h6 { color: #ffffff; }
.footer-auto p { color: #c7d1de !important; }
.footer-links li { margin-bottom: 0.5rem; color: #d3dbe6; }
.footer-links a { color: #d3dbe6; text-decoration: none; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--laranja); }
.footer-base { color: #b9c3d1; }
.footer-powered { color: var(--laranja); font-weight: 600; text-decoration: none; }
.footer-powered:hover { color: #ffd454; text-decoration: underline; }

/* Erro */
.erro-pagina { min-height: 70vh; }

/* Animacoes de entrada */
[data-anim] { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-anim].visivel { opacity: 1; transform: none; }

/* Ancoras */
section[id] { scroll-margin-top: 80px; }

/* Galeria (imagens locais) */
.galeria-item {
  height: 240px; background-color: var(--azul-escuro);
  background-size: cover; background-position: center;
  position: relative; overflow: hidden;
}
.galeria-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 28, 46, 0.85), rgba(15, 28, 46, 0.15));
}
.galeria-cap {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  color: #fff; font-weight: 600; font-size: 1.1rem;
}

/* Carrossel de parceiros */
.parceiros-carrossel {
  overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.parceiros-track {
  display: flex; align-items: center; gap: 3rem; width: max-content;
  animation: deslizar-parceiros 28s linear infinite;
}
.parceiros-carrossel:hover .parceiros-track { animation-play-state: paused; }
.parceiro-logo { flex: 0 0 auto; height: 70px; display: flex; align-items: center; }
.parceiro-logo img {
  max-height: 70px; max-width: 160px; object-fit: contain;
  filter: grayscale(100%); opacity: 0.75; transition: filter 0.3s ease, opacity 0.3s ease;
}
.parceiro-logo img:hover { filter: none; opacity: 1; }
@keyframes deslizar-parceiros { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Fundo suave da seccao de servicos (realca o efeito de vidro) */
#servicos {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 193, 7, 0.18), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(15, 28, 46, 0.14), transparent 45%),
    var(--cinza-claro) !important;
}

/* Cards de servico com ilustracao transparente (marca de agua) */
.servico-card-ilustrado {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
          backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
}
.servico-card-ilustrado:hover {
  background: rgba(255, 255, 255, 0.7);
}
.servico-watermark {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 150px;
  height: auto;
  opacity: 0.22;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.servico-card-ilustrado:hover .servico-watermark {
  opacity: 0.34;
  transform: scale(1.08) rotate(-5deg);
}
.servico-card-ilustrado .card-body {
  position: relative;
  z-index: 1;
}

/* Hero: animacoes do texto */
.hero-destaque { display: inline-block; animation: brilho-laranja 3s ease-in-out infinite; }
@keyframes brilho-laranja {
  0%, 100% { text-shadow: 0 0 0 rgba(255, 193, 7, 0); }
  50%      { text-shadow: 0 0 22px rgba(255, 193, 7, 0.55); }
}
.hero-auto .btn-warning { animation: flutuar 2.8s ease-in-out infinite; }
@keyframes flutuar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Quando o card usa uma FOTO PNG (em vez da ilustracao SVG): maior e mais nitida */
.servico-watermark.is-foto {
  width: 190px;
  opacity: 0.9;
  right: -8px;
  bottom: -8px;
}
.servico-card-ilustrado:hover .servico-watermark.is-foto {
  opacity: 1;
  transform: scale(1.05) rotate(0deg);
}

/* --------------------------------------------------------------------------
   Botao flutuante de WhatsApp
   -------------------------------------------------------------------------- */
.whatsapp-flutuante {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1050;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: pulso-whatsapp 2.4s infinite;
}
.whatsapp-flutuante:hover { color: #fff; transform: scale(1.1); }
@keyframes pulso-whatsapp {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --------------------------------------------------------------------------
   Testemunhos
   -------------------------------------------------------------------------- */
.testemunho-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  height: 100%;
  box-shadow: 0 .5rem 1.5rem rgba(15, 28, 46, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.testemunho-card:hover { transform: translateY(-6px); box-shadow: 0 1rem 2rem rgba(15, 28, 46, 0.12); }
.testemunho-estrelas { color: var(--laranja); }
.testemunho-autor { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.testemunho-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--laranja), #ffda6a);
  color: var(--azul-profundo); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* --------------------------------------------------------------------------
   Mapa (contacto)
   -------------------------------------------------------------------------- */
.mapa-contacto {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: 1rem;
  filter: grayscale(20%);
}

/* Icone do servico em destaque (estilo flat, centrado no card) */
.servico-icone {
  width: 84px;
  height: 84px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.servico-card-ilustrado:hover .servico-icone {
  transform: scale(1.08) translateY(-2px);
}

/* --------------------------------------------------------------------------
   Marcas que servimos
   -------------------------------------------------------------------------- */
.marcas-grelha {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}
.marca-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.25rem;
  border: 1px solid #e3e8ef;
  border-radius: 999px;
  background: #fff;
  color: #51607a;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(15, 28, 46, 0.05);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.marca-badge i { color: var(--laranja); }
.marca-badge:hover {
  transform: translateY(-3px);
  color: var(--azul-profundo);
  border-color: var(--laranja);
  box-shadow: 0 .6rem 1.2rem rgba(255, 193, 7, 0.22);
}

/* Rodape sempre a toda a largura do ecra (full-bleed) */
.footer-auto {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}

/* Logotipo */
.navbar-logo { height: 42px; width: 42px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.footer-logo { height: 34px; width: 34px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; }

/* Marca de agua (logo Lexus) a cobrir a seccao de marcas */
#marcas { position: relative; overflow: hidden; }
#marcas::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/lexus.svg') center center no-repeat;
  background-size: min(80%, 720px);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
#marcas .container { position: relative; z-index: 1; }
