/* ==========================================================
   DS Seguros – Vila Nova de Santo André
   Folha de estilos principal
   ========================================================== */

/* ---------- Cores e variáveis ---------- */
:root {
  --brand: #4fa834;      /* verde do logótipo DS Seguros */
  --brand-dk: #3a7f25;   /* verde escuro (hover) */
  --ink: #14232b;        /* texto principal */
  --muted: #5b6b73;      /* texto secundário */
  --bg: #ffffff;
  --soft: #f1f8ee;       /* fundo verde muito claro */
  --line: #e2ece0;       /* bordas */
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

.soft {
  background: var(--soft);
}

/* ---------- Faixa de pré-visualização ---------- */
.preview {
  background: #fff4d6;
  color: #7a5a00;
  font-size: 13px;
  text-align: center;
  padding: 6px 16px;
}

/* Dados provisórios (a confirmar) */
.ph {
  background: #fff4d6;
  padding: 0 4px;
  border-radius: 4px;
}

/* ---------- Cabeçalho ---------- */
header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  display: block;
  height: 48px;
  width: auto;
  border-radius: 4px;
}

.logo .loc {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1.2px;
  line-height: 1.35;
}

.menu {
  display: flex;
  gap: 26px;
  font-size: 15px;
  font-weight: 500;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--brand);
}

.menu .m-only {
  display: none;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Bandeira para trocar de idioma */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s;
}

.lang:hover {
  border-color: var(--brand);
  color: var(--brand-dk);
}

.lang svg {
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Botão do menu (só no telemóvel) */
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.burger span,
.burger span::before,
.burger span::after {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.2s;
}

.burger span {
  top: 19px;
}

.burger span::before,
.burger span::after {
  content: "";
  left: 0;
}

.burger span::before {
  top: -6px;
}

.burger span::after {
  top: 6px;
}

header.open .burger span {
  background: transparent;
}

header.open .burger span::before {
  top: 0;
  transform: rotate(45deg);
}

header.open .burger span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 12px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: 0.2s;
}

.btn:hover {
  background: var(--brand-dk);
}

.btn.light {
  background: #fff;
  color: var(--brand-dk);
}

.btn.light:hover {
  background: var(--soft);
}

.btn.ghost {
  background: transparent;
  border: 2px solid #fff;
}

.btn.ghost:hover {
  background: #fff;
  color: var(--brand-dk);
}

.btn.full {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #2f6e1d 0%, #4fa834 60%, #7cc35f 100%);
  color: #fff;
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  max-width: 640px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  max-width: 560px;
  opacity: 0.95;
  margin-bottom: 28px;
}

.hero .ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Topo das páginas Seguros / Porquê nós / Contactos */
.hero.page {
  padding: 60px 0 64px;
}

.hero.page .eyebrow {
  color: #fff;
  opacity: 0.85;
}

.hero.page h1 {
  font-size: 38px;
  margin-top: 6px;
}

.hero.page p {
  margin-bottom: 0;
}

/* ---------- Títulos de secção ---------- */
.eyebrow {
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

h2 {
  font-size: 32px;
  margin: 6px 0 14px;
  line-height: 1.2;
}

.lead {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 40px;
}

/* ---------- Cartões de seguros ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  transition: 0.2s;
  background: #fff;
}

.card:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 30px rgba(79, 168, 52, 0.14);
  transform: translateY(-3px);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.card p {
  font-size: 14px;
  color: var(--muted);
}

.ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--soft);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--brand);
}

/* ---------- Porquê nós / Simulação (2 colunas) ---------- */
.why {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.why .lead.tight {
  margin-bottom: 28px;
}

.why ul {
  list-style: none;
  display: grid;
  gap: 18px;
}

.why li {
  display: flex;
  gap: 14px;
}

.why li b {
  display: block;
}

.why li span {
  color: var(--muted);
  font-size: 14px;
}

.tick {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.photo {
  border-radius: 18px;
  min-height: 340px;
  background: linear-gradient(160deg, #dcefd4, #b7dfa8);
  display: grid;
  place-items: center;
  color: var(--brand-dk);
  font-weight: 500;
  text-align: center;
  padding: 20px;
}

/* Fotografias da agência a passar (Sobre nós) */
.photo.slides {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  width: 100%;
  min-height: 0;
  background: #e9f3e5;
}
.slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}
/* fachada (foto larga): mostrar o lado do letreiro DS */
.slides img.fit-left {
  object-position: 6% 50%;
}
.slides img.on {
  opacity: 1;
}
.slides .dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slides .dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: width 0.3s, background 0.3s;
}
.slides .dots button.on {
  width: 24px;
  background: #fff;
}
.slides .dots button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .slides img, .slides .dots button {
    transition: none;
  }
}

/* ---------- Confiança e testemunho ---------- */
.trust h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.trust:hover {
  transform: none;
}

.quote {
  margin-top: 18px;
  padding-left: 16px;
  border-left: 3px solid var(--brand);
  font-style: italic;
  font-size: 15px;
}

.quote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  margin-top: 6px;
  font-size: 14px;
  color: var(--brand-dk);
}

