:root {
  --cor-primaria: #004a99;
  --cor-secundaria: #ddd;
  --cor-destaque: #ffffff;
  --cor-menu: #004a998f;
  --cor-seta: #04305edf;
  --bg: #ffffff;
  --card: #ffffff;
  --accent: #0066cc;
  --accent-2: #00a86b;
  --muted: #000000;
  --glass: rgba(102, 179, 230, 0.6);
  --text: #000000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Times New Roman', Times, serif;
  background: linear-gradient(180deg, var(--bg), #d8d8d8);
  color: var(--text);
  transition: all 0.3s ease;
}

/* Tema escuro consolidado */
body.dark {
  --bg: #ffffff;
  --card: #0031f5;
  --accent: #123c67;
  --accent-2: #00ff5e;
  --muted: #000000;
  --glass: rgba(30, 30, 40, 0.6);
  --text: #f1f1f1;
  background: linear-gradient(180deg, var(--bg), #1a1f2e);

}

body.light {
  --cor-primaria:  #1a1a1a;
  --cor-secundaria: #2d2d2d;
  --cor-destaque: #ffffff;
  --cor-menu: #2f2f2f82;
  --bg: #303030;
  --card: #525151;
  --glass: rgba(85, 118, 141, 0.6);
  --text: #ffffff;
    --muted: #ffffff;
  border: 1px solid #363636;
  background: linear-gradient(180deg, var(--bg), #1e1e1e);
}

/* HEADER */
header {
  background-color: var(--cor-primaria);
  color: var(--cor-destaque);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1000;
}
body > header {
  background-color: var(--cor-primaria);
  color: var(--cor-destaque);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1rem;
  flex-wrap: wrap;

  position: fixed;          /* FIXA NO TOPO */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3000;            /* GARANTE QUE FICA POR CIMA DE TUDO */

  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.wrap {
  margin-top: 180px !important;  /* empurra o conteúdo para baixo do header */
}


.nome-escola {
  font-size: 1.5rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
}

.logo-central {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.logo-central img {
  width: 125px;
  height: 125px;
  object-fit: contain;
}

/* MENU LATERAL */
#menu-lateral {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100%;
  background-color: var(--cor-menu);
  transition: left 0.3s ease-in-out;
  padding-top: 5rem;
  z-index: 999;
}

#menu-lateral.show {
  left: 0;
}

#menu-lateral ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 2rem;
}

#menu-lateral a {
  text-decoration: none;
  color: var(--cor-destaque);
  font-weight: bold;
}

/* MENU TOPO */
.menu-topo {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.menu-topo ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.menu-topo a {
  text-decoration: none;
  color: var(--cor-destaque);
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.menu-topo a:hover {
  color: #ffdd57;
}

/* BOTÃO HAMBÚRGUER */
.hamburguer {
  width: 40px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px;
  z-index: 1001;
}

.hamburguer span {
  display: block;
  height: 4px;
  width: 100%;
  background-color: var(--cor-secundaria);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburguer.ativo span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburguer.ativo span:nth-child(2) {
  opacity: 0;
}

.hamburguer.ativo span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Nova seção de introdução dos itinerários */
.intro-itinerarios {
  background-color: #f8f9fa;
  padding: 25px 20px;
  text-align: center;
  margin: 4;
  border-bottom: 1px solid #e9ecef;
}

.intro-itinerarios h2 {
  font-size: 1.8rem;
  color: var(--cor-primaria);
  margin-bottom: 10px;
  font-weight: 600;
}

.intro-itinerarios p {
  font-size: 1.1rem;
  color: #000000;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

.intro {
   background-color: #f8f9fa;
   background: linear-gradient(180deg, var(--bg), #a9c1f4);
  padding: 25px 20px;
  text-align: center;
  margin: 4;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 80px;
}
 .intro2 {
     background-color: #f8f9fa;
  background: linear-gradient(180deg, var(--bg), #a9c1f4);
  padding: 25px 20px;
  text-align: center;
  margin: 4;
  border-top: 1px solid #e9ecef;
  margin-top: 100px;
 }
/* HERO BANNER */
.hero {
  width: 100%;
  min-width: 100vw;
  height: 70vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  margin: 0;
  padding: 0;
  max-width: 100% !important;
}
.exatas {
  margin-bottom: 140px;}
  
.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

.hero-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background: #001f3f;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.hero-btn:hover {
  background: #003366;
}

/* Seções consolidadas */
section {
  padding: 80px 1px;
  margin: auto;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  max-width: 1000px;
  margin: auto;
}

.about-content img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  object-fit: cover;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  color: #001f3f;
  margin-bottom: 15px;
}

.about-text p {
  font-size: 1.05em;
  line-height: 1.8;
  text-align: justify;
  color: #dfdfdf;
}

/* CONTATO */
.contact {
  text-align: center;
}

.contact-boxes {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.contact-box {
  display: block;
  text-decoration: none;
  color: inherit;
  background: white;
  border-radius: 15px;
  padding: 50px;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-box:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.contact-box h4 {
  color: #001f3f;
  margin-bottom: 10px;
}

/* MAPA */
.map-container {
  margin: 40px auto 0 auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 1000px;
}

.map-container:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* Footer compacto e retangular */
footer {
  background: var(--cor-primaria);
  color: var(--cor-destaque);
  padding: 1rem;
  text-align: center;
  width: 99vw; /* Ocupa toda a largura da viewport */
  margin: 0;
  
  position: relative;
}

.footer-conteudo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
  padding: 0.5rem;
}

.footer-logo {
  width: 40px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.3);
}

.footer-nome {
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}

.footer-links a {
  color: var(--cor-destaque);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
  transform: scale(1.05);
  color: #ffdd57;
}

.direitos {
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Botão voltar ao topo simplificado */
#btn-topo {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--cor-seta);
  color: white;
  border: none;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.4s ease, transform 0.3s ease, visibility 0.4s;
  z-index: 1000;
}

#btn-topo.show {
  opacity: 1;
  visibility: visible;
}

#btn-topo:hover {
  background: #000000;
  transform: scale(1.1);
}


/* Estilos do itinerário consolidados */
.wrap {
  max-width: 980px;
  margin: 36px auto;
  padding: 20px;
  opacity: 0;
  transition: opacity 1s ease;
}

.wrap.visible {
  opacity: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 20px;
}

h1 {
  font-size: 20px;
  margin: 0;
}

p.lead {
  margin: 6px 3px 0;
  color: var(--muted);
  font-size: 14px;
}

.controls {
  display: flex;
  gap: 8px;
}

.btn {
  background: var(--card);
  border: 1px solid #e6eef8;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(12, 34, 63, 0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent), #2575d6);
  color: white;
  border: none;
}

main {
  margin-top: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e9f0fb;
  box-shadow: 0 6px 20px rgba(12, 34, 63, 0.04);
  transition: transform .15s ease, outline 0.5s ease;
}

.card:hover {
  transform: translateY(-6px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.carga {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: #f1f6ff;
  color: #164a9c;
  border: 1px solid #e2efff;
}

.desc {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0;
}

.years {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.year-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed #dbeaf7;
  background: linear-gradient(180deg, #fff, #fbfdff);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}

.year-btn:hover {
  background: linear-gradient(180deg, #f9fcff, #f1f6ff);
}

.year-btn:active {
  transform: scale(0.99);
}

.details {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--glass), #fff);
  border: 1px solid rgba(15, 45, 90, 0.03);
  /* Added animation properties for smooth expand/collapse */
  overflow: hidden;
  transition: all 0.3s ease;
  transform-origin: top;
}

/* Added expanding animation class */
.details.expanding {
  animation: expandDetails 0.3s ease-out forwards;
}

/* Added collapsing animation class */
.details.collapsing {
  animation: collapseDetails 0.3s ease-in forwards;
}

/* Added keyframe animations for expand and collapse */
@keyframes expandDetails {
  0% {
    opacity: 0;
    transform: scaleY(0);
    max-height: 0;
  }
  100% {
    opacity: 1;
    transform: scaleY(1);
    max-height: 500px;
  }
}

@keyframes collapseDetails {
  0% {
    opacity: 1;
    transform: scaleY(1);
    max-height: 500px;
  }
  100% {
    opacity: 0;
    transform: scaleY(0);
    max-height: 0;
  }
}

.details strong {
  display: block;
  margin-bottom: 6px;
}

.list {
  margin: 8px 0;
  padding-left: 18px;
  color: var(--muted);
}

#escolhaBox,
#sucessoBox {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--glass), #fff);
  border: 1px solid rgba(15, 45, 90, 0.03);
  transition: all 0.3s ease;
  display: none;
}

#escolhaBox label {
  display: block;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid #dbeaf7;
  cursor: pointer;
  transition: 0.2s ease, transform 0.15s ease;
}

#escolhaBox input[type="radio"] {
  margin-right: 8px;
}

#escolhaBox label:hover {
  background: linear-gradient(180deg, #f9fcff, #f1f6ff);
  transform: translateY(-2px);
}

/* Switch de tema simplificado */
.theme-switch-container {
  margin-top: 2rem;
  padding: 1rem;
  border-top: 1px solid rgba(252, 252, 252, 0.685);
  display: flex;
  justify-content: flex-start;
}

.theme-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.theme-switch input {
  display: none;
}

.slider {
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: 0.3s;
}

input:checked + .slider {
  background: #00ff0d;
}

input:checked + .slider::before {
  transform: translateX(20px);
}

.theme-label {
  color: white;
  font-size: 0.9rem;
}

/* Modal simplificado */
.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

#caption {
  color: #fff;
  text-align: center;
  margin-top: 0.5rem;
}

/* Adicionando estilos para modal de imagem */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.3s ease;
}

.image-modal-close:hover {
  color: #ccc;
}

/* Tornando todas as imagens clicáveis */
.gallery-item img,
.about-content img,
img[src*="assets/"] {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover,
.about-content img:hover,
img[src*="assets/"]:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (hover: hover) and (pointer: fine) {
  .modal {
    display: none !important;
  }
}

/* Galeria simplificada */
.independent-gallery {
  padding: 3rem 1rem;
  background-color: #f9f9f9;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.gallery-lead {
  font-size: 1rem;
  color: #ededed;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  height: 180px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item img:hover {
    transform: scale(1.05);
  }
}

/* Responsividade mobile consolidada */
@media (max-width: 600px) {
  header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem 2.5rem;
    position: relative;
  }

  .hamburguer {
    width: 35px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    margin: 0;
    order: 0;
  }

  .hamburguer span {
    height: 5px;
    border-radius: 3px;
  }

  .nome-escola {
    font-size: 1rem;
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    margin: 2;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
  }

  .logo-central {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    order: 1;
  }

  .logo-central img {
    width: 100px;
    height: 100px;
  }

  .menu-topo {
    display: block;
    width: 100%;
    margin-top: 70px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    background-color: var(--cor-primaria);
    padding: 0.1rem 0;
    line-height: 1;
  }

  .menu-topo::-webkit-scrollbar {
    display: none;
  }

  .menu-topo {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .menu-topo ul {
    display: inline-flex;
    gap: 0.8rem;
    padding: 0 0.5rem;
    list-style: none;
  }

  .menu-topo a {
    display: inline-block;
    color: var(--cor-destaque);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
  }

  .menu-topo a:hover {
    color: #ffdd57;
  }

  #menu-lateral {
    width: 200px;
  }

  .intro-itinerarios {
    padding: 20px 15px;
  }

  .intro-itinerarios h2 {
    font-size: 1.5rem;
  }

  .intro-itinerarios p {
    font-size: 1rem;
  }

  /* Footer mantém largura total no mobile */
  footer {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }

  .footer-conteudo {
    flex-direction: column;
    gap: 6px;
  }

  /* Modal responsivo no mobile */
  .image-modal-content {
    max-width: 95%;
    max-height: 85%;
  }

  .image-modal-close {
    top: 10px;
    right: 15px;
    font-size: 30px;
  }
}

@media (max-width: 420px) {
  .logo {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .brand {
    gap: 8px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

#endereco {
  padding-top: 0px;
}

/* Enhanced year button states for better feedback */
.year-btn[aria-selected="true"] {
  background: linear-gradient(180deg, #e3f2fd, #bbdefb);
  border-color: var(--accent);
  transform: scale(1.02);
}

/* Animações para o modal */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

  .educational-videos {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
  }
  
  .educational-videos strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
  }
  
  .video-container {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .video-container iframe {
    display: block;
    max-width: 100%;
  }
  
  @media (max-width: 768px) {
    .video-container iframe {
      height: 200px;
    }
  }

.hamburguer {
    position: relative;
    z-index: 3000 !important;
}

/* FORÇA O MENU HAMBURGUER A FICAR NO CANTO ESQUERDO EM QUALQUER TAMANHO */
@media (max-width: 600px) {
    header {
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 0.8rem 1rem 2.5rem !important;
    }

    .hamburguer {
        position: relative !important;
        left: 0 !important;
        margin-right: auto !important;  /* empurra a logo para o centro */
        order: 0 !important;
    }

    .logo-central {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* IMPEDIR QUE O HEADER VIRE COLUNA NO MOBILE (É O QUE QUEBRA TUDO) */
@media (max-width: 420px) {
    header {
        flex-direction: row !important;  /* <-- OBRIGA a manter igual ao PC */
        align-items: center !important;
        gap: 0 !important;
    }
}
