/* =====================================================
   BLOG SINGLE POST STYLES
   Matches Devtonic Studios theme design system
   Add this to: Appearance → Customize → Additional CSS
   OR add @import at top of main.css
   ===================================================== */

/* ---------- Reset & Wrapper ---------- */
.blog-post-wrapper {
    background: #ffffff;
    min-height: 100vh;
}

/* ---------- Hero / Header Section ---------- */
.blog-hero {
    background: linear-gradient(135deg, #0a1929 0%, #001429 100%);
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 102, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}
.blog-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---------- Breadcrumb ---------- */
.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.blog-breadcrumb a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}
.blog-breadcrumb a:hover {
    color: #00A3FF;
}
.breadcrumb-sep {
    color: rgba(255,255,255,0.3);
}

/* ---------- Category Badge ---------- */
.blog-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.blog-cat-badge {
    display: inline-block;
    background: rgba(0, 102, 255, 0.2);
    color: #00A3FF;
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.blog-cat-badge:hover {
    background: rgba(0, 102, 255, 0.35);
    border-color: rgba(0, 162, 255, 0.5);
}
.blog-cat-badge.small {
    font-size: 11px;
    padding: 3px 10px;
}

/* ---------- Post Title ---------- */
.blog-post-title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 24px;
    letter-spacing: -0.5px;
}

/* ---------- Post Meta ---------- */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    flex-wrap: wrap;
}
.blog-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-author-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    border: 2px solid rgba(0,102,255,0.4);
    object-fit: cover;
}
.blog-author-name {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}
.blog-meta-sep {
    color: rgba(255,255,255,0.2);
}
.blog-meta-date,
.blog-read-time {
    color: rgba(255,255,255,0.5);
}

/* ---------- Featured Image ---------- */
.blog-featured-img-wrap {
    background: #f8f9fa;
    padding: 0;
}
.blog-featured-img-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    transform: translateY(-30px);
}
.blog-featured-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-height: 500px;
    object-fit: cover;
}

/* ---------- Article Body Wrapper ---------- */
.blog-content-wrap {
    background: #ffffff;
    padding: 0 20px 60px;
}
.blog-content-inner {
    max-width: 820px;
    margin: 0 auto;
}

/* ---------- Typography: Article Body ---------- */
.blog-body {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    line-height: 1.85;
    color: #1a1a1a;
}
.blog-body h2 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: #001429;
    margin: 48px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f4ff;
    letter-spacing: -0.3px;
}
.blog-body h3 {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    color: #001429;
    margin: 36px 0 12px;
}
.blog-body h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0a1929;
    margin: 28px 0 10px;
}
.blog-body p {
    margin: 0 0 20px;
    color: #2d3748;
}
.blog-body strong, .blog-body b {
    color: #001429;
    font-weight: 600;
}
.blog-body a {
    color: #0066FF;
    text-decoration: underline;
    text-decoration-color: rgba(0,102,255,0.3);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.blog-body a:hover {
    color: #0052CC;
    text-decoration-color: rgba(0,82,204,0.7);
}

/* ---------- Lists ---------- */
.blog-body ul,
.blog-body ol {
    margin: 0 0 20px 0;
    padding-left: 24px;
}
.blog-body ul li,
.blog-body ol li {
    margin-bottom: 10px;
    color: #2d3748;
    line-height: 1.7;
}
.blog-body ul li::marker {
    color: #0066FF;
}
.blog-body ol li::marker {
    color: #0066FF;
    font-weight: 600;
}

/* ---------- Blockquote ---------- */
.blog-body blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 4px solid #0066FF;
    background: #f0f7ff;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #0a1929;
    font-size: 16px;
}
.blog-body blockquote p {
    margin: 0;
    color: #0a1929;
}

/* ---------- Code Blocks ---------- */
.blog-body code {
    background: #f0f4ff;
    color: #0052CC;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}
.blog-body pre {
    background: #0a1929;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 28px 0;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid rgba(0,102,255,0.2);
}
.blog-body pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
}

/* ---------- Images inside post ---------- */
.blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.blog-body figure {
    margin: 28px 0;
}
.blog-body figcaption {
    text-align: center;
    font-size: 13px;
    color: #718096;
    margin-top: 8px;
}

/* ---------- Tables ---------- */
.blog-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.blog-body table th {
    background: #0a1929;
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.blog-body table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8eef8;
    color: #2d3748;
}
.blog-body table tr:last-child td {
    border-bottom: none;
}
.blog-body table tr:nth-child(even) td {
    background: #f8faff;
}

