/* ===========================
   Reset e variáveis
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green-dark:   #1a3a0a;
  --green-mid:    #25500f;
  --green-main:   #3b6d11;
  --green-hover:  #4a8020;
  --green-pale:   #eaf3de;
  --text-dark:    #1a2e0a;
  --text-mid:     #3d4a30;
  --text-muted:   #5a6b48;
  --border:       #d4dbc9;
  --white:        #ffffff;
  --gray-bg:      #f5f7f2;
  --shadow-sm:    0 2px 10px rgba(0,0,0,0.07);
  --shadow-md:    0 6px 28px rgba(0,0,0,0.11);
  --shadow-green: 0 4px 18px rgba(59,109,17,0.38);
  --shadow-dest:  0 6px 24px rgba(59,109,17,0.22);
  --radius:       12px;
  --t:            0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  background: var(--gray-bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; }

/* ===========================
   NAVBAR
=========================== */
.navbar {
  background: linear-gradient(90deg, #1a3a0a 0%, #2a5410 65%, #1e4a0c 100%);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  box-shadow: 0 2px 14px rgba(0,0,0,0.38);
  transition: background .3s ease, transform .3s ease;
}
.navbar.scrolled { background: #152e08; }

.nav-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 0 2rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo img { width: 44px; height: 44px; object-fit: contain; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-title { font-size: 14px; font-weight: 700; color: #fff; font-family: 'Merriweather', serif; letter-spacing: .02em; }
.nav-sub   { font-size: 8.5px; color: #8fc05a; letter-spacing: .08em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; }

.nav-pages {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(192, 221, 151, 0.3);
  margin: 0 10px;
}

.nav-link {
  padding: 7px 11px; color: #c8e0a0; font-size: 13px; font-weight: 500;
  border-radius: 7px; border: 1px solid transparent;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }

.nav-active {
  background: var(--green-main) !important;
  color: #fff !important;
  border: 1px solid #5a9030 !important;
}

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; flex-shrink: 0;
}
.nav-hamburger span { width: 22px; height: 2px; background: #c8e0a0; border-radius: 2px; display: block; }

.nav-mobile {
  display: none; flex-direction: column;
  background: #122808; padding: .5rem 1.5rem 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.nav-mobile.open { display: flex; }

.nav-mobile-pages {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-mobile-pages a {
  color: #c8e0a0; font-size: 14px; padding: 12px 4px; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.06);
}


/* Botão voltar MOBILE */
.mobile-back-btn {
  display: none; /* some no desktop */
  position: fixed;
  top: 70px;
  left: 12px;

  background: #25500f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  z-index: 999;
}

/* só aparece no mobile */
@media (max-width: 700px) {
  .mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
}

.nav-mobile-pages a:last-child { border-bottom: none; }
.nav-mobile-pages a:hover { color: #fff; }

.nav-mobile-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.nav-mobile-sections a {
  color: #a8c878; font-size: 13px; padding: 10px 4px; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav-mobile-sections a:last-child {
  border-bottom: none;
  color: #fff;
  background: #3b6d11;
  padding: 11px 14px;
  border-radius: 8px;
  text-align: center;
  margin-top: 6px;
  font-weight: 700;
}

.nav-mobile-sections a:hover { color: #fff; }



/* ===========================
   HERO
=========================== */
.hero {
  background: linear-gradient(135deg, #eaf2df 0%, #f0faf0 50%, #e6f4e0 100%);
  padding: 2.5rem 2rem 2rem;
  margin-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,109,17,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(59,109,17,0.15), transparent);
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
}

.hero-content { flex: 1; min-width: 0; }

.hero-eyebrow {
  font-size: 11px; font-weight: 600; color: var(--green-main);
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: .65rem;
  display: block;
}

.hero-title {
  font-family: 'Merriweather', serif; font-size: 48px; font-weight: 900;
  color: var(--text-dark); line-height: 1.1; margin-bottom: 1rem;
}

.hero-accent { color: var(--green-main); display: block; }

.hero-sub {
  font-size: 16px; color: var(--text-muted); line-height: 1.7;
  max-width: 480px;
}

.hero-emblem {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.bandeira-tg {
  width: 220px; height: 220px;
  object-fit: contain; display: block;
}

/* ===========================
   BUSCA
=========================== */
.search-area {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.6rem;
  width: 100%;
}

.search-box {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 6px 0 14px;
  height: 52px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t), box-shadow var(--t);
  overflow: hidden;
}

.search-box:focus-within {
  border-color: var(--green-main);
  box-shadow: 0 0 0 3px rgba(59,109,17,0.1);
}

.search-icon-left { flex-shrink: 0; margin-right: 10px; }

.search-input {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  border: none; outline: none;
  font-size: 15px; color: var(--text-dark);
  background: transparent;
  font-family: 'Source Sans 3', sans-serif;
}
.search-input::placeholder { color: #aab89a; }

.search-btn-green {
  width: 38px; height: 38px; min-width: 38px;
  background: var(--green-main);
  border: none; border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t); flex-shrink: 0;
}
.search-btn-green:hover { background: var(--green-hover); }

.cat-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 18px; height: 52px;
  background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text-mid);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  font-family: 'Source Sans 3', sans-serif;
  transition: border-color var(--t), background var(--t);
}
.cat-btn:hover { border-color: var(--green-main); background: var(--green-pale); }

.search-hint { font-size: 12px; color: var(--text-muted); padding-left: 2px; }

/* ===========================
   GRID DE CARDS
=========================== */
.main-section {
  max-width: 1240px;
  margin: 2rem auto;
  padding: 0 2rem;
  flex: 1;
  width: 100%;
}

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

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem 1.25rem;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
  opacity: 0; transform: translateY(28px);
}

.card.visible {
  animation: cardReveal 0.45s ease forwards;
}

@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(59,109,17,0.25);
  transform: translateY(-4px);
}

.card.destaque {
  border: 2px solid var(--green-main);
  box-shadow: var(--shadow-dest);
}
.card.destaque:hover {
  box-shadow: 0 8px 30px rgba(59,109,17,0.28);
  transform: translateY(-6px);
}

.destaque-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--green-main); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(59,109,17,0.3);
}

.card-icon-wrap {
  width: 62px; height: 62px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.85rem; flex-shrink: 0; overflow: hidden;
  box-shadow: 0 4px 14px rgba(59,109,17,.25);
}
.card.destaque .card-icon-wrap { width: 68px; height: 68px; }

.card-icon-wrap img {
  width: 36px; height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.card-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-dark); line-height: 1.35;
  margin-bottom: 0.45rem;
  font-family: 'Merriweather', serif;
}
.card.destaque .card-title { font-size: 16px; }

.card-desc {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 0.9rem; flex: 1;
}

.card-arrow {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-main); font-size: 16px;
  transition: background var(--t), border-color var(--t);
  flex-shrink: 0;
}
.card:hover .card-arrow {
  background: var(--green-pale);
  border-color: var(--green-main);
}

.empty-msg {
  grid-column: 1 / -1; text-align: center;
  padding: 3rem 0; color: var(--text-muted); font-size: 15px;
}

/* ===========================
   TELA DE DETALHE
=========================== */
.detail-section {
  display: none;
  max-width: 1240px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100%; flex: 1;
}
.detail-section.active { display: block; }

.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.22s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.detail-header {
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.detail-icon-wrap {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 4px 14px rgba(59,109,17,.3);
}
.detail-icon-wrap img {
  width: 32px; height: 32px; object-fit: contain;
  filter: brightness(0) invert(1);
}

.detail-title {
  font-size: 22px; font-weight: 900; color: var(--text-dark);
  font-family: 'Merriweather', serif; line-height: 1.3;
}

.detail-badge {
  display: inline-block; font-size: 11px;
  padding: 3px 12px; border-radius: 20px;
  background: var(--green-pale); color: var(--green-main);
  margin-top: 6px; font-weight: 600;
  border: 1px solid rgba(59,109,17,0.2);
  letter-spacing: .04em; text-transform: uppercase;
}

.detail-body { font-size: 15px; color: var(--text-mid); line-height: 1.85; }
.detail-body p  { margin-bottom: 0.9rem; }
.detail-body ul { padding-left: 1.4rem; margin-bottom: 0.9rem; }
.detail-body ul li { margin-bottom: 0.5rem; }
.detail-body strong { color: var(--text-dark); font-weight: 700; }
.detail-body em { font-style: italic; color: var(--green-main); }

.back-btn {
  margin-top: 2rem; padding: 12px 24px;
  background: var(--green-main); border: none; border-radius: 10px;
  cursor: pointer; font-size: 14px; font-weight: 700; color: #fff;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Source Sans 3', sans-serif;
  transition: background var(--t), transform .12s, box-shadow var(--t);
  box-shadow: var(--shadow-green);
}
.back-btn svg { flex-shrink: 0; transition: transform var(--t); }
.back-btn:hover { background: var(--green-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,109,17,.45); }
.back-btn:hover svg { transform: translateX(-3px); }
.back-btn:active { transform: scale(.97); }

/* ===========================
   SCROLL INDICATOR
=========================== */
.scroll-indicator {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding: 1rem 0 0.5rem;
  opacity: 1; transition: opacity 0.4s ease;
}
.scroll-indicator.hidden { opacity: 0; pointer-events: none; }

.scroll-label {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
}

.scroll-arrow {
  width: 32px; height: 32px;
  border: 1.5px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-main); background: var(--white);
  box-shadow: var(--shadow-sm);
  animation: bounceDown 1.8s ease-in-out infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ===========================
   FOOTER
=========================== */
.footer { background: #080f04; padding: 1.5rem 2rem; margin-top: auto; }
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: flex-start; gap: 0;
}
.footer-pages { display: flex; align-items: center; gap: 0; }
.footer-page-link {
  padding: 0 10px; color: #c8e0a0; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: color var(--t); white-space: nowrap;
}
.footer-page-link:hover { color: #fff; }
.footer-sep { color: #4a6a28; font-size: 13px; }
.footer-divider { width: 1px; height: 20px; background: rgba(192,221,151,0.3); margin: 0 15px; }
.footer-right { display: flex; align-items: center; }
.footer-copy { font-size: 12px; color: #4a6028; }

/* ===========================
   RESPONSIVO — ≤1100px
=========================== */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-title  { font-size: 40px; }
  .bandeira-tg { width: 180px; height: 180px; }
}

/* ===========================
   RESPONSIVO — ≤900px
=========================== */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title  { font-size: 34px; }
  .bandeira-tg { width: 160px; height: 160px; }
}

/* ===========================
   RESPONSIVO — ≤700px
=========================== */
@media (max-width: 700px) {
  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }

  .hero { padding: 2rem 1.25rem 1.5rem; }
  .hero-inner { flex-direction: column; align-items: flex-start; padding-bottom: 1.25rem; gap: 0; }
  .hero-emblem { display: none; }
  .hero-title  { font-size: 30px; line-height: 1.25; }
  .hero-title br { display: none; }
  .hero-sub    { font-size: 15px; margin-top: 0.75rem; }

  .main-section  { margin: 1.5rem auto; padding: 0 1.25rem; }
  .detail-section { padding: 0 1.25rem; }

  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .detail-card  { padding: 1.5rem; }
  .detail-title { font-size: 18px; }
  .back-btn { width: 100%; justify-content: center; }

  .footer { padding: 1rem 1.25rem; }
}

/* ===========================
   RESPONSIVO — ≤480px
=========================== */
@media (max-width: 480px) {
  .nav-inner { padding: 0 1rem; height: 58px; }
  .hero { margin-top: 58px; padding: 1.5rem 1rem 1.25rem; }
  .nav-title { font-size: 13px; }
  .nav-sub { display: none; }
  .nav-logo img { width: 36px; height: 36px; }

  .hero-title { font-size: 26px; }
  .hero-sub   { font-size: 14px; }
  .hero-eyebrow { font-size: 10px; }

  .search-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-box  { height: 48px; border-radius: 10px; width: 100%; }
  .search-input { font-size: 14px; }
  .cat-btn { width: 100%; justify-content: center; height: 46px; border-radius: 10px; }

  .main-section  { margin: 1.25rem auto; padding: 0 1rem; }
  .cards-grid    { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card          { padding: 1.1rem 0.75rem 1rem; }
  .card-icon-wrap { width: 50px; height: 50px; }
  .card.destaque .card-icon-wrap { width: 56px; height: 56px; }
  .card-icon-wrap img { width: 28px; height: 28px; }
  .card-title  { font-size: 13px; }
  .card-desc   { font-size: 12px; }

  .detail-section { margin: 1rem auto; padding: 0 1rem; }
  .detail-card    { padding: 1.25rem; }
  .detail-header  { flex-direction: column; align-items: flex-start; gap: 10px; }
  .detail-title   { font-size: 16px; }
  .detail-body    { font-size: 14px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: .6rem; }
}