/* ---------- Sobre nós ---------- */
h3.sub {
  font-size: 20px;
  margin: 8px 0 8px;
}

h2.narrow {
  max-width: 760px;
}

.ramos {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin: 28px 0 36px;
}

.ramos li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-weight: 500;
}

.statement {
  max-width: 760px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--brand-dk);
}

.where {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

/* ---------- Formulário ---------- */
.form {
  background: #fff;
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 20px 50px rgba(20, 35, 43, 0.08);
}

.form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form .field {
  margin-bottom: 14px;
}

.form .form-hint {
  font-size: 13px;
  color: var(--muted);
  margin: -4px 0 14px;
}

label {
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

label.check {
  display: flex;
  gap: 8px;
  font-weight: 400;
  margin-bottom: 18px;
}

label.check input {
  width: auto;
  flex: none;
  margin-top: 3px;
}

/* Telefone com indicativo do país */
.tel {
  display: flex;
  gap: 8px;
}

.tel input {
  flex: 1;
  min-width: 0;
}

.cc {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  white-space: nowrap;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235b6b73' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center;
}

.cc:focus-within {
  outline: 2px solid var(--brand);
  border-color: transparent;
}

/* a lista verdadeira fica invisível por cima: ao clicar abre com os nomes dos países */
.cc select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  border-color: transparent;
}

.ok {
  display: none;
  margin-top: 14px;
  background: #e3f7ec;
  color: #17643a;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
}

.ok.show {
  display: block;
}

/* ---------- Contactos ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
}

.info {
  display: grid;
  gap: 18px;
}

.info > div {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info b {
  display: block;
}

.info .ico {
  margin-bottom: 0;
  flex: 0 0 48px;
}

.info a:hover {
  color: var(--brand-dk);
  text-decoration: underline;
}

.map {
  border-radius: 18px;
  overflow: hidden;
  min-height: 340px;
  border: 1px solid var(--line);
}

.map iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}

/* sem consentimento para o mapa: aviso com botão no lugar do mapa (o iframe só recebe o endereço depois) */
.map { position: relative; }
.map-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: var(--soft, #f1f8ee);
  font-size: 14px;
}
.map-ph p { max-width: 340px; margin: 0; color: var(--muted); }
.map-ph a { color: inherit; text-decoration: underline; font-size: 13px; }

/* ---------- Faixa final (CTA) ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-band h2 {
  margin: 0 0 6px;
}

.cta-band p {
  color: #b9c7bc;
}

/* ---------- Rodapé ---------- */
footer {
  background: #0f1a12;
  color: #a3b5a6;
  padding: 46px 0 26px;
  font-size: 14px;
}

footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 26px;
}

footer .cols img {
  display: block;
  border-radius: 4px;
}

footer .about {
  margin-top: 12px;
  max-width: 340px;
}

footer h4 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 15px;
}

footer a {
  display: block;
  margin-bottom: 6px;
}

footer a:hover {
  color: #fff;
}

/* Informação legal (ASF, litígios, livro de reclamações) */
.legal {
  border-top: 1px solid #223026;
  padding-top: 22px;
  font-size: 12px;
  line-height: 1.65;
}

.legal p {
  margin-bottom: 12px;
  max-width: 980px;
}

.legal a {
  display: inline;
  margin: 0;
  text-decoration: underline;
}

.ral {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 30px;
  margin-bottom: 14px;
}

.ral b {
  display: block;
  color: #cfdcd1;
  font-weight: 600;
}

.legal-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  border-top: 1px solid #223026;
  margin-top: 18px;
  padding-top: 16px;
}

.legal-bottom a {
  text-decoration: none;
}

.legal-bottom a:hover {
  text-decoration: underline;
}

/* ---------- Botão WhatsApp ---------- */
.wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 20;
}

/* ---------- Telemóvel / tablet ---------- */
@media (max-width: 860px) {
  .menu,
  .logo .loc {
    display: none;
  }

  .burger {
    display: block;
  }

  header.open .menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(20, 35, 43, 0.08);
    padding: 4px 20px 12px;
  }

  header.open .menu a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }

  header.open .menu a:last-child {
    border-bottom: 0;
  }

  .hero.page h1 {
    font-size: 30px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .why,
  .contact,
  .where,
  .ral {
    grid-template-columns: 1fr;
  }

  .form .row {
    grid-template-columns: 1fr;
  }

  footer .cols {
    grid-template-columns: 1fr;
  }

  section {
    padding: 60px 0;
  }

  .cta-band {
    padding: 30px;
  }
}

/* Telemóveis pequenos: o botão "Simular grátis" passa para dentro do menu */
@media (max-width: 460px) {
  .nav-end .btn {
    display: none;
  }

  .menu .m-only {
    display: block;
    color: var(--brand-dk);
    font-weight: 600;
  }
}
