/*
 * Simulador PPR v2 — Golden SGF
 *
 * Transcrição do protótipo golden-sgf-hp-v2.html, com tudo dentro de .gsgf-sim
 * para não colidir com o tema. O protótipo estilava body/h1/.card/.opt à solta;
 * numa página WordPress isso pintava metade do site.
 *
 * Os pares de cor estão validados para WCAG AA e não se mexem sem revalidar:
 * sobre o verde do painel só entra branco puro, e o dourado só aparece sobre
 * branco (sobre o verde daria 1,6:1).
 */

.gsgf-sim {
  --gsgf-bg: #eceef0;
  --gsgf-ink: #273347;
  --gsgf-gold: #906d17;
  --gsgf-gold-dark: #7a5b12;
  --gsgf-verde: #0e7d72;
  --gsgf-verde-dark: #0b5f56;
  --gsgf-turquesa: #05737a;
  --gsgf-card: #ffffff;
  --gsgf-muted: #5c6675;
  --gsgf-line: #e3e6ea;
  --gsgf-radius: 18px;

  font-family: 'Montserrat', sans-serif;
  background: var(--gsgf-bg);
  color: var(--gsgf-ink);
  margin: 0;
  padding-block: 12rem;
  padding-inline: 24px;
  box-sizing: border-box;
  /* O protótipo não declarava line-height, logo era 'normal' em toda a árvore. */
  line-height: normal;
}

/*
 * Só descendentes. No protótipo o reset era '*', que perde para 'body' e deixava
 * passar o padding da moldura; aqui '.gsgf-sim' empatava com a regra de cima e,
 * por vir depois, apagava-lhe o padding.
 */
.gsgf-sim *,
.gsgf-sim *::before,
.gsgf-sim *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*
 * Corta o line-height que o tema impõe a p, li, h2… mas deixa passar os que este
 * ficheiro declara. Só descendentes — incluir .gsgf-sim aqui punha a raiz a
 * herdar o line-height do body do tema, que é exactamente o que se quer evitar.
 */
.gsgf-sim * {
  line-height: inherit;
}

/*
 * Os temas costumam impor estilo próprio a button/input/a — repõe-se a base.
 *
 * O :where() é obrigatório: sem ele o seletor fica em (0,1,1) e ganha por
 * especificidade às regras dos componentes, que estão em (0,1,0) — o border:none
 * apagava a border das .gsgf-opt. Com :where() fica (0,1,0) e decide a ordem no
 * ficheiro, que é o que se quer.
 */
.gsgf-sim :where(button, input, a) {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  text-transform: none;
  box-shadow: none;
  text-decoration: none;
  line-height: normal;
}

.gsgf-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Cabeçalho ---------- */

.gsgf-eyebrow {
  text-align: center;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gsgf-gold-dark);
  font-weight: 700;
  margin-bottom: 12px;
}

.gsgf-titulo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: clamp(30px, 3.9vw, 56px);
  line-height: clamp(36px, 4.3vw, 62px);
  letter-spacing: -2px;
  text-transform: uppercase;
  text-align: center;
  color: #31405a;
  margin-bottom: 14px;
}

.gsgf-subtitulo {
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
  color: #5a6474;
  margin-bottom: 44px;
}

.gsgf-subtitulo strong {
  font-weight: 700;
  color: #33404f;
}

.gsgf-grid {
  display: grid;
  grid-template-columns: 1.15fr .95fr;
  gap: 26px;
  align-items: start;
}

@media (max-width: 920px) {
  .gsgf-grid { grid-template-columns: 1fr; }
}

/* ---------- Perguntas ---------- */

.gsgf-card {
  background: var(--gsgf-card);
  border-radius: var(--gsgf-radius);
  padding: 40px 42px;
  box-shadow: 0 10px 30px rgba(27, 38, 55, .07);
}

.gsgf-q {
  margin-bottom: 34px;
  animation: gsgf-reveal .4s ease both;
}

.gsgf-q:last-child { margin-bottom: 0; }

@keyframes gsgf-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.gsgf-q-label {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.45;
  color: #33404f;
  margin-bottom: 6px;
}

.gsgf-q-label--valor {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.gsgf-q-label--valor > span:first-child {
  flex: 1;
  min-width: 0;
}

/* Largura mínima reservada: sem ela a pergunta re-quebrava a cada passo da régua. */
.gsgf-field-value {
  font-weight: 800;
  font-size: 21px;
  color: var(--gsgf-ink);
  flex-shrink: 0;
  min-width: 104px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.gsgf-field-value .gsgf-cur {
  font-weight: 400;
  font-size: 16px;
  margin-left: 2px;
}

.gsgf-q-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.55;
  color: #5f5124;
  background: #f7f3e6;
  border: 1px solid #e3d7b2;
  border-left: 4px solid var(--gsgf-gold);
  border-radius: 0 10px 10px 0;
  padding: 11px 14px;
  margin-bottom: 14px;
}

.gsgf-q-note::before {
  content: "\1F4A1";
  font-size: 17px;
  line-height: 1.3;
  flex-shrink: 0;
}

.gsgf-q-eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gsgf-gold-dark);
  font-weight: 700;
  margin-bottom: 6px;
}

