/* =============================================================
   PP Articles — Styles for the Articles listing page
   Loaded AFTER pp-courses.css (which contains the full ppv2
   design system: tokens, navbar, buttons, reveal, footer, etc.)
   ============================================================= */

/* =====================================================
   ARTICLES HERO — compact, centered, dot pattern
   Mirrors courses-hero from pp-courses.css
   ===================================================== */
.articles-hero {
  position: relative;
  padding: 140px 0 72px;
  background: var(--deep-1);
  overflow: hidden;
  text-align: center;
}
.articles-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(167,139,250,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.articles-hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(20,184,166,0.08) 0%, transparent 40%);
}
.articles-hero__inner {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
}
.articles-hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.15;
  color: var(--text-light); letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.articles-hero__sub {
  font-size: clamp(0.95rem, 1.5vw, 1.08rem); line-height: 1.65;
  color: var(--text-light-60); max-width: 500px; margin: 0 auto;
}

/* =====================================================
   FILTER PILLS — warm surface
   ===================================================== */
.articles-filters {
  background: var(--warm-bg);
  padding: 28px 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--warm-border);
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark-70);
  background: #fff;
  border: 1px solid var(--warm-border);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.filter-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.filter-pill--active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.filter-pill--active:hover {
  background: var(--accent-light);
  color: #fff;
}
.filter-pill__count {
  font-size: 0.72rem;
  opacity: 0.7;
}

/* =====================================================
   FEATURED ARTICLE — split layout on warm bg
   Same dual-tone feel as ppv2 featured course section
   ===================================================== */
.featured-article-section {
  background: var(--warm-bg);
  padding: 80px 0;
}
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.featured-article__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.featured-article__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.15);
}
.featured-article__badge svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.featured-article__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.2;
  color: var(--text-dark); letter-spacing: -0.02em;
  margin: 0;
}
.featured-article__excerpt {
  font-size: 1rem; line-height: 1.65;
  color: var(--text-dark-70);
  max-width: 50ch;
}
.featured-article__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-dark-50);
}
.featured-article__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.featured-article__meta-item svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* Featured article visual — dark card with gradient, mirrors featured__card */
.featured-article__visual {
  position: relative;
  background: var(--deep-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255,255,255,0.08);
}
.featured-article__visual-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
@media (max-width: 1023px) {
  .featured-article {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .featured-article__visual {
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 767px) {
  .featured-article__title {
    font-size: 1.3rem;
  }
  .articles-filters {
    justify-content: flex-start;
    padding: 20px 16px;
    gap: 6px;
  }
  .filter-pill {
    padding: 6px 14px;
    font-size: 0.78rem;
  }
}

/* =====================================================
   ARTICLE CAROUSEL — 3-row horizontal scroll, full-bleed
   ===================================================== */
.articles-section {
  background: var(--warm-bg);
  padding: 80px 0;
  overflow: hidden;
}
.articles-section__header {
  margin-bottom: 32px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.articles-section__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem); line-height: 1.2;
  color: var(--text-dark); letter-spacing: -0.02em;
}
.articles-section__count {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark-50);
  margin-top: -20px;
  margin-bottom: 32px;
}

/* Article grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Article card — stacked (image top, body below) */
.article-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--warm-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}
.article-card__img {
  display: block;
  position: relative;
  overflow: hidden;
  height: 180px;
}
.article-card__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.article-card__body {
  padding: 24px 28px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.article-card__category {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent);
}
.article-card__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.15rem; line-height: 1.3;
  color: var(--text-dark); margin: 0;
}
.article-card__meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 0.8rem; color: var(--text-dark-50);
  margin-top: 4px;
}
.article-card__meta-item {
  display: inline-flex; align-items: center; gap: 5px;
}
.article-card__meta-item svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* Empty state */
.articles-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-dark-50);
  font-size: 1rem;
}

/* Pagination */
.articles-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.articles-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark-70);
  background: #fff;
  border: 1px solid var(--warm-border);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.articles-pagination__btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.articles-pagination__btn--active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.articles-pagination__btn--active:hover {
  background: var(--accent-light);
  color: #fff;
}
.articles-pagination__btn:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.articles-pagination__btn svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Responsive */
@media (max-width: 1023px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-section__header {
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
}
@media (max-width: 639px) {
  .articles-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   PROMPT OF THE WEEK — dark section with accent-bar cards
   ===================================================== */
.potw-section {
  background: var(--deep-2);
  padding: 100px 0;
}
.potw-header {
  margin-bottom: 48px;
}
.potw-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem); line-height: 1.2;
  color: var(--text-light); letter-spacing: -0.02em;
}
.potw-desc {
  font-size: 1rem; line-height: 1.65; color: var(--text-light-60);
  max-width: 479px; margin-top: 12px;
}
.potw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.potw-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}
.potw-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
}
.potw-card--coming-soon {
  cursor: default;
}
.potw-card--coming-soon:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
  transform: none;
}
.potw-card--coming-soon:hover .potw-card__link {
  gap: 6px;
}
.potw-card__label {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--teal-light);
  margin-bottom: 14px;
}
.potw-card__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.1rem; line-height: 1.3;
  color: var(--text-light);
  margin-bottom: 8px;
}
.potw-card__desc {
  font-size: 0.82rem; line-height: 1.6;
  color: var(--text-light-60);
  margin-bottom: 16px;
}
.potw-card__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--accent-light);
  transition: gap 0.3s var(--ease-out);
}
.potw-card:hover .potw-card__link {
  gap: 10px;
}
.potw-card__link svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 767px) {
  .potw-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   CTA BANNER — gradient overlay like org section
   ===================================================== */
.articles-cta {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}
.articles-cta__bg {
  position: absolute; inset: 0;
  background: var(--color-warm-bg-2, #F3EDE6);
}
.articles-cta__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(124,58,237,0.06), transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(20,184,166,0.05), transparent 60%);
}
.articles-cta__inner {
  position: relative; z-index: 1;
  max-width: 600px; margin: 0 auto;
}
.articles-cta__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.2;
  color: var(--color-text-dark, #1A1033); letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.articles-cta__desc {
  font-size: 1rem; line-height: 1.65;
  color: var(--color-text-dark-70, rgba(26,16,51,0.70));
  margin-bottom: 32px;
}
.articles-cta #hs-subscribe-form { width: 100%; max-width: 600px; margin: 0 auto; }
.articles-cta #hs-subscribe-form form {
  display: flex !important; gap: 10px;
  align-items: flex-end; justify-content: center;
}
.articles-cta #hs-subscribe-form fieldset {
  flex: 1 1 0; min-width: 0; max-width: none;
  margin: 0; padding: 0; border: none;
}
.articles-cta #hs-subscribe-form .hs_submit {
  flex: 0 0 auto;
}
.articles-cta #hs-subscribe-form .hs-input {
  width: 100% !important;
}

@media (max-width: 600px) {
  .articles-cta #hs-subscribe-form form { flex-direction: column; align-items: stretch; }
  .articles-cta #hs-subscribe-form fieldset { min-width: 100%; }
}

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