/* === Base / Reset / Tipografia === */

body {
  margin: 0;
  padding-top: 80px;
  background-color: #fdfcf8;
  color: #1a1a1a;
  font-family: 'Cutive', serif;
  font-size: 1rem;
  line-height: 1.6;
}

/* Cabeçalhos */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Overpass Mono', sans-serif;
  font-weight: 700;
  color: #2b1b17;
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding: 0.1rem 2.5% 0.2rem;
}

h1 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  line-height: 1.3;
}

h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

h3 {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
}

/* Parágrafos */

p {
  margin: 0 0 1.25rem;
  padding: 0.1rem 2.5% 0.2rem;
}

/* Links */

a {
  color: #1a1a1a;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: #bf1725;
}


/* === Cabeçalho e Navegação === */

header {
  background-color: #1a1a1a;
  border-bottom: 3px solid #bf1725;
  padding: 0.5rem 1.5rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  font-family: 'IBM Plex Mono', monospace;
  text-decoration: none;
  color: #cbc7c2;
  font-weight: 600;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  margin-left: 20%;
  flex-wrap: wrap;
}

.logo {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 1000;
  padding: 0;
  margin: 0;
}

.logo img {
  height: 74px;
  max-width: 100%;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  padding: 1rem 0;
  gap: 1rem;
}

.nav-menu a {
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #cbc7c2;
}

.nav-menu a:hover {
  color: #bf1725;
}


/* === Busca === */

.search-box input {
  padding: 0.5rem;
  border: 2px solid #5c3d2e;
  border-radius: 5px;
  font-family: 'Cutive', serif;
  max-width: 90%;
}

button {
  border: none;
  background: none;
}


/* === Linha do Tempo === */

.timeline {
  position: relative;
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 24px;
  background: #333;
  transform: translateX(-50%);
}

.event {
  position: relative;
  width: 48%;
  background: #fefaf6;
  padding: 1.5rem;
  margin-bottom: 5rem;
  box-shadow: 3px 3px 0 #00000033;
  border: 2px solid #5c3d2e;
  box-sizing: border-box;
}

.event.left {
  left: 5%;
  text-align: right;
}

.event.right {
  left: 47%;
  text-align: left;
}

.event.left::before {
  right: -10px;
}

.event.right::before {
  left: -10px;
}

.event-txt {
  margin: 0;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'IBM Plex Mono', monospace;
  color: #2b1b17;
  font-weight: 700;
}

.info-box {
  background-color: #f5eee6;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 2px 2px 4px #ccc;
  font-size: 0.75rem;
  width: 300px;
  position: absolute;
  top: -35px;
  color: #1a1a1a;
  line-height: 1.4;
  border-radius: 3px;
  font-family: 'Cutive', serif;
}

.event.left .info-box {
  left: clamp(1rem, 101%, 101%);
  text-align: left;
  box-shadow: -3px 5px 0px 2px #bf1725;
}

.event.right .info-box {
  right: clamp(1rem, 101%, 101%);
  text-align: right;
  box-shadow: 3px 5px 0px 2px #bf1725;
}

.event::after {
  content: "";
  display: table;
  clear: both;
}

.event.left::after {
  content: "";
  position: absolute;
  top: 40%;
  right: -2px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #bf1725;
}

.event.right::after {
  content: "";
  position: absolute;
  top: 40%;
  left: -2px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #bf1725;
}


/* === Rodapé === */

footer {
  background-color: #cbc7c2;
  text-align: center;
  padding: 2rem 10rem;
  font-size: 0.9rem;
  border-top: 3px solid #bf1725;
}

footer .social-icons {
  margin-top: 1rem;
}

footer .social-icons a {
  margin: 0 0.5rem;
  display: inline-block;
}

footer .social-icons img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  transition: filter 0.3s ease;
}


/* === Botões e Navegação Principal === */

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  margin: 2rem auto;
  max-width: 900px;
  padding: 0 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  background: #bf1725;
  color: #fdfcf8;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 16px;
  transition: background-color 0.3s ease;
  flex: 1 1 180px;
  max-width: 150px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
}

.btn:hover {
  background: #99131c;
}

.btn.active,
.btn:focus {
  background: #f5eee6;
  color: #2b1b17;
}


/* === Conteúdo Dinâmico === */

.content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content.active {
  display: block;
  opacity: 1;
}


/* === Galeria === */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.gallery figure {
  margin: 0;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery figure:hover {
  transform: scale(1.02);
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery figcaption {
  padding: 0.75rem;
  font-size: 0.9rem;
  color: #444;
  background-color: #fafafa;
  border-top: 1px solid #eee;
}


/* === Menu Mobile e Responsividade === */

.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #cbc7c2
}

@media screen and (max-width: 1000px) {

  .header-container {
  margin-left: 0;
  }
  
  .logo {
  left: auto;
  top: 0;
  right: 48px;
  }

  .logo img {
  height: 103px;
  max-width: 100%;
  }

  .info-box {
    width: 90%;
  }
  
  .event {
    margin-bottom: calc(4rem + (768px - 100vw) * 0.3);
  }

  footer {
    padding: 2rem 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
  }

  .nav-menu.active {
    display: block;
  }

  .nav-menu ul {
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box {
    width: 80%;
    margin-top: 1rem;
    display: none;
  }

  .search-box.active {
  display: block;
  }

  main {
    padding-top: 80px;
  }
}

@media screen and (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
