/* ===================================================
   Blog — Modern Redesign
   =================================================== */

/* ── Blog Grid ── */
.blog-grid {
    padding-top: 0;
}

/* ── Blog Card ── */
.blog-card {
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e8ecf4;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
    overflow: hidden;
    transition: all .3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(102,126,234,.12);
    border-color: #d0d5e4;
}

/* ── Card Image ── */
.blog-card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9ecef;
}
.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .4s ease;
}
.blog-card:hover .blog-card-img {
    transform: scale(1.06);
}
.blog-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f3ff 0%, #e8ecf4 100%);
    color: #a0aec0;
    font-size: 48px;
}

/* ── Date Badge on Image ── */
.blog-date-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.blog-date-overlay i {
    font-size: 14px;
    color: #667eea;
}

/* ── Card Body ── */
.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}
.blog-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color .2s ease;
}
.blog-card-title a:hover {
    color: #667eea;
}
.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #6b7280;
    margin-bottom: 16px;
    flex: 1;
}

/* ── Card Footer ── */
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f0f3ff;
}
.blog-card-date {
    font-size: 13px;
    color: #8b8fa3;
    display: flex;
    align-items: center;
    gap: 6px;
}
.blog-card-date i {
    color: #667eea;
    font-size: 14px;
}
.blog-read-more {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap .2s ease, color .2s ease;
}
.blog-read-more:hover {
    color: #764ba2;
    gap: 8px;
    text-decoration: none;
}
.blog-read-more i {
    font-size: 14px;
    transition: transform .2s ease;
}

/* ── Empty State ── */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
}
.blog-empty-icon {
    font-size: 64px;
    color: #d0d5e4;
    margin-bottom: 20px;
}
.blog-empty h4 {
    color: #4a5568;
    margin-bottom: 8px;
}
.blog-empty p {
    color: #8b8fa3;
    font-size: 16px;
}

/* ===================================================
   Blog Detail — 3-Column Layout
   =================================================== */

/* ── Detail Header (full-width hero) ── */
.blog-detail-header {
    background: linear-gradient(135deg, #f8faff 0%, #eef1ff 50%, #f5f0ff 100%);
    padding: 140px 0 48px;
    text-align: center;
}
.blog-detail-header .blog-breadcrumbs {
    justify-content: center;
}

/* ── Breadcrumbs ── */
.blog-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8b8fa3;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.blog-breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
.blog-breadcrumbs a:hover {
    text-decoration: underline;
}
.blog-breadcrumbs .separator {
    color: #d0d5e4;
}
.blog-breadcrumbs .current {
    color: #44ce6f;
    font-weight: 600;
}

/* ── Detail Title & Meta ── */
.blog-detail-title {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.25;
    margin-bottom: 20px;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
.blog-detail-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 15px;
    color: #6b7280;
    flex-wrap: wrap;
}
.blog-detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.blog-detail-meta-item i {
    color: #667eea;
    font-size: 15px;
}

/* ── Hero Thumbnail ── */
.blog-hero-thumbnail {
    margin-top: -20px;
    padding-bottom: 40px;
}
.blog-hero-thumbnail img {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,.08);
}

