:root {
  --white: #ffffff;
  --light-gray: #d44040;
  --dark: #000000;
  --bg-color: var(--white);
  --text-color: var(--dark);
  --card-bg: var(#ff0000);
  --accent-color: #b9b5b5; /* Azul escolar */
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
  padding: 0; /* removi */
  margin: 0;  /* adiciona para garantir */
}

main {
  max-width: 100%;   /* ocupa 100% da largura */
  margin: 2rem 0;    /* só mantém espaçamento em cima/baixo */
  padding: 0;        /* removi */
}
/* ===== Seções ===== */
main section {
  background-color: var(--section-bg);
  margin: 2rem auto;
  padding: 2rem;
  border-radius: var(--section-radius);
  max-width: 1000px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: background-color 0.4s ease, color 0.4s ease;
}

main h1 {
  font-size: 1.8rem;
  color: var(--light-gray);
  margin-bottom: 1rem;
}

main p {
  margin-bottom: 1rem;
  text-align: justify;
}

/* ===== Dark Mode ===== */
body.dark-mode {
  --bg-color: #1e1e1e;
  --text-color: #f5f5f5;
  --section-bg: #2c2c2c;
  --accent-color: #ce4040;
}

body.dark-mode main section {
  background-color: var(--section-bg);
}


/* ===== Cabeçalho ===== */
header {
  background: linear-gradient(135deg, #b22222, #ff6347); /* tons avermelhados */
  color: var(--white);
  display: flex;
  justify-content: space-between; /* botão vai pra direita */
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  flex-wrap: wrap;
  transition: 0.6s ease;
  text-align: center;
  border-radius: 0px;
  position: relative;
}

/* Degradê suave de transição entre header e body */
header::after {
  content: "";
  position: absolute;
  bottom: -12%;
  left: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(
    to bottom,
    rgba(178, 34, 34, 0.95) 0%,   /* cor forte do header */
    rgba(178, 34, 34, 0.6) 40%,   /* suaviza no meio */
    rgba(255, 255, 255, 0) 100%   /* dissolve no body */
  );
  pointer-events: none;
  z-index: 1;
  background-blend-mode: multiply;
}


/* Botão Hamburguer */
.menu-toggle {
  width: 28px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  z-index: 2001; /* garante que fica acima do menu */
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: var(--text-color); /* agora acompanha tema */
  border-radius: 3px;
  transition: 0.3s;
}

/* Animação de X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu estilo caixa */
.menu {
  position: absolute;
  top: 55px;
  right: 20px;
  width: 200px;
  background: var(#dc143c); /* usa a cor do card do tema */
  border-radius: 12px;
  padding: 15px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px var(--menu-shadow); /* sombra dinâmica */
  z-index: 2000;
}

.menu.active {
  opacity: 3;
  visibility: visible;
  transform: translateY(0);
}

.menu ul {
  list-style: none;
}

.menu ul li {
  text-align: left;
  padding: 10px 20px;
}

.menu ul li a {
  color: var(--text-color); /* texto acompanha tema */
  font-size: 16px;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

/* Underline animado */
.menu ul li a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-color); /* underline acompanha tema */
  transition: width 0.3s;
  margin-top: 3px;
}

.menu ul li a:hover::after,
.menu ul li a.active::after {
  width: 100%;
}

.menu ul li a.active {
  color: var(--accent-color); /* link ativo usa cor de destaque */
}
header .brasao-domingas img {
  max-height: 60px;
}

header h1 {
  font-size: 1.8rem;
  flex: 1;
}

.header-buttons {
  margin-left: auto; /* joga o botão para a direita */
  display: flex;
  gap: 0.5rem;
}

.header-buttons button {
  background-color: var(--white);
  color: var(--accent-color);
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 0px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.header-buttons button:hover {
  background-color: #ddd;
  transform: scale(1.05);
}

/* ===== Barra de navegação ===== */
nav {
  width: 100%;
  height: 300px; /* altura da faixa da imagem */
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #8b0000, #ff4500); /* tons avermelhados */
}

nav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.9) contrast(1.05) saturate(1.1);
  transition: filter 0.6s ease, transform 0.6s ease;
}

/* Gradiente sutil por cima da imagem */
nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.15));
  pointer-events: none;
}

