/* ==========================================================================
   GadgetDealFinder — main stylesheet
   Clean, editorial tech-review layout. Fully responsive.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-card: #ffffff;
  --text: #0f1729;
  --text-body: #2b3648;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-soft: #ecfdf5;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --tag-bg: #eef2ff;
  --tag-text: #4338ca;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif Pro', Georgia, 'Times New Roman', serif;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 41, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 41, 0.06);

  --container: 1180px;
  --container-narrow: 780px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* Screen-reader only — visible to a11y tools, invisible visually */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-query-heading {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 18px;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 16px 0;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  margin-right: auto;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 32px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.nav-primary {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-primary a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.nav-primary a:hover {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

/* Compact search box in header (all pages) */

.header-search {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.header-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.header-search-input {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: transparent;
  width: 160px;
  min-width: 0;
}

.header-search-input::placeholder {
  color: var(--text-muted);
}

.header-search-button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.header-search-button:hover {
  background: var(--accent-hover);
}

/* ==========================================================================
   Category strip (sub nav)
   ========================================================================== */

.cat-strip {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.cat-strip-inner {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-strip-inner::-webkit-scrollbar {
  display: none;
}

.cat-strip-inner a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 4px 0;
}

.cat-strip-inner a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ==========================================================================
   Search hero (prominent search box on homepage + results page)
   ========================================================================== */

.search-hero {
  padding: 48px 0 8px;
}

.search-hero-results {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
}

.search-form {
  display: flex;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.search-form:focus-within {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
  border-color: var(--accent);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 18px 22px;
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0 36px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.search-button:hover {
  background: var(--accent-hover);
}

/* Search results page */

.search-page-header {
  border-bottom: 1px solid var(--border);
}

.search-results-section {
  min-height: 400px;
}

.search-results-slot {
  min-height: 300px;
  padding: 40px 20px;
  background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.search-results-placeholder {
  font-size: 15px;
  color: var(--text-muted);
}

/* In-body search CTA (article and category pages) */

.search-cta {
  margin: 40px 0 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #f0fdfa 100%);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: var(--radius-lg);
}

.search-cta-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  align-items: center;
}

.search-cta-heading h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.search-cta-heading p {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.search-form-inline {
  margin: 0;
  max-width: none;
}

.search-form-inline .search-input {
  padding: 12px 16px;
  font-size: 15px;
}

.search-form-inline .search-button {
  padding: 0 20px;
  font-size: 12px;
}

@media (max-width: 700px) {
  .search-cta {
    padding: 20px;
  }
  .search-cta-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .search-hero {
    padding: 24px 0 4px;
  }
  .search-input {
    padding: 14px 16px;
    font-size: 16px;
  }
  .search-button {
    padding: 0 20px;
    font-size: 13px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 48px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.hero-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-featured:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.hero-featured img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.hero-featured-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.hero-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-featured-withimg {
  display: flex;
  flex-direction: column;
}

.hero-featured-withimg .hero-featured-body {
  padding: 28px 32px;
}

.hero-featured-textonly {
  border-left: 6px solid var(--accent);
  min-height: 320px;
  display: flex;
  align-items: center;
}

.hero-featured-textonly .hero-featured-body {
  width: 100%;
  padding: 40px 44px;
}

.hero-featured-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hero-featured-body {
  padding: 28px;
}

.hero-featured h1 {
  font-size: 32px;
  line-height: 1.2;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-featured p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.hero-secondary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-secondary-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  color: var(--text);
}

.hero-secondary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hero-secondary-item:hover {
  text-decoration: none;
}

.hero-secondary-item .cat-tag {
  margin-bottom: 8px;
}

.hero-secondary-item h3 {
  font-size: 17px;
  line-height: 1.35;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-secondary-item:hover h3 {
  color: var(--accent);
}

/* ==========================================================================
   Tags & badges
   ========================================================================== */

.cat-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
}

.deal-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
}

/* ==========================================================================
   Section headers
   ========================================================================== */

.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--text);
  padding-bottom: 12px;
}

.section-head h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-head a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.section-head a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Article grid
   ========================================================================== */

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

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

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: var(--text-body);
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
  text-decoration: none;
}

/* Text-only card variant (no image) — distinguishes via left border color */
.article-card-textonly {
  border-left: 4px solid var(--accent);
  padding: 4px 0;
}

.article-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.article-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.article-card-withimg:hover .article-card-img img {
  transform: scale(1.03);
}

.article-card-body {
  padding: 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-textonly .article-card-body {
  padding: 24px 26px;
}

.article-card .cat-tag {
  margin-bottom: 12px;
  align-self: flex-start;
}

.article-card h3 {
  font-size: 18px;
  line-height: 1.35;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.article-card-textonly h3 {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 12px;
}

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

.article-card:hover h3 {
  color: var(--accent);
}

.article-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Article page (single post) — 2-column with sidebar
   ========================================================================== */

.article-page {
  padding: 40px 0 60px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-header {
  margin-bottom: 32px;
}

.article-header .cat-tag {
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 36px;
  line-height: 1.15;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.article-header .article-meta {
  border: none;
  padding-top: 0;
  font-size: 14px;
  gap: 10px;
}

.article-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16 / 9;
}

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

.article-body {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-body);
}

.article-body h2 {
  font-family: var(--font-sans);
  font-size: 26px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 40px 0 16px;
}

.article-body h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  color: var(--text);
  font-weight: 700;
  margin: 28px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
}

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

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text);
}

.ai-disclaimer {
  margin-top: 40px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   Category colors — used for hero banners and card accents
   ========================================================================== */

.article-card-textonly[data-cat="deals"],
.hero-featured-textonly[data-cat="deals"] { border-left-color: #059669; }

.article-card-textonly[data-cat="smartphones"],
.hero-featured-textonly[data-cat="smartphones"] { border-left-color: #2563eb; }

.article-card-textonly[data-cat="laptops"],
.hero-featured-textonly[data-cat="laptops"] { border-left-color: #6366f1; }

.article-card-textonly[data-cat="smart-home"],
.hero-featured-textonly[data-cat="smart-home"] { border-left-color: #0d9488; }

.article-card-textonly[data-cat="audio"],
.hero-featured-textonly[data-cat="audio"] { border-left-color: #d97706; }

.article-card-textonly[data-cat="gaming"],
.hero-featured-textonly[data-cat="gaming"] { border-left-color: #e11d48; }

.article-card-textonly[data-cat="wearables"],
.hero-featured-textonly[data-cat="wearables"] { border-left-color: #7c3aed; }

/* Gradient hero banner on article pages */

.article-hero-color {
  position: relative;
  aspect-ratio: 4 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  padding: 0 44px;
  color: #fff;
}

.article-hero-color[data-cat="deals"] {
  background: linear-gradient(135deg, #059669 0%, #065f46 100%);
}
.article-hero-color[data-cat="smartphones"] {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
}
.article-hero-color[data-cat="laptops"] {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
}
.article-hero-color[data-cat="smart-home"] {
  background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
}
.article-hero-color[data-cat="audio"] {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
}
.article-hero-color[data-cat="gaming"] {
  background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
}
.article-hero-color[data-cat="wearables"] {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

/* Subtle geometric pattern overlay */
.article-hero-color::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,0.08) 0%, transparent 40%),
    radial-gradient(circle at 75% 70%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}

.article-hero-color-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article-hero-color-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.75);
}

.article-hero-color-name {
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}

.article-hero-color-mark {
  position: absolute;
  bottom: 20px;
  right: 24px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 700px) {
  .article-hero-color {
    aspect-ratio: 3 / 1;
    padding: 0 24px;
  }
  .article-hero-color-name {
    font-size: 26px;
  }
}

/* Sidebar */

.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-block {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-heading {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--text);
}

.sidebar-related-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-article {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  color: var(--text-body);
  align-items: start;
}

.sidebar-article-textonly {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-article-textonly:last-child {
  border-bottom: none;
}

.sidebar-article:hover {
  text-decoration: none;
}

.sidebar-article img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius-sm);
}

.sidebar-article-img {
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.sidebar-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

.sidebar-article-body .cat-tag {
  font-size: 9px;
  padding: 2px 7px;
  margin-bottom: 6px;
  display: inline-block;
}

.sidebar-article-body h4 {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sidebar-article:hover h4 {
  color: var(--accent);
}

.sidebar-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-cat-list li {
  border-bottom: 1px solid var(--border);
}

.sidebar-cat-list li:last-child {
  border-bottom: none;
}

.sidebar-cat-list a {
  display: block;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-body);
  font-weight: 500;
}

.sidebar-cat-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.sidebar-cat-list a.active {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   Static pages (about, privacy, etc.)
   ========================================================================== */

.static-page {
  padding: 48px 0 60px;
}

.static-page h1 {
  font-size: 36px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.static-page .last-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.static-page h2 {
  font-size: 22px;
  color: var(--text);
  font-weight: 700;
  margin: 32px 0 12px;
}

.static-page h3 {
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
  margin: 24px 0 10px;
}

.static-page p {
  margin-bottom: 16px;
  color: var(--text-body);
}

.static-page ul {
  margin: 0 0 16px 22px;
  color: var(--text-body);
}

.static-page li {
  margin-bottom: 6px;
}

.static-page address {
  font-style: normal;
  padding: 16px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin: 12px 0 20px;
  line-height: 1.7;
}

/* ==========================================================================
   Category page header
   ========================================================================== */

.cat-header {
  padding: 40px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.cat-header .cat-tag {
  margin-bottom: 12px;
}

.cat-header h1 {
  font-size: 36px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cat-header p {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 620px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #0f1729;
  color: #cbd5e1;
  padding: 56px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 14px;
}

.footer-brand .brand-mark {
  background: #fff;
  color: #0f1729;
}

.footer-tagline {
  font-size: 14px;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.55;
}

.footer-col h5 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #94a3b8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .article-sidebar {
    position: static;
    grid-row: 2;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-featured h1 {
    font-size: 26px;
  }
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-grid.two-col {
    grid-template-columns: 1fr;
  }
  .article-header h1 {
    font-size: 30px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-search-input {
    width: 120px;
  }
}

@media (max-width: 640px) {
  .nav-primary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 0;
    z-index: 20;
  }
  .nav-primary.open {
    display: flex;
  }
  .nav-primary a {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-primary a:last-child {
    border-bottom: none;
  }
  .nav-toggle {
    display: block;
  }
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 12px;
  }
  .header-search {
    order: 3;
    width: 100%;
    max-width: none;
  }
  .header-search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
  }
  .header-search-button {
    padding: 0 16px;
  }
  .site-header {
    position: relative;
  }
  .hero {
    padding: 24px 0;
  }
  .hero-featured-body {
    padding: 20px;
  }
  .hero-featured h1 {
    font-size: 22px;
  }
  .article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .section {
    padding: 28px 0;
  }
  .article-header h1 {
    font-size: 26px;
  }
  .article-body {
    font-size: 17px;
  }
  .article-body h2 {
    font-size: 22px;
  }
  .static-page h1 {
    font-size: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