/* ---------- Tags ---------- */
.blog-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 40px 0;
    padding-top: 24px;
    border-top: 1px solid #e8eef8;
}
.blog-tags-label {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-tag {
    display: inline-block;
    background: #f0f4ff;
    color: #0066FF;
    border: 1px solid #cce0ff;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.blog-tag:hover {
    background: #e0edff;
    border-color: #99c2ff;
}

/* ---------- Author Box ---------- */
.blog-author-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #0a1929, #001429);
    border: 1px solid rgba(0,102,255,0.2);
    border-radius: 14px;
    padding: 28px;
    margin: 40px 0 0;
}
.blog-author-box-avatar {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50%;
    border: 3px solid rgba(0,102,255,0.4);
    flex-shrink: 0;
    object-fit: cover;
}
.blog-author-box-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.blog-author-box-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.4);
}
.blog-author-box-name {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}
.blog-author-box-bio {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    margin: 4px 0 0;
}

/* ---------- Related Posts ---------- */
.blog-related {
    background: #f8f9fc;
    padding: 60px 20px;
    border-top: 1px solid #e8eef8;
}
.blog-related-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.blog-related-title {
    font-size: 26px;
    font-weight: 700;
    color: #001429;
    margin: 0 0 32px;
    letter-spacing: -0.3px;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.blog-related-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid #e8eef8;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: block;
}
.blog-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    border-color: #cce0ff;
}
.blog-related-img {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.blog-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.blog-related-card:hover .blog-related-img img {
    transform: scale(1.04);
}
.blog-related-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.blog-related-post-title {
    font-size: 16px;
    font-weight: 600;
    color: #001429;
    line-height: 1.4;
    margin: 0;
}
.blog-related-date {
    font-size: 12px;
    color: #a0aec0;
}

/* ---------- Rank Math TOC Fix ---------- */
.blog-body .rank-math-toc,
.blog-body .wp-block-rank-math-toc-block {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 28px 0;
}
.blog-body .rank-math-toc h5,
.blog-body .rank-math-toc h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0066FF;
    margin: 0 0 12px;
    border: none;
    padding: 0;
}
.blog-body .rank-math-toc a {
    color: #0066FF;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.7;
}
.blog-body .rank-math-toc a:hover {
    text-decoration: underline;
}

/* ---------- Rank Math FAQ Block ---------- */
.blog-body .rank-math-faq-block .rank-math-question {
    background: #f8faff;
    border: 1px solid #e0ecff;
    border-radius: 8px;
    padding: 16px 20px;
    font-weight: 600;
    color: #001429;
    margin-bottom: 2px;
    cursor: pointer;
}
.blog-body .rank-math-faq-block .rank-math-answer {
    padding: 16px 20px;
    color: #2d3748;
    line-height: 1.75;
    background: #ffffff;
    border: 1px solid #e8eef8;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .blog-hero {
        padding: 90px 16px 48px;
    }
    .blog-post-title {
        font-size: 26px;
    }
    .blog-featured-img-inner {
        transform: translateY(-20px);
        padding: 0 12px;
    }
    .blog-content-wrap {
        padding: 0 16px 48px;
    }
    .blog-body {
        font-size: 16px;
    }
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
    .blog-author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .blog-meta {
        gap: 8px;
        font-size: 13px;
    }
}
@media (max-width: 480px) {
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
    .blog-body h2 {
        font-size: 20px;
    }
}

/* ---------- Archive Page ---------- */
.blog-archive-content {
    background: #ffffff;
    padding: 60px 20px;
}
.blog-archive-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.blog-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}
.archive-card .blog-related-post-title,
.blog-archive-post-title {
    font-size: 18px;
    font-weight: 600;
    color: #001429;
    line-height: 1.4;
    margin: 6px 0;
}
.blog-archive-excerpt {
    font-size: 14px;
    color: #718096;
    line-height: 1.6;
    margin: 0;
}
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.blog-pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}
.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e8eef8;
    color: #0066FF;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.blog-pagination .page-numbers.current {
    background: #0066FF;
    color: #fff;
    border-color: #0066FF;
}
.blog-pagination .page-numbers:hover:not(.current) {
    background: #f0f7ff;
    border-color: #99c2ff;
}
.blog-pagination .prev, .blog-pagination .next {
    width: auto;
    padding: 0 16px;
    font-size: 14px;
}
@media (max-width: 900px) {
    .blog-archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .blog-archive-grid { grid-template-columns: 1fr; }
}
