:root {
  --orange: #ff6500;
  --orange-dark: #e95700;
  --orange-soft: #fff3eb;
  --orange-soft-2: #fff8f3;

  --text: #101828;
  --text-soft: #667085;
  --muted: #98a2b3;

  --border: #eaecf0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;

  --shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 18px 50px rgba(16, 24, 40, 0.12);

  --radius-md: 16px;
  --radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

main {
  display: flex;
  flex-direction: column;
}

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

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  width: 100%;
  height: 92px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-content {
  width: min(1440px, calc(100% - 64px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
}

.brand-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
}

.nav-link {
  position: relative;
  color: #202939;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -22px;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: var(--orange);
}

.btn-open-ticket {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--orange);
  color: #ffffff;
  border-radius: 7px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(255, 101, 0, 0.22);
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-open-ticket:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.hero {
  min-height: 350px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 101, 0, 0.05), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fffefe 100%);
}

.hero-content {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 54px 0 42px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: 44px;
}

.hero-text {
  max-width: 560px;
  padding-left: 74px;
}

.hero-text h1 {
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -1.8px;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-text h1 span {
  display: block;
  color: var(--orange);
}

.hero-text p {
  color: #687085;
  font-size: 19px;
  line-height: 1.55;
  max-width: 540px;
  margin-bottom: 28px;
}

.search-box {
  width: min(540px, 100%);
  height: 58px;
  background: #ffffff;
  border: 1px solid #d6dbe6;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 8px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.04);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 0 12px;
  position: relative;
}

.search-icon {
  font-size: 22px;
  opacity: 0.7;
}

.search-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #7b8498;
}

.search-box button {
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  padding: 0 25px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-box button:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  background: #fff;
  border: 1px solid #d6dbe6;
  border-top: none;
  border-radius: 0 0 9px 9px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.1);
  z-index: 1000;
  display: none;
  max-height: 360px;
  overflow-y: auto;
}

.suggestions-dropdown.visible {
  display: block;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s;
}

.suggestion-item:not(:last-child) {
  border-bottom: 1px solid #f0f2f5;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: #f5f6fa;
}

