/* auth/blog-style.css */

:root {
    /* Brand Palette */
    --blog-primary: #5b3bb0;
    --blog-primary-dark: #4a2f91;
    --blog-primary-light: #7c5cdb;
    --blog-accent: #00d2ff;

    /* Typography & Backgrounds */
    --text-main: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-light: #e2e8f0;

    /* Comment System Specifics */
    --comment-bg: #ffffff;
    --comment-bg-alt: #f8fafc;
    --reply-line-color: #cbd5e1;
    --admin-bg-tint: #f5f3ff;
    --admin-border-tint: #e0e7ff;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* =================================================================== */
/* --- 1. GLOBAL & LAYOUT --- */
/* =================================================================== */

.blog-page-body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
}

/* --- Hero Section --- */
.blog-hero-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px 40px;
    /* Reduced bottom padding */
    text-align: center;
    color: white;
    margin-bottom: 10px;
    /* Reduced margin */
    border-radius: 0 0 40px 40px;
    box-shadow: 0 20px 40px -10px rgba(91, 59, 176, 0.4);
    overflow: hidden;
}

.hero-overlay-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 20%);
    background-size: 100% 100%;
    opacity: 0.6;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-container h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    font-weight: 900;
    line-height: 1.2;
}

.hero-container .highlight {
    color: var(--blog-accent);
    position: relative;
    display: inline-block;
}

.hero-container p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 45px;
    line-height: 1.7;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    transition: transform 0.3s ease;
}

.search-input-wrapper:hover {
    transform: translateY(-3px);
}

.search-container input {
    width: 100%;
    padding: 20px 55px 20px 25px;
    border-radius: 20px;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.98);
}

.search-container box-icon {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    opacity: 0.6;
}

/* =================================================================== */
/* --- 2. BLOG LISTING ELEMENTS --- */
/* =================================================================== */

.categories-bar-wrapper {
    overflow-x: auto;
    margin-bottom: 10px;
    padding-bottom: 12px;
    display: flex;
    justify-content: flex-start;
    /* Prevent clipping */
    -webkit-overflow-scrolling: touch;
    /* mask-image removed to ensure full visibility */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.categories-bar-wrapper::-webkit-scrollbar {
    height: 6px;
}

.categories-bar-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.categories-bar-wrapper::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.categories-bar-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

@media (max-width: 768px) {
    .categories-bar-wrapper {
        justify-content: flex-start;
        padding-left: 20px;
        padding-right: 20px;
        mask-image: none;
    }
}

.categories-bar {
    display: flex;
    gap: 15px;
    padding: 5px;
    margin: 0 auto;
    /* Center content when it fits, safe when overflowing */
    min-width: max-content;
    /* Critical: Trigger overflow on parent */
    flex-wrap: nowrap;
}

.category-btn {
    background: white;
    border: 1px solid var(--border-light);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.category-btn.active {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
    box-shadow: 0 8px 20px rgba(91, 59, 176, 0.3);
    transform: translateY(-2px);
}

.category-btn:hover:not(.active) {
    background: #f8fafc;
    color: var(--blog-primary);
    transform: translateY(-2px);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
    padding-bottom: 60px;
}

.article-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: rgba(91, 59, 176, 0.1);
}

.card-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #cbd5e1;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.article-card:hover img {
    transform: scale(1.1);
}

.card-category-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blog-primary);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.card-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.2s;
}

.article-card:hover .card-title {
    color: var(--blog-primary);
}

.card-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-light);
    padding-top: 18px;
}

.author-info {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 700;
    color: var(--text-secondary);
}

