/* ----- PÁGINA SUSTENTABILIDADE ----- */
/* Carregado só na página /sustentabilidade/ (functions.php). Componentes em HTML dentro de blocos de texto do WPBakery. */

.sus-page {
  --sus-blue: #116fa4;
  --sus-orange: #ff5a14;
  --sus-green: #2c9a4a;
  --sus-fg: #414141;
  --sus-fg-soft: #6b6b6b;
  --sus-line: #dfe6ec;
  --sus-display: "Baloo 2", sans-serif;
}

body.sus-page h1, body.sus-page h2, body.sus-page h3 { font-family: var(--sus-display); text-wrap: balance; }

/* Hero: subtítulo por baixo do título das ondas */
.sus-page #header-ondas .sus-hero-sub p {
  max-width: 620px;
  margin: 10px auto 0;
  color: #fff;
  font-size: 17px;
  text-align: center;
}
/* Com subtítulo, o hero precisa de mais altura: o Salient põe o título a 19% da largura do ecrã,
   o que em ecrãs largos (ou com zoom do sistema) o empurra para cima da onda. Aqui o topo é fixo. */
@media (min-width: 691px) {
  body.sus-page #header-ondas { height: 600px; }
  body.sus-page #header-ondas .ondas-titulo-area .vc_column-inner { padding-top: 195px !important; }
}

/* Intro */
body.sus-page .sus-intro h2 {
  font-size: clamp(32px, 5vw, 55px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--sus-blue);
  text-align: center;
}
body.sus-page .sus-intro p {
  max-width: 680px;
  margin: 20px auto 0;
  font-size: 15px;
  color: var(--sus-fg-soft);
  text-align: center;
}

/* Títulos de secção */
body.sus-page .sus-h-up {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--sus-blue);
  margin-bottom: 18px;
}
body.sus-page .sus-text p { font-size: 15px; color: var(--sus-fg-soft); }

/* Tabela "Filtros Defender em números" */
.sus-tcard {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
  margin-top: 24px;
}
.sus-tscroll { overflow-x: auto; }
.sus-tcard table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.sus-tcard th {
  background: #6598bd;
  color: #fff;
  font-family: var(--sus-display);
  font-weight: 600;
  padding: 9px 12px;
  text-align: center;
  border: 0;
}
.sus-tcard td {
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--sus-line);
  vertical-align: middle;
}
.sus-tcard td:first-child { font-weight: 700; color: var(--sus-fg); }
.sus-tcard td.v { text-align: center; font-weight: 700; color: var(--sus-blue); white-space: nowrap; }
.sus-tcard tr:nth-child(2) td.v, .sus-tcard tr:nth-child(5) td.v { background: rgba(120, 190, 230, .2); }
.sus-tcard tr:nth-child(3) td.v { background: rgba(255, 235, 90, .28); }
.sus-tcard tr:nth-child(4) td.v { background: rgba(255, 160, 110, .22); }
body.sus-page .sus-tcard p.sus-note { font-size: 12px; line-height: 1.5; text-align: center; color: var(--sus-fg-soft); margin: 12px 0 0; padding: 0; }

