/* ══════════════════════════════════════════
   Page: Articles Index
   Extends global.css — reworked for 129 px nav
   ══════════════════════════════════════════ */

/* Override block-theme 645 px content constraint (Twenty Twenty-Five theme.json) */
.page-hero,
.filter-bar,
.most-viewed,
.articles-index,
.articles-empty,
.pagination,
.newsletter-cta,
.newsletter-cta-section,
.newsletter-section {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ── PAGE HERO ── */
.page-hero {
  width: 100%;
  box-sizing: border-box;
  padding: 129px 64px 80px;
}
.page-hero h1 { max-width: none; }
.page-hero p  { max-width: none; }

/* ── CATEGORY FILTERS ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px 0;
}

.filter-btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1.5px solid rgba(61,43,31,0.12);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--brown);
  color: white;
  border-color: var(--brown);
}

/* ── MOST-VIEWED SECTION ── */
.most-viewed {
  padding: 0;
  animation: fadeUp 0.7s 0.1s ease both;
}
.most-viewed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--brown);
}
.most-viewed-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-style: italic;
  margin-bottom: 0;
}
.most-viewed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Three equal vertical rectangles — fixed size regardless of photo dimensions */
.mv-card {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 3 / 4;
  min-height: 280px;
}
.mv-card:hover .mv-card-img,
.mv-card:hover .mv-card-img-placeholder {
  transform: scale(1.05);
}
.mv-card:hover .mv-card-title {
  text-decoration: underline;
}

.mv-card-img-wrap {
  position: absolute;
  inset: 0;
}
.mv-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.mv-card-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: transform 0.4s ease;
  background: var(--brown);
}

.mv-card-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.mv-card-date {
  font-size: 0.75rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 500;
}
.mv-card-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  color: white;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  transition: color 0.2s;
}
.mv-card-excerpt {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}

/* ── ALL ARTICLES GRID ── */
.articles-index {
  padding: 64px 0 48px;
}
.articles-index-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--brown);
}
.articles-index-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-style: italic;
  margin-bottom: 0;
}
.articles-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
}

.article-card {
  display: block;
  text-decoration: none;
  cursor: pointer;
}
.article-card:hover .article-img-wrap img,
.article-card:hover .article-img-wrap .article-img-placeholder {
  transform: scale(1.05);
}
.article-card:hover .article-title {
  color: var(--red);
}