.pagination-wrapper {
    text-align: center;
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pagination-wrapper .spinner-loader {
    margin: 0 auto;
}

.end-message {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    padding: 8px 24px;
    background: #f8fafc;
    border-radius: 50px;
    border: 1px solid var(--border-light);
}

.btn-load {
    background: white;
    border: 2px solid var(--border-light);
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
    box-shadow: var(--shadow-sm);
}

.btn-load:hover {
    border-color: var(--blog-primary);
    color: var(--blog-primary);
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    height: 420px;
    border: none;
}

.cat-skeleton {
    width: 100px;
    height: 45px;
    background: #e2e8f0;
    border-radius: 25px;
    opacity: 0.6;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- Blog Message / Error State System --- */
.blog-message {
    text-align: center;
    padding: 50px 30px;
    color: var(--text-muted);
    font-weight: 600;
    grid-column: 1/-1;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: blogMsgFadeIn 0.4s ease-out;
}

@keyframes blogMsgFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-message-icon {
    margin-bottom: 8px;
    animation: blogIconPulse 2s ease-in-out infinite;
}

@keyframes blogIconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.blog-message-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
}

.blog-message-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
    line-height: 1.6;
}

/* Error type variants */
.blog-message.warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
}

.blog-message.error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
}

.blog-message.info {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid #ddd6fe;
}

.blog-message.empty {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

/* Retry Button */
.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 32px;
    border-radius: 50px;
    border: 2px solid var(--blog-primary);
    background: white;
    color: var(--blog-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(91, 59, 176, 0.1);
}

.retry-btn:hover {
    background: var(--blog-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91, 59, 176, 0.3);
}

.retry-btn:active {
    transform: translateY(0);
}

/* Fade-in animation for article cards */
.article-card.fade-in-up {
    animation: cardFadeInUp 0.5s ease-out both;
}

@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delay for grid items */
.articles-grid .article-card.fade-in-up:nth-child(1) {
    animation-delay: 0.05s;
}

.articles-grid .article-card.fade-in-up:nth-child(2) {
    animation-delay: 0.1s;
}

.articles-grid .article-card.fade-in-up:nth-child(3) {
    animation-delay: 0.15s;
}

.articles-grid .article-card.fade-in-up:nth-child(4) {
    animation-delay: 0.2s;
}

.articles-grid .article-card.fade-in-up:nth-child(5) {
    animation-delay: 0.25s;
}

.articles-grid .article-card.fade-in-up:nth-child(6) {
    animation-delay: 0.3s;
}

.articles-grid .article-card.fade-in-up:nth-child(7) {
    animation-delay: 0.35s;
}

.articles-grid .article-card.fade-in-up:nth-child(8) {
    animation-delay: 0.4s;
}

.articles-grid .article-card.fade-in-up:nth-child(9) {
    animation-delay: 0.45s;
}

/* =================================================================== */
/* --- 3. ARTICLE PAGE & CONTENT --- */
/* =================================================================== */

.article-view-body {
    background: white;
}

.article-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 50px;
    padding-bottom: 60px;
}

/* --- Loading Container (Centered Spinner) --- */
.article-loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    min-height: 60vh;
    min-height: 60dvh;
    width: 100%;
    padding: 40px 20px;
}

.article-loading-container .spinner-loader {
    width: 60px;
    height: 60px;
}

.article-loading-container p {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

/* --- HEADER META TOP (Redesigned & Sophisticated) --- */
.article-header-modern {
    text-align: center;
    margin-bottom: 35px;
    padding: 0 12px;
}

.header-meta-top {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 12px 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border: 1px solid var(--border-light);
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(91, 59, 176, 0.08);
    backdrop-filter: blur(8px);
}

.back-link {
    text-decoration: none;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
    line-height: 1;
}

.back-link box-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.back-link:hover {
    color: var(--blog-primary);
    background: rgba(91, 59, 176, 0.08);
    transform: translateX(3px);
}

.category-pill {
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-primary-dark));
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(91, 59, 176, 0.25);
    border: none;
}

/* Article Title */
.article-title-main {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 35px;
}

/* --- HEADER META BOTTOM (Compact & Professional) --- */
.header-meta-bottom {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    color: var(--text-secondary);
    font-size: 1rem;
    background: #f8fafc;
    /* Lighter BG */
    border-radius: 16px;
    padding: 12px 30px;
    border: 1px solid #f1f5f9;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(91, 59, 176, 0.2);
}

.meta-text .label {
    display: none;
}

