/* Articles module — distinct editorial design (separate from news/posts) */

.articles-page {
  --art-ink: #1a2332;
  --art-muted: #5c6b7a;
  --art-accent: #0d6e6e;
  --art-accent-2: #c45c26;
  --art-paper: #f7f3ec;
  --art-line: rgba(26, 35, 50, 0.08);
  --art-card: #ffffff;
  color: var(--art-ink);
}

.articles-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 70px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(13, 110, 110, 0.35), transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(196, 92, 38, 0.25), transparent 45%),
    linear-gradient(145deg, #0f1c24 0%, #16353a 45%, #1f2a38 100%);
  overflow: hidden;
}

.articles-hero__overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  pointer-events: none;
}

.articles-hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: #fff;
}

.articles-hero__eyebrow {
  display: inline-block;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 12px;
}

.articles-hero__title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.2;
}

.articles-hero__lead {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 28px;
  max-width: 540px;
  line-height: 1.8;
}

.articles-search {
  display: flex;
  align-items: stretch;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.articles-search:focus-within {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
}

.articles-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 14px 22px;
  outline: none;
}

.articles-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.articles-search button {
  border: 0;
  background: var(--art-accent);
  color: #fff;
  width: 54px;
  transition: background 0.2s ease;
}

.articles-search button:hover {
  background: #0a5858;
}

.articles-listing {
  background:
    linear-gradient(180deg, var(--art-paper) 0%, #fff 40%, #fff 100%);
}

.articles-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--art-line);
  border-radius: 12px;
}

.articles-clear-filter {
  margin-right: auto;
  color: var(--art-accent-2);
  font-weight: 600;
}

.article-card {
  height: 100%;
  background: var(--art-card);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--art-line);
  box-shadow: 0 10px 30px rgba(26, 35, 50, 0.04);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(26, 35, 50, 0.1);
}

.article-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.article-card:hover .article-card__media img {
  transform: scale(1.06);
}

.article-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(13, 110, 110, 0.92);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
}

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

.article-card__meta {
  display: flex;
  gap: 16px;
  color: var(--art-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.article-card__meta i {
  margin-left: 6px;
  color: var(--art-accent);
}

.article-card__title {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 10px;
  font-weight: 700;
}

.article-card__title a {
  color: var(--art-ink);
  transition: color 0.2s ease;
}

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

.article-card__summary {
  color: var(--art-muted);
  line-height: 1.8;
  margin-bottom: 18px;
  flex: 1;
}

.article-card__more {
  color: var(--art-accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-card__more i {
  transition: transform 0.25s ease;
}

.article-card__more:hover i {
  transform: translateX(-4px);
}

.articles-empty {
  text-align: center;
  padding: 70px 20px;
  background: #fff;
  border-radius: 18px;
  border: 1px dashed var(--art-line);
}

.articles-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--art-accent);
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.articles-btn:hover {
  background: #0a5858;
  transform: translateY(-1px);
  color: #fff !important;
}

.articles-sidebar .sidebar__widget {
  background: #fff;
  border: 1px solid var(--art-line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.03);
}

.articles-sidebar .sidebar__widget-title {
  color: var(--art-ink);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.articles-sidebar .sidebar__widget-title__have-bar::before {
  background: var(--art-accent);
}

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

.articles-cat-list li a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--art-muted);
  transition: all 0.2s ease;
}

.articles-cat-list li a:hover,
.articles-cat-list li.active a {
  background: rgba(13, 110, 110, 0.08);
  color: var(--art-accent);
  font-weight: 700;
}

.articles-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.articles-tag-cloud a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--art-paper);
  color: var(--art-muted);
  font-size: 13px;
  border: 1px solid var(--art-line);
  transition: all 0.2s ease;
}

.articles-tag-cloud a:hover,
.articles-tag-cloud a.active {
  background: var(--art-accent);
  color: #fff;
  border-color: var(--art-accent);
}

.articles-related-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.articles-related-item {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  transition: transform 0.2s ease;
}

.articles-related-item:hover {
  transform: translateX(-3px);
}

