/* ===== Reset & Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Poppins', sans-serif;
  background: transparent !important;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

/* ===== Progress Bar (ícones dentro da barra, brancos e centrados) ===== */
#progress-bar-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 12px auto 28px;
  height: 22px;
  background: #e9f3ef;
  border-radius: 999px;
  overflow: hidden;
}
#progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: 0%;
  background: #0a8a5a;
  border-radius: 999px;
  transition: width .4s ease;
  z-index: 1;
}
.progress-checkpoints {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 2;
}
.progress-checkpoints span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  position: absolute;
  top: 50%;
  left: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: #fff;
  background: transparent;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: transform .2s ease, opacity .2s ease;
  cursor: pointer;
}
.progress-checkpoints span.visible { opacity: 1; }
.progress-checkpoints span:hover { transform: translate(-50%, -50%) scale(1.1); }

/* ===== Cards ===== */
#home, #slides .slide, #results, .calculators-container {
  background: #fff;
  width: 100%;
  max-width: 1100px;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  transition: transform .25s, box-shadow .25s;
  margin: 10px auto;
}
#home:hover, #slides .slide:hover, #results:hover, .calculators-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0,0,0,.12);
}

h1 { font-weight: 700; font-size: 2rem; margin: 0 0 8px; color: #0f5c3e; }
h2 { font-weight: 600; font-size: 1.4rem; margin: 0 0 14px; color: #0f5c3e; }
p  { margin: 0 0 12px; line-height: 1.6; }

#resultArvores { font-size: 0.9em; text-align: center; }

/* ===== Intro (primeiro ecrã) centrado ===== */
#home .intro-container { text-align: center; }
#home .intro-container button { margin-left: auto; margin-right: auto; display: inline-flex; }

/* ===== Etiquetas das categorias com cor do tipo de slide ===== */
.category {
  display: inline-block;
  font-size: .95rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 10px;
  background: #e9f3ef;
  color: #0f5c3e;
}
.orange-container .category { background: rgba(255,165,0,.15);  color: #cc7a00; }
.grey-container   .category { background: rgba(120,120,120,.15); color: #4a4a4a; }
.blue-container   .category { background: rgba(30,144,255,.15);  color: #1f6fbf; }
.green-container  .category { background: rgba(46,139,87,.15);   color: #1e7f57; }
.purple-container .category { background: rgba(128,0,128,.15);   color: #7a2e7a; }
.yellow-container .category { background: rgba(255,215,0,.15);   color: #a38400; }

/* títulos coerentes com a categoria */
.orange-container h2 { color: #cc7a00; }
.grey-container   h2 { color: #4a4a4a; }
.blue-container   h2 { color: #1f6fbf; }
.green-container  h2 { color: #1e7f57; }
.purple-container h2 { color: #7a2e7a; }
.yellow-container h2 { color: #a38400; }

/* ===== Perguntas, Inputs e Seletores ===== */
.question-container .question {
  font-size: 1.1rem;
  margin: 8px 0 12px;
  animation: fadeIn .35s ease both;
  text-align: center;
}
input[type="number"], select {
  width: 100%;
  max-width: 340px;
  padding: 12px 14px;
  margin: 8px auto 16px auto;
  border: 1px solid #dfe7e3;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  outline: none;
  display: block;
  transition: box-shadow .2s, border-color .2s;
}
input[type="number"]:focus, select:focus {
  border-color: #0a8a5a;
  box-shadow: 0 0 0 4px rgba(10,138,90,.15);
}

/* ===== Botões ===== */
button {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: #0a8a5a;
  color: #fff;
  margin: 8px 6px 0;
  transition: transform .18s, background-color .2s, box-shadow .2s;
  box-shadow: 0 8px 18px rgba(10,138,90,.22);
}
button:hover { background: #096c47; transform: translateY(-2px); box-shadow: 0 12px 22px rgba(9,108,71,.26); }
button:active { transform: translateY(0); }
button.secondary { background: #2c6f43; }
button.secondary:hover { background: #1c4f2e; }

/* botões centrados em todos os slides */
#slides .slide { text-align: center; }
#slides .slide button { display: inline-flex; align-items: center; justify-content: center; }

/* ===== Resultados e Dicas ===== */
#results .result-summary, .result-explanation, .tips-container {
  background: #fff;
  border: 1px solid #e2eee8;
  border-radius: 12px;
  padding: 20px;
  margin-top: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: left;
}
#results h2, #result, #resultCO, #resultArvores { text-align: center; }

.tips-title { margin: 0 0 8px; font-weight: 600; color: #0f5c3e; font-size: 1.1rem; }
.tip-item   { margin: 8px 0; }
.sustainable, .unsustainable {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}
.sustainable   { background: #e6f7ef; color: #1e7f57; }
.unsustainable { background: #ffe8e6; color: #b13a2d; }

/* ===== Gráfico ===== */
.chart-and-explanation {
  display: flex;
  gap: 18px;
  align-items: stretch;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.chart-container {
  flex: 1 1 420px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
}


/* ===== Container “Explora mais” ===== */
.calculators-container {
  background: #fff;
  border: 1px solid #e2eee8;
  border-radius: 12px;
  padding: 20px;
  margin-top: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: left;
}
.calculators-container h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f5c3e;
  margin-bottom: 10px;
}
.calculators-container p {
  margin-bottom: 14px;
  line-height: 1.6;
  color: #333;
}

/* Links/botões verdes */
.calculators-link {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  text-align: left;
}
.calculators-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: #e9f3ef;
  color: #0f5c3e;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, background-color .2s, box-shadow .2s;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}
.calculators-link a:hover {
  background: #d6ece3;
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.10);
}

/* ===== Animações ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }
@keyframes shake  { 0%{transform:translateX(0)}25%{transform:translateX(-4px)}50%{transform:translateX(4px)}75%{transform:translateX(-4px)}100%{transform:translateX(0)} }
@keyframes pulse  { 0%{transform:scale(1)}50%{transform:scale(1.04)}100%{transform:scale(1)} }
.is-correct   { animation: pulse .45s ease-in-out; background:#4CAF50!important; color:#fff!important; }
.is-incorrect { animation: shake .45s ease-out;   background:#FF6347!important; color:#fff!important; }

/* ===== Slide Visibility ===== */
.slide { display: none; opacity: 0; }
.slide.active { display: block; animation: fadeIn .35s ease both; }

/* ===== Resultados — ajustes pedidos ===== */
.result-title { text-align: center; margin-bottom: 8px; }
#result, #resultCO { text-align: center; font-size: 1.05rem; }
.result-highlight { font-size: 1.3rem; font-weight: 700; }
.status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; line-height: 1.1; margin-left: 4px; }
.status-low  { background: #e6f7ef; color: #1e7f57; }  /* Baixa */
.status-mid  { background: #fff7e6; color: #a36a00; }  /* Moderada */
.status-high { background: #ffe8e6; color: #b13a2d; }  /* Alta */
.result-explanation h3 { font-size: 1.1rem; font-weight: 600; color: #0f5c3e; margin: 0 0 8px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  #home, #slides .slide, #results, .calculators-container { padding: 22px; border-radius: 12px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.25rem; }
  .chart-container { max-width: 220px; }
}

/* ===== Accessibility Focus ===== */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(10,138,90,.18);
  border-color: #0a8a5a;
}

/* Efeito hover apenas nas secções secundárias */
.tips-container,
.result-explanation,
.calculators-container {
  transition: transform .25s, box-shadow .25s;
}

.tips-container:hover,
.result-explanation:hover,
.calculators-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0,0,0,.12);
}


/* Garantir gráfico menor e título centrado (reforço) */
.result-title { text-align: center; }
.chart-container { flex: 0 1 320px; max-width: 320px; }
@media (max-width: 768px) {
  .chart-container { flex-basis: 280px; max-width: 280px; }
}

/* Texto do resultado + badges coloridas */
#result { text-align: center; font-size: 1.15rem; }
.result-highlight { font-size: 1.35rem; font-weight: 700; }
.status { display:inline-block; padding:4px 12px; border-radius:999px; font-weight:700; }
.status-low  { background:#e6f7ef; color:#1e7f57; }
.status-mid  { background:#fff7e6; color:#a36a00; }
.status-high { background:#ffe8e6; color:#b13a2d; }




/* ===== Recursos Ambientais ===== */
.resources-container {
  background: #fff;
  border: 1px solid #e2eee8;
  border-radius: 16px;
  padding: 28px;
  margin: 20px auto;
  width: 100%;
  max-width: 1100px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.resources-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
}

.resources-container h2 {
  font-weight: 600;
  font-size: 1.4rem;
  color: #0f5c3e;
  margin-bottom: 10px;
}

.resources-container p {
  color: #333;
  line-height: 1.5;
  margin-bottom: 18px;
}

/* links e descrições dos recursos */
.resources-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.resources-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: #e9f3ef;
  color: #0f5c3e;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 400px;
}

.resources-links a:hover {
  background: #d6ece3;
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.1);
}

/* texto explicativo entre parênteses */
.resource-desc {
  font-size: 0.95rem;
  color: #444;
  max-width: 600px;
  margin: 0 auto 15px;
  font-style: italic;
  opacity: 0.9;
}




