/* ==========================================================================
   Blog styling — UniversityJano.com
   Uses the same design tokens as the rest of the site (css/design-system.css)
   so the blog matches the main site's look and feel exactly.
   ========================================================================== */

.blog-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--text-inverse);
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}

.blog-hero .container {
  max-width: 800px;
  margin: 0 auto;
}

.blog-hero h1 {
  color: #ffffff !important;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.blog-hero p {
  color: #cbd5e1;
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
}

.blog-listing-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-400);
}

.blog-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-surface-alt);
}

.blog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-img-wrap img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.blog-card-meta .blog-category-pill {
  background: var(--blue-50);
  color: var(--blue-600);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
}

.blog-card h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--navy-900);
  margin: 0 0 0.6rem;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  flex: 1;
}

.blog-card-readmore {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue-600);
}

.blog-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Featured (first) post gets a larger treatment on wide screens */
.blog-featured-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-radius: var(--radius-lg);
}

.blog-featured-card .blog-card-img-wrap {
  aspect-ratio: auto;
  height: 100%;
  min-height: 260px;
}

.blog-featured-card .blog-card-body {
  justify-content: center;
  padding: 2rem;
}

.blog-featured-card h2 {
  font-size: 1.5rem;
}

.blog-featured-card p {
  font-size: 1rem;
  -webkit-line-clamp: 3;
}

@media (max-width: 760px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-featured-card .blog-card-img-wrap {
    min-height: 200px;
  }
}

/* --- Article page --- */
.blog-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.blog-article .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}

.blog-article .back-link:hover {
  text-decoration: underline;
}

.blog-article .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-subtle);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.blog-article .meta .blog-category-pill {
  background: var(--blue-50);
  color: var(--blue-600);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.blog-article h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  line-height: 1.25;
  margin-bottom: 1.25rem;
  color: var(--navy-900);
}

.blog-article img.cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.blog-article h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--navy-900);
  font-size: 1.4rem;
}

.blog-article h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--navy-900);
  font-size: 1.15rem;
}

.blog-article p,
.blog-article li {
  line-height: 1.8;
  color: var(--text-main);
  font-size: 1.03rem;
}

.blog-article p {
  margin-bottom: 1.1rem;
}

.blog-article ul,
.blog-article ol {
  margin: 0 0 1.25rem 1.25rem;
}

.blog-article li {
  margin-bottom: 0.4rem;
}

.blog-article a {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--blue-100);
  text-underline-offset: 2px;
}

.blog-article a:hover {
  text-decoration-color: var(--blue-600);
}

.blog-article strong {
  color: var(--navy-900);
}

.blog-article blockquote {
  border-left: 4px solid var(--orange-500);
  background: var(--orange-50);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-main);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.blog-tags .tag-pill {
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
}

.blog-cta-box {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 2.5rem;
  text-align: center;
}

.blog-cta-box p:first-child {
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.blog-cta-box p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.blog-cta-box .btn-primary,
.blog-cta-box .btn-outline {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  margin: 0.3rem;
  font-size: 0.92rem;
}

.blog-cta-box .btn-primary {
  background: var(--blue-600);
  color: #fff;
}

.blog-cta-box .btn-primary:hover {
  background: var(--navy-700);
}

.blog-cta-box .btn-outline {
  background: transparent;
  color: var(--blue-600);
  border: 2px solid var(--blue-600);
}

.blog-cta-box .btn-outline:hover {
  background: var(--blue-50);
}

/* ===== New Stitch-design prose styling for {{ content }} markdown output ===== */
.blog-prose h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0F172A;
  margin-top: 0.5rem;
}
.blog-prose h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: #0F172A;
  margin-top: 0.25rem;
}
.blog-prose p {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 28px;
  color: #475569;
  margin: 0;
}
.blog-prose ul, .blog-prose ol {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 28px;
  color: #475569;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.blog-prose ul { list-style: disc; }
.blog-prose ol { list-style: decimal; }
.blog-prose strong { color: #0F172A; font-weight: 700; }
.blog-prose a { color: #FF7A00; font-weight: 600; text-decoration: underline; }
.blog-prose a:hover { color: #EA580C; }
.blog-prose blockquote {
  border-left: 4px solid #FF7A00;
  background: #F8FAFC;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  color: #475569;
  font-style: italic;
}
.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(11,27,61,0.08);
}
.blog-prose th {
  background: #0B1B3D;
  color: #ffffff;
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 700;
}
.blog-prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E2E8F0;
  color: #475569;
}
.blog-prose tr:last-child td { border-bottom: none; }
.blog-prose tr:nth-child(even) { background: #F8FAFC; }
.blog-prose img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(11,27,61,0.08);
  margin: 0.75rem 0;
  display: block;
}
.blog-prose hr {
  border: none;
  border-top: 1px solid #E2E8F0;
  margin: 1rem 0;
}

/* ===== Blog hero: background image, glow blobs, entrance + hover animation ===== */
@keyframes blogFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blogFloat { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-18px) translateX(10px); } }
@keyframes blogPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1.25rem 4rem;
}

.blog-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1750379046723-5ed69ff11571?auto=format&fit=crop&w=1600&q=70');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.32;
  mix-blend-mode: luminosity;
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6,14,34,0.92) 10%, rgba(11,27,61,0.75) 55%, rgba(19,47,107,0.55) 100%);
}

.blog-hero-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  pointer-events: none;
  animation: blogFloat 9s ease-in-out infinite;
}

.blog-hero-inner {
  position: relative;
  z-index: 2;
  animation: blogFadeUp 0.7s ease-out both;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--orange-500);
  color: #ffffff;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
  animation: blogPulse 2.5s ease-in-out infinite;
}

.blog-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1rem;
}

.blog-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blog-hero-stat b {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--orange-300);
}

.blog-hero-stat span {
  font-size: 0.78rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Card entrance + hover polish */
.blog-grid .blog-card {
  animation: blogFadeUp 0.6s ease-out both;
}
.blog-grid .blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-grid .blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-grid .blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-grid .blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-grid .blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-grid .blog-card:nth-child(6) { animation-delay: 0.3s; }
