:root {
  --primary: #2196F3;
  --primary-dark: #1769aa;
  --accent: #FF9800;
  --bg: #F7F9FC;
  --text: #212121;
  --text-light: #6B7280;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.app-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;        /* pode subir um pouco */
  box-shadow: var(--shadow);
  overflow: visible;   /* 🔴 ESSENCIAL */
}


.app-bar h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.menu-btn {
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.2s;
}

.menu-btn:hover {
  transform: scale(1.1);
}

.drawer {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #fff;
  box-shadow: var(--shadow);
  transition: left 0.3s;
  z-index: 200;
  padding: 80px 20px;
  overflow-y: auto;
}

.drawer.show {
  left: 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  display: none;
}

.drawer.show ~ .drawer-overlay {
  display: block;
}

.drawer h3 {
  margin-bottom: 20px;
  color: var(--primary-dark);
  font-size: 16px;
}

.drawer a {
  display: block;
  margin: 12px 0;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.drawer a:hover {
  color: var(--primary);
}

.drawer-section {
  margin: 20px 0;
}

.drawer-section-title {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 8px;
}

.hero {
  text-align: center;
  padding: 28px 20px;   /* 🔽 REDUZ ALTURA DO “BALÃO” */
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 16px; /* 🔽 MENOS ESPAÇO ABAIXO */
}

.hero h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px; /* 🔽 menos respiro */
  color: var(--primary-dark);
}

.hero p {
  font-size: 15px;
  color: var(--text-light);
}

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  padding: 0 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: inline-block;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.posts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.posts-title {
  font-size: 22px;
  font-weight: 700;
  margin: 10px 0 20px;
  color: var(--primary-dark);
}

.post-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.post-title {
  font-size: 20px;
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.post-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

footer {
  background: #fff;
  padding: 30px 20px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.05);
}

footer p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
  margin: 8px 0;
}

footer strong {
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: 24px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}

@media (max-width: 480px) {
  .app-bar h1 {
    font-size: 18px;
  }

  .hero {
    padding: 22px 16px;
  }

  .hero h2 {
    font-size: 20px;
  }

  .card {
    padding: 16px 12px;
  }

  .card-icon {
    font-size: 28px;
  }

  .card-title {
    font-size: 14px;
  }
}
.card {
  position: relative; /* para posicionar a estrela */
}

/* botão de favorito (estrela) */
.fav-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  user-select: none;
  background: transparent;
  border: none;
}

.fav-btn:hover {
  opacity: 1;
}
/* ========== BUSCA GLOBAL ========== */

.search-wrapper {
  position: relative;
  width: 260px;
  margin-right: 12px;
}

#globalSearch {
  width: 100%;
  padding: 6px 12px;
  border-radius: 22px;
  border: none;
  outline: none;
  font-size: 14px;
}

.search-results {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
  max-height: 380px;
  overflow-y: auto;
  z-index: 9999;
}

.search-results.visible {
  display: block;
}

.search-item {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.search-item:hover {
  background: #f3f4f6;
}

.search-title {
  font-size: 14px;
  font-weight: 700;
}

.search-subtitle {
  font-size: 12px;
  color: #666;
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  transition: transform .15s ease, color .15s ease;
}

.fav-btn.active {
  color: #f59e0b; /* dourado */
}

.fav-btn:hover {
  transform: scale(1.15);
}
