/* ================================================= */
/* GLOBAL                                            */
/* ================================================= */

body {
  margin: 0;
  font-family: 'Fredoka One', cursive;
  font-size: 1.15rem;
  background: linear-gradient(to bottom, #d0f4f5, #fceabb);
  color: #333;
}

a {
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}
a:hover {
  color: #005599;
  text-decoration: underline;
}

/* ================================================= */
/* LAYOUT                                            */
/* ================================================= */

header {
  text-align: center;
  background-color: #dcffcf;
  padding: 1rem;
}
header img { width: 100%; }

footer {
  background-color: #ffe17d;
  color: #5d4037;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* ================================================= */
/* SEÇÕES                                            */
/* ================================================= */

.intro,
.desen {
  text-align: center;
  padding: 2rem 1rem;
  background-color: #fff5e6;
  margin: 1rem auto;
  max-width: 900px;
  border-radius: 20px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

.intro h1 { font-size: 2rem; color: #4CAF50; }
.intro h3 { color: #289728; }

.leitura-destaque {
  background: #e6f4ff;
  margin: 2rem auto;
  padding: 1.5rem;
  max-width: 850px;
  border-radius: 16px;
  text-align: center;
}

/* ================================================= */
/* ANIMAÇÕES                                         */
/* ================================================= */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.intro h1,
.intro h2,
.intro h3,
.intro p,
.intro li {
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
}
.intro h1 { animation-delay: 0.2s; }
.intro h2 { animation-delay: 0.4s; }
.intro h3 { animation-delay: 0.6s; }
.intro p  { animation-delay: 1.0s; }
.intro li { animation-delay: 1.2s; }

/* ================================================= */
/* GALERIA                                           */
/* ================================================= */

.gallery {
  padding: 2rem;
  background-color: #e3fcef;
  text-align: center;
}
.gallery h2 { margin-bottom: 1rem; color: #2e7d32; }

.gallery-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.gallery-images img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 16px;
  border: 4px dashed #81c784;
  background-color: white;
}

.activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
}
.section-title {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #2e7d32;
  font-weight: bold;
}

/* ================================================= */
/* HOME — CARDS DE SEÇÃO                             */
/* ================================================= */

.sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}
.section {
  width: 230px;
  height: 230px;
  background-color: #fff;
  border-radius: 30% 50% 40% 60% / 50% 40% 60% 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s;
  cursor: pointer;
}
.section:hover { transform: scale(1.05); }
.section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ================================================= */
/* EXEMPLOS / DUAS COLUNAS                           */
/* ================================================= */

.exemplos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 2rem auto;
  max-width: 1000px;
  text-align: center;
}
.exemplo { flex: 1 1 200px; max-width: 220px; }
.exemplo img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin-bottom: 0.5rem;
}

.duas-colunas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 2rem 0;
}
.coluna-imagem img {
  max-width: 300px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.coluna-texto { max-width: 600px; text-align: justify; }

/* ================================================= */
/* DICAS MATEMÁTICAS                                 */
/* ================================================= */

.math-tips {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}
.math-tips h2 {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #2a6f97;
}
.math-tips ul {
  list-style: disc;
  padding-left: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}
.math-tips ul ul { list-style: circle; margin-top: 0.5rem; padding-left: 1.2rem; }
.math-tips ul li { margin-bottom: 0.75rem; }

@media (max-width: 600px) {
  .math-tips { padding: 1rem; margin: 1rem; }
  .math-tips h2 { font-size: 1.5rem; }
  .math-tips ul,
  .math-tips ul ul { padding-left: 1rem; }
}

/* ================================================= */
/* VÍDEOS                                            */
/* ================================================= */

.videos-section {
  padding: 40px 20px;
  background-color: #f5f5f5;
  text-align: center;
}
.videos-title { font-size: 2rem; margin-bottom: 30px; color: #333; }

.video-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 20px auto;
  max-width: 1000px;
  padding: 20px;
  gap: 20px;
  flex-wrap: wrap;
}
.video-card iframe { width: 480px; height: 270px; border-radius: 12px; border: none; }
.video-info {
  flex: 1;
  text-align: justify;
  background-color: #e6f4ea;
  padding: 20px;
  border-radius: 12px;
  font-size: 1rem;
}

.video-closing-message {
  max-width: 900px;
  margin: 40px auto;
  background-color: #fff9ec;
  border-left: 6px solid #f4a261;
  padding: 30px;
  border-radius: 12px;
  text-align: justify;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.video-closing-message h3 { font-size: 1.6rem; margin-bottom: 20px; color: #2a9d8f; }
.video-closing-message .closing-highlight {
  font-weight: bold;
  font-size: 1.2rem;
  margin-top: 20px;
  text-align: center;
  color: #264653;
}

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

.perfil-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.perfil {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.perfil img { width: 220px; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.perfil-info { max-width: 600px; text-align: justify; }
.perfil-nome { text-align: center; margin-top: 0.5rem; font-weight: bold; font-size: 1.1rem; }

/* ================================================= */
/* FORMULÁRIO / CONTATO                              */
/* ================================================= */

.formulario {
  background-color: #fff5e6;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
  max-width: 900px;
  margin: 2rem auto;
}
iframe { width: 100%; height: 800px; border: none; }

/* ================================================= */
/* ASSISTENTE                                        */
/* ================================================= */

.fala-container {
  position: fixed;
  bottom: 180px;
  left: 120px;
  max-width: 300px;
  z-index: 1000;
}
.fala {
  display: none;
  text-align: justify;
  background-color: #ffdf52;
  color: #005508;
  padding: 10px 15px;
  border-radius: 15px;
  font-family: sans-serif;
  font-size: 16px;
  position: relative;
  animation: fadeInUp 1s ease-in-out;
}
.fala::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 20px;
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #e0f7fa;
}

#close-assistant {
  position: absolute;
  top: -10px; right: -10px;
  background: #ffdddd;
  border: none;
  border-radius: 50%;
  width: 25px; height: 25px;
  font-size: 18px;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#assistant-img,
.fala-container {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  visibility: hidden;
}
#assistant-img.show,
.fala-container.show {
  opacity: 1;
  visibility: visible;
}

#assistant-img {
  position: fixed;
  bottom: 30px; left: 40px;
  width: 100px;
  z-index: 999;
}

/* ================================================= */
/* ALTO CONTRASTE                                    */
/* ================================================= */

body.contraste {
  background-color: #000 !important;
  color: #fff !important;
}
body.contraste header,
body.contraste footer,
body.contraste .intro,
body.contraste .desen,
body.contraste .section,
body.contraste .gallery,
body.contraste .video-card,
body.contraste .video-info,
body.contraste .math-tips,
body.contraste .formulario,
body.contraste .video-closing-message {
  background-color: #111 !important;
  color: #fff !important;
}
body.contraste a,
body.contraste h1,
body.contraste h2,
body.contraste h3,
body.contraste p {
  color: #fff !important;
}
body.contraste .gallery-images img { border: 4px dashed #fff !important; }
body.contraste .section { box-shadow: 3px 3px 10px rgba(255,255,255,0.2) !important; }
body.contraste .section-title { color: #000 !important; }
body.contraste .videos-title { color: #000 !important; }
body.contraste .video-closing-message {
  border-left: 6px solid #fff !important;
}
body.contraste .video-closing-message h3,
body.contraste .video-closing-message .closing-highlight { color: #fff !important; }
body.contraste .perfil-info,
body.contraste .perfil-nome { color: #fff !important; }
body.contraste .math-tips { border: 1px solid #fff !important; }
body.contraste .math-tips h2 { color: #fff !important; }
body.contraste .fala { background-color: #222 !important; color: #fff !important; }
body.contraste .link-somos { color: #fff !important; text-decoration: underline !important; }
