/* Public articles — WordPress-like archive/detail, FIE tokens */
.articles-page {
  --art-ink: #143126;
  --art-muted: #5a6b62;
  --art-line: rgba(20, 49, 38, 0.12);
  --art-surface: #f7faf7;
  --art-accent: var(--green-dark, #3d9149);
  --art-accent-soft: var(--green-soft, #e8f6ea);
  padding-block: 2.5rem 4rem;
  color: var(--art-ink);
}

.articles-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--art-line);
}

.articles-hero .kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--art-accent);
}

.articles-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.2;
  color: var(--art-ink);
}

.articles-hero .lead {
  margin: 0;
  max-width: 42rem;
  color: var(--art-muted);
  font-size: 1.05rem;
}

.articles-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 960px) {
  .articles-layout {
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    align-items: start;
  }
}

.articles-feed {
  display: grid;
  gap: 1.5rem;
}

.article-card {
  display: grid;
  gap: 1rem;
  padding: 0;
  background: #fff;
  border: 1px solid var(--art-line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  border-color: rgba(61, 145, 73, 0.35);
  box-shadow: 0 10px 28px rgba(20, 49, 38, 0.08);
}

@media (min-width: 640px) {
  .article-card {
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  }
}

.article-card-media {
  position: relative;
  min-height: 11rem;
  background:
    linear-gradient(145deg, var(--art-accent-soft), #fff),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(61, 145, 73, 0.06) 8px,
      rgba(61, 145, 73, 0.06) 9px
    );
}

.article-card-media img,
.article-card-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 11rem;
  max-width: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* Utility aliases (Tailwind-like) used on article media */
.articles-page .max-w-full {
  max-width: 100%;
}

.articles-page .h-auto {
  height: auto;
}

.articles-page .object-cover {
  object-fit: cover;
}

.articles-page .rounded-lg {
  border-radius: 0.5rem;
}

.article-card-body {
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem 1.25rem 1.35rem;
  align-content: start;
}

.article-card-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--art-muted);
}

.article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.article-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--art-accent-soft);
  color: var(--art-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.article-badge:hover {
  background: var(--green, #4fae5c);
  color: #fff;
}

.article-card h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.article-card h2 a {
  color: inherit;
  text-decoration: none;
}

.article-card h2 a:hover {
  color: var(--art-accent);
}

.article-card-excerpt {
  margin: 0;
  color: var(--art-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.article-card-more {
  justify-self: start;
  font-weight: 600;
  color: var(--art-accent);
  text-decoration: none;
}

.article-card-more:hover {
  text-decoration: underline;
}

.articles-sidebar {
  display: grid;
  gap: 1.25rem;
}

.sidebar-box {
  padding: 1.15rem 1.2rem;
  background: var(--art-surface);
  border: 1px solid var(--art-line);
  border-radius: 12px;
}

.sidebar-box h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  color: var(--art-ink);
}

.sidebar-search {
  display: grid;
  gap: 0.55rem;
}

.sidebar-search input[type="search"] {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--art-line);
  border-radius: 8px;
  font: inherit;
}

.sidebar-search button {
  justify-self: start;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.sidebar-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  color: var(--art-ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.sidebar-list a:hover {
  color: var(--art-accent);
}

.sidebar-count {
  flex: none;
  min-width: 1.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--art-line);
  color: var(--art-muted);
  font-size: 0.75rem;
  text-align: center;
}

.sidebar-list.is-recent a {
  display: block;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--art-line);
}

.sidebar-list.is-recent li:last-child a {
  border-bottom: 0;
  padding-bottom: 0;
}

.sidebar-list .date {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--art-muted);
}

.articles-empty {
  padding: 2rem;
  border: 1px dashed var(--art-line);
  border-radius: 12px;
  color: var(--art-muted);
  text-align: center;
}

.articles-pagination {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--art-line);
}

.articles-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.articles-pager-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.35rem;
  border: 1px solid var(--art-line);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #fff 0%, var(--art-surface) 100%);
  box-shadow: 0 8px 22px rgba(20, 49, 38, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.articles-pager-pages {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
}

.articles-pager-ctrl,
.articles-pager-page,
.articles-pager-gap {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  margin: 0;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  font-size: 0.92rem;
  color: var(--art-ink);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.articles-pager-ctrl {
  gap: 0.25rem;
  min-width: 2.35rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--art-accent);
  background: transparent;
}

.articles-pager-ctrl span[aria-hidden="true"] {
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 500;
}

.articles-pager-ctrl:hover {
  background: var(--art-accent-soft);
  color: var(--art-accent);
}

.articles-pager-ctrl.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.articles-pager-page {
  min-width: 2.35rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.articles-pager-page:hover {
  background: var(--art-accent-soft);
  color: var(--art-accent);
}

.articles-pager-page.is-current {
  background: var(--art-accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(61, 145, 73, 0.28);
}

.articles-pager-gap {
  min-width: 1.25rem;
  padding: 0 0.15rem;
  color: var(--art-muted);
  letter-spacing: 0.08em;
}

.articles-pager-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--art-muted);
  text-align: center;
}

.articles-pager-meta strong {
  color: var(--art-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .articles-pager-ctrl-label {
    display: none;
  }

  .articles-pager-ctrl {
    min-width: 2.5rem;
    padding: 0;
  }

  .articles-pager-bar {
    width: 100%;
    justify-content: space-between;
    border-radius: 14px;
  }
}

/* Single article */
.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--art-muted);
}

