/* Hero Section */
.blog-hero {
    position: relative;
    height: clamp(300px, 50vh, 500px);
    overflow: hidden;
}

.blog-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            var(--primary),
            transparent,
            transparent);
}

/* Blog Content Section */
.blog-section {
    padding: 4rem 1.5rem;
}

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

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
    .blog-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
    }
}

/* Blog Header */
.blog-header {
    margin-bottom: 2rem;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-meta-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* Share Buttons */
.blog-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.blog-share-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
}

.share-btn {
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
}

.share-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Blog Content */
.blog-content {
    margin: 3rem 0;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--muted);
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2 {
    color: var(--white);
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
}

.blog-content h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.blog-content ul,
.blog-content ol {
    margin: 1rem 0 1.5rem 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* Tags Section */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
}

.blog-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.25rem;
    color: var(--accent);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
}

/* Related Articles */
.related-section {
    margin-top: 3rem;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.related-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.related-card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-card-image img {
    transform: scale(1.05);
}

.related-card-content {
    padding: 1rem;
}

.related-card-title {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.related-card:hover .related-card-title {
    color: var(--accent);
}

.related-card-date {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px; /* adjust based on header height */
    height: fit-content;
}

.sidebar-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

/* Author Card */
.author-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

.author-details h4 {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.author-details p {
    color: var(--muted);
    font-size: 0.75rem;
}

.author-bio {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Quick Links */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.quick-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent);
}

.quick-link.primary {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

.quick-link.primary:hover {
    background: rgba(59, 130, 246, 0.9);
}

.quick-link svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .blog-hero {
        height: 300px;
    }

    .blog-title {
        font-size: 1.875rem;
    }

    .blog-section {
        padding: 2rem 1rem;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-content {
        margin: 2rem 0;
    }

    .blog-grid {
        gap: 1rem;
    }
}

/* ======================================================
   BLOG CONTENT TYPOGRAPHY
   Scoped only to blog content
   ====================================================== */

.blog-content {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.75;
  color: #e5e7eb;
}

.blog-content h1,
.blog-content h2,
.blog-content h3 {
  color: #f8fafc; /* slate-50 */
}

/* ----------------------
   Headings
   ---------------------- */

.blog-content h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  line-height: 1.2;
  margin: 2.5rem 0 1.5rem;
  font-weight: 700;
}

.blog-content h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.875rem);
  line-height: 1.3;
  margin: 2.5rem 0 1.25rem;
  font-weight: 600;
}

.blog-content h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  line-height: 1.4;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

/* ----------------------
   Paragraphs & Text
   ---------------------- */

.blog-content p {
  margin: 0 0 1.25rem;
}

.blog-content strong {
  font-weight: 600;
}

/* ----------------------
   Lists
   ---------------------- */

.blog-content ul,
.blog-content ol {
  padding-left: 1.25rem;
  margin: 1rem 0 1.5rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

/* ----------------------
   Links
   ---------------------- */

.blog-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-content a:hover {
  text-decoration-thickness: 2px;
}

/* ----------------------
   FAQ spacing polish
   ---------------------- */

.blog-content h2 + h3 {
  margin-top: 1.5rem;
}

/* ======================================================
   Mobile Readability Enhancements
   ====================================================== */

@media (max-width: 480px) {
  .blog-content {
    line-height: 1.8;
  }
}