/* ── 3-Column Grid ── */
.blog-detail-body {
    padding: 0 0 80px;
}
.blog-layout {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 220px;
    gap: 36px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Left: Share Sidebar ── */
.blog-sidebar-share {
    position: relative;
}
.blog-share-sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.blog-share-sticky-label {
    font-size: 11px;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}
.blog-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #e8ecf4;
    background: #fff;
    color: #4a5568;
    font-size: 16px;
    text-decoration: none;
    transition: all .2s ease;
    cursor: pointer;
}
.blog-share-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.blog-share-icon.facebook:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.blog-share-icon.twitter:hover  { background: #000;    color: #fff; border-color: #000; }
.blog-share-icon.whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.blog-share-icon.telegram:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.blog-share-icon.copy-link:hover { background: #667eea; color: #fff; border-color: #667eea; }
.blog-share-icon.copied {
    background: #44ce6f !important;
    color: #fff !important;
    border-color: #44ce6f !important;
}

/* ── Center: Article Main ── */
.blog-article-main {
    min-width: 0;
}

/* ── Article Content (WYSIWYG) ── */
.blog-article-content {
    font-size: 17px;
    line-height: 1.9;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.blog-article-content h1 {
    font-size: 30px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 40px 0 16px;
    line-height: 1.3;
}
.blog-article-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 36px 0 14px;
    line-height: 1.3;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f3ff;
}
.blog-article-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 28px 0 12px;
    line-height: 1.4;
}
.blog-article-content h4,
.blog-article-content h5,
.blog-article-content h6 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 24px 0 10px;
}
.blog-article-content p {
    margin-bottom: 20px;
}
.blog-article-content p:last-child {
    margin-bottom: 0;
}
.blog-article-content ul,
.blog-article-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.blog-article-content li {
    margin-bottom: 8px;
}
.blog-article-content li::marker {
    color: #667eea;
}
.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
}
.blog-article-content a {
    color: #667eea;
    text-decoration: underline;
}
.blog-article-content a:hover {
    color: #764ba2;
}
.blog-article-content blockquote {
    background: #f8fdf9;
    border-left: 4px solid #44ce6f;
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 24px 0;
    font-style: italic;
    color: #4a5568;
    line-height: 1.8;
}
.blog-article-content strong {
    color: #1a1a2e;
    font-weight: 700;
}
.blog-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}
.blog-article-content table th,
.blog-article-content table td {
    border: 1px solid #e8ecf4;
    padding: 12px 16px;
    text-align: left;
    color: #4a5568;
}
.blog-article-content table th {
    background: #f0f3ff;
    font-weight: 600;
    color: #1a1a2e;
}
.blog-article-content table tr:nth-child(even) {
    background: #fafbfe;
}
.blog-article-content pre,
.blog-article-content code {
    background: #f7f8fc;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}
.blog-article-content pre {
    padding: 16px 20px;
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid #e8ecf4;
}
.blog-article-content code {
    padding: 2px 6px;
}
.blog-article-content hr {
    border: none;
    height: 2px;
    background: #f0f3ff;
    margin: 32px 0;
}

/* ── Right: Table of Contents Sidebar ── */
.blog-sidebar-toc {
    position: relative;
}
.blog-toc-sticky {
    position: sticky;
    top: 100px;
    background: #f8faff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e8ecf4;
}
.blog-toc-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-toc-title i {
    color: #667eea;
    font-size: 14px;
}
.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.blog-toc-item {
    margin-bottom: 2px;
}
.blog-toc-item.toc-sub {
    padding-left: 14px;
}
.blog-toc-link {
    display: block;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    padding: 6px 12px;
    border-left: 2px solid transparent;
    border-radius: 0 8px 8px 0;
    transition: all .2s ease;
    line-height: 1.4;
}
.blog-toc-link:hover {
    color: #667eea;
    background: rgba(102,126,234,.06);
    text-decoration: none;
}
.blog-toc-link.active {
    color: #667eea;
    border-left-color: #667eea;
    background: rgba(102,126,234,.08);
    font-weight: 600;
}

/* ── CTA Card ── */
.blog-cta-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 50%, #f0f3ff 100%);
    border: 2px solid #cdf1d8;
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    margin: 48px 0 32px;
}
.blog-cta-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #44ce6f, #38b55a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(68,206,111,.3);
}
.blog-cta-card h3 {
    color: #1a1a2e;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
}
.blog-cta-card p {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 24px;
}
.blog-cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.blog-cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    background: linear-gradient(135deg, #44ce6f, #38b55a);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    transition: all .2s ease;
    box-shadow: 0 4px 16px rgba(68,206,111,.3);
}
.blog-cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(68,206,111,.4);
    color: #fff;
    text-decoration: none;
}
.blog-cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    background: transparent;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #d0d5e4;
    transition: all .2s ease;
}
.blog-cta-btn-secondary:hover {
    border-color: #44ce6f;
    color: #44ce6f;
    text-decoration: none;
}
.blog-cta-trust {
    margin-top: 16px;
    font-size: 13px;
    color: #8b8fa3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.blog-cta-trust i {
    color: #44ce6f;
}

/* ── Article Divider ── */
.blog-article-divider {
    border: none;
    height: 1px;
    background: #e8ecf4;
    margin: 0 0 32px 0;
}

/* ── Article Footer ── */
.blog-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    transition: color .2s ease;
}
.blog-back-link:hover {
    color: #667eea;
    text-decoration: none;
}
.blog-share {
    display: flex;
    align-items: center;
    gap: 10px;
}
.blog-share-label {
    font-size: 14px;
    color: #8b8fa3;
    font-weight: 500;
}
.blog-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f0f3ff;
    color: #4a5568;
    font-size: 16px;
    text-decoration: none;
    transition: all .2s ease;
}
.blog-share-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.blog-share-link.facebook:hover { background: #1877F2; color: #fff; }
.blog-share-link.twitter:hover  { background: #000;    color: #fff; }
.blog-share-link.whatsapp:hover { background: #25D366; color: #fff; }

/* ===================================================
   Blog — Responsive
   =================================================== */

/* ── Listing responsive ── */
@media (max-width: 768px) {
    .blog-card-body { padding: 18px; }
    .blog-card-title { font-size: 16px; }
    .blog-card-excerpt { font-size: 13px; }
}

/* ── Detail: Tablet — hide TOC ── */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 56px minmax(0, 1fr);
    }
    .blog-sidebar-toc {
        display: none;
    }
}

/* ── Detail: Mobile — single column ── */
@media (max-width: 767px) {
    .blog-detail-title {
        font-size: 28px;
    }
    .blog-detail-meta {
        gap: 14px;
        font-size: 13px;
    }
    .blog-detail-header {
        padding: 110px 0 36px;
    }
    .blog-hero-thumbnail img {
        border-radius: 12px;
    }
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .blog-sidebar-share {
        display: none;
    }
    .blog-article-content {
        font-size: 16px;
    }
    .blog-article-content h2 { font-size: 22px; }
    .blog-article-content h3 { font-size: 19px; }
    .blog-cta-card {
        padding: 32px 20px;
    }
    .blog-cta-card h3 { font-size: 22px; }
    .blog-article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .blog-breadcrumbs {
        font-size: 13px;
        margin-bottom: 16px;
    }
}