.gsgf-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gsgf-opt {
  border: 1px solid var(--gsgf-line);
  background: #f7f8f9;
  border-radius: 10px;
  padding: 14px 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: #5a6474;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.gsgf-opt:hover {
  border-color: var(--gsgf-gold);
  color: var(--gsgf-gold-dark);
}

.gsgf-opt.is-active,
.gsgf-opt.is-active:hover {
  background: var(--gsgf-turquesa);
  border-color: var(--gsgf-turquesa);
  color: #fff;
}

/* ---------- Pergunta respondida (colapsada) ---------- */

.gsgf-qdone {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--gsgf-line);
  background: #f7f8f9;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  text-align: left;
  transition: border-color .18s ease;
  animation: gsgf-reveal .3s ease both;
}

.gsgf-qdone:hover { border-color: var(--gsgf-gold); }

.gsgf-qd-label {
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gsgf-muted);
  font-weight: 700;
  flex-shrink: 0;
  width: 118px;
}

.gsgf-qd-ans {
  flex: 1;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gsgf-ink);
  line-height: 1.4;
}

.gsgf-qd-edit {
  font-size: 12px;
  font-weight: 700;
  color: var(--gsgf-gold-dark);
  text-transform: uppercase;
  letter-spacing: .08em;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .gsgf-qdone { flex-wrap: wrap; }
  .gsgf-qd-label { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .gsgf-q,
  .gsgf-qdone,
  .gsgf-rec { animation: none; }
}

/* ---------- Réguas ---------- */

.gsgf-sim input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--gsgf-turquesa) var(--gsgf-fill, 0%), #dde1e6 var(--gsgf-fill, 0%));
  outline: none;
}

.gsgf-sim input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gsgf-turquesa);
  border: 5px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  cursor: pointer;
}

.gsgf-sim input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gsgf-turquesa);
  border: 5px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  cursor: pointer;
}

.gsgf-range-hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gsgf-muted);
  margin-top: 14px;
}

/* ---------- Painel de resultado ---------- */

.gsgf-panel {
  background: var(--gsgf-verde);
  border-radius: var(--gsgf-radius);
  padding: 42px 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  position: sticky;
  top: 24px;
}

@media (max-width: 920px) {
  .gsgf-panel { position: static; }
}

.gsgf-panel-titulo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 23px;
  letter-spacing: -1px;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  margin-bottom: 24px;
}

.gsgf-panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gsgf-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.7;
  padding: 30px 10px;
}

.gsgf-rec {
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: gsgf-reveal .4s ease both;
}

/*
 * Card branco dentro do painel verde: é o que permite pôr o valor a dourado.
 * Dourado sobre o verde dá 1,6:1 e falha AA sem apelo.
 */
.gsgf-rec-head {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 10px;
  text-align: center;
  padding: 22px 16px;
  margin-bottom: 18px;
}

.gsgf-ppr-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gsgf-gold);
  font-weight: 700;
}

.gsgf-rec-head h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 6px 0 8px;
  color: var(--gsgf-verde-dark);
}

.gsgf-rec-value {
  font-weight: 800;
  font-size: 36px;
  white-space: nowrap;
  color: var(--gsgf-gold);
}

.gsgf-rec-value sup {
  font-size: 16px;
  font-weight: 400;
}

.gsgf-ppr-meta {
  font-size: 13px;
  color: #fff;
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.6;
}

.gsgf-ppr-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: #fff;
  flex: 1;
}

.gsgf-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gsgf-bullets li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 9px;
}

.gsgf-bullets li::before {
  content: "\00b7";
  position: absolute;
  left: 2px;
  font-weight: 800;
}

.gsgf-proj-disc {
  font-size: 11.5px;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 10px;
  margin-top: 14px;
  line-height: 1.6;
}

.gsgf-cta {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: var(--gsgf-gold);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .18s ease;
}

.gsgf-cta:hover,
.gsgf-cta:focus {
  background: var(--gsgf-gold-dark);
  color: #fff;
}

/* Sem link no BO o botão continua a aparecer, mas não finge ser clicável. */
.gsgf-cta[disabled] {
  cursor: default;
  opacity: .75;
}

/* ---------- Rodapés ---------- */

.gsgf-disclaimer {
  max-width: 860px;
  margin: 30px auto 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #5a6474;
  text-align: center;
}

.gsgf-disclaimer strong { color: var(--gsgf-ink); }

/* Foco visível — o protótipo não o tinha e num site a sério faz falta. */
.gsgf-sim :focus-visible {
  outline: 2px solid var(--gsgf-gold);
  outline-offset: 2px;
}

.gsgf-aviso {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--gsgf-gold);
  background: #fff8e5;
  font-size: 14px;
}