.meta-text .value {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.meta-divider {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
    opacity: 0.5;
}

/* Grid Layout */
.article-grid-layout {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 60px;
    margin-top: 60px;
}

.article-main-col {
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
}

.article-hero-image {
    margin-bottom: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sidebar Share */
/* Sidebar Share - Renamed to avoid adblockers */
.side-actions-sticky {
    position: sticky;
    top: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10;
    /* Ensure it stays above other content */
}

.action-label {
    writing-mode: vertical-rl;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    user-select: none;
}

.social-icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    /* Ensure no underline for links */
    position: relative;
    /* Context for nested icons */
    z-index: 2;
    /* Ensure clickable */
}

/* Explicitly style box-icons inside to ensure visibility */
.social-icon-btn box-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    fill: currentColor;
    /* Inherit color from parent */
    width: 24px;
    /* Explicit size */
    height: 24px;
    /* Explicit size */
}

.social-icon-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.social-icon-btn.brand-wa:hover,
.footer-action-btn.brand-wa {
    color: #25D366;
    border-color: #25D366;
    background: #f0fdf4;
}

.social-icon-btn.brand-fb:hover,
.footer-action-btn.brand-fb {
    color: #1877F2;
    border-color: #1877F2;
    background: #eff6ff;
}

.social-icon-btn.action-copy:hover,
.footer-action-btn.action-copy {
    color: var(--text-main);
    border-color: var(--text-main);
    background: #f8fafc;
}

/* Article Body */
.article-body-text {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #334155;
    margin-bottom: 40px;
    font-weight: 400;
}

.article-body-text h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-main);
    position: relative;
    letter-spacing: -0.5px;
}

.article-body-text p {
    margin-bottom: 20px;
}

.article-body-text img {
    max-width: 100%;
    border-radius: 16px;
    margin: 28px 0;
    box-shadow: var(--shadow-lg);
}

.article-body-text ul,
.article-body-text ol {
    margin: 24px 0;
    padding-right: 20px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px 30px;
    border: 1px solid var(--border-light);
}

.article-body-text li {
    margin-bottom: 8px;
}

.article-body-text a {
    color: var(--blog-primary);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid rgba(91, 59, 176, 0.3);
    transition: all 0.2s ease;
    padding-bottom: 1px;
}

.article-body-text a:hover {
    border-bottom-color: var(--blog-primary);
    background-color: rgba(91, 59, 176, 0.05);
    border-radius: 4px;
}

/* Footer & Author */
.article-footer-actions {
    background: linear-gradient(to right, #f8fafc, #ffffff);
    padding: 24px 28px;
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--border-light);
    margin-bottom: 50px;
    box-shadow: var(--shadow-md);
}

/* MEDIA QUERY: Hide footer actions on large screens */
@media (min-width: 900px) {
    .article-footer-actions {
        display: none !important;
    }
}

.footer-share-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.1rem;
    white-space: nowrap;
}

.share-buttons-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.footer-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-action-btn.brand-wa {
    background: #25D366;
    color: white;
}

.footer-action-btn.brand-fb {
    background: #1877F2;
    color: white;
}

.footer-action-btn.action-copy {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

/* --- Author Box (Redesigned & Integrated) --- */
.author-box {
    background: white;
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    border-right: 5px solid var(--blog-primary);
    /* Brand Accent */
    margin-bottom: 40px;
    margin-top: 30px;
}

.bio-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--blog-primary);
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.bio-text h5 {
    margin: 0 0 6px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.bio-text strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: var(--text-main);
    font-weight: 800;
}

.bio-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Section Divider (Redesigned) --- */
.related-wrapper {
    margin-top: 60px;
    padding-top: 40px;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 50px;
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    height: 2px;
    background: linear-gradient(to right, #cbd5e1, #e2e8f0);
    flex: 1;
    max-width: 150px;
    border-radius: 2px;
}

.section-divider h3 {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
}

.related-grid-engaging {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-card-engaging {
    position: relative;
    height: 320px;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    background: #1e293b;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
}

.related-card-engaging:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.related-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.5s;
}

.related-card-engaging:hover .related-bg {
    opacity: 0.5;
    transform: scale(1.1);
}

.related-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    color: white;
    z-index: 2;
}

.related-cat {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--blog-accent);
    margin-bottom: 10px;
    display: block;
    letter-spacing: 1px;
}

