/* ===== SINGLE POST - HERO + SIDEBAR LAYOUT ===== */
.single-hero-header {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-top: 0;
    padding-top: 100px;
}

.single-hero-bg {
    position: absolute;
    inset: 0;
    background-color: var(--color-hero-bg, #0a2540);
}

.single-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.single-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.4) 100%);
}

.single-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    color: #fff;
}

.single-hero-category {
    display: inline-block;
    background: var(--color-accent, #d63b3b);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.single-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    max-width: 800px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.single-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.single-hero-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.single-hero-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.single-hero-author-name {
    font-weight: 600;
}

.single-hero-date {
    opacity: 0.85;
    font-size: 0.9rem;
}

.single-hero-reading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.single-hero-reading svg {
    width: 16px;
    height: 16px;
}

/* ===== LAYOUT 70/30 ===== */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.single-main {
    min-width: 0;
}

.single-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== SIDEBAR WIDGETS ===== */
.sidebar-widget {
    background: var(--color-card-bg, #fff);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border, #e9ecef);
}

.sidebar-widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light, #6c757d);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget-title svg {
    width: 16px;
    height: 16px;
    color: var(--color-accent, #d63b3b);
}

/* SEARCH BAR - Glassmorphism */
.sidebar-search {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.sidebar-search-form {
    position: relative;
}

.sidebar-search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--color-accent, #d63b3b);
    box-shadow: 0 4px 12px var(--color-accent-light, rgba(255, 107, 107, 0.15));
}

.sidebar-search-input::placeholder {
    color: #adb5bd;
}

.sidebar-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #adb5bd;
    pointer-events: none;
}

.sidebar-search-btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-accent, #d63b3b);
    color: #fff;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-search-btn:hover {
    background: var(--color-accent-hover, #c43434);
    transform: translateY(-50%) scale(1.02);
}

/* READING PROGRESS - Circular */
.sidebar-progress {
    text-align: center;
}

.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: var(--color-border, #e9ecef);
    stroke-width: 6;
}

.progress-circle-fill {
    fill: none;
    stroke: var(--color-accent, #d63b3b);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary, #0a2540);
}

.progress-label {
    font-size: 0.8rem;
    color: var(--color-text-light, #6c757d);
}

/* SHARE BUTTONS - Vertical */
.sidebar-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-share-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    transition: all 0.2s ease;
}

.sidebar-share-btn:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
}

.share-twitter {
    background: linear-gradient(135deg, #14171a 0%, #2c3e50 100%);
}

.share-linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #006699 100%);
}

.share-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

/* TAGS */
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #f1f3f5;
    color: var(--color-text, #495057);
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-tag:hover {
    background: var(--color-accent, #d63b3b);
    color: #fff;
}

/* ===== ARTICLE CONTENT ===== */
.single-article-content {
    background: var(--color-card-bg, #fff);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.single-article-content .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text, #333);
}

.single-article-content .entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.single-article-content .entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.single-article-content .entry-content p {
    margin-bottom: 1.5rem;
}

.single-article-content .entry-content img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

/* ===== AUTHOR BIO ===== */
.single-author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-top: 2.5rem;
}

.single-author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.single-author-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.single-author-info p {
    margin: 0;
    color: var(--color-text-light, #6c757d);
    line-height: 1.6;
}

/* ===== POST NAVIGATION ===== */
.single-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.single-nav-item {
    padding: 1.25rem;
    background: var(--color-card-bg, #fff);
    border-radius: 12px;
    border: 1px solid var(--color-border, #e9ecef);
    text-decoration: none;
    transition: all 0.2s ease;
}

.single-nav-item:hover {
    border-color: var(--color-accent, #d63b3b);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.single-nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-light, #6c757d);
    display: block;
    margin-bottom: 0.5rem;
}

.single-nav-title {
    font-weight: 600;
    color: var(--color-primary, #0a2540);
}

.single-nav-next {
    text-align: right;
}

/* ===== RELATED POSTS ===== */
.single-related {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem;
}

.single-related-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary, #0a2540);
}

.single-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card {
    background: var(--color-card-bg, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

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

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

.related-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.related-card-title a {
    color: var(--color-primary, #0a2540);
    text-decoration: none;
}

.related-card-title a:hover {
    color: var(--color-accent, #d63b3b);
}

.related-card-date {
    font-size: 0.8rem;
    color: var(--color-text-light, #6c757d);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .single-layout {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .single-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .single-hero-title {
        font-size: 2rem;
    }
}

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

    .single-hero-title {
        font-size: 1.6rem;
    }

    .single-hero-content {
        padding: 2rem 1rem;
    }

    .single-sidebar {
        grid-template-columns: 1fr;
    }

    .single-article-content {
        padding: 1.5rem;
    }

    .single-post-nav {
        grid-template-columns: 1fr;
    }

    .single-related-grid {
        grid-template-columns: 1fr;
    }

    .single-author-bio {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== COMMENTS SECTION ===== */
.comments-section {
    margin-top: 2.5rem;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary, #0a2540);
    margin: 0 0 1.5rem;
}

.comments-title svg {
    color: var(--color-accent, #d63b3b);
    flex-shrink: 0;
}

/* Comment List */
.comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comments-item {
    margin-bottom: 1rem;
}

.comments-card {
    background: var(--color-card-bg, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border, #e9ecef);
    transition: border-color 0.2s ease;
}

.comments-card:hover {
    border-color: var(--color-accent, #d63b3b);
}

/* Nested / Threaded Comments */
.comments-item .children {
    list-style: none;
    margin: 0.75rem 0 0;
    padding-left: 1.5rem;
    border-left: 3px solid var(--color-accent, #d63b3b);
}

.comments-item .children .comments-card {
    background: #fafbfc;
}

/* Comment Header */
.comments-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.comments-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border, #e9ecef);
}

.comments-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.comments-author-name {
    font-weight: 600;
    color: var(--color-primary, #0a2540);
    font-size: 0.95rem;
}

.comments-author-name a {
    color: inherit;
    text-decoration: none;
}

.comments-author-name a:hover {
    color: var(--color-accent, #d63b3b);
}

.comments-date {
    font-size: 0.8rem;
    color: var(--color-text-light, #6c757d);
}

.comments-awaiting {
    margin-left: auto;
    font-size: 0.75rem;
    background: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Comment Content */
.comments-content {
    color: var(--color-text, #333);
    line-height: 1.7;
    font-size: 0.95rem;
}

.comments-content p:last-child {
    margin-bottom: 0;
}

/* Comment Footer */
.comments-card-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border, #e9ecef);
}

.comments-reply-link a,
.comments-edit-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent, #d63b3b);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: opacity 0.2s ease;
}

.comments-reply-link a:hover,
.comments-edit-link a:hover {
    opacity: 0.75;
}

/* Pagination */
.comments-pagination {
    margin-top: 1.5rem;
    text-align: center;
}

.comments-pagination-links .page-numbers {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin: 0 0.15rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--color-text, #333);
    text-decoration: none;
    border: 1px solid var(--color-border, #e9ecef);
    transition: all 0.2s ease;
}

.comments-pagination-links .page-numbers.current,
.comments-pagination-links .page-numbers:hover {
    background: var(--color-accent, #d63b3b);
    color: #fff;
    border-color: var(--color-accent, #d63b3b);
}

/* Closed Comments */
.comments-closed {
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
    color: var(--color-text-light, #6c757d);
    font-size: 0.9rem;
}

/* ===== COMMENT FORM ===== */
.comments-form-wrapper {
    margin-top: 2rem;
}

.comments-form .comment-reply-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary, #0a2540);
    margin: 0 0 0.5rem;
}

.comments-form .comment-reply-title small a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-accent, #d63b3b);
    text-decoration: none;
    margin-left: 0.5rem;
}

.comments-form-note {
    font-size: 0.85rem;
    color: var(--color-text-light, #6c757d);
    margin-bottom: 1.25rem;
}

.comments-required {
    color: var(--color-accent, #d63b3b);
    font-weight: 700;
}

.comments-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.comments-form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary, #0a2540);
    margin-bottom: 0.4rem;
}

.comments-form-field input,
.comments-form-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border, #e9ecef);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--color-card-bg, #fff);
    color: var(--color-text, #333);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.comments-form-field input:focus,
.comments-form-field textarea:focus {
    outline: none;
    border-color: var(--color-accent, #d63b3b);
    box-shadow: 0 0 0 3px rgba(214, 59, 59, 0.1);
}

.comments-form-field input:invalid:not(:placeholder-shown),
.comments-form-field textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.comments-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.comments-form-comment {
    margin-top: 1rem;
}

.comments-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background: var(--color-accent, #d63b3b);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.comments-submit-btn:hover {
    background: var(--color-link-hover, #c43434);
    transform: translateY(-1px);
}

.comments-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--color-text-light, #6c757d);
    line-height: 1.5;
}

.comments-privacy-note svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ===== COMMENTS RESPONSIVE ===== */
@media (max-width: 768px) {
    .comments-form-fields {
        grid-template-columns: 1fr;
    }

    .comments-card {
        padding: 1rem;
    }

    .comments-item .children {
        padding-left: 1rem;
    }

    .comments-card-header {
        gap: 0.5rem;
    }

    .comments-avatar-img {
        width: 40px;
        height: 40px;
    }
}

/* ===== READING PROGRESS BAR (top) ===== */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary, #2563eb), var(--color-secondary, #7c3aed));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ===== TABLE OF CONTENTS ===== */
.sidebar-toc {
    position: sticky;
    top: 90px;
}

.toc-nav {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border, #e9ecef) transparent;
}

.toc-nav::-webkit-scrollbar {
    width: 4px;
}

.toc-nav::-webkit-scrollbar-thumb {
    background: var(--color-border, #e9ecef);
    border-radius: 4px;
}

.toc-list,
.toc-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-sublist {
    padding-left: 1rem;
    margin-top: 0.25rem;
}

.toc-item {
    margin-bottom: 0.2rem;
}

.toc-link {
    display: block;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-text, #495057);
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.2s ease;
}

.toc-link:hover {
    color: var(--color-accent, #d63b3b);
    background: rgba(0, 0, 0, 0.03);
    border-left-color: var(--color-border, #e9ecef);
}

.toc-link.toc-active {
    color: var(--color-accent, #d63b3b);
    font-weight: 600;
    border-left-color: var(--color-accent, #d63b3b);
    background: rgba(214, 59, 59, 0.06);
}

.toc-h3 .toc-link {
    font-size: 0.8rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    color: var(--color-text-light, #6c757d);
}

.toc-h3 .toc-link.toc-active {
    color: var(--color-accent, #d63b3b);
}

@media (max-width: 992px) {
    .sidebar-toc {
        position: static;
    }

    .toc-nav {
        max-height: none;
    }
}
