/**
 * AdHub.la Articles — Lao press-inspired layout
 * Patterns: KPL / Vientiane Times (lead story, dated headlines, category rails, most-read)
 * Visual: light, crisp cards, petrol primary, gold accents, generous whitespace
 */

.ah-news {
  --ah-news-max: 1120px;
  margin: -24px -24px 0;
  background: var(--ah-bg, #f5f7f8);
  color: var(--ah-text, #12262b);
  font-family: var(--ah-font-sans);
  min-height: 60vh;
}

.ah-news__inner {
  max-width: var(--ah-news-max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

@media (min-width: 768px) {
  .ah-news__inner {
    padding: 2rem 1.5rem 4rem;
  }
}

/* Masthead */
.ah-news-mast {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--ah-primary, #15444c);
}

@media (min-width: 900px) {
  .ah-news-mast {
    grid-template-columns: 1fr minmax(260px, 340px);
    align-items: end;
  }
}

.ah-news-mast__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ah-accent, #c79236);
  margin: 0 0 0.4rem;
}

.ah-news-mast__title {
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ah-primary, #15444c);
  margin: 0 0 0.5rem;
}

.ah-news-mast__lead {
  margin: 0;
  max-width: 40rem;
  color: var(--ah-text-secondary, #5a6f76);
  font-size: 0.95rem;
  line-height: 1.55;
}

.ah-news-search {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.ah-news-search__wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.ah-news-search__wrap .fa-search {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ah-text-muted, #7a8f96);
  font-size: 0.85rem;
  pointer-events: none;
}

.ah-news-search__input {
  width: 100%;
  border: 1px solid var(--ah-border, #d8e0e3);
  background: #fff;
  border-radius: var(--ah-radius-pill, 999px);
  padding: 0.6rem 1rem 0.6rem 2.35rem;
  font-size: 0.9rem;
  color: var(--ah-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ah-news-search__input:focus {
  border-color: var(--ah-primary);
  box-shadow: 0 0 0 3px var(--ah-primary-soft, rgba(21, 68, 76, 0.1));
}

.ah-news-search__btn {
  flex-shrink: 0;
  border: none;
  border-radius: var(--ah-radius-pill, 999px);
  background: var(--ah-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.15rem;
}

.ah-news-search__btn:hover {
  background: var(--ah-primary-hover, #1c5863);
}

.ah-news-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--ah-border);
  border-radius: 12px;
  box-shadow: var(--ah-shadow-md, 0 4px 14px rgba(18, 38, 43, 0.08));
  overflow: hidden;
}

.ah-news-suggest a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--ah-text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--ah-border);
}

.ah-news-suggest a:last-child {
  border-bottom: 0;
}

.ah-news-suggest a:hover {
  background: var(--ah-surface-muted, #eef2f3);
}

.ah-news-suggest__more {
  font-weight: 700;
  color: var(--ah-primary) !important;
}

/* Section headings — press rule */
.ah-news-section {
  margin-bottom: 2.25rem;
}

.ah-news-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--ah-border);
}

.ah-news-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ah-primary);
  letter-spacing: -0.01em;
}

.ah-news-section__more {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ah-accent);
  text-decoration: none;
  white-space: nowrap;
}

.ah-news-section__more:hover {
  color: var(--ah-primary);
}

/* Lead + sidebar (hub home) */
.ah-news-layout {
  display: grid;
  gap: 1.75rem;
}

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

.ah-news-lead {
  display: grid;
  gap: 0;
  background: #fff;
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-card, 14px);
  overflow: hidden;
  box-shadow: var(--ah-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.ah-news-lead:hover {
  box-shadow: var(--ah-shadow-md);
  transform: translateY(-1px);
}

@media (min-width: 720px) {
  .ah-news-lead {
    grid-template-columns: 1.15fr 1fr;
    min-height: 280px;
  }
}

.ah-news-lead__media {
  position: relative;
  min-height: 200px;
  background: var(--ah-surface-muted);
}

.ah-news-lead__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 200px;
}

@media (min-width: 720px) {
  .ah-news-lead__media,
  .ah-news-lead__media img {
    min-height: 100%;
  }
}

.ah-news-lead__body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ah-news-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ah-accent);
  margin-bottom: 0.45rem;
}

.ah-news-lead__title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ah-text);
  letter-spacing: -0.02em;
}

