:root {
  --brand-primary: #8b5cf6;
  --brand-secondary: #ec4899;
  --brand-accent: #0ea5e9;
  --bg-main: #f7fafc;
  --bg-card: #ffffff;
  --ink-strong: #0f172a;
  --ink-soft: #475569;
  --border-soft: #e2e8f0;
  --ok: #0f766e;
  --warn: #b45309;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--ink-strong);
  background:
    radial-gradient(900px 500px at 5% -10%, rgba(139, 92, 246, 0.2), transparent 60%),
    radial-gradient(900px 600px at 95% -10%, rgba(236, 72, 153, 0.12), transparent 58%),
    var(--bg-main);
  min-height: 100%;
}

a {
  color: inherit;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.1rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.25);
}

.nav-links {
  display: inline-flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-link {
  text-decoration: none;
  border: 1px solid var(--border-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.52rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  background: #fff;
}

.btn-link.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.hero {
  margin-top: 1.1rem;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 22px;
  padding: 1.8rem;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88)),
    linear-gradient(120deg, rgba(139, 92, 246, 0.18), rgba(14, 165, 233, 0.14));
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.07);
  animation: rise-in 0.45s ease-out;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

.hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  max-width: 72ch;
  font-size: 1.02rem;
}

.search-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr 180px 130px;
}

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

.search-grid input,
.search-grid select,
.search-grid button,
.comment-form input,
.comment-form select,
.comment-form textarea {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.74rem 0.82rem;
  background: #fff;
  width: 100%; /* garantir largura consistente */
  transition: border-color .12s ease, box-shadow .12s ease;
}

