/* ============================================
   Articles Listing Page — Bright Theme
   Senior UX redesign: light, clean, card-based
   ============================================ */

/* ---------- Page Wrapper ---------- */
.abr-articles-page {
  background: #F8FAFC;
  font-family: var(--hero-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  padding-bottom: 100px;
}

/* ---------- Breadcrumb ---------- */
.abr-breadcrumb {
  padding: 24px 0 0;
  font-size: 13px;
  color: #94A3B8;
}

.abr-breadcrumb a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.abr-breadcrumb a:hover {
  color: #0EA5E9;
  text-decoration: none;
}

.abr-breadcrumb-sep {
  margin: 0 8px;
  color: #CBD5E1;
}

.abr-breadcrumb-current {
  color: #475569;
  font-weight: 500;
}

/* ---------- Page Header ---------- */
.abr-page-header {
  text-align: center;
  padding: 48px 0 40px;
  max-width: 640px;
  margin: 0 auto;
}

.abr-page-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0EA5E9;
  margin-bottom: 12px;
}

.abr-page-title {
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0F172A;
  margin: 0 0 16px;
  line-height: 1.1;
}

.abr-page-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* ---------- Search & Filter Bar ---------- */
.abr-filter-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 0 40px;
  max-width: 800px;
  margin: 0 auto;
}

.abr-search-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.abr-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  pointer-events: none;
}

.abr-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0F172A;
  background: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.abr-search-input::placeholder {
  color: #94A3B8;
}

.abr-search-input:focus {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Category filter pills */
.abr-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.abr-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.abr-filter-pill:hover {
  border-color: #0EA5E9;
  color: #0EA5E9;
  background: #F0F9FF;
}

.abr-filter-pill.abr-pill-active {
  background: #0EA5E9;
  color: #FFFFFF;
  border-color: #0EA5E9;
}

.abr-pill-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(0,0,0,0.08);
  padding: 1px 6px;
  border-radius: 100px;
}

.abr-pill-active .abr-pill-count {
  background: rgba(255,255,255,0.25);
}

/* ---------- Articles Grid ---------- */
.abr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---------- Featured Row ---------- */
.abr-featured-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 28px;
}

/* ---------- Article Card ---------- */
.abr-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  position: relative;
}

.abr-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  border-color: rgba(14, 165, 233, 0.2);
  text-decoration: none;
}

.abr-card:focus-within {
  outline: 2px solid #0EA5E9;
  outline-offset: 2px;
}

/* Featured card variant */
.abr-card-featured {
  border-color: rgba(14, 165, 233, 0.15);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 0 0 1px rgba(14, 165, 233, 0.06);
}

/* Featured badge */
.abr-featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #0EA5E9, #6366F1);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.abr-featured-badge svg {
  flex-shrink: 0;
}

/* Card Image */
.abr-card-img {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #F1F5F9;
}

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

.abr-card:hover .abr-card-img img {
  transform: scale(1.05);
}

/* No-image placeholder */
.abr-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E0F2FE, #EDE9FE);
  color: #94A3B8;
}

/* Card Body */
.abr-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Category tag */
.abr-card-tag {
  display: inline-block;
  padding: 3px 10px;
  background: #E0F2FE;
  color: #0284C7;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  align-self: flex-start;
}

/* Card Title */
.abr-card-title {
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 8px;
  line-height: 1.35;
}

.abr-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.abr-card-title a:hover {
  color: #0EA5E9;
  text-decoration: none;
}

/* Featured card has bigger title */
.abr-card-featured .abr-card-title {
  font-size: 20px;
}

/* Card Excerpt */
.abr-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 16px;
  flex: 1;
}

/* Card Meta (date + read time) */
.abr-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: #94A3B8;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #F1F5F9;
}

.abr-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.abr-card-meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Read more arrow */
.abr-card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: #0EA5E9;
  transition: gap 0.2s ease;
}

.abr-card:hover .abr-card-read-more {
  gap: 8px;
}

/* ---------- Empty State ---------- */
.abr-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 40px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
}

.abr-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #94A3B8;
}

.abr-empty-title {
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 8px;
}

.abr-empty-text {
  font-size: 15px;
  color: #475569;
  margin: 0;
}

/* ---------- No Results (search) ---------- */
.abr-no-results {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  color: #475569;
  font-size: 15px;
}

.abr-no-results.abr-visible {
  display: block;
}

/* ---------- Scroll Reveal Animations ---------- */
.abr-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.abr-reveal.abr-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.abr-reveal-delay-1 { transition-delay: 0.05s; }
.abr-reveal-delay-2 { transition-delay: 0.1s; }
.abr-reveal-delay-3 { transition-delay: 0.15s; }
.abr-reveal-delay-4 { transition-delay: 0.2s; }
.abr-reveal-delay-5 { transition-delay: 0.25s; }
.abr-reveal-delay-6 { transition-delay: 0.3s; }

/* ---------- Article Count / Stats ---------- */
.abr-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 0 0 32px;
}

.abr-stat {
  text-align: center;
}

.abr-stat-num {
  display: block;
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: 28px;
  font-weight: 800;
  color: #0EA5E9;
}

.abr-stat-label {
  font-size: 12px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .abr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .abr-featured-row {
    grid-template-columns: 1fr;
  }

  .abr-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .abr-page-header {
    padding: 32px 0 28px;
  }

  .abr-filter-bar {
    padding: 0 0 28px;
  }
}

@media (max-width: 640px) {
  .abr-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .abr-featured-row {
    gap: 16px;
  }

  .abr-page-title {
    font-size: 28px;
  }

  .abr-card-body {
    padding: 16px 18px 20px;
  }

  .abr-card-featured .abr-card-title {
    font-size: 17px;
  }

  .abr-stats {
    gap: 20px;
  }

  .abr-stat-num {
    font-size: 22px;
  }

  .abr-filter-pills {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .abr-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .abr-card {
    transition: none;
  }

  .abr-card-img img {
    transition: none;
  }
}