.suggestion-title {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.suggestion-category {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--orange);
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-image {
  position: relative;
  min-height: 340px;
}

.orange-shape {
  position: absolute;
  right: 28px;
  top: 12px;
  width: 620px;
  max-width: 95%;
  height: 292px;
  border-radius: 48% 52% 55% 45% / 44% 48% 52% 56%;
  background: linear-gradient(135deg, #ffd9be 0%, #fff0e5 100%);
  transform: rotate(-3deg);
}

.mockup-card {
  position: absolute;
  right: 130px;
  top: 58px;
  width: 350px;
  height: 205px;
  background: #111827;
  border-radius: 14px 14px 8px 8px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 74px 1fr;
  padding: 10px;
  transform: rotate(7deg);
}

.mockup-card::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -22px;
  height: 26px;
  background: #293241;
  border-radius: 0 0 18px 18px;
  transform: perspective(180px) rotateX(22deg);
}

.mockup-sidebar {
  background: linear-gradient(180deg, var(--orange), #ff8b2d);
  border-radius: 8px 0 0 8px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.mockup-sidebar strong {
  color: #ffffff;
  font-size: 10px;
  margin-bottom: 6px;
}

.mockup-sidebar span {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.65);
}

.mockup-screen {
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  padding: 18px;
}

.mockup-header {
  width: 100%;
  height: 34px;
  border-radius: 6px;
  background: #ffffff;
  margin-bottom: 15px;
  box-shadow: inset 0 0 0 1px #edf0f5;
}

.mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mockup-chart,
.mockup-list {
  height: 98px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px #edf0f5;
}

.mockup-chart {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    conic-gradient(var(--orange) 0 40%, #dadde5 40% 72%, #ffb274 72% 100%);
  position: relative;
}

.chart-circle::after {
  content: "";
  position: absolute;
  inset: 16px;
  background: #ffffff;
  border-radius: 50%;
}

.mockup-list {
  padding: 18px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mockup-list span {
  height: 7px;
  border-radius: 99px;
  background: #e5e7eb;
}

.mockup-list span:nth-child(2),
.mockup-list span:nth-child(4) {
  width: 72%;
}

.chat-bubble {
  position: absolute;
  left: 40px;
  top: 58px;
  width: 86px;
  height: 66px;
  background: var(--orange);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 14px 30px rgba(255, 101, 0, 0.24);
}

.chat-bubble::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -8px;
  width: 22px;
  height: 22px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.chat-bubble span {
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
}

.plant-card {
  position: absolute;
  right: 20px;
  bottom: 42px;
  width: 82px;
  height: 62px;
  background: #ffffff;
  border-radius: 0 0 18px 18px;
  box-shadow: var(--shadow-sm);
}

.plant-card::before,
.plant-card::after,
.plant-card span::before {
  content: "";
  position: absolute;
  bottom: 52px;
  width: 24px;
  height: 54px;
  background: linear-gradient(180deg, #ff7b1a, #ef5b00);
  border-radius: 80% 0 80% 0;
  transform-origin: bottom center;
}

.plant-card::before {
  left: 20px;
  transform: rotate(-28deg);
}

.plant-card::after {
  left: 44px;
  transform: rotate(32deg);
}

.plant-card span::before {
  left: 32px;
  transform: rotate(8deg);
}

.search-section {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto 48px;
  padding-top: 40px;
  background: none;
  border-top: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scroll-margin-top: 110px;
}

.categories-section,
.article-layout {
  scroll-margin-top: 110px;
}

.categories-section {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto 12px;
  padding: 40px 0 16px;
  border-radius: var(--radius-lg);
  background: none;
}

.section-header {
  text-align: center;
  margin-bottom: 26px;
}

.section-header h2 {
  font-size: 24px;
  line-height: 1.25;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-header p {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 15px;
}

.categories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
}

.category-card {
  width: calc(25% - 7.5px);
  flex-shrink: 0;
  min-height: 112px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:hover,
.category-card.active {
  background: var(--orange-soft);
  border-color: rgba(255, 101, 0, 0.35);
  box-shadow: 0 12px 26px rgba(255, 101, 0, 0.15);
}

.category-card.active {
  transform: translateY(-2px);
}

.category-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-soft);
  color: var(--orange);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-card:hover .category-icon,
.category-card.active .category-icon {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #ffffff;
  transform: scale(1.05);
}

.category-icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.category-card strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 3px;
}

.category-card p {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.articles-status {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 22px;
  font-size: 15px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-topic-group {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-topic-group:has(.topic-articles-grid:not(.collapsed)) {
  grid-column: 1 / -1;
}

.topic-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(255, 101, 0, 0.12), rgba(255, 255, 255, 0.96) 45%),
    #ffffff;
  border-bottom: 1px solid var(--border);
}

.topic-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topic-marker {
  width: 10px;
  height: 44px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(255, 101, 0, 0.18);
}

.topic-header h3 {
  font-size: 18px;
  line-height: 1.2;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.topic-header p {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 14px;
  max-width: 720px;
}

.topic-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.topic-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 24px;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  min-height: 178px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--orange);
  box-shadow: 0 18px 38px rgba(255, 101, 0, 0.12);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.article-category,
.article-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.article-category {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.article-tag {
  background: #f2f4f7;
  color: #475467;
}

.article-card h3 {
  font-size: 18px;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 10px;
}

.article-card p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 18px;
}

.article-link {
  margin-top: auto;
  color: var(--orange);
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.benefits-bar {
  width: min(1440px, calc(100% - 64px));
  margin: 12px auto 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 101, 0, 0.08) 0%,
    var(--orange-soft) 40%,
    rgba(255, 243, 235, 0.5) 70%,
    transparent 100%
  );
  border: 1px solid var(--border);
  border-bottom: 2px solid rgba(255, 101, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.benefit-item > span {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-soft);
  border: 1.5px solid var(--orange);
  border-radius: 50%;
  font-size: 18px;
}

.benefit-item strong {
  color: var(--text);
  font-size: 14px;
}

.benefit-item p {
  color: var(--text-soft);
  font-size: 12px;
}

.footer {
  border-top: 3px solid var(--orange);
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  background: var(--orange-soft);
}

/* Página de artigo */
.article-page {
  background: #ffffff;
}

.article-layout {
  width: min(1100px, calc(100% - 64px));
  margin: 0 auto;
  padding: 42px 0 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 24px;
}

.article-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
  margin-bottom: 30px;
}

.article-header h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.article-header p {
  color: var(--text-soft);
  font-size: 16px;
}

.article-content {
  color: #1d2939;
  font-size: 17px;
  line-height: 1.75;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--text);
  line-height: 1.25;
  margin: 30px 0 14px;
}

.article-content h1 {
  font-size: 34px;
}

.article-content h2 {
  font-size: 28px;
}

.article-content h3 {
  font-size: 22px;
}

.article-content p {
  margin: 0 0 16px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 18px 22px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content a {
  color: var(--orange);
  font-weight: 700;
  text-decoration: underline;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 20px 0;
}

.article-content iframe {
  max-width: 100%;
  width: 100%;
  min-height: 420px;
  border-radius: 14px;
  border: 0;
  margin: 22px 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.article-content th {
  background: var(--bg-soft);
}

.loading-box,
.error-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

.error-box {
  color: #b42318;
  background: #fff7f7;
  border-color: #ffd1d1;
}

@media (max-width: 1200px) {
  .topbar {
    height: auto;
  }

  .topbar-content {
    padding: 18px 0;
    flex-wrap: wrap;
    display: flex;
  }

  .nav-menu {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 28px;
    padding-bottom: 5px;
  }

  .nav-link.active::after {
    bottom: -8px;
  }

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

  .hero-text {
    padding-left: 0;
    max-width: 720px;
  }

  .hero-image {
    min-height: 300px;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topic-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 18px 24px;
  }
}

@media (max-width: 820px) {
  .category-card {
    width: calc(50% - 5px);
  }
}

@media (max-width: 760px) {
  .topbar-content,
  .hero-content,
  .categories-section,
  .search-section,
  .benefits-bar,
  .article-layout {
    width: min(100% - 32px, 1440px);
  }

  .brand {
    min-width: auto;
  }

  .brand-logo {
    width: 145px;
  }

  .btn-open-ticket {
    padding: 11px 14px;
    font-size: 13px;
  }

  .hero-content {
    padding-top: 36px;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .search-box {
    height: auto;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .search-input-wrapper {
    min-height: 44px;
  }

  .search-box button {
    width: 100%;
  }

  .hero-image {
    display: none;
  }

  .category-card {
    width: 100%;
    min-height: auto;
  }

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

  .topic-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topic-header h3 {
    font-size: 21px;
  }

  .topic-articles-grid {
    padding: 18px;
  }

  .benefits-bar {
    padding: 16px;
    gap: 12px;
  }

  .article-content iframe {
    min-height: 260px;
  }
}

.youtube-embed {
  width: 100%;
  margin: 24px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.12);
  aspect-ratio: 16 / 9;
}

.youtube-embed iframe {
  width: 100%;
  height: 100%;
  min-height: unset;
  display: block;
  border: 0;
  margin: 0;
  border-radius: 0;
}

.hero-illustration {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  margin: 0;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-12px) scale(1.02); }
}

.topic-header {
  cursor: pointer;
  user-select: none;
}

.topic-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.topic-header-btn:hover {
  background: rgba(255, 101, 0, 0.1);
}

.topic-header-btn .chevron {
  transition: transform 0.25s ease;
}

.topic-header-btn.expanded .chevron {
  transform: rotate(180deg);
}

.topic-articles-grid.collapsed {
  display: none;
}

/* ============================= */
/* VOTE BOX */
/* ============================= */

.vote-box {
  margin-top: 40px;
  padding: 24px;
  background: var(--orange-soft);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border);
}

.vote-question {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 16px;
}

.vote-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.vote-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--bg);
}

.vote-btn--active {
  border-color: var(--orange);
  background: var(--orange);
  color: #ffffff;
}

.vote-btn--active:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #ffffff;
}

