/* =========================================================
   BotBug — páginas interiores feitas com widgets nativos do Elementor
   (páginas legais e páginas de SEO por distrito).
   Classes "bbx-*" são postas nos contentores/widgets no Elementor
   (Avançado → Classes CSS). Usa os tokens de style.css.
   Seletores com ".bb-page .e-con" para ganhar aos estilos por defeito
   dos contentores do Elementor.
   ========================================================= */

/* ---------- língua: o mesmo bloco em PT e em EN, mostra-se só um ---------- */
html[data-lang="en"] .lang-pt, html:not([data-lang="en"]) .lang-en { display: none !important; }

/* ---------- base dos widgets nativos ---------- */
.bb-page .elementor-widget-text-editor { color: var(--muted); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.7; }
.bb-page .elementor-widget-text-editor p + p { margin-top: 1em; }
.bb-page .elementor-widget-text-editor strong, .bb-page .elementor-widget-text-editor b { color: var(--ink); font-weight: 700; }
.bb-page .elementor-widget-text-editor a { color: var(--accent-ink); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--out); }
@media (hover: hover) { .bb-page .elementor-widget-text-editor a:hover { background-size: 0 1px; background-position: 100% 100%; } }

/* secção com a largura máxima do site, sem precisar de contentor interior */
.bb-page .e-con.bbx-section {
  padding: clamp(90px, 12vw, 170px) max(var(--g), calc((100% - var(--max)) / 2 + var(--g)));
  border-top: 1px solid var(--line); position: relative; gap: 0;
}
.bb-page .bbx-eyebrow .elementor-heading-title { font: 500 12px/1 var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.bb-page .bbx-eyebrow .elementor-heading-title::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.bb-page .bbx-h2 .elementor-heading-title { font-size: clamp(38px, 5.6vw, 88px); font-weight: 700; line-height: .98; letter-spacing: -.035em; font-variation-settings: "wdth" 84; max-width: 16ch; color: var(--ink); }
.bb-page .bbx-h2 .elementor-heading-title em, .bb-page .bbx-title .elementor-heading-title em { font-style: normal; color: var(--accent-ink); }
.bb-page .bbx-lead { max-width: 56ch; margin-top: 24px; font-size: clamp(17px, 1.3vw, 19px); }

/* palavras que sobem (títulos .js-reveal) */
.bb-page .js-reveal .line { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.bb-page .js-reveal .line__in { display: inline-block; }

/* ---------- HERO (páginas de distrito) ---------- */
.bb-page .e-con.bbx-hero {
  position: relative; min-height: 92vh; min-height: 92svh; justify-content: flex-end; gap: 0; overflow: hidden;
  padding: 130px max(var(--g), calc((100% - var(--max)) / 2 + var(--g))) clamp(40px, 6vw, 80px);
}
.bb-page .e-con.bbx-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60vw 60vw at var(--mx, 70%) var(--my, 20%), rgba(110, 231, 183, .10), rgba(127, 119, 254, .05) 45%, transparent 70%); pointer-events: none; }
.bb-page .bbx-shapes.elementor-widget { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.bb-page .bbx-shapes .hero__shapes { position: absolute; inset: 0; }
.bb-page .bbx-hero > .elementor-widget:not(.bbx-shapes) { position: relative; }
.bb-page .bbx-title .elementor-heading-title {
  font-size: clamp(46px, min(8.6vw, 15vh), 156px); font-weight: 600; line-height: .92; letter-spacing: -.04em;
  font-variation-settings: "wdth" 82; max-width: 13ch; color: var(--ink);
}
.bb-page .bbx-title .kw { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding: .06em 0 .12em; margin-bottom: -.12em; }
.bb-page .bbx-hero .bbx-lead { max-width: 52ch; }
.bb-page .bbx-actions { margin-top: 32px; }
.bb-page .bbx-actions .hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- duas colunas ---------- */
.bb-page .e-con.bbx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.bb-page .e-con.bbx-split > .e-con { gap: 0; }

/* lista de serviços/factos (editor de texto com <ul>) */
.bb-page .bbx-facts ul { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.bb-page .bbx-facts li { padding: 26px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 44px 1fr; gap: 0 18px; counter-increment: fact; }
.bb-page .bbx-facts ul { counter-reset: fact; }
.bb-page .bbx-facts li::before { content: counter(fact, decimal-leading-zero); grid-row: span 2; font: 500 13px/1.9 var(--f-m); color: var(--accent-ink); letter-spacing: .06em; }
.bb-page .bbx-facts li strong { display: block; font: 700 clamp(19px, 1.6vw, 23px)/1.25 var(--f-d); letter-spacing: -.015em; margin-bottom: 8px; }

/* ---------- cartões ---------- */
.bb-page .e-con.bbx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.bb-page .e-con.bbx-card {
  position: relative; gap: 0; padding: clamp(28px, 3vw, 40px); padding-top: clamp(84px, 8vw, 110px); border-radius: var(--r);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .5s var(--out), box-shadow .4s;
}
.bb-page .e-con.bbx-card::before { content: ""; position: absolute; top: clamp(28px, 3vw, 40px); left: clamp(28px, 3vw, 40px); width: 34px; height: 34px; background: var(--mint); border-radius: 50%; }
.bb-page .e-con.bbx-card:nth-child(3n+2)::before { background: var(--violet); border-radius: 100% 0 0 0; }
.bb-page .e-con.bbx-card:nth-child(3n)::before { background: var(--amber); border-radius: 9px; transform: rotate(45deg) scale(.82); }
.bb-page .bbx-card .elementor-heading-title { font: 700 clamp(21px, 1.8vw, 26px)/1.2 var(--f-d); letter-spacing: -.02em; color: var(--ink); margin-bottom: 12px; }
@media (hover: hover) { .bb-page .e-con.bbx-card:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -30px var(--shadow); } }

/* concelhos / zonas: lista em pílulas */
.bb-page .bbx-areas-title { margin-top: clamp(50px, 7vw, 90px); }
.bb-page .bbx-areas-title .elementor-heading-title { font: 700 clamp(20px, 1.7vw, 24px)/1.2 var(--f-d); color: var(--ink); }
.bb-page .bbx-areas ul { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.bb-page .bbx-areas li { height: 40px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font: 500 13px/1 var(--f-m); letter-spacing: .04em; color: var(--ink); transition: box-shadow .3s, color .3s; }
@media (hover: hover) { .bb-page .bbx-areas li:hover { box-shadow: inset 0 0 0 1px var(--mint); color: var(--accent-ink); } }

/* ---------- FAQ (contentor .bbx-qa = título + texto) ---------- */
.bb-page .e-con.bbx-faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.bb-page .e-con.bbx-faq__side { position: sticky; top: 120px; gap: 0; }
.bb-page .e-con.bbx-faq__list { gap: 0; }
.bb-page .e-con.bbx-qa { display: block; border-bottom: 1px solid var(--line-2); }
.bb-page .e-con.bbx-qa:first-child { border-top: 1px solid var(--line-2); }
.bb-page .bbx-qa .elementor-heading-title { font: 600 clamp(19px, 1.7vw, 24px)/1.3 var(--f-d); letter-spacing: -.01em; color: var(--ink); }
.bb-page .bbx-qa:not(.qa) .elementor-heading-title { padding: 26px 0 12px; }   /* sem JS / no editor */
.bb-page .bbx-qa .qa__q { font: inherit; color: inherit; }
.bb-page .bbx-qa .qa__a p { color: var(--muted); }

/* ---------- PÁGINAS LEGAIS ---------- */
.bb-page .e-con.bbx-legal-hero { gap: 0; padding: clamp(140px, 16vw, 210px) max(var(--g), calc((100% - var(--max)) / 2 + var(--g))) clamp(50px, 6vw, 80px); position: relative; overflow: hidden; }
.bb-page .e-con.bbx-legal-hero::after { content: ""; position: absolute; right: max(var(--g), calc((100% - var(--max)) / 2 + var(--g))); bottom: clamp(50px, 6vw, 80px); width: clamp(70px, 9vw, 130px); aspect-ratio: 1; background: var(--violet); border-radius: 100% 0 0 0; opacity: .9; }
.bb-page .bbx-legal-title .elementor-heading-title { font-size: clamp(46px, 8vw, 132px); font-weight: 600; line-height: .92; letter-spacing: -.04em; font-variation-settings: "wdth" 82; max-width: 11ch; color: var(--ink); }
.bb-page .e-con.bbx-legal {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: start;
  padding: clamp(50px, 6vw, 90px) max(var(--g), calc((100% - var(--max)) / 2 + var(--g))) clamp(90px, 12vw, 160px);
  border-top: 1px solid var(--line);
}
.bb-page .bbx-toc.elementor-widget { position: sticky; top: 120px; }
.bb-page .bbx-toc__label { font: 500 12px/1 var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.bb-page .bbx-toc ol { display: grid; gap: 4px; border-left: 1px solid var(--line-2); }
.bb-page .bbx-toc a { display: block; padding: 8px 0 8px 18px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); font-size: 15px; line-height: 1.35; transition: color .25s, border-color .25s; }
.bb-page .bbx-toc a.is-on { color: var(--ink); border-left-color: var(--mint); }
@media (hover: hover) { .bb-page .bbx-toc a:hover { color: var(--accent-ink); } }
.bb-page .e-con.bbx-legal > .e-con { gap: 0; }
.bb-page .bbx-legal__text { max-width: 70ch; font-size: 17px; line-height: 1.8; }
.bb-page .bbx-legal__text h2 { font: 700 clamp(24px, 2.4vw, 34px)/1.15 var(--f-d); letter-spacing: -.02em; color: var(--ink); margin: 0 0 18px; scroll-margin-top: 110px; }
.bb-page .bbx-legal__text * + h2 { margin-top: clamp(48px, 5vw, 70px); padding-top: clamp(48px, 5vw, 70px); border-top: 1px solid var(--line); }
.bb-page .bbx-legal__text ul { display: grid; gap: 12px; margin: 18px 0; }
.bb-page .bbx-legal__text li { position: relative; padding-left: 26px; }
.bb-page .bbx-legal__text li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }
.bb-page .bbx-legal__text li p { margin: 0; }
.bb-page .bbx-legal__contact { margin-top: clamp(48px, 5vw, 70px) !important; padding: 26px 30px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }

/* ---------- responsivo ---------- */
@media (max-width: 1024px) {
  .bb-page .e-con.bbx-split, .bb-page .e-con.bbx-faq { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .bb-page .e-con.bbx-faq__side { position: static; }
  .bb-page .e-con.bbx-legal { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .bb-page .bbx-toc.elementor-widget { position: static; }
}
@media (max-width: 600px) {
  .bb-page .bbx-title .elementor-heading-title { font-size: 12.6vw; }
  .bb-page .bbx-legal-title .elementor-heading-title { font-size: 13vw; }
  .bb-page .e-con.bbx-legal-hero::after { display: none; }
  .bb-page .bbx-facts li { grid-template-columns: 1fr; } .bb-page .bbx-facts li::before { grid-row: auto; margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { .bb-page .e-con.bbx-card { transition: none; } }

/* WordPress: o botão flutuante do WhatsApp fica no canto inferior direito; as setas dos projetos afastam-se dele */
.bb-page .tunnel__info { padding-right: max(112px, calc(var(--g) + 70px)); }

/* =========================================================
   "Construímos Websites": hero com formulário e blocos de venda
   ========================================================= */
.bb-page .e-con.bbx-hero--form { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(36px, 5vw, 80px); min-height: 0; padding-top: clamp(120px, 12vw, 160px); padding-bottom: clamp(60px, 8vw, 110px); }
.bb-page .bbx-hero--form > .bbx-shapes { grid-area: 1 / 1 / -1 / -1; }
.bb-page .e-con.bbx-hero__text { gap: 0; position: relative; }
.bb-page .bbx-hero--form .bbx-title .elementor-heading-title { font-size: clamp(44px, 5.8vw, 104px); max-width: 11ch; }
.bb-page .bbx-hero__note { margin-top: 28px; }
.bb-page .bbx-badge { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); margin-bottom: 14px !important; }
.bb-page .bbx-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(110, 231, 183, .2); }
.bb-page .bbx-formcard.elementor-widget { position: relative; }
.bb-page .bbx-small { margin-top: 12px; font-size: 13px; color: var(--dim); }

/* formulário */
.bbf { position: relative; padding: clamp(24px, 3vw, 40px); border-radius: calc(var(--r) + 4px); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 90px -40px var(--shadow); }
.bbf__kicker { font: 700 clamp(22px, 2vw, 28px)/1.15 var(--f-d); letter-spacing: -.02em; color: var(--ink); }
.bbf__sub { color: var(--muted); font-size: 15px; margin: 6px 0 22px !important; }
.bbf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.bbf__f { display: block; margin-bottom: 14px; }
.bbf__f > span { display: block; font: 500 12px/1 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.bbf__f small { text-transform: none; letter-spacing: 0; color: var(--dim); }
.bbf input[type="text"], .bbf input[type="email"], .bbf input[type="tel"], .bbf select, .bbf textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--bg); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2); font: 400 16px/1.4 var(--f-b); transition: box-shadow .25s, background-color .25s; appearance: none; -webkit-appearance: none;
}
.bbf textarea { resize: vertical; min-height: 120px; }
.bbf select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 42px; }
.bbf input:focus, .bbf select:focus, .bbf textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--mint); }
.bbf__f.is-bad input, .bbf__f.is-bad select, .bbf__f.is-bad textarea { box-shadow: inset 0 0 0 2px #FF6B6B; }
.bbf__err { display: block; font-style: normal; font-size: 13px; color: #FF6B6B; min-height: 0; margin-top: 6px; }
.bbf__err:empty { display: none; }
.bbf__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bbf__ok { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin: 6px 0 20px; font-size: 13px; line-height: 1.55; color: var(--muted); cursor: pointer; }
.bbf__ok .bbf__err { grid-column: 2; }
.bbf__ok input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--mint); }
.bbf__ok a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.bbf__send { width: 100%; justify-content: center; }
.bbf__send[disabled] { opacity: .6; cursor: progress; }
.bbf.is-sending .bbf__send .arr { animation: bbfPulse .9s ease-in-out infinite; }
@keyframes bbfPulse { 50% { transform: translateX(5px); } }
.bbf__status { margin-top: 12px !important; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.bbf__status.is-error { color: #FF6B6B; }
.bbf__done { text-align: center; padding: clamp(30px, 5vw, 60px) 10px; }
.bbf__done[hidden] { display: none; }
.bbf__tick { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--mint); }
.bbf__tick::after { content: ""; width: 26px; height: 14px; border-left: 3px solid var(--on-mint); border-bottom: 3px solid var(--on-mint); transform: translateY(-3px) rotate(-45deg); }
.bbf__done-msg { color: var(--muted); margin: 8px 0 18px !important; }

/* para quem se destina: sim / não */
.bb-page .e-con.bbx-who { margin-top: clamp(36px, 5vw, 60px); gap: 16px; padding: 0; border: 0; }
.bb-page .e-con.bbx-list { gap: 0; padding: clamp(28px, 3vw, 40px); border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.bb-page .bbx-list .elementor-heading-title { font: 700 clamp(21px, 1.8vw, 26px)/1.2 var(--f-d); letter-spacing: -.02em; color: var(--ink); margin-bottom: 18px; }
.bb-page .bbx-list ul { display: grid; gap: 14px; }
.bb-page .bbx-list li { position: relative; padding-left: 38px; }
.bb-page .bbx-list li::before { position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--f-b); }
.bb-page .bbx-list--yes li::before { content: "✓"; background: var(--mint); color: var(--on-mint); }
.bb-page .bbx-list--no li::before { content: "✕"; background: rgba(255, 107, 107, .16); color: #FF6B6B; }
.bb-page .bbx-section > .bbx-actions { margin-top: clamp(30px, 4vw, 48px); }

/* cartões em 4, passos e testemunhos */
.bb-page .e-con.bbx-cards--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.bb-page .e-con.bbx-cards--4 > .bbx-card, .bb-page .e-con.bbx-steps > .bbx-card { padding-top: clamp(28px, 3vw, 40px); }
.bb-page .e-con.bbx-cards--4 > .bbx-card::before, .bb-page .e-con.bbx-steps > .bbx-card::before { display: none; }
.bb-page .bbx-card .bbx-eyebrow .elementor-heading-title { margin-bottom: 18px; }
.bb-page .e-con.bbx-steps { counter-reset: step; }
.bb-page .e-con.bbx-steps > .bbx-card { counter-increment: step; }
.bb-page .e-con.bbx-steps > .bbx-card::after { content: counter(step, decimal-leading-zero); position: absolute; right: clamp(24px, 3vw, 36px); top: clamp(20px, 2.4vw, 30px); font: 700 clamp(44px, 5vw, 72px)/1 var(--f-d); color: var(--line-2); }
.bb-page .e-con.bbx-quote { padding-top: clamp(28px, 3vw, 40px); }
.bb-page .e-con.bbx-card.bbx-quote:nth-child(n)::before { content: "“"; position: static; width: auto; height: auto; background: none; border-radius: 0; transform: none; font: 800 72px/.6 var(--f-d); color: var(--accent-ink); margin-bottom: 14px; }
.bb-page .bbx-quote .elementor-widget-text-editor { color: var(--ink); font-size: 16px; }
.bb-page .bbx-quote .elementor-heading-title { margin: 22px 0 0; font: 500 12px/1 var(--f-m); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }

/* chamada final centrada */
.bb-page .e-con.bbx-cta { align-items: center; text-align: center; }
.bb-page .bbx-cta .bbx-h2 .elementor-heading-title { margin-inline: auto; }
.bb-page .bbx-cta .bbx-lead { margin-inline: auto; }
.bb-page .bbx-cta .hero__cta { justify-content: center; }

@media (max-width: 1024px) {
  .bb-page .e-con.bbx-hero--form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .bbf__row { grid-template-columns: 1fr; }
  .bb-page .bbx-hero--form .bbx-title .elementor-heading-title { font-size: 12vw; }
}
