/* ==========================
   TEMAS
   ========================== */
/* ===== MOBILE & HERO: evitar corte e âncoras escondidas pelo sticky ===== */
:root {
  scroll-behavior: smooth;
  /* Altura da navbar ~64-80px; isso evita que títulos fiquem "cortados" ao clicar no menu */
  scroll-padding-top: 84px;
}

.hero {
  /* Se tiver bg no hero, mantenha; aqui garantimos respiro e nada de overflow */
  padding-block: clamp(16px, 6vw, 40px);
  overflow: visible;
}

.hero .logoNumUp,
.hero .logoCrede {
  width: auto;
  height: auto;
  max-width: 100%;
}

.hero .logoNumUp { /* diminui no mobile para não “cortar” */
  max-height: clamp(120px, 24vw, 220px);
}
.hero .logoCrede {
  max-height: clamp(48px, 12vw, 100px);
}

@media (max-width: 575.98px) {
  .hero .row { row-gap: 12px; }
}

/* ===== “Balão” para textos de seção (aplique a classe .speech nos cards de texto) ===== */
.speech {
  position: relative;
  border: 1px solid var(--color-border, #b6b6b6);
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--color-bg-card, #efefef) 92%, transparent),
      color-mix(in oklab, var(--color-bg-card, #efefef) 85%, transparent)
    );
  border-radius: 16px;
  box-shadow: 0 10px 24px var(--color-bxs, rgba(0,0,0,.12));
  padding: clamp(1rem, 2.4vw, 1.5rem);
}

/* “aba” superior esquerda do balão */
.speech::before {
  content: "";
  position: absolute;
  top: -10px; left: clamp(14px, 4vw, 36px);
  width: 18px; height: 18px;
  background: inherit;
  border-left: 1px solid var(--color-border, #b6b6b6);
  border-top: 1px solid var(--color-border, #b6b6b6);
  transform: rotate(45deg);
  border-top-left-radius: 6px;
  box-shadow: -4px -4px 10px rgba(0,0,0,.03) inset;
}

/* versão com “aba” inferior (se preferir em algum bloco, adicione .speech-bottom junto) */
.speech-bottom::before {
  top: auto; bottom: -10px;
  border-top: 0; border-left: 0;
  border-right: 1px solid var(--color-border, #b6b6b6);
  border-bottom: 1px solid var(--color-border, #b6b6b6);
}

/* reforço do padrão já combinado para retângulos */
.card.clube,
.card.clube.infor {
  border: 1px solid var(--color-border, #b6b6b6);
  background: var(--color-bg-card, #efefef);
  border-radius: 1rem;
  box-shadow: 0 6px 20px var(--color-bxs, rgba(0,0,0,.1));
}

/* Títulos com sublinhado verde (já usado antes) */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: .5rem;
  margin-bottom: 2rem;
  line-height: 1.2;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  width: min(180px, 60%);
  height: 6px;
  border-radius: 999px;
  background: var(--color-primary, #009639);
  box-shadow: 0 2px 0 var(--color-primary-II, #275040);
}


html[theme="light"] {
  --color-bg: #fff;
  --color-text: #222;
  --color-primary: #009639;
  --color-primary-II: #275040;
  --color-primary-light: #3cb878;
  --color-secondary: #4dc6b6;
  --color-accent: #f15a29;
  --color-border: #b6b6b6;
  --color-bg-card: #efefef;
  --color-bxs: rgba(0, 0, 0, 0.3);
}

html[theme="dark"] {
  --color-bg: #121212;
  --color-text: #f5f5f5;
  --color-primary: #3cb878;
  --color-primary-II: #12b071;
  --color-primary-light: #00a859;
  --color-secondary: #49f37c;
  --color-accent: #f68c57;
  --color-border: #333;
  --color-bg-card: #313131;
  --color-bxs: rgba(228, 228, 228, 0.3);
}

html[theme="dark"] p,
html[theme="dark"] a,
html[theme="dark"] h5,
html[theme="dark"] h6 {
  background-color: #000 !important;
  color: #fff !important;
  border: 1px solid #fff !important;
}

/* ==========================
   GERAL
   ========================== */

body {
  background-color: var(--color-bg) !important;
  color: var(--color-text);
  font-family: Arial, sans-serif;
}

header {
  background: var(--color-primary);
  color: var(--color-bg);
  padding: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
}

button {
  background: var(--color-secondary);
  color: var(--color-bg);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: var(--color-accent);
}

.divisorB {
  border: 5px solid var(--color-primary);
  width: 50vw;
  height: 3px;
  border-radius: 15px;
}

::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #1d1d1d;
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-light);
}

::selection {
  background: var(--color-primary-light);
  color: var(--color-bg);
}

/* ==========================
   HERO
   ========================== */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 35vh;
  text-align: center;
  color: #fff;
  background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-primary) 100%);
}

.logoNumUp {
  margin-right: -40px;
}

.logoCrede {
  margin-left: -40px;
}

.hero p {
  margin: 0 auto;
  max-width: 600px;
  font-size: 1.2rem;
  opacity: 0.9;
}

.hero button {
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #f15a29;
  color: #fff;
  transition: background 0.3s;
}

.hero button:hover {
  background: #d94b1f;
}

/* ==========================
   NAVBAR
   ========================== */

.navbar {
  background-color: var(--color-bg);
}

.navbar ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar ul li {
  position: relative;
  padding: 0 1rem;
}

.navbar ul li a {
  color: var(--color-primary);
  font-weight: bold;
}

.navbar ul li a:hover {
  color: var(--color-accent);
}

.navbar ul li:not(:first-child) {
  border-left: 2px solid var(--color-primary);
}

.navbar .tema {
  background-color: var(--color-primary);
}

.navbar .tema:hover {
  background-color: var(--color-accent);
}

/* ==========================
   SECTIONS / FOOTER
   ========================== */

section,
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-bg);
  color: var(--color-text);
}

h3 {
  border-bottom-color: var(--color-primary);
}

.divisor {
  width: 100%;
  background: transparent;
}

/* ==========================
   BOTÃO TOPO
   ========================== */

#btnTopo {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1050;
  display: none;
  width: 45px;
  height: 45px;
  background-color: var(--color-primary);
  color: var(--color-bg);
  perspective: 500px;
  transition: background-color 0.3s;
}

#btnTopo:hover {
  background-color: var(--color-accent);
}

