/* ═══════════════════════════════════════════════════════
   ARTICLES PAGE — Frontend Styles
   Fonts required: Barlow Condensed 400/600/800, Barlow 400/500/600
   ═══════════════════════════════════════════════════════ */

:root {
  --af-black:    #000000;
  --af-white:    #ffffff;
  --af-blue:     #178be6;
  --af-orange:   #e85411;
  --af-gray:     #f4f4f4;
  --af-mid-gray: #888;
  --af-border:   #eee;
}
.load-more-btn-text{
  color: #fff !important;
}
/* ── FULL-WIDTH HERO ── */
.hero-featured {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--af-black);
}
.hero-featured:hover .hero-img { transform: scale(1.02); }
.hero-featured:hover .hero-title { color: rgba(255,255,255,.85); }

.hero-img-wrap {
  width: 100%;
  height: clamp(380px, 55vw, 580px);
  overflow: hidden;
  position: relative;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s ease;
  filter: brightness(.68);
}
.hero-featured picture { display: contents; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.85) 100%);
}
.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 40px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-category {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--af-orange);
  display: inline-block;
  margin-bottom: 14px;
  background: rgba(0,0,0,.4);
  padding: 3px 12px;
  border-radius: 2px;
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4.5vw, 54px);
  line-height: 1.05;
  color: var(--af-white);
  margin: 0 0 16px;
  letter-spacing: -.01em;
  max-width: 820px;
  transition: color .2s;
}
.hero-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,.75);
  margin: 0 0 18px;
  max-width: 580px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 575px) { .hero-excerpt { display: none; } }

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.hero-meta .meta-dot {
  width: 3px; height: 3px;
  background: rgba(255,255,255,.4);
  border-radius: 50%;
}
.hero-meta .hero-author {
  color: rgba(255,255,255,.9);
  font-weight: 600;
  font-size: 13px;
}

/* ── CATEGORY NAV ── */
.cat-nav {
  border-top: 1px solid var(--af-border);
  border-bottom: 1px solid var(--af-border);
  background: var(--af-white);
  margin-top: 32px;
}
.cat-nav-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: center;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--af-black);
  padding: 16px 24px;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
  display: inline-block;
}
.cat-btn:hover {
  color: var(--af-black);
  background: var(--af-gray);
  text-decoration: none;
}
.cat-btn.active {
  color: var(--af-orange);
  border-bottom-color: var(--af-orange);
  background: transparent;
}

/* ── GRID SECTION ── */
.grid-section { padding: 48px 0 72px; }
.grid-section-header {
  border-top: 2px solid var(--af-black);
  padding-top: 18px;
  margin-bottom: 28px;
}
.grid-section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--af-black);
  margin: 0;
}

/* ── ARTICLE CARD ── */
.af-article-card {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.af-article-card:hover .af-card-title { color: var(--af-orange); }
.af-article-card:hover .af-card-thumb img { transform: scale(1.03); }

.af-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 14px;
  background: var(--af-gray);
}
.af-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .35s ease;
}
.af-card-category {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--af-orange);
  display: block;
  margin-bottom: 7px;
}
.af-card-title {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.35;
  color: var(--af-black);
  margin: 0 0 10px;
  transition: color .2s;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.af-card-meta {
  font-size: 12px;
  color: var(--af-mid-gray);
  display: flex;
  align-items: center;
  gap: 8px;
}
.af-card-meta .meta-dot {
  width: 3px; height: 3px;
  background: #ccc; border-radius: 50%;
}

/* ── LOAD MORE ── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 0 0;
}
.load-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--af-blue); color: #fff;
  font-family: 'Barlow', sans-serif;
  font-size: 14px; font-weight: 600;
  border: 2px solid var(--af-blue);
  border-radius: 100px; padding: 12px 32px;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, border-color .18s, color .18s;
}
.load-more-btn:hover { background: #1278c8; border-color: #1278c8; color: #fff; }
.load-more-btn.loading { opacity: .6; pointer-events: none; }

/* ── PAGINATOR ── */
.af-paginator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.af-page-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 15px;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1.5px solid var(--af-border);
  background: var(--af-white);
  color: var(--af-black);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1;
}
.af-page-btn:hover {
  border-color: var(--af-orange);
  color: var(--af-orange);
  text-decoration: none;
}
.af-page-btn.active {
  background: var(--af-orange);
  border-color: var(--af-orange);
  color: var(--af-white);
  pointer-events: none;
}
.af-page-btn.disabled {
  color: #ccc;
  border-color: var(--af-border);
  pointer-events: none;
  cursor: default;
}
.af-page-ellipsis {
  font-size: 15px;
  color: var(--af-mid-gray);
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
}

/* ── LOADING STATE ── */
#af-articles-container.loading {
  opacity: .5;
  pointer-events: none;
  transition: opacity .2s;
}

/* ── EMPTY STATE ── */
.af-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--af-mid-gray);
}
.af-empty i { font-size: 48px; margin-bottom: 16px; display: block; }
.af-empty p { font-size: 16px; }

/* ── MOBILE ── */
@media (max-width: 767px) {
  .hero-content { padding: 24px 20px 32px; }
  .hero-img-wrap { height: clamp(280px, 70vw, 420px); }

  .cat-nav-inner {
    justify-content: flex-start;
    padding: 0 20px;
  }
  .cat-btn {
    font-size: 16px;
    padding: 14px 16px;
  }

  .grid-section { padding: 32px 0 48px; }

  .load-more-wrap { padding: 28px 20px 0; }
  .load-more-btn { font-size: 13px; padding: 10px 24px; width: 100%; justify-content: center; }
}
