/* ══════════════════════════════════════════
   EmailBarista — Category Page
   Page-specific styles (requires global.css)
   ══════════════════════════════════════════ */

/* Override block-theme content constraint */
.page-hero,
.cat-hero,
.filter-bar,
.most-viewed,
.articles-index,
.articles-empty,
.pagination,
.newsletter-section {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

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

/* ── NEWSLETTER BANNER ── */
.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;
  margin-bottom: 12px;
  transition: opacity 0.2s;
}
.newsletter-link:hover { opacity: 0.85; }
.newsletter-tagline {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  line-height: 1.6;
}

/* ── CATEGORY HERO (legacy) ── */
.cat-hero {
  background: var(--brown);
  padding: 50px 64px 56px;
  animation: fadeUp 0.6s ease both;
}
.cat-hero .breadcrumb {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  font-weight: 500;
}
.cat-hero .breadcrumb a {
  color: var(--tan);
  text-decoration: none;
  font-weight: 600;
}
.cat-hero .breadcrumb a:hover { text-decoration: underline; color: white; }
.cat-hero h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  color: white;
  line-height: 1;
  margin-bottom: 20px;
  max-width: none;
}
.cat-hero p {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.6);
  max-width: none;
  line-height: 1.75;
}
.cat-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tan);
  background: rgba(196,168,130,0.12);
  padding: 8px 18px;
  border-radius: 100px;
}

/* ── FILTER BAR ── */
.filter-bar {
  padding: 24px 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(61,43,31,0.08);
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  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-block;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--brown);
  color: white;
  border-color: var(--brown);
}

/* ── MOST VIEWED ── */
.most-viewed { padding: 64px 64px 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);
  margin-bottom: 0;
  font-style: italic;
}

.most-viewed-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }

/* Feature Card */
.mv-feature {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  aspect-ratio: 4 / 3;
}
.mv-feature:hover .mv-feature-img-placeholder { transform: scale(1.03); }
.mv-feature-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  transition: transform 0.5s ease;
}
.mv-feature-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 32px;
  background: linear-gradient(transparent, rgba(42,31,26,0.85));
  color: white;
}
.mv-feature-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mv-feature-cat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(255,255,255,0.95);
  padding: 3px 10px;
  border-radius: 100px;
}
.mv-feature-author { font-size: 0.75rem; color: #fff; font-weight: 500; }
.mv-feature-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1.2;
  color: white;
  letter-spacing: -0.01em;
}

/* Sidebar Cards */
.mv-sidebar { display: flex; flex-direction: column; gap: 16px; }
.mv-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  text-decoration: none;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.2s;
}
.mv-card:hover { background: rgba(61,43,31,0.04); }
.mv-card:hover .mv-card-title { color: var(--red); }
.mv-card-img {
  width: 140px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.mv-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.3s;
}
.mv-card-body { display: flex; flex-direction: column; gap: 6px; }
.mv-card-meta { display: flex; align-items: center; gap: 8px; }
.mv-card-cat {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.mv-card-author { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.mv-card-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--brown);
  line-height: 1.25;
  transition: color 0.2s;
  letter-spacing: -0.01em;
}

/* ── ALL ARTICLES INDEX ── */
.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);
  margin-bottom: 0;
  font-style: italic;
}
.articles-count { font-size: 0.85rem; color: var(--muted); font-weight: 500; }

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

/* Article Card */
.article-card { text-decoration: none; display: block; 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-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-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;
}

/* Gradient Styles */
.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-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; }
.pagination-info { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* 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: 0.97rem;
  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; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-hero   { padding: 100px 24px 48px; }
  .cat-hero    { padding: 48px 24px 40px; }
  .filter-bar  { padding: 20px 24px; }
  .most-viewed { padding: 40px 24px 0; }

  .most-viewed-grid { grid-template-columns: 1fr; }
  .mv-feature { aspect-ratio: 16 / 10; }
  .mv-card { grid-template-columns: 110px 1fr; }
  .mv-card-img { width: 110px; height: 80px; }

  .articles-index { padding: 40px 24px 32px; }
  .articles-grid  { grid-template-columns: 1fr; }
  .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-section { padding: 0 24px 60px; }
  .newsletter-inner { padding: 36px 24px; }

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

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