/* ============================================
   POST.CSS — Studio Cambria
   Stili per le pagine singolo post /bandi/[slug]/
   ============================================ */

/* ── POST HERO ── */

.post-hero {
  background: var(--brand-navy);
  padding: var(--space-24) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201,137,42,.15) 0%, transparent 70%);
  pointer-events: none;
}

.post-hero .container {
  position: relative;
  max-width: 860px;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.post-hero-date {
  font-size: var(--text-sm);
  color: rgba(253,250,246,.5);
}

.post-hero-category {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold);
  background: rgba(201,137,42,.12);
  border: 1px solid rgba(201,137,42,.25);
  border-radius: 9999px;
  padding: var(--space-1) var(--space-3);
}

.post-hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--font-bold);
  color: var(--brand-white);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.post-hero-excerpt {
  font-size: var(--text-lg);
  color: rgba(253,250,246,.65);
  line-height: var(--leading-relaxed);
  max-width: 680px;
}

/* ── FEATURED IMAGE ── */

.post-featured-image {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 16/7;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── POST LAYOUT ── */

.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-16);
  align-items: start;
  padding: var(--space-16) 0 var(--space-24);
}

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-sidebar {
    display: none;
  }
}

/* ── POST BODY ── */

.post-body {
  max-width: 680px;
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  color: var(--color-heading);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.post-body h2 { font-size: var(--text-2xl); }
.post-body h3 { font-size: var(--text-xl); }
.post-body h4 { font-size: var(--text-lg); }

.post-body p {
  margin-bottom: var(--space-5);
}

.post-body ul,
.post-body ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
}

.post-body li {
  margin-bottom: var(--space-2);
}

.post-body strong {
  font-weight: var(--font-semibold);
  color: var(--color-heading);
}

.post-body a {
  color: var(--color-accent-accessible);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-body a:hover {
  color: var(--color-accent);
}

/* ── WP CONTENT BLOCKS (post migrati da WordPress) ── */

.post-body .post-media-block {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  align-items: flex-start;
}

.post-body .post-media-figure {
  flex-shrink: 0;
  width: 56px;
}

.post-body .post-media-figure img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* Nested .post-media-block inside .post-media-block */
.post-body .post-media-block .post-media-block {
  flex: 1;
  margin-bottom: 0;
}

.post-body figure {
  margin: var(--space-8) 0;
}

.post-body figure img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

/* ── POST SIDEBAR ── */

.post-sidebar {
  position: sticky;
  top: calc(80px + var(--space-6));
}

.post-sidebar-cta {
  background: var(--brand-navy);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  color: var(--brand-white);
  margin-bottom: var(--space-6);
}

.post-sidebar-cta h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-3);
}

.post-sidebar-cta p {
  font-size: var(--text-sm);
  color: rgba(253,250,246,.65);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

/* ── POST FOOTER NAV ── */

.post-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  margin-top: var(--space-10);
  border-top: 1px solid var(--color-border);
  gap: var(--space-4);
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-accent);
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.post-back-link:hover {
  color: var(--color-accent-accessible);
  gap: var(--space-3);
}
