/* Listing blog — Blog/blog.html */

.blog-page {
  --blog-bg: #fffcf5;
  --blog-ink: #141a18;
  --blog-body: #3d4743;
  --blog-muted: #596963;
  --blog-line: rgba(20, 26, 24, 0.12);
  --blog-card-bg: #ffffff;
  --blog-space-1: 0.5rem;
  --blog-space-2: 1rem;
  --blog-space-4: 2rem;
}

.blog-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--blog-bg);
  color: var(--blog-ink);
  font-family: "Geist", sans-serif;
}

.blog-page .font-geist-mono {
  font-family: "Geist Mono", monospace;
}

.blog-main {
  position: relative;
  isolation: isolate;
}

.blog-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 1;
  background: url("../Immagini/Pattern/Blog.webp") no-repeat top -10px right -280px / clamp(760px, 48vw, 900px);
  pointer-events: none;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--blog-space-4);
}

@media (min-width: 720px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.blog-page-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.blog-intro {
  display: flex;
  flex-direction: column;
  gap: var(--blog-space-1);
  max-width: 40rem;
}

.blog-card {
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-space-2);
  overflow: hidden;
  background: var(--blog-card-bg);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 32px -28px rgba(20, 26, 24, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -24px rgba(18, 21, 23, 0.45);
  border-color: rgba(20, 26, 24, 0.2);
}

.blog-card:hover .blog-card__title {
  color: #053021;
}

.blog-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--blog-line);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(243, 241, 236, 0.95));
  display: block;
  object-fit: cover;
  color: var(--blog-muted);
  font-family: "Geist", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.5rem;
  padding: 1.75rem 2rem 2rem;
  box-sizing: border-box;
}

.blog-card__meta {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--blog-muted);
}

.blog-card__title {
  margin: 0;
  padding-top: 0.125rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--blog-ink);
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__lead {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.62;
  color: var(--blog-body);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-empty {
  border: 1px dashed rgba(20, 26, 24, 0.25);
  border-radius: 1rem;
  padding: 1.5rem;
  font-family: "Geist Mono", monospace;
  color: var(--blog-muted);
  background: rgba(255, 255, 255, 0.55);
}

.blog-pagination {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.blog-pagination.is-visible {
  display: flex;
}

.blog-page-btn {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(20, 26, 24, 0.2);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  color: #141a18;
  font-family: "Geist Mono", monospace;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.blog-page-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(20, 26, 24, 0.35);
}

.blog-page-btn[aria-current="page"] {
  background: #ccff66;
  border-color: #99c94f;
  font-weight: 700;
}

.blog-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

#blog-main-header .header-cta {
  background-color: #141a18;
  color: #fffcf5;
  border: 1px solid #141a18;
  border-radius: 14px;
  padding: 0.75rem 1.5rem;
  font-family: "Geist Mono", monospace;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px -14px rgba(18, 21, 23, 0.45);
  transition: background-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, color 0.3s ease;
}

#blog-main-header .header-cta:hover {
  background-color: #1b2023;
  color: #fffcf5;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -14px rgba(18, 21, 23, 0.65);
}

@media (max-width: 1279px) {
  #blog-main-header {
    padding-right: 1.5rem !important;
    max-width: 100vw;
  }
}
