/* ══════════════════════════════════════
   AstralPage — Blog CSS
   Carica DOPO style.css (che contiene reset, variabili base, navbar, footer)
   ══════════════════════════════════════ */

/* ── Variabili aggiuntive (non presenti in style.css) ── */
:root {
  --font-reading:       'Inter', system-ui, -apple-system, sans-serif;
  --color-card:         #111111;
  --color-surface:      #0d0d0d;
  --color-border:       hsla(235, 100%, 50%, 0.12);
  --color-border-hover: hsla(235, 100%, 50%, 0.30);
  --color-grey-100:     #e5e5e5;
  --color-blue-light:   hsla(235, 100%, 72%, 1);
  --radius-card:        1.25rem;
}


/* ══════════════════════════════
   MOBILE MENU
   (mobile-menu è definito in contact.css/works.css;
    blog.html lo ridefinisce qui per non dipendere da quei file)
══════════════════════════════ */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(0, 0, 0, .97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}
.mobile-menu.is-open { display: flex; }

.mobile-menu_link {
  font-size: 2rem;
  font-weight: 500;
  color: var(--color-white);
  transition: opacity .2s;
}
.mobile-menu_link:hover { opacity: .5; }

.mobile-menu_cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .75rem 2rem;
  border-radius: 1rem;
  background: var(--color-white);
  color: #000;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 1rem;
}


/* ══════════════════════════════
   BLOG HERO — sfondo chiaro + scroll-over (identico a Works)
══════════════════════════════ */
.blog-hero {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 75vh;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 8rem;
  padding-bottom: 6rem;
  overflow: hidden;
  background: #f5f5f0;
  color: #000;
  text-align: center;
}

.blog-hero-spacer { height: 75vh; }

.blog-hero_label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2rem;
}

.blog-hero .text-style-label { color: #888; }

.blog-hero_heading {
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 500;
  line-height: 1.08;
  max-width: 42rem;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.blog-hero_sub {
  margin-top: 1.5rem;
  max-width: 30rem;
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.blog-hero_fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 12rem;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  z-index: 3;
  pointer-events: none;
}

/* Sections scroll over fixed hero */
.section-blog-list,
.section_cta,
.footer {
  position: relative;
  z-index: 1;
  background: #000;
}


/* ══════════════════════════════
   BLOG LIST — griglia card
══════════════════════════════ */
.section-blog-list {
  padding-top: 5rem;
  padding-bottom: 6rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* ── Card ── */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
}

.blog-card_img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
}
.blog-card_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card_img { transform: scale(1.04); }

.blog-card_img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #111 0%, #1c1c2e 100%);
}
.blog-card_img-placeholder svg { opacity: 0.15; }

.blog-card_content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
  gap: 0.75rem;
}

.blog-card_meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.blog-card_category {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-blue-light);
  background: hsla(235,100%,50%,0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid hsla(235,100%,50%,0.15);
}

.blog-card_date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-grey);
  letter-spacing: 0.05em;
}

.blog-card_title {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-white);
}

.blog-card_excerpt {
  font-family: var(--font-reading);
  font-size: 0.875rem;
  color: var(--color-grey-200);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.blog-card_footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-blue-light);
  margin-top: 0.25rem;
  transition: gap 0.2s ease;
}
.blog-card:hover .blog-card_footer { gap: 0.65rem; }

/* ── Stato vuoto ── */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.blog-empty_icon {
  width: 4rem; height: 4rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-grey);
}
.blog-empty_title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-white);
}
.blog-empty_sub {
  font-family: var(--font-reading);
  color: var(--color-grey-200);
  max-width: 28rem;
  line-height: 1.6;
}

/* ── Skeleton loader ── */
.skeleton-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.skeleton-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: blogShimmer 1.4s infinite;
}
.skeleton-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.skeleton-line {
  height: 0.75rem;
  border-radius: 0.4rem;
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: blogShimmer 1.4s infinite;
}
@keyframes blogShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Paginazione ── */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-grey-200);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.pagination-btn:hover {
  border-color: var(--color-border-hover);
  color: var(--color-white);
}
.pagination-btn.is-active {
  background: var(--color-white);
  border-color: var(--color-white);
  color: #000;
  font-weight: 700;
}
.pagination-btn:disabled          { opacity: 0.3; cursor: not-allowed; }
.pagination-btn:disabled:hover    { border-color: var(--color-border); color: var(--color-grey-200); }