.vote-count {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* ============================= */
/* RELATED ARTICLES */
/* ============================= */

.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  gap: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-sm);
}

.related-category {
  display: inline-block;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.related-card-title {
  font-size: 15px;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.related-card-summary {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
}

@media (min-width: 560px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================= */
/* TOP ARTICLES */
/* ============================= */

.top-articles-section {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto 48px;
  padding-top: 40px;
  border-top: 3px solid var(--orange);
  background: linear-gradient(
    180deg,
    rgba(255, 101, 0, 0.08) 0%,
    var(--orange-soft) 40%,
    rgba(255, 243, 235, 0.5) 70%,
    transparent 100%
  );
  border-radius: var(--radius-lg);
}

.top-articles-section .section-header {
  margin-bottom: 28px;
}

.top-articles-grid {
  display: grid;
  gap: 16px;
}

.top-article-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.top-article-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-sm);
}

.top-article-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.top-article-rank--top3 {
  background: var(--orange);
  color: #ffffff;
}

.top-article-info {
  flex: 1;
  min-width: 0;
}

.top-article-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-article-info p {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}

.top-article-link {
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.top-article-link:hover {
  text-decoration: underline;
}

/* ============================= */
/* TOP ARTICLES — TOGGLE LAYOUT  */
/* ============================= */

.section-header .top-toggle-btn {
  margin-top: 16px;
}

.top-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.top-toggle-btn:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.top-articles-grid--compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.top-articles-grid--expanded {
  display: grid;
  gap: 16px;
}

.hidden {
  display: none !important;
}

.top-articles-grid--compact .top-article-card {
  align-items: flex-start;
  padding: 16px 20px;
  gap: 16px;
  border-color: var(--orange);
  box-shadow: 0 0 0 1px rgba(255, 101, 0, 0.2), 0 8px 24px rgba(255, 101, 0, 0.1);
}

.top-articles-grid--compact .top-article-rank {
  width: 44px;
  height: 44px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 3px 10px rgba(255, 101, 0, 0.3);
  flex-shrink: 0;
}

.top-articles-grid--compact .top-article-info h4 {
  font-size: 14px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.top-articles-grid--compact .top-article-summary {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  margin-bottom: 4px;
}

@media (max-width: 820px) {
  .top-articles-grid--compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-article-card {
    flex-wrap: wrap;
  }

  .top-article-info h4 {
    white-space: normal;
  }
}

@keyframes highlight-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 101, 0, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 101, 0, 0); }
}