.related-title {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* =================================================================== */
/* --- 5. COMPLEX COMMENTS SYSTEM --- */
/* =================================================================== */

.comments-section-container {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    margin-top: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.comments-header {
    margin-bottom: 30px;
    text-align: center;
}

/* Improved Title Style */
.comments-header h3 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: #1e293b;
    /* Dark Navy */
    position: relative;
    display: inline-block;
}

.comments-header h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--blog-primary);
    margin: 10px auto 0;
    border-radius: 4px;
}

/* Thread Wrapper */
.comment-thread {
    position: relative;
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease;
}

.comment {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* Avatar */
.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f1f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #5b3bb0;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow:
        0 0 0 1px rgba(91, 59, 176, 0.08),
        0 4px 12px rgba(91, 59, 176, 0.12),
        inset 0 1px 3px rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.comment-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 100% 0%, rgba(123, 92, 219, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.comment.admin-comment .comment-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: white;
    box-shadow:
        0 0 0 1px rgba(91, 59, 176, 0.15),
        0 4px 16px rgba(102, 126, 234, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.3),
        0 -2px 8px rgba(118, 75, 162, 0.2);
}

/* Content Bubble */
.comment-content {
    flex-grow: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.comment-author {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.verification-badge {
    /* 1. Base Layout & Alignment */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;

    /* 2. Contour-hugging Drop Shadow 
       (Replaces box-shadow, allowing the shadow to trace the ripples) */
    filter: drop-shadow(0 2px 4px rgba(29, 155, 240, 0.35));

    /* 3. Typography & Icon Rendering */
    color: #ffffff;
    font-weight: 600;
    line-height: 1;
    z-index: 1; /* Establishes stacking context */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 4. The Spaghetti-Ripple Shape Layer */
.verification-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    
    /* 5. 3D Radial Gradient 
       Simulates lighting/inner-glow without needing inset box-shadows */
    background: radial-gradient(circle at 35% 25%, #4cb8ff 0%, #1d9bf0 45%, #0c85d0 100%);
    
    /* 6. Perfect Bezier-Curve Ripple Mask (14 waves, replacing the jagged polygon) */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100.0 50.0 C100.0 53.7,91.6 56.3,90.9 59.3 C90.2 62.4,96.7 68.3,95.0 71.7 C93.4 75.1,84.8 73.7,82.8 76.2 C80.9 78.6,84.1 86.8,81.2 89.1 C78.3 91.4,71.1 86.5,68.2 87.8 C65.4 89.2,64.8 97.9,61.1 98.7 C57.5 99.6,53.1 92.0,50.0 92.0 C46.9 92.0,42.5 99.6,38.9 98.7 C35.2 97.9,34.6 89.2,31.8 87.8 C28.9 86.5,21.7 91.4,18.8 89.1 C15.9 86.8,19.1 78.6,17.2 76.2 C15.2 73.7,6.6 75.1,5.0 71.7 C3.3 68.3,9.8 62.4,9.1 59.3 C8.4 56.3,0.0 53.7,0.0 50.0 C0.0 46.3,8.4 43.7,9.1 40.7 C9.8 37.6,3.3 31.7,5.0 28.3 C6.6 24.9,15.2 26.3,17.2 23.8 C19.1 21.4,15.9 13.2,18.8 10.9 C21.7 8.6,28.9 13.5,31.8 12.2 C34.6 10.8,35.2 2.1,38.9 1.3 C42.5 0.4,46.9 8.0,50.0 8.0 C53.1 8.0,57.5 0.4,61.1 1.3 C64.8 2.1,65.4 10.8,68.2 12.2 C71.1 13.5,78.3 8.6,81.2 10.9 C84.1 13.2,80.9 21.4,82.8 23.8 C84.8 26.3,93.4 24.9,95.0 28.3 C96.7 31.7,90.2 37.6,90.9 40.7 C91.6 43.7,100.0 46.3,100.0 50.0Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100.0 50.0 C100.0 53.7,91.6 56.3,90.9 59.3 C90.2 62.4,96.7 68.3,95.0 71.7 C93.4 75.1,84.8 73.7,82.8 76.2 C80.9 78.6,84.1 86.8,81.2 89.1 C78.3 91.4,71.1 86.5,68.2 87.8 C65.4 89.2,64.8 97.9,61.1 98.7 C57.5 99.6,53.1 92.0,50.0 92.0 C46.9 92.0,42.5 99.6,38.9 98.7 C35.2 97.9,34.6 89.2,31.8 87.8 C28.9 86.5,21.7 91.4,18.8 89.1 C15.9 86.8,19.1 78.6,17.2 76.2 C15.2 73.7,6.6 75.1,5.0 71.7 C3.3 68.3,9.8 62.4,9.1 59.3 C8.4 56.3,0.0 53.7,0.0 50.0 C0.0 46.3,8.4 43.7,9.1 40.7 C9.8 37.6,3.3 31.7,5.0 28.3 C6.6 24.9,15.2 26.3,17.2 23.8 C19.1 21.4,15.9 13.2,18.8 10.9 C21.7 8.6,28.9 13.5,31.8 12.2 C34.6 10.8,35.2 2.1,38.9 1.3 C42.5 0.4,46.9 8.0,50.0 8.0 C53.1 8.0,57.5 0.4,61.1 1.3 C64.8 2.1,65.4 10.8,68.2 12.2 C71.1 13.5,78.3 8.6,81.2 10.9 C84.1 13.2,80.9 21.4,82.8 23.8 C84.8 26.3,93.4 24.9,95.0 28.3 C96.7 31.7,90.2 37.6,90.9 40.7 C91.6 43.7,100.0 46.3,100.0 50.0Z' fill='black'/%3E%3C/svg%3E");
    
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Optional: Icon sizing inside the badge */
.verification-badge svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    margin-top: 1px; /* Optical centering */
}

.verification-badge box-icon {
    width: 15px;
    height: 15px;
    fill: white;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.1));
}

/* Text Bubble */
.comment-text {
    background: var(--comment-bg-alt);
    padding: 14px 18px;
    border-radius: 16px 0 16px 16px;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.admin-comment .comment-text {
    background: var(--admin-bg-tint);
    border-color: var(--admin-border-tint);
    color: #312e81;
}

.reply-mention {
    color: var(--blog-primary);
    font-weight: 800;
    margin-left: 5px;
    background: rgba(91, 59, 176, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
}

/* Actions Bar */
.comment-actions {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    align-items: center;
    padding-right: 5px;
}

.comment-action {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.comment-action:hover,
.comment-action.liked {
    color: var(--blog-primary);
    background: #f0ecfb;
}

.comment-action.liked box-icon {
    fill: var(--blog-primary-dark);
}

.comment-action box-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.2s;
}

.comment-action:hover box-icon {
    transform: scale(1.1);
}

.toggle-replies-btn {
    background: none;
    border: none;
    color: var(--blog-primary);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    margin-right: auto;
}

.toggle-replies-btn:hover {
    background: #f0ecfb;
}

/* Nested Replies */
.replies-container {
    margin-top: 20px;
    margin-right: 25px;
    padding-right: 25px;
    border-right: 2px solid var(--reply-line-color);
    display: none;
    position: relative;
}

.replies-container::before {
    content: '';
    position: absolute;
    top: -12px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--reply-line-color);
    border-right: 2px solid var(--reply-line-color);
    border-bottom-right-radius: 15px;
}

/* Options Menu */
.comment-options-wrapper {
    position: relative;
}

.comment-options-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: #cbd5e1;
    display: flex;
    transition: all 0.2s;
}

.comment-options-toggle:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.comment-options-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 140px;
    z-index: 10;
    display: none;
    padding: 6px;
    flex-direction: column;
    gap: 2px;
}

.comment-options-menu.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.comment-option {
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    font-weight: 600;
}

.comment-option:hover {
    background: #f8fafc;
    color: var(--text-main);
}

.comment-option.delete:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* --- Forms (Post & Reply) --- */
#comment-form-container {
    margin-top: 35px;
    /* Space from comments */
    padding-top: 20px;
    border-top: 2px dashed #f1f5f9;
}

