/* =====================================================
   LAYOUT.CSS
   Carregado nas PÁGINAS INTERNAS (sobre, projetos,
   tecnologias, contato). NÃO é usado no index.html,
   que tem sua própria estrutura de tela cheia (home.css).
   Contém: topbar, footer, estrutura genérica de página.
   ===================================================== */

/* ---------- Topbar ---------- */

.topbar {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 64px;
  border-bottom: 1px solid var(--purple);
}

.topbar__logo {
  font-family: "IM Fell English", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2.3rem;
  color: var(--text);
  text-decoration: none;
}

.topbar__logo .logo__cap {
  font-family: "US Declaration", cursive;
  font-style: normal;
}

.topbar__nav ul {
  list-style: none;
  display: flex;
  gap: 44px;
}

.topbar__nav a {
  font-family: "Spectral", serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--text);
}

.topbar__nav a.is-active {
  color: var(--purple-light);
}

/* ---------- Botão hambúrguer (só aparece no mobile) ---------- */

.topbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.topbar__toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Transforma as 3 linhas em um "X" quando o menu está aberto */
.topbar__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.topbar__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.topbar__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Conteúdo genérico de página ---------- */

.page {
  flex: 1;
  padding: 64px 64px 96px;
}

.page__inner {
  max-width: 980px;
  margin: 0 auto;
}

.page-title {
  text-align: center;
  font-family: "IM Fell English", serif;
  font-style: normal !important;
  font-weight: 400;
  font-size: 2.1rem;
  letter-spacing: 0.5px;
  margin-bottom: 44px;
}

.lead-text p {
  font-family: "Spectral", serif;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--text-dim);
  margin-bottom: 24px;
  text-align: justify;
  text-justify: inter-word; /* Distribui o espaço entre as palavras */

}

.section-title {
  text-align: center;
  font-family: "IM Fell English", serif;
  font-style: normal !important;
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: 0.5px;
  margin: 80px 0 48px;
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 28px 24px;
  font-family: "Spectral", serif;
  font-weight: 200;
  font-size: 1.3rem;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .topbar {
    padding: 20px 24px;
  }

  .topbar__toggle {
    display: flex;
  }

  /* Menu vira um painel dropdown, escondido por padrão */
  .topbar__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--purple);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .topbar__nav.is-open {
    max-height: 400px;
  }

  .topbar__nav ul {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 28px 24px;
  }

  .page {
    padding: 48px 24px 72px;
  }
}

@media (max-width: 480px) {
  .topbar__logo {
    font-size: 1.9rem;
  }

  .topbar__nav ul {
    gap: 14px 20px;
  }

  .topbar__nav a {
    font-size: 1.1rem;
  }

  .page {
    padding: 36px 18px 56px;
  }

  .page-title {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

  .lead-text p {
    font-size: 1.05rem;
    line-height: 1.55;
    text-align:left;

  }

  .section-title {
    font-size: 1.45rem;
    margin: 56px 0 32px;
  }
}
