/* =========================================================
   Per4media · base compartilhada das LPs
   Arquivo: /assets/p4m-base.css
   Tudo aqui usa o prefixo .p4m- para não interferir no
   Tailwind nem no CSS próprio de cada LP.
   Cada LP pode trocar as cores redefinindo as variáveis
   dentro de :root no seu próprio <style>.
   ========================================================= */

:root {
  --p4m-bg: #0a0a0c;
  --p4m-card: #141418;
  --p4m-line: #26262d;
  --p4m-text: #f4f4f5;
  --p4m-muted: #a1a1aa;
  --p4m-accent: #f7931e;      /* laranja do símbolo 4 */
  --p4m-accent-2: #e52421;    /* vermelho do símbolo 4 */
  --p4m-wa: #25d366;
  --p4m-wa-text: #062e1c;
  --p4m-radius: 16px;
  --p4m-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --p4m-font-title: 'Outfit', 'Inter', system-ui, sans-serif;
}

/* ---------- Altura de tela que funciona no celular ---------- */
.p4m-dvh { min-height: 100vh; min-height: 100dvh; }

/* ---------- Foco visível para quem navega pelo teclado ---------- */
.p4m-footer a:focus-visible,
.p4m-faq summary:focus-visible,
.p4m-wa-bar:focus-visible,
.p4m-yt:focus-visible {
  outline: 2px solid var(--p4m-accent);
  outline-offset: 3px;
}

/* =========================================================
   RODAPÉ PADRÃO
   ========================================================= */
.p4m-footer {
  background: var(--p4m-bg);
  color: var(--p4m-muted);
  border-top: 1px solid var(--p4m-line);
  font-family: var(--p4m-font);
  font-size: 14px;
  line-height: 1.6;
  padding: 56px 20px 32px;
}
.p4m-footer__wrap { max-width: 1120px; margin: 0 auto; }
.p4m-footer__top {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 24px;
  padding-bottom: 32px; border-bottom: 1px solid var(--p4m-line);
}
.p4m-footer__brand img { height: 28px; width: auto; display: block; }
.p4m-footer__brand p { margin: 12px 0 0; max-width: 34em; }
.p4m-footer__cta {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--p4m-wa); color: var(--p4m-wa-text) !important;
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.p4m-footer__cols {
  display: grid; gap: 28px 24px; padding: 32px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 860px) {
  .p4m-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.p4m-footer h2 {
  margin: 0 0 12px; color: var(--p4m-text);
  font: 600 13px/1.3 var(--p4m-font); letter-spacing: .08em; text-transform: uppercase;
}
.p4m-footer ul { list-style: none; margin: 0; padding: 0; }
.p4m-footer li a {
  display: inline-flex; align-items: center; min-height: 36px;
  color: var(--p4m-muted); text-decoration: none;
}
.p4m-footer li a:hover { color: var(--p4m-text); }
.p4m-footer li a[aria-current="page"] { color: var(--p4m-text); font-weight: 600; }
.p4m-footer__partners {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  padding: 24px 0; border-top: 1px solid var(--p4m-line);
}
.p4m-footer__partners span {
  width: 100%; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
@media (min-width: 640px) { .p4m-footer__partners span { width: auto; margin-right: 8px; } }
.p4m-footer__partners img {
  height: 40px; width: auto; opacity: .65; filter: grayscale(100%); transition: opacity .3s ease, filter .3s ease;
}
.p4m-footer__partners img:hover { opacity: 1; filter: none; }
.p4m-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 24px; padding-top: 24px; border-top: 1px solid var(--p4m-line); font-size: 13px;
}
.p4m-footer__social,
.p4m-footer__legal { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 -8px; }
.p4m-footer__social a,
.p4m-footer__legal a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  color: var(--p4m-muted); text-decoration: none;
}
.p4m-footer__social a:hover,
.p4m-footer__legal a:hover { color: var(--p4m-text); }

/* =========================================================
   PERGUNTAS FREQUENTES (usa <details>, funciona sem JS)
   ========================================================= */
.p4m-faq { max-width: 860px; margin: 0 auto; padding: 72px 20px; font-family: var(--p4m-font); }
.p4m-faq h2 {
  margin: 0 0 24px; color: var(--p4m-text); text-align: center;
  font: 700 clamp(26px, 4vw, 36px)/1.15 var(--p4m-font-title);
}
.p4m-faq details {
  background: var(--p4m-card); border: 1px solid var(--p4m-line);
  border-radius: var(--p4m-radius); margin-bottom: 10px;
}
.p4m-faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; padding: 18px 20px; min-height: 56px;
  color: var(--p4m-text); font-weight: 600; font-size: 16px;
}
.p4m-faq summary::-webkit-details-marker { display: none; }
.p4m-faq summary::after {
  content: "+"; flex: 0 0 auto; font-size: 22px; line-height: 1; color: var(--p4m-accent);
  transition: transform .2s ease;
}
.p4m-faq details[open] summary::after { transform: rotate(45deg); }
.p4m-faq details > div { padding: 0 20px 18px; color: var(--p4m-muted); line-height: 1.65; }
.p4m-faq details > div p { margin: 0 0 10px; }

/* =========================================================
   BARRA DE WHATSAPP FIXA (só no celular)
   ========================================================= */
.p4m-wa-bar { display: none; }
@media (max-width: 767px) {
  .p4m-wa-bar {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    position: fixed; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9990; min-height: 52px; padding: 0 18px; border-radius: 999px;
    background: var(--p4m-wa); color: var(--p4m-wa-text) !important;
    font: 700 15px/1.2 var(--p4m-font); text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .25s ease, opacity .25s ease;
  }
  .p4m-wa-bar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
  body.p4m-has-wa-bar { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
.p4m-wa-bar svg, .p4m-footer__cta svg { width: 20px; height: 20px; flex: 0 0 auto; fill: currentColor; }

/* =========================================================
   YOUTUBE COM CAPA CLICÁVEL
   O player só carrega quando a pessoa clica.
   ========================================================= */
.p4m-yt {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; padding: 0; margin: 0; border-radius: inherit; overflow: hidden;
  background: #000 center / cover no-repeat; cursor: pointer;
}
.p4m-yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p4m-yt::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35));
}
.p4m-yt::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 72px; height: 72px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(229, 36, 33, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 34px no-repeat;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: transform .2s ease;
}
.p4m-yt:hover::after { transform: translate(-50%, -50%) scale(1.06); }
.p4m-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Vídeos com carregamento sob demanda ---------- */
video[data-p4m-lazy] { background: #000; }

/* =========================================================
   RESPEITO A "REDUZIR MOVIMENTO"
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