.ah-news-lead__excerpt {
  margin: 0 0 0.85rem;
  color: var(--ah-text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.ah-news-meta {
  font-size: 0.78rem;
  color: var(--ah-text-muted);
  font-weight: 500;
}

/* Stack list (KPL-style dated headlines) */
.ah-news-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-card);
  overflow: hidden;
}

.ah-news-stack li + li {
  border-top: 1px solid var(--ah-border);
}

.ah-news-stack a {
  display: block;
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.ah-news-stack a:hover {
  background: var(--ah-surface-muted);
}

.ah-news-stack__title {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ah-text);
}

.ah-news-stack a:hover .ah-news-stack__title {
  color: var(--ah-primary);
}

.ah-news-stack__date {
  font-size: 0.75rem;
  color: var(--ah-text-muted);
}

/* Grid cards — clean & sharp */
.ah-news-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .ah-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .ah-news-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ah-news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-card);
  overflow: hidden;
  box-shadow: var(--ah-shadow-sm);
  height: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.ah-news-card:hover {
  box-shadow: var(--ah-shadow-md);
  border-color: var(--ah-border-strong, #b8c5ca);
}

.ah-news-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--ah-surface-muted);
  overflow: hidden;
}

.ah-news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ah-news-card__ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ah-text-muted);
  font-size: 1.4rem;
}

.ah-news-card__body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}

.ah-news-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}

.ah-news-card__title a {
  color: var(--ah-text);
  text-decoration: none;
}

.ah-news-card__title a:hover {
  color: var(--ah-primary);
}

.ah-news-card__excerpt {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ah-text-secondary);
  line-height: 1.5;
  flex: 1;
}

.ah-news-card__cta {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ah-primary);
  text-decoration: none;
}

.ah-news-card__cta:hover {
  color: var(--ah-accent);
}

/* Sidebar most-read */
.ah-news-aside {
  background: #fff;
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-card);
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: var(--ah-shadow-sm);
}

.ah-news-aside__title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ah-primary);
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--ah-accent);
}

.ah-news-aside ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ahmost;
}

.ah-news-aside li {
  counter-increment: ahmost;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.55rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--ah-border);
}

.ah-news-aside li:last-child {
  border-bottom: 0;
}

.ah-news-aside li::before {
  content: counter(ahmost);
  font-weight: 800;
  color: var(--ah-accent);
  font-size: 0.95rem;
  line-height: 1.35;
}

.ah-news-aside a {
  text-decoration: none;
  color: var(--ah-text);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.4;
}

.ah-news-aside a:hover {
  color: var(--ah-primary);
}

/* Sort pills */
.ah-news-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.ah-news-sort a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--ah-border);
  background: #fff;
  color: var(--ah-text-secondary);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.ah-news-sort a.is-active,
.ah-news-sort a:hover {
  border-color: var(--ah-primary);
  color: var(--ah-primary);
  background: var(--ah-primary-soft);
}

.ah-news-empty {
  color: var(--ah-text-muted);
  font-size: 0.95rem;
  padding: 1.5rem 0;
}

.ah-news-query {
  color: var(--ah-text-secondary);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.ah-news-pagination {
  margin-top: 1.5rem;
}

.ah-news-pagination .page-link {
  border-radius: 999px !important;
  margin: 0 0.15rem;
  color: var(--ah-primary);
  border-color: var(--ah-border);
}

.ah-news-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ah-primary);
  text-decoration: none;
}

/* Detail — reading mode */
.ah-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.15rem 3rem;
}

.ah-article__cover {
  border-radius: var(--ah-radius-card);
  overflow: hidden;
  border: 1px solid var(--ah-border);
  margin-bottom: 1.35rem;
  background: var(--ah-surface-muted);
}

.ah-article__cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.ah-article__cover-ph {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ah-text-muted);
  font-size: 2rem;
}

.ah-article__cat {
  color: var(--ah-accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ah-article__title {
  margin: 0.4rem 0 0.65rem;
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ah-primary);
}

.ah-article__meta {
  margin: 0 0 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ah-border);
  font-size: 0.85rem;
  color: var(--ah-text-muted);
}

.ah-article__body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2a3a3f;
}

.ah-article__body p {
  margin-bottom: 1.1rem;
}

.main-wrap-inner .content-area:has(.ah-news),
.main-wrap-inner .content-area:has(.ah-article) {
  padding-bottom: 0;
  background: var(--ah-bg, #f5f7f8);
}
