/* === BASE STILE GENERALE === */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #ffffff;
  color: #111;
}

/* === HERO DELLA SEZIONE === */
.heroCategory {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  border-bottom: 1px solid #111;
}

.heroCategory h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin: 0 auto 1rem;
  max-width: 720px;
  color: #111;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.heroCategory .description,
.page-lead {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: #333;
  line-height: 1.7;
}

/* === LAYOUT A 2 COLONNE === */
.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  max-width: 1366px;
  margin: 0 auto;
  padding: 3rem 1rem 5rem;
}

/* === SIDEBAR SINISTRA === */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-box {
  background: #fff;
  border: 1px solid #111;
  border-radius: 0;
  padding: 1.5rem;
}

.sidebar-box h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #222;
}

.sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  text-decoration: none;
  background-color: #fff;
  padding: 1rem;
  border-radius: 0;
  transition: background 0.2s ease;
  border: 1px solid #111;
}

.category-card:hover {
  background-color: #fff;
  border-color: #c8241d;
}

.category-card .title {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
}

.category-card .desc {
  font-size: 0.85rem;
  color: #666;
  margin-top: 2px;
  line-height: 1.4;
}

/* === CONTENUTO DESTRO: POST === */
.main-content .posts-container,
.archive-main .posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

/* === CARD POST === */
.post-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: white;
  border: 1px solid #111;
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-cover {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.post-card img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
}

.post-card .post-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1rem 1rem 0;
  line-height: 1.4;
  color: #222;
}

.post-card .post-title a {
  color: inherit;
  text-decoration: none;
}

.post-card .post-title a:hover {
  color: #c8241d;
}

.post-card .post-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card .post-description {
  margin: 0.65rem 1rem 1.2rem;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .main-content {
    order: 1;
  }
  .heroCategory h1 {
    font-size: 2.2rem;
  }
}