/* ==========================================================================
   SINGLE POST STYLES
   ========================================================================== */



.single-post-article {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid #E2E8F0;
    margin-bottom: 2.5rem;
    box-sizing: border-box;
    max-width: 100%;
}

/* Header */
.single-post__header {
    margin-bottom: 2rem;
}

.single-post__meta-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.single-post__cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #E8F0FE;
    color: #0055FF;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.single-post__badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0055FF;
}

.single-post__date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748B;
    font-size: 0.875rem;
    font-weight: 500;
}

.single-post__date svg {
    width: 15px;
    height: 15px;
    stroke: #94A3B8;
}

.single-post__title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: #0A1E3D;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}

/* Author Block */
.single-post__author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 1.5rem;
    border-top: 1px solid #F1F5F9;
}

.single-post__author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.single-post__author-info {
    display: flex;
    flex-direction: column;
}

.single-post__author-by {
    font-size: 0.75rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.single-post__author-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0A1E3D;
}

/* Media */
.single-post__media {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    background: #F1F5F9;
}

.single-post__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Content Typography */
.single-post__content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.single-post__content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    max-width: 100%;
}

.single-post__content h2,
.single-post__content h3,
.single-post__content h4 {
    color: #0A1E3D;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

.single-post__content h2 {
    font-size: 1.75rem;
}

.single-post__content h3 {
    font-size: 1.4rem;
}

.single-post__content ul,
.single-post__content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.single-post__content li {
    margin-bottom: 0.5rem;
}

.single-post__content blockquote {
    border-left: 4px solid #0055FF;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #F8FAFC;
    border-radius: 0 8px 8px 0;
    font-size: 1.15rem;
    font-style: italic;
    color: #1E293B;
}

.single-post__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Tags Footer */
.single-post__footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

/* Share Footer */
.single-post__share {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.single-post__share-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0A1E3D;
}

.single-post__share-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #FFFFFF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.share-facebook { background: #1877F2; }
.share-twitter { background: #000000; }
.share-linkedin { background: #0A66C2; }
.share-whatsapp { background: #25D366; }

/* Comments Section */
.modern-comments-area {
    margin: 0 0 3rem 0;
    padding: 3rem;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
}

.modern-comments-title,
.modern-comment-reply-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0A1E3D;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.85rem;
}

.modern-comments-title::after,
.modern-comment-reply-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: #0055FF;
}

.modern-comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

.modern-comment-list li {
    margin-bottom: 2rem;
}

.modern-comment-list article {
    display: flex;
    gap: 1.25rem;
}

.modern-comment-list .comment-author img {
    border-radius: 50%;
    width: 60px;
    height: 60px;
}

.modern-comment-list .comment-meta {
    margin-bottom: 0.5rem;
}

.modern-comment-list .fn {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0A1E3D;
    font-style: normal;
}

.modern-comment-list .comment-metadata a {
    color: #64748B;
    font-size: 0.85rem;
    text-decoration: none;
}

.modern-comment-list .comment-content {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

.modern-comment-list .reply a {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0055FF;
    background: #EFF4FF;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.modern-comment-list .reply a:hover {
    background: #0055FF;
    color: #FFF;
}

.modern-comment-form input[type="text"],
.modern-comment-form input[type="email"],
.modern-comment-form input[type="url"],
.modern-comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #F8FAFC;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.modern-comment-form input:focus,
.modern-comment-form textarea:focus {
    border-color: #0055FF;
    outline: none;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.1);
}

.comment-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-form-grid > div {
    margin: 0;
}

.submit-comment-btn {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

/* Related Posts Section */
.single-related-posts {
    margin: 0 0 3rem 0;
    max-width: 100%;
    box-sizing: border-box;
}

.single-related-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0A1E3D;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.85rem;
}

.single-related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: #0055FF;
}

/* Responsive */
@media (max-width: 767px) {
    /* Make entire page white so article blends full-width seamlessly */
    body.single,
    body.single .publications-page {
        background: #FFFFFF;
    }

    .single-post-article {
        padding: 1rem 0;
        border-radius: 0;
        border: none;
        margin-bottom: 1rem;
    }

    .single-post__media {
        border-radius: 0;
        margin-left: calc(var(--container-padding, 1rem) * -1);
        margin-right: calc(var(--container-padding, 1rem) * -1);
        width: calc(100% + var(--container-padding, 1rem) * 2);
        max-width: none;
    }

    .single-post__title {
        font-size: 1.5rem;
    }

    .single-post__content {
        font-size: 0.95rem;
    }

    /* Force all WP block content to stay within bounds */
    .single-post__content *,
    .single-post__content .wp-block-group,
    .single-post__content .wp-block-columns,
    .single-post__content .wp-block-buttons,
    .single-post__content .wp-block-table,
    .single-post__content .wp-block-separator {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .single-post__content figure,
    .single-post__content iframe,
    .single-post__content .wp-block-image {
        max-width: 100% !important;
        height: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .single-post__content table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }

    .single-post__content pre {
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-x: auto;
    }

    .single-post__content .wp-block-columns {
        flex-direction: column !important;
    }

    .single-post__content .wp-block-button__link {
        white-space: normal;
        word-wrap: break-word;
    }

    .single-related-posts .publications-grid {
        margin-left: 0;
        margin-right: 0;
    }

    .modern-comments-area {
        padding: 1.5rem 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-top: 2rem;
    }

    .comment-form-grid {
        grid-template-columns: 1fr;
    }
}
