/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2e7d32;
  --primary-light: #4caf50;
  --primary-dark: #1b5e20;
  --accent: #ff8f00;
  --text: #212121;
  --text-light: #555;
  --bg: #fafafa;
  --bg-card: #ffffff;
  --border: #e0e0e0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ===== HEADER ===== */
header {
  background: var(--primary-dark);
  color: #fff;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.5px;
  text-decoration: none !important;
}
.logo:hover { color: #fff !important; text-decoration: none !important; }
.logo span { color: #a5d6a7 !important; }
.logo:hover span { color: #a5d6a7 !important; }

nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
}

nav ul li a {
  color: #e8f5e9;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.2s;
}
nav ul li a:hover, nav ul li a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 70px 20px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 28px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(255,143,0,0.4);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,143,0,0.5);
  text-decoration: none;
  color: #fff;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 60px 0; }
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-light);
  margin-bottom: 36px;
  font-size: 1rem;
}

/* ===== GRID DE ARTIGOS ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.article-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
  display: block;
}

.card-body { padding: 20px; }

.card-category {
  display: inline-block;
  background: #e8f5e9;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #999;
}

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

/* ===== CATEGORIAS ===== */
.categories-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.categories-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
}
.categories-inner::-webkit-scrollbar { display: none; }

.cat-btn {
  white-space: nowrap;
  padding: 7px 18px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-btn:hover, .cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== SIDEBAR ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.sidebar { position: sticky; top: 84px; }

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f5e9;
}

.popular-list { list-style: none; }
.popular-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.popular-list li:last-child { border-bottom: none; }
.popular-list li a { color: var(--text); font-weight: 500; }
.popular-list li a:hover { color: var(--primary); text-decoration: none; }
.popular-list li span { display: block; color: #999; font-size: 0.78rem; margin-top: 2px; }

.newsletter-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form button {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--primary-dark); }

/* ===== ARTIGO INDIVIDUAL ===== */
.article-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 60px 20px 40px;
}
.article-header .container { max-width: 800px; }
.article-category-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.article-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  opacity: 0.85;
  flex-wrap: wrap;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
}

.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 36px 0 14px;
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}
.article-body p { margin-bottom: 18px; color: var(--text); }
.article-body ul, .article-body ol {
  margin: 0 0 18px 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--primary-dark); }

.article-body .tip-box {
  background: #e8f5e9;
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}
.article-body .tip-box p { margin: 0; color: var(--primary-dark); font-weight: 500; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: #f5f5f5;
  padding: 10px 20px;
  font-size: 0.82rem;
  color: var(--text-light);
}
.breadcrumb .container { max-width: 1100px; margin: 0 auto; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== PÁGINAS INTERNAS ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 50px 20px;
  text-align: center;
}
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.page-header p { opacity: 0.85; font-size: 1rem; }

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
}
.page-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 32px 0 12px;
}
.page-content p { margin-bottom: 16px; }
.page-content ul { margin: 0 0 16px 24px; }
.page-content li { margin-bottom: 8px; }

/* ===== CONTATO ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: var(--font);
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form button:hover { background: var(--primary-dark); }

.contact-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: #e8f5e9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-info-item h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.contact-info-item p { font-size: 0.88rem; color: var(--text-light); margin: 0; }

/* ===== SOBRE ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-img-placeholder {
  background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
  border-radius: var(--radius);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.value-icon { font-size: 2rem; margin-bottom: 12px; }
.value-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.value-card p { font-size: 0.85rem; color: var(--text-light); margin: 0; }

/* ===== FOOTER ===== */
footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 48px 20px 24px;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: #fff; font-size: 1.3rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; color: #aaa; }
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #aaa; font-size: 0.85rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #777;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: #aaa; }
.footer-bottom a:hover { color: #fff; }

/* ===== PAGINAÇÃO ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
}
.pagination a:hover, .pagination span.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ===== TAGS ===== */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tag {
  background: #f5f5f5;
  color: var(--text-light);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ===== RELATED ARTICLES ===== */
.related-section {
  background: #f5f5f5;
  padding: 48px 20px;
  margin-top: 48px;
}
.related-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ===== ALERT / SUCCESS ===== */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  display: none;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  nav ul { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary-dark); padding: 12px; }
  nav ul.open { display: flex; }
  nav { order: 3; }
  .menu-toggle { display: flex; order: 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .values-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 20px; }
  .articles-grid { grid-template-columns: 1fr; }
}

/* ===== BANNER DE COOKIES ===== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: #ddd;
  padding: 18px 24px;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  display: none;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s, transform 0.3s;
}
#cookie-banner.show { 
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-text {
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
  min-width: 260px;
}
.cookie-text a { color: #a5d6a7; text-decoration: underline; }
.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cookie-btn-accept {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.cookie-btn-accept:hover { background: var(--primary-light); }
.cookie-btn-reject {
  background: transparent;
  color: #aaa;
  border: 1px solid #555;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cookie-btn-reject:hover { border-color: #aaa; color: #fff; }

@media (max-width: 600px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .cookie-buttons { width: 100%; }
  .cookie-btn-accept, .cookie-btn-reject { flex: 1; text-align: center; }
}


/* ===== AUTHOR BOX ===== */
.author-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 40px auto;
  max-width: 800px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.author-img {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-light);
}

.author-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
}

.author-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .author-box {
    flex-direction: column;
    text-align: center;
  }
}