/* ══════════════════════════════
   SINGOLO POST — hero scroll-over (come Works)
══════════════════════════════ */
.post-hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 75vh;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem var(--padding-global) 6rem;
  overflow: hidden;
  background: #f5f5f0;
  color: #000;
  text-align: center;
}

.post-hero-spacer {
  height: 75vh;
}

.post-hero_fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12rem;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  z-index: 3;
  pointer-events: none;
}

/* Sezioni sopra hero fissa */
.post-cover-wrap,
.post-body-wrap,
.section-related,
.post-cta,
.footer {
  position: relative;
  z-index: 1;
  background: #000;
}

.post-breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
}
.post-breadcrumb a        { color: #555; }
.post-breadcrumb a:hover  { color: #000; }
.post-breadcrumb_sep      { opacity: 0.4; }

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.post-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsla(235,100%,40%,1);
  background: hsla(235,100%,50%,0.12);
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid hsla(235,100%,50%,0.25);
}

.post-date,
.post-read-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #777;
}

.post-title {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 52rem;
  margin: 0 auto 1.25rem;
  color: #000;
  position: relative;
  z-index: 2;
}

.post-subtitle {
  font-family: var(--font-reading);
  font-size: 1.1rem;
  color: #555;
  max-width: 44rem;
  margin: 0 auto;
  line-height: 1.65;
  position: relative;
  z-index: 2;
}

.post-cover-wrap {
  padding: 3rem var(--padding-global);
}
.post-cover {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

/* ── Corpo articolo ── */
.post-body-wrap {
  display: grid;
  grid-template-columns: 1fr min(720px, 100%) 1fr;
  padding: 0 var(--padding-global);
}
.post-body-wrap > * { grid-column: 2; }

.post-content {
  font-family: var(--font-reading);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-grey-100);
  padding: 3rem 0;
}
.post-content h2       { font-family: var(--font-primary); font-size: clamp(1.4rem, 2.5vw, 1.85rem); font-weight: 500; color: var(--color-white); margin-top: 3rem; margin-bottom: 1rem; letter-spacing: -0.01em; line-height: 1.2; }
.post-content h3       { font-family: var(--font-primary); font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 500; color: var(--color-white); margin-top: 2.25rem; margin-bottom: 0.75rem; line-height: 1.3; }
.post-content p        { margin-bottom: 1.5rem; }
.post-content strong   { color: var(--color-white); font-weight: 600; }
.post-content em       { font-style: italic; }
.post-content a        { color: var(--color-blue-light); text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.2s; }
.post-content a:hover  { opacity: 0.75; }
.post-content ul,
.post-content ol       { margin: 0 0 1.5rem 1.5rem; }
.post-content li       { margin-bottom: 0.5rem; }
.post-content img      { width: 100%; border-radius: 0.75rem; margin: 2rem 0; border: 1px solid var(--color-border); }
.post-content blockquote { border-left: 3px solid var(--color-blue); padding-left: 1.5rem; margin: 2rem 0; color: var(--color-grey-200); font-style: italic; }
.post-content code     { background: #1a1a1a; border: 1px solid var(--color-border); border-radius: 0.35rem; padding: 0.15rem 0.4rem; font-family: var(--font-mono); font-size: 0.85em; color: var(--color-blue-light); }
.post-content pre      { background: #111; border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 1.5rem; overflow-x: auto; margin: 2rem 0; }
.post-content pre code { background: none; border: none; padding: 0; font-size: 0.875rem; color: var(--color-grey-100); }
.post-content hr       { border: none; border-top: 1px solid var(--color-border); margin: 3rem 0; }

.post-divider {
  grid-column: 2;
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* ── Correlati ── */
.section-related  { padding: 5rem var(--padding-global) 6rem; }
.related-header   { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2.5rem; }
.related-title    { font-family: var(--font-primary); font-size: 1.5rem; font-weight: 500; }
.related-grid     { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }


/* ══════════════════════════════
   REVEAL SCROLL
══════════════════════════════ */
.fade-up          { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }


/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 991px) {
  .blog-grid    { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .post-body-wrap                 { grid-template-columns: 1fr; padding: 0 1.25rem; }
  .post-body-wrap > *             { grid-column: 1; }
  .post-cover-wrap                { padding: 2rem 1.25rem; }
}

@media (max-width: 600px) {
  .blog-grid                      { grid-template-columns: 1fr; gap: 1.25rem; }
  .related-grid                   { grid-template-columns: 1fr; }
  .blog-hero_heading              { font-size: 2.75rem; }
}