.search-grid button,
.action-btn {
  cursor: pointer;
  font-weight: 800;
  color: #fff;
  border: 0;
  background: linear-gradient(130deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 12px;
  padding: 0.62rem 0.9rem;
  box-shadow: 0 8px 20px rgba(13, 88, 166, 0.06);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.action-btn:active { transform: translateY(1px); }
.action-btn:focus { outline: 3px solid rgba(139,92,246,0.12); outline-offset: 2px; }

/* Ajustes específicos para o formulário de comentários */
.comment-form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr; /* empilhado por padrão para melhor legibilidade */
  align-items: start;
}

/* Em telas maiores usamos o layout em colunas (Nome | E-mail | Nota) */
@media (min-width: 980px) {
  .comment-form-grid {
    grid-template-columns: 1fr 1fr 160px;
    align-items: end;
    gap: 0.9rem;
  }
}

.comment-form-grid label,
.comment-text-wrap {
  display: block;
  font-size: 0.9rem;
  color: #475569;
}

.comment-form-grid input,
.comment-form-grid select,
.comment-form textarea {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 12px;
}

.comment-form-grid select {
  padding-right: 2.4rem; /* espaço para o caret */
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.35) 50%), linear-gradient(135deg, rgba(255,255,255,0.35) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.comment-text-wrap textarea {
  min-height: 160px; /* textarea maior para visualização adequada */
  resize: vertical;
  padding: 0.85rem;
}

.comment-form-footer {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.comment-form-footer .small-muted { flex: 1 1 auto; }
.comment-form-footer .action-btn { margin-left: auto; }

.comment-form input:focus,
.comment-form select:focus,
.comment-form textarea:focus { border-color: rgba(139,92,246,0.45); box-shadow: 0 6px 18px rgba(99,102,241,0.06); }

.comment-card { padding: 0.9rem; border-radius: 12px; }
.comment-card p { margin: 0.45rem 0 0; color: var(--ink-soft); line-height: 1.6; }

/* ajuste responsivo fino */
@media (max-width: 560px) {
  .comment-form-footer { justify-content: flex-end; }
}

.starter-section,
.tracks-section {
  margin-top: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.starter-head h2,
.tracks-section h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.starter-head p {
  margin: 0.35rem 0 0.1rem;
  color: #64748b;
}

.starter-grid,
.tracks-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.starter-card,
.track-card {
  text-decoration: none;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(145deg, #fff, #f8fafc);
}

.starter-card h3,
.track-card h3 {
  margin: 0.3rem 0 0.28rem;
  font-size: 1rem;
}

.starter-card p,
.track-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.starter-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.52rem;
  font-size: 0.72rem;
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.08);
}

.journey-section,
.updates-section,
.ai-search-section {
  margin-top: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.journey-head h2,
.updates-head h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.ai-search-head h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.journey-head p {
  margin: 0.35rem 0 0.1rem;
  color: #64748b;
}

.ai-search-head p {
  margin: 0.35rem 0 0.15rem;
  color: #64748b;
}

.journey-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.journey-card {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0.9rem;
  background: linear-gradient(155deg, #fff, #f8fafc);
}

.journey-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  color: #0f766e;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(15, 118, 110, 0.25);
}

.journey-card h3 {
  margin: 0.4rem 0 0.35rem;
  font-size: 1rem;
}

.journey-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.journey-card a {
  margin-top: 0.7rem;
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  color: #6d28d9;
}

.updates-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.updates-head a {
  font-size: 0.84rem;
  color: #6d28d9;
  text-decoration: none;
  font-weight: 700;
}

.updates-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.updates-item {
  text-decoration: none;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.68rem 0.75rem;
  background: #fff;
  display: grid;
  gap: 0.12rem;
}

.updates-item span {
  font-size: 0.78rem;
  color: #64748b;
}

.updates-item strong {
  font-size: 0.95rem;
}

.ai-search-tags {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill.ai-pill {
  text-decoration: none;
  border-color: rgba(14, 165, 233, 0.25);
  background: rgba(14, 165, 233, 0.08);
  color: #0c4a6e;
}

.content-grid {
  margin-top: 1.15rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 340px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.list-head h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.list-head span {
  font-size: 0.87rem;
  color: #64748b;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

.post-card {
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.post-card h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.post-card p {
  color: var(--ink-soft);
  margin: 0.52rem 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.65rem;
}

.pill {
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border-soft);
  font-size: 0.78rem;
  color: #334155;
  background: #fff;
}

.pill.rating {
  border-color: rgba(180, 83, 9, 0.25);
  color: var(--warn);
  background: rgba(251, 191, 36, 0.14);
}

.card-side {
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.card-side h3 {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.6rem 0.68rem;
  margin-bottom: 0.5rem;
  background: #fff;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-item p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  line-height: 1.58;
}

.article-wrap {
  margin-top: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.article-main {
  padding: 1.4rem 1.5rem;
}

.article-main h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4.2vw, 2.45rem);
  letter-spacing: -0.025em;
}

.article-main h2,
.article-main h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.article-main p,
.article-main li {
  color: var(--ink-soft);
  line-height: 1.68;
}

.article-main figure {
  margin: 0.9rem 0;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.article-main figure img {
  width: 100%;
  height: auto;
  display: block;
}

.article-main figcaption {
  font-size: 0.84rem;
  color: #64748b;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--border-soft);
}

.guide-note {
  border: 1px solid rgba(15, 118, 110, 0.28);
  background: rgba(45, 212, 191, 0.12);
  color: #134e4a;
  border-radius: 14px;
  padding: 0.75rem;
}

.comments-block {
  margin-top: 1.15rem;
  border-top: 1px solid var(--border-soft);
  padding-top: 1rem;
}

.comments-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.comments-top h2 {
  margin: 0;
}

.comment-stats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.comments-tools {
  margin: 0.65rem 0 0.8rem;
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pill.is-active {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.08);
  color: #6d28d9;
}

.comment-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
  background: #fff;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.comment-form {
  border: 1px solid var(--border-soft);
  background: #fff;
  border-radius: 14px;
  padding: 0.9rem;
}

.comment-form-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr 1fr 130px;
}

.comment-form-grid label,
.comment-text-wrap {
  display: block;
  font-size: 0.85rem;
  color: #475569;
}

.comment-form-grid label input,
.comment-form-grid label select,
.comment-text-wrap textarea {
  margin-top: 0.3rem;
}

.comment-form textarea {
  min-height: 105px;
  resize: vertical;
}

.comment-form-footer {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.comments-list {
  margin-top: 0.9rem;
}

.comment-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.comment-stars {
  color: #b45309;
  letter-spacing: 0.03em;
}

.comment-alert {
  margin-bottom: 0.7rem;
}

.comment-alert-error {
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(254, 202, 202, 0.55);
  color: #7f1d1d;
}

.small-muted {
  color: #64748b;
  font-size: 0.86rem;
}

.footer {
  margin-top: 1.6rem;
  border-top: 1px solid var(--border-soft);
  padding: 1.25rem 0 2rem;
  color: #64748b;
}

@media (max-width: 980px) {
  .starter-grid,
  .tracks-grid,
  .journey-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .comment-form-grid,
  .search-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero,
  .article-main {
    padding: 1rem;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7rem 0;
  }
}