.article-breadcrumb a {
  color: var(--art-accent);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-single-header {
  margin-bottom: 1.5rem;
}

.article-single-header h1 {
  margin: 0.65rem 0 0.85rem;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.18;
  color: var(--art-ink);
}

.article-single-media {
  margin: 0 0 1.75rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--art-line);
  background: var(--art-surface);
}

.article-single-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 28rem;
  object-fit: cover;
}

.article-prose {
  max-width: 48rem;
  font-size: 1.075rem;
  line-height: 1.75;
  color: #1f2e28;
}

.article-prose > *:first-child {
  margin-top: 0;
}

.article-prose h2,
.article-prose h3,
.article-prose h4 {
  margin: 1.75rem 0 0.75rem;
  line-height: 1.3;
  color: var(--art-ink);
}

.article-prose p,
.article-prose ul,
.article-prose ol,
.article-prose blockquote,
.article-prose table,
.article-prose figure {
  margin: 0 0 1.15rem;
}

.article-prose a {
  color: var(--art-accent);
}

.article-prose img,
.article-lightbox-trigger img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* Standalone body images: smaller than full column width */
.article-prose > img,
.article-prose > p > img,
.article-prose .article-content-image {
  display: block;
  max-width: min(100%, 26rem);
  width: 100%;
  margin: 1rem auto;
  border-radius: 8px;
}

.article-prose img:hover,
.article-lightbox-trigger img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 49, 38, 0.16);
  opacity: 0.96;
}

/* Consecutive images → compact gallery (click opens lightbox) */
.article-prose .article-gallery,
.article-prose .gallery,
.article-prose .wp-block-gallery,
.article-prose .blocks-gallery-grid,
.article-prose .wp-block-image-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.55rem;
  margin: 1.15rem 0 1.4rem;
}

@media (min-width: 640px) {
  .article-prose .article-gallery,
  .article-prose .gallery,
  .article-prose .wp-block-gallery,
  .article-prose .blocks-gallery-grid,
  .article-prose .wp-block-image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.65rem;
  }
}

.article-prose .article-gallery img,
.article-prose .gallery img,
.article-prose .wp-block-gallery img,
.article-prose .blocks-gallery-grid img {
  display: block;
  width: 100%;
  max-width: none;
  height: 7.5rem;
  margin: 0;
  object-fit: cover;
  border-radius: 8px;
}

@media (min-width: 640px) {
  .article-prose .article-gallery img,
  .article-prose .gallery img,
  .article-prose .wp-block-gallery img,
  .article-prose .blocks-gallery-grid img {
    height: 8.75rem;
  }
}

.article-prose .gallery .gallery-item,
.article-prose .wp-block-gallery .wp-block-image,
.article-prose .blocks-gallery-item,
.article-prose .wp-block-gallery figure {
  margin: 0 !important;
  width: 100% !important;
}

.article-prose figure.wp-block-image,
.article-prose .wp-caption {
  margin: 0 0 1.15rem;
}

/* YouTube / Vimeo embeds */
.article-prose .article-video {
  position: relative;
  width: 100%;
  max-width: 48rem;
  margin: 1.35rem auto 1.6rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #0f1a15;
  box-shadow: 0 12px 28px rgba(20, 49, 38, 0.12);
}

.article-prose .article-video iframe,
.article-prose .article-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: 12px;
}

.article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(2px);
}

.article-lightbox-image {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  cursor: default;
}

.article-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 81;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
}

.article-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

[x-cloak] {
  display: none !important;
}

.article-prose blockquote {
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--art-accent);
  color: var(--art-muted);
  font-style: italic;
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-prose th,
.article-prose td {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--art-line);
}

.article-prose figure {
  margin-inline: 0;
}

.article-prose figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--art-muted);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--art-line);
}

.article-related {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--art-line);
}

.article-related h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.article-related-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .article-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.article-related-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
  border: 1px solid var(--art-line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.article-related-card:hover {
  border-color: rgba(61, 145, 73, 0.4);
}

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

.article-related-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.article-related-card .date {
  font-size: 0.8rem;
  color: var(--art-muted);
}