#btnTopo i {
  display: inline-block;
  transition: transform 0.3s ease;
}

#btnTopo:hover i {
  transform: translateY(-4px);
}

/* ==========================
   INICIO
   ========================== */

#inicio {
  flex-direction: column;
  margin-top: 30px;
}

#inicio .clube,
#Desafios .clube,
#material .clube,
#ferramentas .clube,
#sobre .clube {
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 4px 12px var(--color-bxs);
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#inicio .clube h5 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary-light));
  padding: 12px 24px;
  border-radius: 15px;
  box-shadow: 0 6px 18px var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  animation: pulse 2s infinite;
}

#inicio .clube p,
#Desafios .clube p,
#material .clube p,
#ferramentas .clube p,
#sobre .clube p {
  font-family: Arial, sans-serif;
  text-align: justify;
  max-width: 90%;
}

#inicio .clube span,
#Desafios .clube span,
#material .clube span,
#ferramentas .clube span,
#sobre .clube span {
  color: #11998e;
  font-weight: bold;
  background: #e6fff4;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

#inicio .clube a,
#Desafios .clube a,
#material .clube a,
#ferramentas .clube a,
#sobre .clube a {
  font-weight: bold;
  color: #fff;
  background: #28a745;
  padding: 8px 15px;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s;
  white-space: nowrap;
}

#inicio .clube a:hover,
#Desafios .clube a:hover,
#material .clube a:hover,
#ferramentas .clube a:hover,
#sobre .clube a:hover {
  background: #1e7e34;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==========================
   APRENDER
   ========================== */

#aprender,
#sobre {
  justify-content: space-around;
}

#aprender iframe,
#sobre iframe {
  margin: 17.5px 0;
}

#aprender .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 17.5px 0;
  background-color: var(--color-primary-II);
  color: var(--color-bg);
  transition: 0.4s;
}

