/* =========================================================
   SINGLE — Single post & page styles, entry content, nav
   Optimized typography & responsive scaling.
   ========================================================= */

/* 1. Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    width: 0%;
    z-index: 9999;
    transition: width .1s ease;
}

/* 2. Single Post & Page Header */
.single-post-header {
    margin-bottom: 20px;
}

.single-title {
    font-size: 1.95rem;
    line-height: 1.3;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--navy-dark);
    letter-spacing: -0.02em;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--gray);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.single-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.single-meta i {
    font-size: 12px;
    color: var(--primary);
}

/* 3. Featured Image */
.featured-image {
    margin: 20px 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.featured-caption {
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    padding: 8px 12px;
    font-style: italic;
}

/* 4. Entry Content Typography */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #1e293b;
}

.entry-content p {
    margin-bottom: 18px;
}

.entry-content h2 {
    margin: 28px 0 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-dark);
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.entry-content h3 {
    margin: 22px 0 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy-dark);
    line-height: 1.35;
}

.entry-content h4 {
    margin: 18px 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy-dark);
}

.entry-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}

.entry-content a:hover,
.entry-content a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 10px 18px;
    margin: 20px 0;
    background: var(--light-gray);
    font-style: italic;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 15px;
    color: #334155;
}

/* 5. Modern List Styling */
.entry-content ul, 
.entry-content ol {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.entry-content ul li, 
.entry-content ol li {
    position: relative;
    margin-bottom: 12px;
    line-height: 1.65;
    color: #334155;
}

.entry-content ul li {
    padding-left: 28px;
}

.entry-content ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

.entry-content ol {
    counter-reset: tso-counter;
}

.entry-content ol li {
    counter-increment: tso-counter;
    padding-left: 36px;
}

.entry-content ol li::before {
    content: counter(tso-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: #e0edff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: 'Poppins', sans-serif;
}

/* 6. Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 24px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.post-tags a {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gray);
    background: var(--light-gray);
    padding: 4px 10px;
    border-radius: 20px;
    transition: all .2s ease;
}

.post-tags a:hover {
    background: var(--primary);
    color: #fff;
}

/* 7. Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 28px 0;
}

.post-nav-item {
    display: block;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .25s ease;
}

.post-nav-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.post-nav-next { text-align: right; }

.post-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: .4px;
    margin-bottom: 6px;
}

.post-nav-title {
    font-size: 13.5px;
    line-height: 1.4;
    margin: 0;
    color: var(--navy-dark);
    font-weight: 600;
    display: block;
}

/* 8. Related Posts */
.related-posts { margin: 32px 0; }

/* 9. Breadcrumbs Navigation - Compact Arrow Style */
.breadcrumbs, #breadcrumbs, .yoast-breadcrumb, .rank-math-breadcrumb {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    gap: 2px;
}

.breadcrumbs::-webkit-scrollbar, #breadcrumbs::-webkit-scrollbar, 
.yoast-breadcrumb::-webkit-scrollbar, .rank-math-breadcrumb::-webkit-scrollbar {
    display: none;
}

/* Hide default separators */
.breadcrumbs .separator, #breadcrumbs .separator, 
.breadcrumbs span.sep,
.yoast-breadcrumb .breadcrumb_last::before, 
.rank-math-breadcrumb .separator {
    display: none !important;
}

/* Style all links inside breadcrumbs */
.breadcrumbs a, #breadcrumbs a, .yoast-breadcrumb a, .rank-math-breadcrumb a {
    text-decoration: none;
    padding: 5px 12px 5px 16px;
    background: var(--primary, #0066ff);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    line-height: 1.3;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%);
    transition: filter 0.2s ease;
}

/* First item (Home) */
.breadcrumbs span:first-child > a, #breadcrumbs span:first-child > a, 
.yoast-breadcrumb span:first-child > a, .rank-math-breadcrumb span:first-child > a,
.breadcrumbs > a:first-child, #breadcrumbs > a:first-child {
    padding-left: 12px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

/* Last item (Current Page) */
.breadcrumbs .breadcrumb_last, #breadcrumbs .breadcrumb_last, 
.yoast-breadcrumb .breadcrumb_last, .rank-math-breadcrumb .last,
.breadcrumbs .current, #breadcrumbs .current {
    background: #e2e8f0;
    color: #475569 !important;
    padding: 5px 12px 5px 16px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    line-height: 1.3;
    white-space: nowrap;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Hover Effect */
.breadcrumbs a:hover, #breadcrumbs a:hover, 
.yoast-breadcrumb a:hover, .rank-math-breadcrumb a:hover {
    filter: brightness(1.1);
    color: #ffffff !important;
    text-decoration: none;
}

/* =========================================================
   10. RESPONSIVE — Tablet & Mobile Scaling
   ========================================================= */

@media (max-width: 860px) {
    .single-title { font-size: 1.65rem; }
    .entry-content { font-size: 15.5px; }
    .entry-content h2 { font-size: 1.38rem; margin: 24px 0 10px; }
    .entry-content h3 { font-size: 1.18rem; margin: 20px 0 8px; }
}

@media (max-width: 600px) {
    /* Mobile Titles: Smaller but highlighted */
    .single-title {
        font-size: 1.35rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    /* Mobile Meta: Smaller & compact */
    .single-meta {
        font-size: 11.5px;
        gap: 10px;
        padding-bottom: 12px;
    }

    /* Mobile Content Headings */
    .entry-content {
        font-size: 14.5px;
        line-height: 1.65;
    }

    .entry-content p {
        margin-bottom: 14px;
    }

    .entry-content h2 {
        font-size: 1.22rem;
        margin: 22px 0 8px;
    }

    .entry-content h3 {
        font-size: 1.1rem;
        margin: 18px 0 6px;
    }

    .entry-content h4 {
        font-size: 1.02rem;
        margin: 14px 0 4px;
    }

    .entry-content ul li, 
    .entry-content ol li {
        margin-bottom: 9px;
        line-height: 1.55;
    }

    .entry-content ul li {
        padding-left: 24px;
    }

    .entry-content ol li {
        padding-left: 30px;
    }

    .entry-content ol li::before {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 20px 0;
    }

    .post-nav-item {
        padding: 12px 14px;
    }
}

@media (max-width: 400px) {
    .single-title { font-size: 1.22rem; }
    .single-meta { font-size: 11px; gap: 8px; }
}