/* ==========================================================================
   MAIN.CSS — Reset, Layout Base, Componentes e Responsividade (ISAB)
   ========================================================================== */

/* ---------- 1. Variáveis Globais (Design Tokens) ---------- */
.hero-title,
h1.hero-title,
.hero-section h1 {
  color: var(--isab-green-deep, #1d4934) !important;
}

:root {
  --isab-green-deep: #1d4934;
  --isab-green-main: #286447;
  --isab-green-soft: #f4f8f5;
  --isab-yellow: #f5b82e;
  --isab-yellow-light: #fffbeb;
  --isab-text-dark: #18251e;
  --isab-text-muted: #5e6d64;
  --isab-border: #e2e9e4;
  --isab-surface: #ffffff;
  --layout-max-width: 1200px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--md-font-family, system-ui, -apple-system, sans-serif);
  font-size: 1rem;
  line-height: 1.5;
  background-color: #ffffff;
  color: var(--isab-text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Respeita preferências de redução de movimento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 3. Tipografia & Acessibilidade ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--isab-text-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--isab-green-main);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--isab-green-main);
  color: #ffffff;
  padding: 0.75rem 1rem;
  z-index: 10000;
  border-radius: 4px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 4. Layout Base & Utilitários ---------- */
.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.app-main-fluid {
  flex: 1;
  width: 100%;
  padding: 0;
}

.container-narrow {
  max-width: 640px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header__title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header__subtitle {
  color: var(--isab-text-muted);
  max-width: 640px;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* ---------- 5. Botões Padronizados ---------- */
.btn-isab-primary,
.btn-isab-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* Botão Principal em Amarelo Destaque */
.btn-isab-primary {
  background-color: var(--isab-yellow);
  color: var(--isab-text-dark) !important;
  border: none;
  box-shadow: 0 4px 12px rgba(245, 184, 46, 0.25);
}

.btn-isab-primary:hover {
  background-color: #e0a322;
  transform: translateY(-1px);
}

/* Botão Secundário Padrão */
.btn-isab-secondary {
  background-color: transparent;
  color: var(--isab-green-main) !important;
  border: 1.5px solid var(--isab-green-main);
}

.btn-isab-secondary:hover {
  background-color: var(--isab-green-soft);
}

/* ---------- 6. Header & Navegação Desktop ---------- */
.header {
  background-color: var(--isab-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: none;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--isab-text-dark);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background-color: #f1f5f9;
}

.header-figma .nav-links .nav-link.active,
.header-figma .nav-link.active,
.nav-link.active {
  background-color: transparent !important;
  background: transparent !important;
  color: var(--isab-green-main) !important;
  border-bottom: 3px solid var(--isab-green-main) !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
}

.btn-nav-link {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Botão Hambúrguer */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}

.nav-toggle:hover {
  background-color: #f1f5f9;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--isab-text-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before { content: ''; position: absolute; top: -7px; left: 0; }
.nav-toggle__icon::after { content: ''; position: absolute; top: 7px; left: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 7. Sidebar Mobile & Overlay ---------- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.sidebar-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 80vw;
  height: 100vh;
  background-color: var(--isab-surface);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
}

.sidebar-mobile.is-open {
  transform: translateX(0);
}

.sidebar-mobile__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--isab-border);
}

.sidebar-mobile__close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--isab-text-dark);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.sidebar-mobile__nav {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 0.5rem;
}

.sidebar-mobile__nav .nav-link {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--isab-text-dark);
}

.sidebar-mobile__nav .nav-link:hover,
.sidebar-mobile__nav .nav-link.active {
  background-color: #e8f5e9;
  color: var(--isab-green-main);
}

/* ---------- 8. Projetos em Destaque ---------- */
.projects {
  padding: 4rem 1.5rem;
  background-color: var(--isab-yellow-light, #fffbeb);
}

.projects__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  max-width: var(--layout-max-width);
  margin: 0 auto;
}

.project {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  max-width: 450px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.project-media-container {
  width: 100%;
  height: 220px;
  background-color: #f1f5f3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-media-container img,
.project-media-container video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------- 9. Seção "Faça Parte" (CTA) ---------- */
.cta {
  padding: 4rem 1.5rem;
  border-top: 1px solid rgba(245, 184, 46, 0.2);
}

.cta__inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  background: 1px solid var(--h-sand-line);
  padding: 2.5rem 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(245, 184, 46, 0.15);
  border: 1px solid rgba(245, 184, 46, 0.3);
}

.cta__text {
  flex: 1;
}

.cta__text h2 {
  color: var(--isab-text-dark, #18251e) !important;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.cta__text p {
  color: var(--isab-text-muted, #5e6d64) !important;
  font-size: 1.05rem;
}

.cta__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-isab-cta-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  background-color: transparent;
  color: var(--isab-green-main) !important;
  border: 2px solid var(--isab-green-main);
}

.btn-isab-cta-outline:hover {
  background-color: var(--isab-green-soft);
  transform: translateY(-1px);
}

/* ---------- 10. Rodapé (Footer Viking) ---------- */
.footer-viking {
  background-color: #2A2D34 !important;
  color: #A0A5B1 !important;
  padding-top: 3rem !important;
  margin-top: 0;
}

.footer-viking__container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 1.5rem 2.5rem 1.5rem !important;
}

.footer-viking__grid {
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr !important; 
  gap: 3.5rem !important;
  align-items: start !important;
}

.footer-col {
  width: 100% !important;
}

.footer-col--wide {
  grid-column: auto !important;
}

.footer-col h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF !important;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: #A0A5B1 !important;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #FFFFFF !important;
}

.footer-col p {
  color: #A0A5B1 !important;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Faixa Inferior do Copyright e Logos de Parceiros */
.footer-viking__bottom {
  background-color: #1E2025 !important;
  padding: 1.25rem 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.footer-viking__bottom-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.footer-logo strong {
  color: #FFFFFF !important;
  font-size: 1.25rem;
  letter-spacing: 1px;
}

.footer-bottom-right {
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
}

.footer-partners-mini {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

.footer-partner-logo {
  background: #ffffff !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 36px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

.footer-partner-logo img {
  max-height: 22px !important;
  max-width: 90px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.footer-credits {
  color: #8A8F9E !important;
  font-size: 0.85rem;
}

/* ---------- 11. Regras de Responsividade ---------- */
@media (min-width: 769px) {
  .nav-toggle,
  .sidebar-mobile,
  .sidebar-overlay {
    display: none !important;
  }

  .header-figma .nav-links,
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
  }
}

@media (max-width: 768px) {
  .header-figma .nav-links,
  .nav-links {
    display: none !important;
  }

  .nav-toggle {
    display: inline-flex !important;
  }

  .cta__inner {
    flex-direction: column !important;
    text-align: center !important;
    padding: 2rem 1.5rem !important;
  }

  .cta__actions {
    justify-content: center !important;
    width: 100% !important;
  }

  .footer-viking__container {
    padding: 2rem 1rem 1.5rem 1rem !important;
  }

  .footer-viking__grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 2rem !important;
    padding-bottom: 1rem !important;
  }

  .footer-col {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .footer-col ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.6rem !important;
  }

  .footer-viking__bottom-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    text-align: center !important;
  }

  .footer-bottom-right {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
}

/* Layout Lado a Lado: Mapa (Esquerda) e Informações (Direita) */
.pontos-container-split {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.pontos-container-split .coluna-mapa,
.pontos-container-split .coluna-info {
  width: 100%;
}

@media (max-width: 850px) {
  .pontos-container-split {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
}