/* Espaço reservado para fotografia */
.sus-photo {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  background: linear-gradient(160deg, #1b8fc4, #0e5e8f 70%, #26a69a);
}
.sus-photo b { display: block; font-family: var(--sus-display); font-size: 22px; letter-spacing: 0; margin-bottom: 4px; }

/* "O que já fazemos": 5 colunas */
.sus-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.sus-cols > * { min-width: 0; }
body.sus-page .sus-cols h3 { font-size: 21px; font-weight: 500; line-height: 1.2; color: var(--sus-fg); margin-bottom: 14px; min-height: 50px; }
body.sus-page .sus-cols p { font-size: 14px; color: var(--sus-fg-soft); margin: 0; padding: 0; }
.sus-k { display: block; font-family: var(--sus-display); font-size: 34px; font-weight: 700; line-height: 1; color: var(--sus-blue); margin-bottom: 10px; }
.sus-k svg { width: 38px; height: 38px; display: block; }

/* Energia */
/* O Salient dá 40px de margem por baixo das linhas: sem ela, o espaço abaixo da imagem fica igual ao de cima (72px) */
body.sus-page .wpb_row.vc_row.vc_row-fluid.sus-energia { margin-bottom: 0; }
body.sus-page .sus-duo h3 { font-size: 30px; font-weight: 400; line-height: 1.2; color: var(--sus-blue); margin-bottom: 12px; }
.sus-big { display: flex; gap: 18px; margin-top: 18px; }
.sus-big div { font-family: var(--sus-display); font-size: 48px; font-weight: 700; line-height: 1; color: var(--sus-blue); }
.sus-big div small { display: block; font-family: Montserrat, sans-serif; font-size: 12px; font-weight: 600; color: var(--sus-fg-soft); margin-top: 6px; letter-spacing: .04em; text-transform: uppercase; }
.sus-big div.g { color: var(--sus-green); }
.sus-fig { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 4px 18px rgba(0, 0, 0, .1); background: #fff; }
.sus-fig img { display: block; width: 100%; height: auto; margin: 0 !important; }
body.sus-page .sus-fig figcaption { padding: 12px 18px; font-size: 12px; color: var(--sus-fg-soft); }

/* Selos */
.sus-sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sus-sgrid > * { min-width: 0; }
.sus-seal { background: #fff; border-radius: 22px; padding: 26px; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); display: flex; flex-direction: column; gap: 12px; }
body.sus-page .row .col img.sus-seal-img { width: 96px; height: 96px; display: block; margin: 0 !important; }
body.sus-page .row .col img.sus-seal-img.sus-seal-logo { width: 253px; max-width: 100%; object-fit: contain; object-position: left center; }
/* Links no fundo do cartão, alinhados entre os três */
body.sus-page .sus-seal p.sus-seal-link { margin-top: auto; }
.sus-badge { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--sus-display); font-weight: 700; font-size: 13px; line-height: 1.1; text-align: center; color: #fff; }
.sus-badge.b2 { background: linear-gradient(135deg, #1b8fc4, #0e5e8f); }
.sus-badge.b3 { background: linear-gradient(135deg, #ffb020, #ff7a14); }
body.sus-page .sus-seal h3 { font-size: 22px; font-weight: 500; line-height: 1.2; color: var(--sus-fg); margin: 0; }
body.sus-page .sus-seal p { margin: 0; padding: 0; font-size: 14px; color: var(--sus-fg-soft); }
.sus-seal a { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--sus-blue); text-decoration: none; }

/* Timeline */
.sus-tl .lead { font-size: 15px; color: var(--sus-fg-soft); margin: 0 0 30px; max-width: 640px; }
.sus-tl ol { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--sus-line); }
.sus-tl li { display: grid; grid-template-columns: 175px 1fr; gap: 0 20px; padding: 0 0 22px 22px; margin: 0; position: relative; list-style: none; }
.sus-tl li::before { content: ""; position: absolute; left: -10px; top: 8px; width: 17px; height: 17px; border-radius: 50%; background: var(--sus-orange); border: 3px solid #fff; }
.sus-tl li.f::before { background: #fff; border-color: var(--sus-blue); }
.sus-tl .y { font-family: var(--sus-display); font-weight: 700; font-size: 26px; line-height: 1.2; color: var(--sus-blue); }
body.sus-page .sus-tl li p { margin: 4px 0 0; padding: 0; font-size: 15px; }
/* Marcos com mais de um parágrafo: os seguintes ficam na coluna do texto, debaixo do primeiro */
body.sus-page .sus-tl li p + p { grid-column: 2; margin-top: 0; }

/* Botões */
.sus-btn {
  display: inline-block;
  font-family: var(--sus-display);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff !important;
  padding: 8px 22px;
  border-radius: 15px;
  background: var(--sus-orange);
  transition: opacity .2s;
}
.sus-btn:hover { opacity: .85; }
.sus-btn.ghost { background: transparent; border: 2px solid #fff; text-transform: none; font-size: 17px; padding: 8px 24px; }

/* Vídeo */
body.sus-page .sus-video h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 400; color: var(--sus-blue); margin-bottom: 12px; }
body.sus-page .sus-video p { font-size: 15px; color: var(--sus-fg-soft); margin: 0 0 20px; }
/* Reel do Instagram (embed.js substitui o blockquote por um iframe).
   Corte em baixo, como em teresabranco.com: mostra só o cabeçalho (~54px) e o vídeo (4:5,
   altura = 1,25 × largura) e esconde "Ver mais no Instagram", gostos e comentários. A altura acompanha a largura. */
.sus-reel { position: relative; max-width: 400px; margin: 0 auto; overflow: hidden; border-radius: 22px; box-shadow: 0 4px 18px rgba(0, 0, 0, .1); background: #fff; }
.sus-reel::before { content: ""; display: block; padding-top: calc(125% + 52px); }
body.sus-page .sus-reel .instagram-media,
body.sus-page .sus-reel iframe.instagram-media { position: absolute !important; top: 0; left: 0; min-width: 0 !important; width: 100% !important; max-width: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
/* Antes de o embed carregar (ou enquanto não há consentimento de cookies): cartão azul com botão play */
body.sus-page .sus-reel blockquote.instagram-media { height: 100%; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #0e5e8f, #22a4c9); text-align: center; font-size: 14px; }
body.sus-page .sus-reel blockquote.instagram-media::before,
body.sus-page .sus-reel blockquote.instagram-media::after { display: none; }
body.sus-page .sus-reel blockquote.instagram-media p { margin: 0; padding: 0; color: #fff; }
body.sus-page .sus-reel blockquote.instagram-media a { color: #fff; text-decoration: none; font-weight: 600; }
body.sus-page .sus-reel blockquote.instagram-media a::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: rgba(255, 255, 255, .95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23ff5a14'/%3E%3C/svg%3E") center / 34px no-repeat; }

/* CTA final */
.sus-cta { text-align: center; color: #fff; }
body.sus-page .sus-cta h2 { font-size: clamp(30px, 5vw, 48px); font-weight: 700; color: #fff; }
body.sus-page .sus-cta p { margin: 6px 0 24px; font-size: 17px; color: #fff; }
.sus-cta .sus-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.sus-page a:focus-visible { outline: 3px solid var(--sus-orange); outline-offset: 2px; }

@media (max-width: 1200px) {
  .sus-cols { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
}
@media (max-width: 999px) {
  .sus-cols { grid-template-columns: repeat(2, 1fr); }
  .sus-sgrid { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  /* O hero tem 170px no mobile (style.css): só cabe o título, como nas outras páginas */
  body.sus-page #header-ondas .sus-hero-sub { display: none; }
  .sus-tcard { padding: 14px; }
  .sus-tcard td { padding: 9px 8px; font-size: 13px; }
  .sus-tcard td.v { white-space: normal; }
  .sus-tcard td:first-child { width: 60%; }
  .sus-cols { grid-template-columns: 1fr; }
  body.sus-page .sus-cols h3 { min-height: 0; }
  .sus-tl li { grid-template-columns: 1fr; gap: 2px; }
  body.sus-page .sus-tl li p + p { grid-column: 1; }
  .sus-big { flex-wrap: wrap; }
}

/* Fundo em gradiente da faixa CTA */
.sus-cta-row > .row-bg-wrap .row-bg { background: linear-gradient(135deg, #0e5e8f, #1b8fc4) !important; }

/* O Salient põe os links das faixas "light" a 70% de opacidade */
body.sus-page .span_12.light .wpb_text_column a.sus-btn:not(:hover) { opacity: 1; }
