/* ==========================================
   1. VARIÁVEIS E TEMA
   ========================================== */
:root {
  --verde: #2ecc71;
  --verde-escuro: #1a8a48;
  --verde-medio: #27ae60;
  --preto: #0a0a0a;
  --branco: #fafaf8;
  --cinza-claro: #f2f0eb;
  --cinza-medio: #d6d3cc;
  --cinza-texto: #5a5750;
  --fonte-titulo: 'Plus Jakarta Sans', sans-serif;
  --fonte-corpo: 'Nunito', sans-serif;
  --radius: 1.2rem;
  --sombra: 0 8px 40px rgba(0,0,0,0.1);
  --transicao: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --preto: #fafaf8;
  --branco: #0a0a0a;
  --cinza-claro: #141414;
  --cinza-medio: #2a2a2a;
  --cinza-texto: #bdb9b1;
  --sombra: 0 8px 40px rgba(0,0,0,0.45);
}

/* ==========================================
   2. RESET E CONFIGURAÇÕES BASE
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fonte-corpo);
  background: var(--branco);
  color: var(--preto);
  overflow-x: hidden;
}

/* ==========================================
   3. TIPOGRAFIA GERAL E LISTAS
   ========================================== */
h1, h2, h3 {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  letter-spacing: -0.03em;
}

p, a, button, input, textarea, label, li, span {
  font-family: var(--fonte-corpo);
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================
   4. CLASSES UTILITÁRIAS
   ========================================== */
.campo-oculto {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.container {
  width: min(1240px, 100% - 8rem);
  margin-inline: auto;
}

/* ==========================================
   5. COMPONENTE GERAL: HEADER
   ========================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: var(--transicao);
  padding: 1.2rem 0;
}

[data-theme="dark"] #header {
  background: rgba(10,10,10,0.9);
  border-bottom-color: rgba(255,255,255,0.08);
}

#header.scrolled {
  padding: 0.7rem 0;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

.header-inner {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 1.5rem;
}

.header-logo img {
  width: 140px;
  height: auto;
  display: block;
}

.menu-desktop {
  justify-self: center;
}

.menu-desktop ul {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.menu-desktop .menu-link {
  position: relative;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.875rem;
  color: var(--cinza-texto);
  padding: 0.4rem 0.25rem;
  transition: color 0.25s ease;
}

.menu-desktop .menu-link::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--verde);
  transition: width 0.3s ease;
}

.menu-desktop .menu-link:hover {
  color: var(--preto);
}

.menu-desktop .menu-link:hover::after {
  width: 80%;
}

.menu-desktop .menu-link.active {
  color: var(--verde-escuro);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: transparent;
  color: var(--preto);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transicao);
}

[data-theme="dark"] .icon-btn {
  border-color: rgba(255,255,255,0.18);
  color: var(--preto);
}

.icon-btn:hover {
  border-color: var(--verde);
  color: var(--verde);
  transform: translateY(-1px);
}

#menuHamburger {
  display: none;
}

/* ==========================================
   6. COMPONENTE GERAL: MENU MOBILE
   ========================================== */
#overlayMobile {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 1060;
}

#overlayMobile.active {
  opacity: 1;
  pointer-events: auto;
}

#menuMobile {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(340px, 85vw);
  background: #0a0a0a;
  color: #fff;
  z-index: 1070;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.2rem 1.2rem;
}

#menuMobile.active {
  transform: translateX(0);
}

.mobile-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.btn-fechar-mobile {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.menu-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.menu-mobile-list .menu-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 0.8rem;
  border-radius: 0.8rem;
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  transition: var(--transicao);
}

.menu-mobile-list .menu-link i {
  color: var(--verde);
  font-size: 1.1rem;
}

.menu-mobile-list .menu-link:hover {
  background: rgba(255,255,255,0.08);
}

.menu-mobile-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.menu-mobile-footer a {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
  transition: var(--transicao);
}

.menu-mobile-footer a i {
  color: var(--verde);
  font-size: 1rem;
}

.menu-mobile-footer a:hover {
  border-color: var(--verde);
  transform: translateY(-2px);
}

/* ==========================================
   7. SCROLLBAR
   ========================================== */
::-webkit-scrollbar { 
  width: 5px; 
}

::-webkit-scrollbar-thumb {
  background: var(--verde);
  border-radius: 999px;
}

/* ==========================================
   8. MEDIA QUERIES GLOBAIS
   ========================================== */
@media (max-width: 1024px) {
  .container { width: min(1240px, 100% - 5rem); }
}

@media (max-width: 880px) {
  /* Container Geral */
  .container { width: min(1240px, 100% - 3rem); }
  
  /* Ajustes do Header e Menu */
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .menu-desktop {
    display: none;
  }
  #menuHamburger {
    display: grid;
  }
}

@media (max-width: 640px) {
  /* Container Geral */
  .container { width: min(1240px, 100% - 2rem); }
  
  /* Ajustes do Header */
  .header-inner { gap: 0.6rem; }
  .header-logo img { width: 100px; }
}