.article-topic-group.highlight {
  animation: highlight-pulse 1s ease-in-out 3;
  border-color: var(--orange);
}

/* ============================= */
/* TOAST NOTIFICATIONS */
/* ============================= */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 9999;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 400px;
  word-break: break-word;
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
}

.toast--error { background: #e03e3e; }
.toast--success { background: #16a34a; }
.toast--info { background: #2563eb; }

/* ============================= */
/* WORD BREAK / OVERFLOW */
/* ============================= */

.article-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-content pre,
.article-content code {
  white-space: pre-wrap;
  word-break: break-all;
}

.article-card h3,
.article-card p {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ============================= */
/* SKELETON LOADING */
/* ============================= */

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.skeleton-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--bg);
}

.skeleton-line {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 12px;
}

.skeleton-line--short {
  width: 40%;
}

.skeleton-line--medium {
  width: 65%;
}

.skeleton-line--long {
  width: 85%;
}

.skeleton-line--tag {
  width: 70px;
  height: 22px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 4px;
}

.skeleton-title {
  height: 20px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 12px;
}

/* ============================= */
/* EMPTY STATE */
/* ============================= */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 15px;
  max-width: 400px;
  margin: 0 auto 20px;
}

.empty-state .suggested-search {
  display: inline-block;
  background: var(--orange-soft);
  color: var(--orange);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.empty-state .suggested-search:hover {
  background: var(--orange);
  color: #fff;
}

/* ============================= */
/* LOAD MORE */
/* ============================= */

.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-soft);
  background: var(--bg);
}

/* ============================= */
/* 404 PAGE */
/* ============================= */

.not-found-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.not-found-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
}

.not-found-hero {
  text-align: center;
  max-width: 560px;
  width: 100%;
  margin-bottom: 48px;
}

.not-found-code {
  font-size: 96px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.6;
}

.not-found-content h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.not-found-subtitle {
  font-size: 16px;
  color: var(--text-soft);
  margin-bottom: 28px;
  line-height: 1.6;
}

.not-found-content .search-box {
  margin: 0 auto;
}

.not-found-links {
  max-width: 820px;
  width: 100%;
  margin-bottom: 48px;
}

.not-found-links h2 {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}

.not-found-links .categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.not-found-links .category-card {
  padding: 14px;
  width: auto;
  min-height: auto;
  flex-shrink: 1;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: all 0.2s;
  cursor: pointer;
}

.not-found-links .category-card:hover {
  background: var(--orange-soft);
  border-color: rgba(255, 101, 0, 0.35);
  box-shadow: 0 12px 26px rgba(255, 101, 0, 0.15);
}

.not-found-help {
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.not-found-help h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.not-found-help p {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.not-found-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  transition: opacity 0.2s;
}

.not-found-whatsapp-btn:hover {
  opacity: 0.9;
}

/* ============================= */
/* NOT FOUND — ARTICLE ERROR */
/* ============================= */

.not-found-article-error {
  text-align: center;
  padding: 48px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.not-found-article-error .not-found-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.not-found-article-error h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.not-found-article-error p {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 24px;
  line-height: 1.6;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.not-found-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.not-found-btn--primary {
  background: var(--orange);
  color: #fff;
}

.not-found-btn--primary:hover {
  background: var(--orange-dark);
}

.not-found-btn--secondary {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
}

.not-found-btn--secondary:hover {
  border-color: var(--orange);
  color: var(--orange);
}

@media (max-width: 640px) {
  .not-found-code {
    font-size: 64px;
  }

  .not-found-content h1 {
    font-size: 22px;
  }

  .not-found-links .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.article-protected {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
  padding: 48px 32px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.protected-lock-icon {
  color: var(--orange);
  margin-bottom: 16px;
}

.protected-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.protected-description {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.protected-form {
  display: flex;
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}

.protected-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 15px;
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.protected-input:focus {
  border-color: var(--orange);
}

.protected-btn {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.2s;
}

.protected-btn:hover {
  background: var(--orange-dark);
}

.protected-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.protected-message {
  margin-top: 16px;
  font-size: 14px;
}

.protected-message.error {
  color: #dc3545;
}

.protected-message.success {
  color: #28a745;
}