:root {
  --ink: #151515;
  --muted: #5f6872;
  --line: #e8ebef;
  --paper: #ffffff;
  --soft: #f5f7f9;
  --brand: #2d64f5;
  --green: #0f8b6f;
  --gold: #ffbe3d;
  --coral: #ff775f;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}

a:hover {
  color: var(--brand);
}

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

.container-xl {
  max-width: 1280px;
}

.site-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 18px rgba(15, 23, 42, 0.06);
  z-index: 1020;
}

.navbar {
  min-height: 74px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: auto;
  height: 42px;
  object-fit: contain;
}

.footer-brand-logo {
  height: 38px;
}

.nav-link {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  padding-inline: 0.72rem !important;
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.header-search input,
.search-page-form input,
.newsletter-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.header-search input {
  padding: 9px 0 9px 15px;
  font-size: 0.9rem;
}

.header-search button {
  display: grid;
  width: 42px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.4rem;
}

.hero-section {
  padding: 42px 0 38px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(28px, 4vw, 58px);
  align-items: center;
}

.hero-image-wrap,
.card-image {
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
}

.hero-image-wrap img,
.card-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 320ms ease;
}

.hero-image-wrap:hover img,
.article-card:hover img {
  transform: scale(1.045);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.article-main h1,
.category-banner h1,
.search-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  font-weight: 800;
  line-height: 0.98;
}

.hero-content p,
.category-banner p,
.search-hero p {
  margin: 22px 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.byline,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.intro-band,
.muted-band {
  background: var(--soft);
}

.intro-band {
  padding: 34px 0;
  border-block: 1px solid var(--line);
}

.intro-grid,
.split-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.intro-grid h2,
.section-heading h2,
.split-feature h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
}

.intro-grid p,
.split-feature p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
}

.text-button,
.newsletter-form button,
.search-page-form button,
.share-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  padding: 0 20px;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.text-button:hover,
.newsletter-form button:hover,
.search-page-form button:hover,
.share-row button:hover {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 28px rgba(45, 100, 245, 0.22);
  transform: translateY(-1px);
}

.content-section {
  padding: clamp(44px, 7vw, 82px) 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading a {
  color: var(--brand);
  font-weight: 800;
}

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

.article-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.article-card:hover {
  border-color: rgba(45, 100, 245, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 3.1rem;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  min-height: 4.5rem;
  margin: 0 0 16px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--muted);
  font-size: 0.96rem;
}

.split-feature {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1fr);
}

.guide-list {
  display: grid;
  gap: 12px;
}

.guide-list a,
.sidebar-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.guide-list a:hover,
.sidebar-link:hover {
  border-color: rgba(45, 100, 245, 0.35);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.guide-list span,
.sidebar-link span {
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.newsletter-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: clamp(26px, 5vw, 52px);
}

.newsletter-block .eyebrow {
  color: var(--gold);
}

.newsletter-block h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
}

.newsletter-block p {
  margin: 14px 0 0;
  color: #cfd5df;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.newsletter-form input,
.search-page-form input {
  min-height: 48px;
  border-radius: 999px;
  background: #fff;
  padding: 0 16px;
}

.newsletter-form button {
  background: var(--gold);
  color: var(--ink);
}

.article-page {
  padding: 30px 0 70px;
}

.breadcrumb-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.article-main {
  max-width: 820px;
}

.article-subtitle {
  margin: 22px 0;
  color: var(--muted);
  font-size: 1.25rem;
}

.share-row {
  display: flex;
  gap: 10px;
  margin: 24px 0;
}

.share-row button {
  min-height: 38px;
  background: var(--soft);
  color: var(--ink);
}

.featured-image,
.article-content img {
  width: 100%;
  border-radius: 8px;
  background: var(--soft);
}

.article-content {
  margin-top: 34px;
  font-size: 1.08rem;
}

.article-content h2 {
  margin: 40px 0 12px;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.16;
}

.article-content p,
.article-content li {
  color: #303741;
}

.article-content blockquote {
  margin: 34px 0;
  border-left: 5px solid var(--brand);
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.28;
  padding-left: 22px;
}

.article-content ul {
  padding-left: 22px;
}

.article-sidebar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 22px;
}

.sidebar-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.sidebar-block h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
}

.sidebar-block .sidebar-link {
  border-inline: 0;
  border-radius: 0;
  box-shadow: none;
  padding-inline: 0;
}

.sidebar-block .sidebar-link:first-of-type {
  border-top: 0;
}

.article-sidebar .newsletter-block {
  grid-template-columns: 1fr;
  padding: 24px;
}

.article-sidebar .newsletter-form {
  grid-template-columns: 1fr;
}

.related-section {
  margin-top: 54px;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.category-banner,
.search-hero {
  padding: clamp(52px, 9vw, 104px) 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f5f7f9 0%, #eef6ff 100%);
}

.category-banner p {
  max-width: 760px;
}

.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination-wrap a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.pagination-wrap a.active,
.pagination-wrap a:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.search-page-form {
  display: flex;
  max-width: 700px;
  gap: 10px;
  margin-top: 24px;
}

.search-page-form input {
  border: 1px solid var(--line);
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: var(--soft);
  padding: 34px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-weight: 800;
}

.site-footer {
  background: #111318;
  color: #fff;
  padding: 56px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}

.footer-logo {
  color: #fff;
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 380px;
  color: #b9c0ca;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer a:not(.footer-logo) {
  display: block;
  color: #d9dee7;
  margin: 8px 0;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #a8b0bd;
  font-size: 0.88rem;
  padding-top: 20px;
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    padding: 18px 0 8px;
  }

  .header-search {
    width: 100%;
    margin-top: 12px;
  }

  .hero-grid,
  .intro-grid,
  .split-feature,
  .newsletter-block,
  .article-layout {
    grid-template-columns: 1fr;
  }

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

  .article-sidebar {
    position: static;
  }

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

@media (max-width: 640px) {
  .hero-section {
    padding-top: 26px;
  }

  .hero-content h1,
  .article-main h1,
  .category-banner h1,
  .search-hero h1 {
    font-size: 2.2rem;
  }

  .article-grid,
  .compact-grid,
  .newsletter-form,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .newsletter-block {
    padding: 24px;
  }

  .share-row {
    flex-wrap: wrap;
  }
}