.article-img-wrap {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: var(--brown);
  aspect-ratio: 1 / 1;
}
.article-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  transition: transform 0.4s ease;
}
.article-img-placeholder.style-1 { background: linear-gradient(135deg, #f5e6d3 0%, #e8cdb0 100%); }
.article-img-placeholder.style-2 { background: linear-gradient(135deg, #fde8e8 0%, #f5c4c4 100%); }
.article-img-placeholder.style-3 { background: linear-gradient(135deg, #e8f0e8 0%, #c8dcc8 100%); }
.article-img-placeholder.style-4 { background: linear-gradient(135deg, #e8e8f5 0%, #c8c8e8 100%); }
.article-img-placeholder.style-5 { background: linear-gradient(135deg, #f5f0e8 0%, #e8dcc8 100%); }
.article-img-placeholder.style-6 { background: linear-gradient(135deg, #f0e8f5 0%, #d8c8e8 100%); }

.article-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.article-date {
  font-size: 0.75rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 500;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.article-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.article-author {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}
.article-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.article-excerpt {
  font-size: 0.82rem;
  color: #fff;
  line-height: 1.6;
}

/* Empty state */
.articles-empty {
  text-align: center;
  padding: 120px 64px;
}
.articles-empty h2 {
  font-style: italic;
  margin-bottom: 12px;
}
.articles-empty p {
  color: var(--muted);
  font-size: 1.1rem;
}

/* ── GRADIENT PLACEHOLDERS ── */
.style-1 { background: linear-gradient(135deg, #f5e6d3 0%, #e8cdb0 100%); }
.style-2 { background: linear-gradient(135deg, #fde8e8 0%, #f5c4c4 100%); }
.style-3 { background: linear-gradient(135deg, #e8f0e8 0%, #c8dcc8 100%); }
.style-4 { background: linear-gradient(135deg, #e8e8f5 0%, #c8c8e8 100%); }
.style-5 { background: linear-gradient(135deg, #f5f0e8 0%, #e8dcc8 100%); }
.style-6 { background: linear-gradient(135deg, #f0e8f5 0%, #d8c8e8 100%); }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px 64px;
  flex-wrap: wrap;
  gap: 16px;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pagination-info {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

/* Static HTML classes */
.pagination-btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid rgba(61,43,31,0.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter Tight', sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pagination-btn:hover {
  border-color: var(--brown);
  color: var(--brown);
}
.pagination-num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  font-family: 'Inter Tight', sans-serif;
  cursor: pointer;
  background: transparent;
}
.pagination-num:hover {
  border-color: rgba(61,43,31,0.12);
  color: var(--brown);
}
.pagination-num.active {
  background: var(--brown);
  color: white;
  border-color: var(--brown);
}
.pagination-ellipsis {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 4px;
  font-weight: 600;
}

/* WordPress paginate_links() output */
.pagination-controls .page-numbers {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  font-family: 'Inter Tight', sans-serif;
  cursor: pointer;
  background: transparent;
}
.pagination-controls .page-numbers:hover {
  border-color: rgba(61,43,31,0.12);
  color: var(--brown);
}
.pagination-controls .page-numbers.current {
  background: var(--brown);
  color: white;
  border-color: var(--brown);
}
.pagination-controls .page-numbers.dots {
  border: none;
  cursor: default;
  width: auto;
}
.pagination-controls .prev.page-numbers,
.pagination-controls .next.page-numbers {
  width: auto;
  padding: 9px 18px;
  border: 1.5px solid rgba(61,43,31,0.12);
  gap: 6px;
}
.pagination-controls .prev.page-numbers:hover,
.pagination-controls .next.page-numbers:hover {
  border-color: var(--brown);
  color: var(--brown);
}

/* ── NEWSLETTER CTA ── */
.newsletter-cta {
  margin: 0 64px 80px;
  background: var(--red);
  border-radius: 28px;
  padding: 64px;
  text-align: center;
}
.newsletter-cta h2 {
  color: white;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 12px;
  font-style: normal;
}
.newsletter-cta p {
  color: #fff;
  font-size: 1.1rem;
  max-width: 460px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.92rem;
  outline: none;
  background: white;
  color: var(--text);
}
.newsletter-input::placeholder {
  color: var(--muted);
}
.newsletter-submit {
  background: var(--brown);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.newsletter-submit:hover {
  background: #2a1e14;
  transform: translateY(-1px);
}
.newsletter-note {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.45);
  margin-top: 16px;
}

/* Forminator overrides inside the CTA */
.newsletter-cta .newsletter-form .forminator-custom-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

/* ── NEWSLETTER CTA SECTION (Forminator wrapper) ── */
.newsletter-cta-section {
  margin: 0 64px 80px;
  background: var(--red);
  border-radius: 28px;
  padding: 64px;
  text-align: center;
}

/* ── NEWSLETTER BANNER (link to newsletter page) ── */
.newsletter-section {
  padding: 64px 0;
}
.newsletter-inner {
  background: var(--red);
  border-radius: 20px;
  padding: 56px 48px;
  text-align: center;
}
.newsletter-link {
  display: inline-block;
  color: white;
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  font-style: italic;
  text-decoration: none;
  transition: opacity 0.2s;
}
.newsletter-link:hover { opacity: 0.9; }
.newsletter-tagline {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  margin-top: 12px;
  margin-bottom: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-hero {
    padding: 80px 24px 48px;
  }
  .filter-bar {
    padding: 20px 24px;
  }

  .most-viewed {
    padding: 40px 24px 0;
  }
  .most-viewed-grid {
    grid-template-columns: 1fr;
  }
  .mv-card {
    aspect-ratio: 3 / 4;
  }

  .articles-index {
    padding: 40px 24px 32px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .articles-index-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pagination {
    padding: 0 24px 48px;
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-cta {
    margin: 0 24px 60px;
    padding: 48px 24px;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-cta-section {
    margin: 0 24px 60px;
    padding: 48px 24px;
  }

  .newsletter-section {
    padding: 0 24px 60px;
  }
  .newsletter-inner {
    padding: 36px 24px;
  }

  .articles-empty {
    padding: 80px 24px;
  }
}

@media (max-width: 600px) {
  .article-img-wrap {
    aspect-ratio: 4 / 3;
  }
}