.articles-related-item__thumb {
  width: 72px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.articles-related-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.articles-related-item h4 {
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 4px;
  color: var(--art-ink);
}

.articles-related-item span {
  font-size: 12px;
  color: var(--art-muted);
}

.articles-cat-pill {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(13, 110, 110, 0.1);
  color: var(--art-accent);
  font-weight: 700;
}

.articles-muted {
  color: var(--art-muted);
}

.articles-pagination .pagination {
  justify-content: center;
  gap: 6px;
}

.articles-pagination .page-link {
  border-radius: 10px !important;
  border: 1px solid var(--art-line);
  color: var(--art-ink);
  min-width: 40px;
  text-align: center;
}

.articles-pagination .page-item.active .page-link {
  background: var(--art-accent);
  border-color: var(--art-accent);
}

/* Detail */
.article-detail-hero {
  position: relative;
  min-height: 48vh;
  display: flex;
  align-items: flex-end;
  padding: 150px 0 60px;
  overflow: hidden;
}

.article-detail-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  animation: articleHeroZoom 18s ease-in-out infinite alternate;
}

.article-detail-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 28, 36, 0.35) 0%, rgba(15, 28, 36, 0.82) 100%);
}

.article-detail-hero__inner {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 860px;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  opacity: 0.85;
}

.article-breadcrumb a {
  color: #fff;
}

.article-detail-hero__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.45;
  font-weight: 800;
  margin-bottom: 18px;
}

.article-detail-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  opacity: 0.9;
}

.article-detail-hero__meta i {
  margin-left: 6px;
}

.article-summary {
  background: var(--art-paper);
  border: 0;
  border-right: 4px solid var(--art-accent);
  border-radius: 0 16px 16px 0;
  padding: 22px 26px;
  margin: 0 0 30px;
}

.article-summary p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 2;
  color: var(--art-ink);
}

.article-body {
  font-size: 1.05rem;
  line-height: 2.1;
  color: #2a3542;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  color: var(--art-ink);
  font-weight: 800;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 18px auto;
  display: block;
}

.article-body p {
  margin-bottom: 1.1em;
}

.article-body blockquote {
  background: rgba(13, 110, 110, 0.06);
  border-right: 3px solid var(--art-accent);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
}

.article-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

.article-section-title::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--art-accent), var(--art-accent-2));
  border-radius: 999px;
}

.article-gallery {
  margin-top: 40px;
}

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

.article-gallery__item {
  display: block;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
}

.article-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-gallery__item:hover img {
  transform: scale(1.08);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
}

.article-tags span {
  color: var(--art-muted);
  margin-left: 4px;
}

.article-tags a {
  background: var(--art-paper);
  border: 1px solid var(--art-line);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--art-ink);
  font-size: 13px;
}

.article-tags a:hover {
  background: var(--art-accent);
  color: #fff;
  border-color: var(--art-accent);
}

.article-sources {
  margin-top: 36px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--art-line);
  border-radius: 16px;
}

.article-sources__body {
  white-space: pre-wrap;
  line-height: 2;
  color: var(--art-muted);
}

.article-share {
  margin-top: 36px;
}

.article-share__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-share__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.article-share__links a:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.article-share__links--stack {
  flex-direction: column;
}

.share-linkedin { background: #0a66c2; }
.share-x { background: #111; }
.share-reddit { background: #ff4500; }
.share-tumblr { background: #001935; }

.article-comments {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--art-line);
}

.article-comment {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.article-comment__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--art-accent), #1a9a9a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.article-comment__content {
  flex: 1;
  background: #fff;
  border: 1px solid var(--art-line);
  border-radius: 14px;
  padding: 16px 18px;
}

.article-comment__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.article-comment__head time {
  color: var(--art-muted);
  font-size: 12px;
}

.article-comment p {
  margin: 0;
  line-height: 1.9;
  white-space: pre-wrap;
}

.article-comment--reply {
  margin-top: 14px;
  margin-bottom: 0;
}

.article-comment--reply.is-admin .article-comment__content {
  background: rgba(13, 110, 110, 0.06);
  border-color: rgba(13, 110, 110, 0.2);
}

.admin-badge {
  display: inline-block;
  background: var(--art-accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  font-weight: 700;
}

.article-comment-form {
  margin-top: 28px;
  padding: 24px;
  background: var(--art-paper);
  border-radius: 16px;
  border: 1px solid var(--art-line);
}

.article-comment-form .form-control {
  border-radius: 12px;
  border-color: var(--art-line);
  padding: 12px 14px;
}

.article-comment-form .form-control:focus {
  border-color: var(--art-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.15);
}

@keyframes articleHeroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

@media (max-width: 991px) {
  .articles-hero,
  .article-detail-hero {
    padding-top: 120px;
    min-height: auto;
  }

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

@media (max-width: 575px) {
  .article-gallery__grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-card__body {
    padding: 18px;
  }
}
