/* ==========================================================================
   1. CONFIGURAÇÕES GLOBAIS E VARIÁVEIS
   ========================================================================== */

:root {
  --cor-primaria: #0056b3; /* Azul escuro para identidade */
  --cor-secundaria: #007bff; /* Azul mais vivo para botões e links */
  --cor-fundo: #f8f9fa;      /* Fundo geral (cinza muito claro) */
  --cor-texto: #333;         /* Cor principal do texto */
  --cor-branco: #ffffff;
  --sombra-padrao: 0 4px 15px rgba(0, 0, 0, 0.1);
  --raio-borda: 8px;
  --font-principal: 'Poppins', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-principal);
  background-color: var(--cor-fundo);
  color: var(--cor-texto);
  line-height: 1.6;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--cor-primaria);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   2. HEADER E FOOTER (COM MENU MOBILE)
   ========================================================================== */

.site-header {
  background-color: var(--cor-branco);
  padding: 5px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  gap: 10px;
}

.logo-icon {
  font-size: 2rem;
  color: var(--cor-primaria);
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 900;
}

/* Estilos da navegação para DESKTOP (acima de 400px) */
.site-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.site-nav a {
  color: var(--cor-texto);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.site-nav a:hover {
  color: var(--cor-secundaria);
}

/* Esconde a checkbox e o ícone do menu em telas maiores */
.menu-toggle,
.menu-icon {
  display: none;
}


/* ===============================================
   ESTILOS DO MENU PARA ECRÃS MENORES QUE 400px
   =============================================== */
@media (max-width: 599px) {

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}



  /* Mostra o ícone do menu */
 .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 102; /* Para ficar acima do menu */
  }

  /* As 3 linhas do ícone "hambúrguer" */
  .menu-icon span {
    width: 100%;
    height: 3px;
    background-color: var(--cor-primaria);
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  /* Esconde a navegação por defeito */
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    background-color: var(--cor-branco);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    
    /* Animação de deslizar */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;

    /* Layout vertical dos links */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 101;
  }

  .site-nav a {
    font-size: 1.2rem; /* Aumenta o tamanho da fonte para toque fácil */
  }

  /* A MÁGICA: Quando a checkbox está marcada, mostra o menu */
  .menu-toggle:checked ~ .site-nav {
    transform: translateX(0);
  }

  /* Transforma o ícone "hambúrguer" num "X" para fechar */
  .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }
  .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
}

/* Footer (sem alterações) */
.site-footer {
  background-color: var(--cor-primaria);
  color: var(--cor-branco);
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
}/* ==========================================================================
   3. SECÇÃO HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--cor-branco);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/banner1.jpg") no-repeat center center/cover;
  z-index: -1;
  transform: skewY(-4deg); /* Efeito de inclinação moderno */
  transform-origin: top left;
}

.hero-content {
  max-width: 700px;
  animation: fadeIn 1s ease-in-out;
}

.hero-content h2 {
  font-size: 2.5rem;
  color: var(--cor-branco);
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

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

/* ==========================================================================
   4. BOTÕES (CTA)
   ========================================================================== */

.cta {
  background-color: var(--cor-branco);
  color: var(--cor-secundaria);
  border: none;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--sombra-padrao);
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   5. SECÇÕES (VALORES, CURSOS, CTA-FINAL)
   ========================================================================== */

section {
  padding: 60px 0;
}

section h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 40px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.card {
  background-color: var(--cor-branco);
  padding: 30px;
  border-radius: var(--raio-borda);
  box-shadow: var(--sombra-padrao);
  text-align: center;
  flex-basis: 300px; /* Largura base de cada card */
  flex-grow: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.cta-final {
  background-color: var(--cor-secundaria);
  text-align: center;
}

.cta-final h2 {
  color: var(--cor-branco);
}

.cta-final .cta {
  background-color: var(--cor-branco);
  color: var(--cor-secundaria);
}

/* ==========================================================================
   6. MODAIS (POPUPS)
   ========================================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--cor-branco);
  padding: 30px 40px;
  border-radius: var(--raio-borda);
  box-shadow: var(--sombra-padrao);
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  text-align: center;
}

.modal:not(.hidden) .modal-content {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.8rem;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--cor-texto);
}

.modal h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
}

/* Estilos específicos do Popup de Boas-Vindas */
.welcome-icon {
  font-size: 3rem;
  color: var(--cor-secundaria);
  margin-bottom: 15px;
}

/* Estilos do formulário de Login */
.modal-content form {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.modal-content label {
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 5px;
}

.modal-content input[type="text"],
.modal-content input[type="password"] {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: var(--raio-borda);
  font-size: 1rem;
}

.modal-content button[type="submit"] {
  background-color: var(--cor-secundaria);
  color: var(--cor-branco);
  padding: 12px;
  border: none;
  border-radius: var(--raio-borda);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

.modal-content button[type="submit"]:hover {
  background-color: var(--cor-primaria);
}

.modal-content a {
  display: block;
  margin-top: 15px;
  text-align: center;
  color: var(--cor-secundaria);
  text-decoration: none;
}
.modal-content a:hover {
  text-decoration: underline;
}

/* Mensagens Flash */
.alert-login {
  padding: 10px;
  border-radius: var(--raio-borda);
  margin-bottom: 15px;
  text-align: center;
  color: var(--cor-branco);
  background-color: #dc3545; /* Cor de erro padrão */
}

.alert-login.success { /* Caso adicione uma categoria 'success' no futuro */
    background-color: #28a745; 
}


/* Classe para esconder os modais via JS */
.hidden {
  opacity: 0;
  visibility: hidden;
}


/* ==========================================================================
   7. MEDIA QUERIES PARA RESPONSIVIDADE
   ========================================================================== */

/* Telas de tablets e maiores */
@media (min-width: 768px) {
  .hero-content h2 {
    font-size: 3.5rem;
  }

  .desktop-nav {
      display: block; /* Garante que a navegação apareça */
  }
}

/* Telas pequenas (mobile) */
@media (max-width: 767px) {
  .flex-between {
    flex-direction: column;
    gap: 15px;
  }
  
  .desktop-nav {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
  }

  .desktop-nav a {
      margin-left: 0;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
  
  section h2 {
      font-size: 1.8rem;
  }
}