/* Article listing and detail page styles */
/* =========================
   Guides / Articles Pages
========================= */

.articles-page,
.article-page {
  background: #f5f8fc;
  margin-top: 78px;
}

.guides-hero,
.article-hero {
  background:
    linear-gradient(120deg, rgba(0, 46, 110, 0.96), rgba(0, 46, 110, 0.72)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: #fff;
  padding: 78px 0 72px;
}

.guides-hero .container,
.article-hero-grid {
  display: grid;
  gap: 32px;
}

.guides-hero h1,
.article-hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  font-weight: 800;
  line-height: 1.04;
  margin: 12px 0 16px;
  max-width: 880px;
}

.guides-hero p,
.article-hero p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.06rem;
  max-width: 760px;
}

.article-hero-actions,
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-hero-actions {
  margin-top: 24px;
}

.article-hero-actions a,
.article-back-link,
.article-meta-row span {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  text-decoration: none;
}

.article-hero-actions a {
  background: #ffdc00;
  color: #002e6e;
  min-height: 42px;
  padding: 0 15px;
}

.article-hero-actions a + a {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.article-back-link {
  color: #ffdc00;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.article-meta-row {
  margin-top: 22px;
}

.article-meta-row span {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.84rem;
  min-height: 36px;
  padding: 0 13px;
}

.article-hero-grid {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.article-hero-grid img {
  aspect-ratio: 4 / 3;
  border: 6px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  object-fit: cover;
  width: 100%;
}

.article-browser-section {
  background: #f5f8fc;
}

.article-browser-section > .container,
.article-page > .section > .container {
  max-width: none;
  width: 100%;
  padding-left: clamp(20px, 3vw, 48px);
  padding-right: clamp(20px, 3vw, 48px);
}

.article-toolbar {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  margin-bottom: 18px;
}

.article-search {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  min-height: 50px;
  padding: 0 14px;
}

.article-search i {
  align-self: center;
  color: #f39c12;
}

.article-search input {
  border: 0;
  color: #172335;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.article-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.article-category-tabs button {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  color: #002e6e;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 38px;
  padding: 0 13px;
}

.article-category-tabs button.active,
.article-category-tabs button:hover,
.article-category-tabs button:focus-visible {
  background: #002e6e;
  border-color: #002e6e;
  color: #fff;
  outline: none;
}

.article-results-bar {
  align-items: center;
  color: #607086;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.article-results-bar strong {
  color: #002e6e;
}

.guide-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card,
.related-article-card {
  background: #fff;
  border: 1px solid rgba(0, 46, 110, 0.09);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 46, 110, 0.08);
  color: inherit;
  overflow: hidden;
  text-decoration: none;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.guide-card:hover,
.guide-card:focus-visible,
.related-article-card:hover,
.related-article-card:focus-visible {
  box-shadow: 0 22px 48px rgba(0, 46, 110, 0.14);
  outline: none;
  transform: translateY(-4px);
}

.guide-card img {
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  width: 100%;
}

.guide-card-body {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.guide-card-body span,
.related-article-card span {
  color: #f39c12;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-card-body h3,
.related-article-card h3 {
  color: #002e6e;
  font-size: 1.15rem;
  line-height: 1.35;
}

.guide-card-body p {
  color: #536174;
  font-size: 0.93rem;
}

.guide-card-meta {
  align-items: center;
  border-top: 1px solid #edf2f7;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 14px;
}

.guide-card-meta small {
  color: #607086;
  font-weight: 800;
}

.guide-card-meta strong {
  color: #002e6e;
  font-size: 0.84rem;
}

.article-empty-state,
.article-loading-state,
.article-not-found {
  color: #607086;
  font-weight: 700;
  padding: 42px 18px;
  text-align: center;
}

.article-empty-state i,
.article-loading-state i,
.article-not-found i {
  color: #f39c12;
  font-size: 2rem;
  margin-bottom: 12px;
}

.article-not-found {
  margin-top: 78px;
  min-height: 60vh;
  padding-top: 120px;
}

.article-not-found h1 {
  color: #002e6e;
}

.article-not-found a {
  background: #002e6e;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  margin-top: 18px;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.article-layout {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.article-content,
.article-sidebar {
  background: #fff;
  border: 1px solid rgba(0, 46, 110, 0.09);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 46, 110, 0.08);
}

.article-body {
  padding: 34px;
}

.article-body h2 {
  color: #002e6e;
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 30px 0 12px;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body p {
  color: #38465a;
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
  display: grid;
  gap: 9px;
  margin: 14px 0 22px;
  padding-left: 24px;
}

.article-body li {
  color: #38465a;
  line-height: 1.75;
}

.article-rich-image,
.article-rich-block,
.article-checklist,
.article-table-block,
.article-formula,
.article-cta-block,
.article-quote {
  margin: 30px 0;
}

.article-rich-image {
  background: #f7faff;
  border: 1px solid #e2eaf5;
  border-radius: 10px;
  overflow: hidden;
}

.article-rich-image img {
  aspect-ratio: 16 / 8.5;
  display: block;
  object-fit: cover;
  width: 100%;
}

.article-rich-image figcaption {
  color: #607086;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 12px 16px;
}

.article-video {
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 10px;
  overflow: hidden;
}

.article-video iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.article-checklist {
  background: #f7faff;
  border: 1px solid #e2eaf5;
  border-radius: 10px;
  padding: 22px;
}

.article-checklist ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin-bottom: 0;
  padding-left: 0;
}

.article-checklist li {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.article-checklist i {
  align-items: center;
  background: #e8f7ef;
  border-radius: 50%;
  color: #136c3a;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 0.76rem;
  height: 24px;
  justify-content: center;
  margin-top: 2px;
  width: 24px;
}

.article-table-scroll {
  border: 1px solid #e2eaf5;
  border-radius: 10px;
  overflow: auto;
}

.article-table-block table {
  border-collapse: collapse;
  min-width: 560px;
  width: 100%;
}

.article-table-block th,
.article-table-block td {
  border-bottom: 1px solid #edf2f7;
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

.article-table-block th {
  background: #002e6e;
  color: #fff;
  font-size: 0.86rem;
}

.article-table-block td {
  color: #38465a;
  font-size: 0.92rem;
  font-weight: 600;
}

.article-formula {
  background: #002e6e;
  border-radius: 10px;
  color: #fff;
  padding: 24px;
}

.article-formula h2,
.article-formula p {
  color: inherit;
}

.article-formula strong {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffdc00;
  display: block;
  font-size: 1.2rem;
  margin: 12px 0;
  padding: 16px;
}

.article-quote {
  border-left: 4px solid #f39c12;
  color: #24364f;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.65;
  padding: 6px 0 6px 18px;
}

.article-cta-block {
  align-items: center;
  background: #fff9e8;
  border: 1px solid #f4ca64;
  border-radius: 10px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 22px;
}

.article-cta-block.document {
  background: #f7faff;
  border-color: #dbe4ef;
}

.article-cta-block h2,
.article-cta-block p {
  margin: 0;
}

.article-cta-block a {
  background: #002e6e;
  border-radius: 7px;
  color: #fff;
  flex: 0 0 auto;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 15px;
  text-decoration: none;
}

.article-sidebar {
  display: grid;
  gap: 12px;
  padding: 22px;
  position: sticky;
  top: 100px;
}

.article-sidebar h3 {
  color: #002e6e;
}

.article-sidebar a {
  align-items: center;
  background: #f7faff;
  border: 1px solid #e2eaf5;
  border-radius: 7px;
  color: #002e6e;
  display: inline-flex;
  font-weight: 800;
  gap: 9px;
  min-height: 42px;
  padding: 0 13px;
  text-decoration: none;
}

.article-sidebar a:hover,
.article-sidebar a:focus-visible {
  background: #002e6e;
  color: #fff;
  outline: none;
}

.article-sidebar-note {
  background: #fff9e8;
  border: 1px solid #f4ca64;
  border-radius: 8px;
  color: #5c4b00;
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 14px;
}

.article-sidebar-note span {
  font-size: 0.84rem;
  font-weight: 700;
}

.related-articles-section {
  background: #fff;
}

.related-article-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.related-article-card {
  display: grid;
  gap: 9px;
  padding-bottom: 18px;
}

.related-article-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.related-article-card span,
.related-article-card h3 {
  padding: 0 18px;
}

@media (max-width: 1180px) {
  .articles-page,
  .article-page {
    margin-top: 66px;
  }

  .guides-hero,
  .article-hero {
    padding: 58px 0 52px;
  }

  .guides-hero .container,
  .article-hero-grid {
    gap: 24px;
  }

  .guides-hero h1,
  .article-hero h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    max-width: 760px;
  }

  .article-toolbar {
    grid-template-columns: 1fr;
  }

  .article-category-tabs {
    justify-content: flex-start;
  }

  .guide-grid,
  .related-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-hero-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-hero-grid img {
    max-height: 360px;
  }

  .article-sidebar {
    position: static;
  }
}

@media (hover: none) and (pointer: coarse) {
  .articles-page,
  .article-page {
    margin-top: 66px;
    width: 100%;
  }

  .guides-hero,
  .article-hero,
  .article-browser-section,
  .related-articles-section {
    width: 100%;
  }

  .guides-hero,
  .article-hero {
    padding: 42px 0;
  }

  .guides-hero h1,
  .article-hero h1 {
    font-size: clamp(2rem, 8vw, 2.7rem);
    line-height: 1.08;
  }

  .guides-hero p,
  .article-hero p {
    font-size: 0.98rem;
  }

  .article-toolbar,
  .article-hero-grid,
  .article-layout,
  .guide-grid,
  .related-article-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .article-category-tabs,
  .article-results-bar,
  .guide-card-meta,
  .article-cta-block {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
  }

  .article-category-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .article-category-tabs button,
  .article-hero-actions a,
  .article-cta-block a {
    justify-content: center;
    width: 100%;
  }

  .article-content,
  .article-sidebar,
  .guide-card,
  .related-article-card {
    min-width: 0;
    width: 100%;
  }

  .article-body {
    padding: 22px;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .article-toolbar,
  .article-hero-grid,
  .article-layout,
  .guide-grid,
  .related-article-grid {
    grid-template-columns: 1fr;
  }

  .article-category-tabs {
    justify-content: flex-start;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .guides-hero,
  .article-hero {
    padding: 52px 0;
  }

  .article-results-bar,
  .guide-card-meta,
  .article-cta-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-body {
    padding: 22px;
  }

  .article-rich-image img {
    aspect-ratio: 4 / 3;
  }

  .article-cta-block a {
    text-align: center;
    width: 100%;
  }
}