#aprender .btn:hover {
  transform: translateY(-15px);
  box-shadow: 0 15px 20px rgba(0, 0, 0, 0.5);
}

#aprender .card-clube {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 15px;
  background-color: var(--color-primary);
  color: var(--color-bg);
  font-size: large;
}

#aprender .card-clube .apresentacao {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 97%;
  min-height: 80px;
  margin: 17.5px 0;
  border-radius: 15px;
  background-color: var(--color-primary-II);
  transition: 0.5s;
}

#aprender .card-clube .apresentacao:hover {
  transform: translateY(-15px);
  box-shadow: 0 15px 20px rgba(0, 0, 0, 0.3);
}

#aprender .card-clube .apresentacao p {
  width: 90%;
  height: 50px;
  margin: 0;
  border-radius: 15px;
  border: 4px double var(--color-accent);
  display: flex;
  justify-content: center;
  align-items: center;
}

#aprender .card-clube img {
  width: 97%;
  margin: 17.5px 0;
  border-radius: 15px;
}

#aprender details,
#sobre details {
  background-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
  width: 95%;
  border: 2px solid var(--color-accent);
  border-radius: 5px;
  margin-bottom: 15px;
}

/* ==========================
   Desafios / Material / Ferramentas
   ========================== */

#Desafios .custom-card,
#material .custom-card,
#ferramentas .custom-card {
  border: 1px solid var(--color-border) !important;
  border-radius: 15px;
  overflow: hidden;
  background-color: var(--color-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#Desafios .custom-card:hover,
#material .custom-card:hover,
#ferramentas .custom-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px var(--color-bxs);
}

#Desafios .custom-card h5,
#material .custom-card h5,
#ferramentas .custom-card h5 {
  color: var(--color-text);
  transition: color 0.3s ease;
}

html[theme="light"] #Desafios .custom-card:hover h5,
html[theme="light"] #material .custom-card:hover h5,
html[theme="light"] #ferramentas .custom-card:hover h5 {
  color: var(--color-primary) !important;
}

#Desafios .custom-card ul {
  margin: 0;
  padding: 0;
}

#Desafios .custom-card ul li {
  background-color: var(--color-primary);
  color: var(--color-bg);
  margin-bottom: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  list-style: none;
  transition: all 0.2s ease-in-out;
}

#Desafios .custom-card ul li::before {
  content: "•";
  color: var(--color-primary-light);
  font-weight: bold;
  margin-right: 0.5rem;
}

#Desafios .custom-card ul li:hover {
  background-color: var(--color-primary-II);
  color: #fff;
  transform: translateX(4px);
}

#Desafios .custom-card ul li a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  display: block;
}

#Desafios .custom-card ul li:hover a {
  color: #fff;
}

#Desafios .card-img,
#material .card-img,
#ferramentas .card-img {
  width: 100%;
  background-size: cover;
  background-position: center;
}

#Desafios .custom-btn,
#material .custom-btn,
#ferramentas .custom-btn {
  border: none;
  background-color: #007b33;
  color: #fff;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#Desafios .custom-btn:hover,
#material .custom-btn:hover,
#ferramentas .custom-btn:hover {
  transform: translateY(4px);
  background-color: #005f27;
}

#Desafios .custom-btn-modal {
  border: none;
  background-color: var(--color-bg);
  color: #005f27;
  border: 2px solid #005f27;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#Desafios .custom-btn-modal:hover {
  transform: translateY(4px);
  background-color: #005f27;
  color: var(--color-bg);
}


/* ==========================
   SOBRE
   ========================== */

#sobre .card-cidades {
  min-height: max-content;
  background-color: var(--color-primary-II);
  color: var(--color-bg);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
}

#sobre .card-cidades ul li {
  background-color: var(--color-primary-II);
  color: var(--color-bg);
  transition: 1s;
  font-size: small;
}

#sobre .card-cidades ul li:hover {
  background-color: var(--color-accent);
  cursor: pointer;
}

#sobre #map {
  min-height: 400px;
  border-radius: 1rem;
}

.row-mapa {
  align-items: stretch !important;
}

/* ==========================
   rodapé
   ========================== */

footer {
  background-color: var(--color-primary-II);
}