.comment-form {
    position: relative;
}

.comment-form textarea,
.edit-comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid var(--border-light);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    background: #fcfcfc;
    transition: all 0.2s;
    color: var(--text-main);
}

.comment-form textarea:focus,
.edit-comment-textarea:focus {
    border-color: var(--blog-primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(91, 59, 176, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}

.button {
    padding: 10px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.button.primary {
    background: var(--blog-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.button.primary:hover {
    background: var(--blog-primary-dark);
    transform: translateY(-2px);
}

.button.secondary {
    background: #e2e8f0;
    color: var(--text-main);
}

.button.secondary:hover {
    background: #cbd5e1;
}

.login-prompt-comment {
    text-align: center;
    padding: 24px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.login-prompt-comment a {
    color: var(--blog-primary);
    text-decoration: none;
    border-bottom: 2px solid rgba(91, 59, 176, 0.2);
}

/* =================================================================== */
/* --- 6. DESKTOP LAYOUT OPTIMIZATION --- */
/* =================================================================== */
/* Professional 2-column layout for desktop with integrated sidebar */

@media (min-width: 1201px) {

    /* Convert wrapper to intelligent 2-column grid */
    .main-content-wrapper.article-wrapper {
        display: grid;
        grid-template-columns: 1fr 330px;
        grid-auto-flow: row;
        gap: 50px;
        max-width: 1450px;
        margin: 0 auto;
        align-items: start;
        padding-top: 50px;
        padding-bottom: 60px;
        padding-left: 30px;
        padding-right: 30px;
    }

    /* Article loading state spans full width */
    #article-loading-state {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    /* Main article content in left/primary column */
    #article-content-container {
        grid-column: 1;
        grid-row: 2;
    }

    /* Related articles as sticky sidebar */
    #related-articles-section {
        grid-column: 2;
        grid-row: 2 / 4;
        position: sticky;
        top: 80px;
        align-self: start;
        width: 100%;
        padding-left: 20px;
        border-left: 1px solid var(--border-light);
        margin-top: 0;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        will-change: top;
        transition: top 0s;
    }

    /* Related section title styling for sidebar context */
    #related-articles-section .section-divider {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 25px;
        margin-top: 0;
        padding: 0;
        flex-shrink: 0;
    }

    #related-articles-section .section-divider::before,
    #related-articles-section .section-divider::after {
        display: none;
    }

    #related-articles-section .section-divider h3 {
        font-size: 1.3rem;
        margin: 0;
        font-weight: 800;
    }

    /* Single column grid for related articles in narrower sidebar */
    .related-grid-engaging {
        grid-template-columns: 1fr;
        gap: 20px;
        display: grid;
        flex: 1;
        min-height: 0;
    }

    /* Compact cards for sidebar - flex for better scroll behavior */
    .related-card-engaging {
        height: 200px;
        border-radius: 12px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .related-content {
        padding: 16px;
    }

    .related-cat {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .related-title {
        font-size: 1rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Comments section in primary column, below article */
    #comments-section {
        grid-column: 1;
        grid-row: 3;
        margin-top: 50px;
        position: relative;
        z-index: 1;
    }

    /* Desktop overrides for comments styling */
    .comments-section-container {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        padding: 45px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
        background: var(--bg-card);
        border: 1px solid var(--border-light);
        border-radius: 24px;
    }
}

/* Large desktop screens: even more optimized spacing */
@media (min-width: 1401px) {
    .main-content-wrapper.article-wrapper {
        grid-template-columns: 1fr 350px;
        gap: 60px;
        padding-left: 40px;
        padding-right: 40px;
    }

    #related-articles-section {
        padding-left: 25px;
    }

    .related-card-engaging {
        height: 220px;
    }


}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {

    /* Reset grid layout for tablet/mobile */
    .main-content-wrapper.article-wrapper {
        display: block;
        max-width: 1200px;
        margin: 0 auto;
        padding-top: 50px;
        padding-bottom: 60px;
    }

    /* Ensure related articles display below article */
    #article-content-container {
        display: block;
    }

    #related-articles-section {
        position: static;
        max-height: none;
        border-left: none;
        padding-left: 0;
        margin-top: 60px;
        padding-top: 40px;
    }

    #related-articles-section .section-divider {
        flex-direction: row;
        text-align: center;
        gap: 25px;
    }

    #related-articles-section .section-divider::before,
    #related-articles-section .section-divider::after {
        display: block;
        content: '';
        height: 2px;
        background: linear-gradient(to right, #cbd5e1, #e2e8f0);
        flex: 1;
        max-width: 150px;
        border-radius: 2px;
    }

    #comments-section {
        margin-top: 0;
    }

    /* Revert related grid to responsive columns */
    .related-grid-engaging {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .related-card-engaging {
        height: 320px;
    }

    .related-content {
        padding: 30px;
    }

    .related-cat {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .related-title {
        font-size: 1.3rem;
        line-height: 1.4;
    }

    /* Remove scrollbar styling */
    #related-articles-section::-webkit-scrollbar {
        display: none;
    }

    .article-grid-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }

    .article-title-main {
        font-size: 2rem;
    }

    .comments-section-container {
        padding: 24px;
    }

    .article-loading-container {
        min-height: 70vh;
        min-height: 70dvh;
    }
}