/* Transição suave entre nav e main */
nav::after {
  content: "";
  position: absolute;
  bottom: -12%;
  left: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(
    to bottom,
    rgba(139, 0, 0, 0.95) 0%,     /* cor forte do nav */
    rgba(139, 0, 0, 0.6) 40%,     /* suaviza no meio */
    rgba(255, 255, 255, 0) 100%   /* dissolve no main */
  );
  pointer-events: none;
  z-index: 1;
  background-blend-mode: multiply;
}

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

.nav-buttons button {
  background-color: transparent;
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-buttons button:hover {
  background-color: #5f5f5f;
  transform: scale(1.05);
}

/* ===== Conteúdo principal ===== */
main {
  max-width: 1500px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ===== Carrossel ===== */
.carrossel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.carrossel-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  scroll-behavior: smooth;
}

.carrossel-item {
  min-width: 100%;
  text-align: center;
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
}

.carrossel-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.carrossel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.2rem;
  z-index: 10;
}

.carrossel-btn.prev { left: 10px; }
.carrossel-btn.next { right: 10px; }

/* ===== Container dos Eventos ===== */
.eventos-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 90%;
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
  background-color: transparent;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}



/* ===== Rodapé ===== */
footer {
  background: linear-gradient(135deg, #a52a2a, #dc143c); /* tons avermelhados */
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
}

/* Transição suave entre footer e body */
footer::before {
  content: "";
  position: absolute;
  top: -12%;
  left: 0;
  width: 100%;
  height: 15%;
  background:
    to top,
    rgba(165, 42, 42, 0.95) 0%,   /* cor forte do footer */
     ;
  pointer-events: none;
  z-index: 1;
  background-blend-mode: multiply;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto 1rem auto;
}

.footer-container h3 {
  margin-bottom: 0.5rem;
}

.footer-container p,
.footer-container a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-container a:hover { text-decoration: underline; }

.footer-copy {
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ===== Tema Escuro ===== */
body.dark-mode {
  --bg-color: #2b2b2b;
  --text-color: #f5f5f5;
  --card-bg: #3a3a3a;
  --accent-color: #4ba3c7;
}

body.dark-mode header,
body.dark-mode nav,
body.dark-mode footer {
  background-color: var(--accent-color);
}

/*
 * Base Responsividade: A maioria dos elementos já são fluidos.
 * Apenas ajustes finos são necessários para tamanhos de tela específicos.
 */

/* Tablets e Telas Maiores (Horizontal) */
@media (max-width: 1024px) {
    header,
    nav,
    footer {
        padding: 0.8rem;
    }

    header h1 {
        font-size: 1.4rem;
    }

    main p {
        margin-bottom: 0.7rem;
    } /* margens menores para textos */

    .eventos-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .carrossel-item img {
        height: 250px;
    }

    footer {
        padding: 1.5rem 0.8rem;
    }
}

/* Tablets e Celulares (Vertical) */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.6rem;
    }

    header h1 {
        font-size: 1.3rem;
    }

    main p {
        margin-bottom: 0.6rem;
    }

    .eventos-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .carrossel-item img {
        height: 200px;
    }

    footer {
        padding: 1.2rem 0.6rem;
    }
}

/* Celulares Menores */
@media (max-width: 480px) {
    header {
        padding: 0.5rem;
    }

    header h1 {
        font-size: 1.2rem;
    }

    main p {
        margin-bottom: 0.5rem;
    }

    .eventos-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .carrossel-item img {
        height: 150px;
    }

    footer {
        padding: 1rem 0.5rem;
    }
}