/* ================================
   HERO PER PAGINA BLOG
================================ */
.blog-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-color: #04211A;
  min-height: 400px;
  padding: 4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  z-index: 0;
}

.blog-hero .hero-inner {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

.blog-hero .hero-icon {
  margin-bottom: 1.5rem;
}

.blog-hero .hero-icon svg {
  width: 64px;
  height: 64px;
  fill: #c2380c !important;
}

.blog-hero .page-title {
  font-size: calc(2rem + 1vw);
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ffffff;
}

.blog-hero .page-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  color: #ffffff;
}

/* Evita overflow orizzontale */
body {
  overflow-x: hidden;
}
/* ============================
   TITOLI E DESCRIZIONE ARCHIVIO
============================ */
.archive-title,
.archive-description {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-inline: auto;
}

.archive-title {
  color: #c2380c;
  margin-top: 4rem;
}

.archive-description {
  color: #04211A;
}

/* ============================
   GRIGLIA ARTICOLI
============================ */
.archive-posts-grid {
  list-style: none;
  padding: 0;
  margin: 2rem 0 3rem;
  max-width: 1100px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.archive-post {
  background-color: transparent;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.archive-post:hover {
  transform: translateY(-5px);
}

.archive-post img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #ddd;
}

/* ============================
   INFO ARTICOLO
============================ */
.archive-post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  text-align: center;
}

.archive-post-info h3 {
  font-size: 1.2rem;
  color: #04211A;
  margin: 0.5rem 0;
}

.archive-post-info span,
.archive-post-info time {
  margin: 0.5rem 0;
}

.archive-post-info h3 a {
  color: inherit;
  text-decoration: none;
}

.archive-post-info h3 a:hover {
  color: #c2380c;
  text-decoration: underline;
}

/* ============================
   CTA LEGGI TUTTO
============================ */
.archive-post-info .read-more {
  display: inline-block;
  margin-top: auto;
  background-color: #084537;
  color: #ffffff !important;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
  text-align: center;
}

.archive-post-info .read-more:hover {
  background-color: #c2380c;
  color: #ffffff !important;
}

/* ============================
   CTA TORNA AL BLOG
============================ */
.back-to-blog {
  text-align: center;
  margin: 3rem 0;
}

.back-to-blog .back-button {
  display: inline-block;
  background-color: #084537;
  color: #ffffff !important;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.back-to-blog .back-button:hover {
  background-color: #c2380c;
  color: #ffffff !important;
}

/* ============================
   PAGINAZIONE GENERALE
============================ */
.archive-pagination,
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 3rem 0;
}

.page-numbers {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  background-color: #f5f5f5;
  color: #04211A;
  text-decoration: none;
  transition: background 0.2s ease;
  font-weight: 500;
  min-width: 44px;
  text-align: center;
}

.page-numbers:hover {
  background-color: #e0e0e0;
}

.page-numbers.current {
  background-color: #c2380c;
  color: #fff;
  font-weight: 700;
}

.page-numbers.prev,
.page-numbers.next {
  background-color: #084537;
  color: #ffffff !important;
}

.page-numbers.prev:hover,
.page-numbers.next:hover {
  background-color: #c2380c;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 992px) {
  .archive-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
    .archive-posts-grid {
    grid-template-columns: 1fr;
  }
  .archive-post-info {
    text-align: center;
  }

  .pagination {
    gap: 0;
  }

  .page-numbers.prev,
  .page-numbers.next {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: center;
    padding: 0.4rem 0.8rem;
  }

  .page-numbers.prev {
    margin-bottom: 1rem;
  }

  .page-numbers.next {
    margin-top: 1rem;
  }

  .page-numbers:not(.prev):not(.next) {
    flex: 0 1 auto;
    margin: 0 0.5rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (min-width: 769px) {
  .pagination {
    gap: 3rem;
  }

  .page-numbers {
    margin: 0 1.5rem;
  }

  .page-numbers:first-child {
    margin-left: 0;
  }

  .page-numbers:last-child {
    margin-right: 0;
  }
}
