/* ============================================================
   BLOG ARCHIVE – NES | Hello Elementor Child Theme
   File: /wp-content/themes/hello-elementor-child/css/blog-archive.css
   ============================================================ */

/* ── RESET parziale per l'area blog ─────────────────────────── */
.nes-posts-grid a,
.nes-card-featured,
.nes-card {
  color: inherit;
}

/* ── WRAP ────────────────────────────────────────────────────── */
.nes-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── LABEL ───────────────────────────────────────────────────── */
.nes-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #C8102E;
  margin-bottom: 12px;
}
.nes-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: #C8102E;
  display: inline-block;
  flex-shrink: 0;
}

/* ── HERO ────────────────────────────────────────────────────── */
.nes-hero {
  background: #f5f2ee;
  padding: 72px 0;
  text-align: center;
}
.nes-hero-title {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1.1;
  margin: 12px 0 16px;
}
.nes-hero-sub {
  font-size: 16px;
  color: #777;
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.75;
}
.nes-search-box {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
}
.nes-search-box input[type="search"] {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid #e0e0e0;
  border-right: none;
  border-radius: 10px 0 0 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.nes-search-box input[type="search"]:focus {
  outline: none;
  border-color: #C8102E;
}
.nes-search-box button {
  padding: 14px 22px;
  background: #C8102E;
  color: #fff;
  border: none;
  border-radius: 0 10px 10px 0;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s;
}
.nes-search-box button:hover { background: #a30d25; }

/* ── CATEGORIE BAR ───────────────────────────────────────────── */
.nes-cat-bar {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  /* Hello Elementor: la sticky nav ha altezza variabile.
     Il JS in blog-archive.js calcola il top dinamicamente. */
  top: 0;
  z-index: 90;
}
.nes-cat-inner {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nes-cat-inner::-webkit-scrollbar { display: none; }
.nes-cat-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 16px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.nes-cat-btn:hover { color: #C8102E; }
.nes-cat-btn.active { color: #C8102E; border-color: #C8102E; }

/* ── SEZIONE ARTICOLI ────────────────────────────────────────── */
.nes-posts-section { padding: 64px 0 88px; }

/* ── GRID ────────────────────────────────────────────────────── */
.nes-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── CARD BASE ───────────────────────────────────────────────── */
.nes-card {
  background: #fff;
  border: 1.5px solid #ebebeb;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.nes-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0,0,0,.09);
  border-color: rgba(200,16,46,.2);
}
.nes-card-img {
  height: 210px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #e8e2da;
}
.nes-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
  display: block;
}
.nes-card:hover .nes-card-img img,
.nes-card-featured:hover .nes-card-img img {
  transform: scale(1.05);
}
.nes-card-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #C8102E;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 16px;
}
.nes-card-body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nes-card-meta {
  font-size: 12px;
  color: #bbb;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nes-dot {
  width: 3px;
  height: 3px;
  background: #ddd;
  border-radius: 50%;
  display: inline-block;
}
.nes-card-body h3 {
  font-size: 16px;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.3;
  margin-bottom: 10px;
}
.nes-card-body p {
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}
.nes-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f5f5f5;
  margin-top: auto;
}
.nes-read-link {
  font-size: 13px;
  font-weight: 700;
  color: #C8102E;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap .2s;
}
.nes-read-link::after { content: '→'; }
.nes-card:hover .nes-read-link,
.nes-card-featured:hover .nes-read-link { gap: 9px; }
.nes-read-time { font-size: 12px; color: #ccc; }

/* ── FEATURED ────────────────────────────────────────────────── */
.nes-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #fff;
  border: 1.5px solid #ebebeb;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.nes-card-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.1);
  border-color: rgba(200,16,46,.2);
}
.nes-card-featured .nes-card-img {
  height: 100%;
  min-height: 320px;
}
.nes-feat-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nes-feat-badge {
  display: inline-block;
  background: #C8102E;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 16px;
  margin-bottom: 14px;
  align-self: flex-start;
}
.nes-cat-inline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #C8102E;
  margin-bottom: 10px;
}
.nes-feat-body h2 {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1.25;
  margin-bottom: 12px;
}
.nes-feat-body p {
  font-size: 14px;
  color: #777;
  line-height: 1.8;
  margin-bottom: 22px;
}

/* ── PAGINAZIONE ─────────────────────────────────────────────── */
.nes-pagination { display: flex; justify-content: center; padding: 48px 0 0; }
.nes-pagination .page-numbers {
  display: inline-flex;
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.nes-pagination .page-numbers li a,
.nes-pagination .page-numbers li span {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #e8e8e8;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all .2s;
}
.nes-pagination .page-numbers li a:hover,
.nes-pagination .page-numbers li span.current {
  background: #C8102E;
  color: #fff;
  border-color: #C8102E;
}
.nes-pagination .page-numbers li span.dots {
  border: none;
  background: none;
  color: #ccc;
  font-size: 18px;
}

/* ── CTA BANNER ──────────────────────────────────────────────── */
.nes-cta-banner {
  background: linear-gradient(135deg, #1a1a2e, #2d1a3e);
  padding: 72px 0;
  text-align: center;
}
.nes-cta-inner { max-width: 600px; }
.nes-cta-banner h2 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}
.nes-cta-banner p {
  font-size: 15px;
  color: rgba(255,255,255,.7);
  margin-bottom: 32px;
  line-height: 1.7;
}
.nes-btn-red {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #C8102E;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.nes-btn-red:hover { background: #a30d25; transform: translateY(-2px); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nes-posts-grid { grid-template-columns: 1fr 1fr; }
  .nes-card-featured { grid-template-columns: 1fr; }
  .nes-card-featured .nes-card-img { min-height: 240px; }
}
@media (max-width: 600px) {
  .nes-posts-grid { grid-template-columns: 1fr; }
  .nes-card-featured { grid-column: auto; }
  .nes-wrap { padding: 0 16px; }
}
