/* ============ Reset & base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background: #f8fafc;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 48px 20px; }
.section-heading { margin-bottom: 28px; max-width: 640px; }
.section-heading h2 { font-size: 1.6rem; }
.section-heading p { color: #64748b; margin: 0; }

/* ============ Header ============ */
.site-header {
  background: #0f172a;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
}
.brand-icon { font-size: 1.4rem; }

.main-nav ul {
  display: flex;
  gap: 4px;
}
.main-nav a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.main-nav a:hover, .main-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: #fff;
  margin: 0 auto;
  border-radius: 2px;
}

/* ============ Hero ============ */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
  color: #fff;
  padding: 64px 20px 56px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 760px;
}
.hero-lead {
  color: #cbd5e1;
  max-width: 620px;
  font-size: 1.05rem;
  margin-bottom: 24px;
}
.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-cat-pill {
  border: 1.5px solid;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: .9rem;
  background: rgba(255,255,255,.05);
  transition: background .15s;
}
.hero-cat-pill:hover { background: rgba(255,255,255,.15); }

/* ============ Card grid ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
  transition: transform .15s, box-shadow .15s;
  border: 1px solid #e2e8f0;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15,23,42,.12);
}
.card-link { display: block; height: 100%; }
.card-media {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-icon { font-size: 2.6rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.card-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.badge-hot {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  color: #b45309;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}
.card-body { padding: 16px 18px 18px; }
.card-cat {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.card-title {
  font-size: 1.05rem;
  margin: 6px 0 8px;
}
.card-excerpt {
  color: #64748b;
  font-size: .9rem;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  display: inline-block;
  font-weight: 700;
  font-size: .88rem;
  color: #0f172a;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
}

/* ============ Category grid (home) ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.category-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--cat-color, #334155);
  border-radius: 14px;
  padding: 24px 20px;
  transition: transform .15s, box-shadow .15s;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,23,42,.1); }
.category-icon { font-size: 2.2rem; }
.category-card h3 { margin: 10px 0 8px; }
.category-card p { color: #64748b; font-size: .9rem; margin: 0 0 14px; }
.category-count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--cat-color, #334155);
}

/* ============ Category (list) hero ============ */
.category-hero {
  background: color-mix(in srgb, var(--cat-color, #334155) 12%, #fff);
  border-bottom: 1px solid #e2e8f0;
  padding: 44px 20px;
  text-align: left;
}
.category-hero-icon { font-size: 2.6rem; }
.category-hero h1 { color: var(--cat-color, #0f172a); margin-top: 8px; }
.category-hero p { color: #475569; max-width: 640px; margin: 0; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
  font-size: .9rem;
  color: #64748b;
}
.pagination a {
  font-weight: 700;
  color: #0f172a;
}

/* ============ Article page ============ */
.article-header {
  background: color-mix(in srgb, var(--cat-color, #334155) 10%, #fff);
  border-bottom: 1px solid #e2e8f0;
  padding: 32px 20px 40px;
}
.breadcrumb {
  font-size: .82rem;
  color: #64748b;
  margin-bottom: 14px;
}
.breadcrumb a:hover { text-decoration: underline; }
.article-cat-badge {
  display: inline-block;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--cat-color, #334155);
  margin-bottom: 12px;
}
.article-header h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); max-width: 800px; }
.article-excerpt { color: #475569; max-width: 720px; font-size: 1.05rem; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.article-hero-image {
  margin-top: -28px;
  margin-bottom: 8px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15,23,42,.15);
  max-width: 900px;
}
.article-hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.meta-chip {
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 600;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 20px;
  align-items: start;
}
.article-body { max-width: 720px; }
.article-body h2 { font-size: 1.3rem; margin-top: 1.6em; }
.article-body ul { list-style: disc; padding-left: 1.3em; margin: 1em 0; }
.article-body li { margin-bottom: .5em; }
.article-body p { margin: 1em 0; }
.article-body strong { color: #0f172a; }

.cta-box {
  margin-top: 32px;
  background: #0f172a;
  color: #fff;
  padding: 26px 26px 22px;
  border-radius: 14px;
}
.cta-box p { margin: 0 0 14px; color: #e2e8f0; }
.cta-button {
  display: inline-block;
  background: #f59e0b;
  color: #1e293b;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  transition: background .15s;
}
.cta-button:hover { background: #fbbf24; }
.cta-disclosure {
  font-size: .78rem;
  color: #94a3b8 !important;
  margin: 14px 0 0 !important;
}
.cta-secondary {
  font-size: .85rem;
  margin: 14px 0 0 !important;
}
.cta-secondary a { color: #cbd5e1; text-decoration: underline; }
.cta-secondary a:hover { color: #fff; }

.article-sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.pros-cons-box {
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
}
.pros-cons-box.pros { background: #f0fdf4; border-color: #bbf7d0; }
.pros-cons-box.cons { background: #fff7ed; border-color: #fed7aa; }
.pros-cons-box h3 { font-size: .95rem; margin-bottom: 10px; }
.pros-cons-box ul { list-style: none; padding: 0; }
.pros-cons-box li {
  font-size: .88rem;
  margin-bottom: 8px;
  padding-left: 1.1em;
  position: relative;
}
.pros-cons-box li::before { content: "—"; position: absolute; left: 0; opacity: .5; }

.related-section { border-top: 1px solid #e2e8f0; }

/* ============ Simple pages ============ */
.simple-page { max-width: 760px; }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose p { margin: 1em 0; }

/* ============ Footer ============ */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 48px 20px 32px;
}
.footer-brand { margin-bottom: 10px; }
.footer-col h3 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col p { color: #94a3b8; font-size: .9rem; }

.disclosure {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 20px 28px;
  font-size: .78rem;
  color: #64748b;
}
.disclosure .copyright { margin-top: 8px; }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .pros-cons-box { flex: 1 1 240px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #0f172a;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .main-nav.open { max-height: 400px; }
  .main-nav ul { flex-direction: column; padding: 8px 20px 16px; }
  .main-nav a { display: block; padding: 12px 10px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 44px 16px 40px; }
  .section { padding: 36px 16px; }
  .card-grid, .category-grid { grid-template-columns: 1fr; }
}
