/* Blog – News section */

.blog-page {
  background: #0a0a0a;
  min-height: calc(100vh - 120px);
}

/* Hero */
.blog-hero {
  background: linear-gradient(135deg, #0c1929 0%, #111827 45%, #0a1628 100%);
  border-bottom: 1px solid #1e3a5f;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(34, 211, 238, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(16, 185, 129, 0.06) 0%, transparent 55%);
  pointer-events: none;
}

.blog-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  position: relative;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: #67e8f9;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.blog-hero p {
  font-size: 1.1rem;
  color: #9ca3af !important;
  max-width: 36rem;
  margin: 0;
  line-height: 1.6;
}

.blog-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #6b7280 !important;
}

.blog-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-hero-meta i {
  color: #22d3ee;
}

/* Main content area */
.blog-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Featured post */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: linear-gradient(145deg, #111827 0%, #0f172a 100%);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.blog-featured:hover {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.08);
}

@media (min-width: 768px) {
  .blog-featured {
    grid-template-columns: 1.2fr 1fr;
  }
}

.blog-featured-visual {
  background: linear-gradient(160deg, #0e7490 0%, #065f46 50%, #1e1b4b 100%);
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  position: relative;
}

.blog-featured-visual::after {
  content: '✈';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 4rem;
  opacity: 0.15;
}

.blog-featured-label {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #67e8f9;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.blog-featured-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-featured-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #ffffff !important;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.blog-featured-body p {
  color: #d1d5db !important;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #67e8f9 !important;
  font-weight: 600;
  font-size: 0.95rem;
}

.blog-featured:hover .blog-read-more {
  gap: 0.65rem;
}

/* Post grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

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

.blog-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.blog-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.blog-card-date {
  font-size: 0.8rem;
  color: #6b7280 !important;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card-date i {
  color: #22d3ee;
  font-size: 0.75rem;
}

.blog-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f9fafb !important;
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #9ca3af !important;
  line-height: 1.6;
  flex: 1;
  margin: 0 0 1rem;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid #1f2937;
  font-size: 0.85rem;
  color: #67e8f9 !important;
  font-weight: 500;
}

/* Year divider */
.blog-year-group {
  margin-bottom: 2.5rem;
}

.blog-year-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4b5563 !important;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1f2937;
}

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280 !important;
}

.blog-empty i {
  font-size: 2.5rem;
  color: #374151;
  margin-bottom: 1rem;
  display: block;
}

/* ── Single post ── */

.post-page {
  background: #0a0a0a;
  min-height: calc(100vh - 120px);
}

.post-toolbar {
  background: linear-gradient(180deg, #1a1f2e 0%, #151922 100%);
  border-bottom: 1px solid #2d3748;
}

.post-toolbar-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #9ca3af !important;
}

.post-breadcrumb a {
  color: #67e8f9 !important;
  text-decoration: none;
}

.post-breadcrumb a:hover {
  text-decoration: underline;
}

.post-breadcrumb .sep {
  color: #4b5563;
}

.post-back-link {
  font-size: 0.875rem;
  color: #9ca3af !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s;
}

.post-back-link:hover {
  color: #67e8f9 !important;
}

.post-article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #1f2937;
}

.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: #6b7280 !important;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.post-meta i {
  color: #22d3ee;
}

/* Article prose – dimensioni leggibili, non hero-sized */
.prose-article {
  --tw-prose-body: #d1d5db !important;
  --tw-prose-headings: #ffffff !important;
  --tw-prose-links: #67e8f9 !important;
  --tw-prose-bold: #f3f4f6 !important;
  --tw-prose-bullets: #9ca3af !important;
  --tw-prose-hr: #374151 !important;
  --tw-prose-quotes: #d1d5db !important;
  --tw-prose-quote-borders: #22d3ee !important;
  --tw-prose-code: #fde047 !important;
  --tw-prose-pre-bg: #111827 !important;
  color: #d1d5db !important;
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose-article h1 {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  border-bottom: 1px solid #374151;
  padding-bottom: 0.4rem;
}

.prose-article h2 {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
  border-bottom: 1px solid #1f2937;
  padding-bottom: 0.3rem;
}

.prose-article h3 {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
  border-bottom: none !important;
}

.prose-article p {
  font-size: 1.05rem !important;
  margin-bottom: 1.25rem !important;
  color: #d1d5db !important;
}

.prose-article li {
  color: #d1d5db !important;
  font-size: 1.05rem !important;
}

.prose-article a {
  color: #67e8f9 !important;
}

.prose-article img {
  border-radius: 0.5rem;
  border: 1px solid #374151;
}

.prose-article code {
  background: #1f2937 !important;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.prose-article pre {
  background: #111827 !important;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 1.25rem;
}

/* Post navigation */
.post-nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
}

.post-nav-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s;
  display: block;
}

.post-nav-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

.post-nav-card.next {
  text-align: right;
}

.post-nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280 !important;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-nav-card.next .post-nav-label {
  justify-content: flex-end;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #67e8f9 !important;
  line-height: 1.35;
}

.post-nav-empty {
  visibility: hidden;
}

/* Mastodon CTA on blog */
.blog-cta {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
  border: 1px solid #1f2937;
  border-radius: 1rem;
  text-align: center;
}

.blog-cta p {
  color: #9ca3af !important;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.blog-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f3f4f6 !important;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s;
}

.blog-cta a:hover {
  background: rgba(255, 255, 255, 0.14);
}