@media (max-width: 768px) {
    .article-wrapper {
        padding-top: 40px;
        padding-bottom: 45px;
    }

    .article-loading-container {
        min-height: 75vh;
        min-height: 75dvh;
        padding: 30px 16px;
        gap: 16px;
    }

    .article-loading-container .spinner-loader {
        width: 50px;
        height: 50px;
    }

    .article-loading-container p {
        font-size: 0.95rem;
    }
}

/* Ultra-small screens (< 360px width) */
@media (max-width: 360px) {
    .blog-hero-section {
        padding: 50px 12px 35px;
    }

    .hero-container h1 {
        font-size: 1.35rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
        margin-bottom: 12px;
    }

    .hero-container p {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .article-loading-container {
        min-height: 80vh;
        min-height: 80dvh;
        padding: 20px 12px;
        gap: 12px;
    }

    .article-loading-container .spinner-loader {
        width: 45px;
        height: 45px;
    }

    .article-loading-container p {
        font-size: 0.9rem;
    }

    .article-header-modern {
        margin-bottom: 16px;
        padding: 0 6px;
    }

    .header-meta-top {
        gap: 6px;
        padding: 6px 10px;
        margin-bottom: 12px;
    }

    .back-link {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    .category-pill {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .article-body-text {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 24px;
    }

    .article-body-text h2 {
        font-size: 1.15rem;
        margin-top: 22px;
        margin-bottom: 12px;
    }

    .article-body-text p {
        margin-bottom: 12px;
    }

    .article-body-text img {
        margin: 14px 0;
        border-radius: 10px;
    }

    .article-body-text ul,
    .article-body-text ol {
        margin: 14px 0;
        padding: 12px 16px;
    }

    .article-body-text li {
        margin-bottom: 4px;
    }

    .author-box {
        padding: 12px;
        gap: 10px;
        margin-bottom: 22px;
        margin-top: 16px;
    }

    .bio-avatar {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .bio-text h5 {
        font-size: 0.6rem;
    }

    .bio-text strong {
        font-size: 0.9rem;
    }

    .bio-text p {
        font-size: 0.8rem;
    }

    .article-footer-actions {
        padding: 12px 12px;
        gap: 8px;
        margin-bottom: 22px;
    }

    .footer-share-label {
        font-size: 0.8rem;
        gap: 4px;
    }

    .footer-share-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        gap: 3px;
    }

    .section-divider {
        gap: 8px;
        margin-bottom: 22px;
    }

    .section-divider::before,
    .section-divider::after {
        max-width: 25px;
    }

    .section-divider h3 {
        font-size: 0.95rem;
    }

    .comments-section-container {
        padding: 12px;
        margin-top: 22px;
        border-radius: 12px;
    }

    .comments-header h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .comments-header h3::after {
        width: 30px;
        margin: 6px auto 0;
    }

    .comment-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .comment {
        gap: 8px;
    }

    .comment-text {
        padding: 8px 10px;
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .comment-author {
        font-size: 0.8rem;
    }

    .comment-timestamp {
        font-size: 0.65rem;
    }

    #comment-form-container {
        margin-top: 22px;
        padding-top: 12px;
    }

    .comment-form textarea {
        min-height: 80px;
        padding: 10px 10px;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    .article-wrapper {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .article-main-col {
        padding: 0 4px;
    }
}

@media (max-width: 600px) {
    .blog-hero-section {
        padding: 60px 16px 40px;
    }

    .hero-container h1 {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-header-modern {
        padding: 0;
        margin-bottom: 20px;
    }

    .header-meta-top {
        gap: 8px;
        padding: 8px 14px;
        margin-bottom: 16px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(248, 250, 252, 0.93));
    }

    .back-link {
        font-size: 0.8rem;
        padding: 3px 8px;
        gap: 3px;
    }

    .category-pill {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    /* MOBILE HIDE TITLE */
    .article-title-main {
        display: none;
    }

    /* MOBILE COMPACT BOTTOM META */
    .header-meta-bottom {
        padding: 6px 10px;
        gap: 8px;
        width: auto;
        display: inline-flex;
        flex-direction: row;
        font-size: 0.8rem;
        background: #fcfcfc;
        border-radius: 12px;
    }

    .avatar-circle {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .meta-text .value {
        font-size: 0.75rem;
    }

    .meta-divider {
        display: none;
    }

    /* Remove divider to save space */

    .article-body-text {
        font-size: 1.0rem;
        line-height: 1.75;
        margin-bottom: 28px;
    }

    .article-body-text h2 {
        font-size: 1.35rem;
        margin-top: 28px;
        margin-bottom: 14px;
        line-height: 1.3;
    }

    .article-body-text p {
        margin-bottom: 14px;
    }

    .article-body-text img {
        margin: 18px 0;
        border-radius: 12px;
    }

    .article-body-text ul,
    .article-body-text ol {
        margin: 18px 0;
        padding: 16px 20px;
        padding-right: 16px;
        border-radius: 10px;
    }

    .article-body-text li {
        margin-bottom: 6px;
    }

    .author-box {
        padding: 16px;
        gap: 12px;
        margin-bottom: 28px;
        margin-top: 20px;
        border-radius: 12px;
    }

    .bio-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .bio-text h5 {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }

    .bio-text strong {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }

    .bio-text p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .article-footer-actions {
        padding: 16px 16px;
        gap: 10px;
        margin-bottom: 28px;
        border-radius: 12px;
    }

    .footer-share-label {
        font-size: 0.9rem;
        gap: 6px;
    }

    .footer-share-btn {
        padding: 7px 14px;
        font-size: 0.8rem;
        gap: 4px;
        border-radius: 8px;
    }

    .share-buttons-row {
        gap: 6px;
        width: 100%;
    }

    .section-divider {
        gap: 10px;
        margin-bottom: 28px;
    }

    .section-divider::before,
    .section-divider::after {
        max-width: 35px;
    }

    .section-divider h3 {
        font-size: 1.1rem;
    }

    .comments-section-container {
        padding: 16px;
        margin-top: 28px;
        border-radius: 16px;
    }

    .comments-header h3 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .comments-header h3::after {
        width: 40px;
        height: 3px;
        margin: 8px auto 0;
    }

    .comment-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
        border-radius: 50%;
    }

    .comment {
        gap: 10px;
    }

    .comment-text {
        padding: 10px 12px;
        font-size: 0.9rem;
        margin-bottom: 6px;
        border-radius: 12px 0px 12px 12px;
    }

    .replies-container {
        padding-right: 12px;
        margin-right: 12px;
    }

    .comment-author {
        font-size: 0.9rem;
    }

    .comment-timestamp {
        font-size: 0.7rem;
    }

    #comment-form-container {
        margin-top: 28px;
        padding-top: 16px;
    }

    .comment-form textarea {
        min-height: 90px;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 0.95rem;
    }

    .article-wrapper {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .article-main-col {
        padding: 0 8px;
    }

    .search-container input {
        padding: 16px 45px 16px 20px;
        font-size: 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
