/* single.css – Load this only on single posts */

/* === SINGLE ARTICLE CONTAINER === */
.single-article {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    line-height: 1.8;
}

/* Featured Image – full-width, responsive */
.featured-image {
    margin: 0 -30px 0; /* Negative margin for full-bleed effect */
    text-align: center;
    position: relative;
}

.featured-image img {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
    border-radius: 8px;
}

.caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Category badge – now right below image, centered, big & noticeable */
.breaking-category {
    display: block;
    margin: 10px auto 30px;       /* Positive top margin – no overlap, clean spacing */
    background: #d63638;
    color: white;
    font-size: 0.60rem;            /* Smaller than 2rem, readable but not huge */
    font-weight: 900;
    text-transform: uppercase;
    padding: 4px 24px;            /* Much smaller padding → compact box */
    border-radius: 6px;
    text-align: center;
    width: fit-content;           /* Shrinks to text size */
    max-width: 60%;               /* Max 60% width – not too wide */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* Softer shadow */
    z-index: 2;
}

/* Title + Meta */
.article-header {
    text-align: center;
    margin-bottom: 0px;
    max-width: 80%; /* 80% width for h1/content – balanced under image */
    margin-left: auto;
    margin-right: auto;
}

.article-header h1 {
    font-size: 1.4rem;
    line-height: 1.2;
    margin: 0 0 20px;
    font-weight: 900;
    color: #111;
}

.breaking-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;              /* Consistent spacing */
    margin: 20px 0 40px;
    font-size: 1rem;
    color: #555;
}



.publish-date {
    font-style: italic;
    font-size: 1rem;
    white-space: nowrap;
}

.breaking-author-mini {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #111;
    line-height: 1.2;
}

.author-stats {
    font-size: 0.9rem;
    color: #d63638;
}

/* Content – readable typography */
.content {
    font-size: 1.15rem;
    color: #222;
    max-width: 100%;                /* Full available space */
    margin: 0 auto;                 /* Center it */
    padding: 0 30px;                /* Match single-article padding */
    box-sizing: border-box;         /* Prevent overflow */
}

.content p {
    margin: 0 0 28px;
}

.content h2, .content h3 {
    margin: 50px 0 20px;
    font-weight: 800;
    color: #111;
}

.content h2 { font-size: 2rem; }
.content h3 { font-size: 1.6rem; }

/* Responsive adjustments – enhanced for big & small screens */
/* Responsive adjustments – only small/medium screen fixes */
@media (max-width: 1024px) {
    .single-article {
        padding: 35px 25px;
    }

    .featured-image {
        margin: 0 -25px 0;
    }

    .breaking-category {
        font-size: 1.4rem;
        padding: 6px 20px;
        margin: 8px auto 20px;
        max-width: 70%;
    }

    .article-header {
        max-width: 85%;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .content h2 {
        margin: 12px 0 10px;
        font-size: 1.4rem;
    }

    .content {
        padding: 0 4px;
        font-size: 1.4rem;
    }

    /* Added: Prevent text overflow + center better */
    .content p {
        margin: 0 0 20px;
        word-break: break-word;
    }

    .breaking-meta {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .single-article {
        padding: 30px 20px;
        margin: 20px 10px;
        border-radius: 0;
    }

    .featured-image {
        margin: 0 -20px 0;
    }

    .breaking-category {
        font-size: 1.2rem;
        padding: 5px 18px;
        margin: 6px auto 18px;
        max-width: 75%;
    }

    .article-header {
        max-width: 90%;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .content h2 {
        margin: 12px 0 10px;    
        font-size: 1.4rem;
    }

    .breaking-meta {
        flex-direction: column;
        gap: 18px;
        text-align: center;
    }

    .content {
        padding: 0 4px;
        font-size: 1.4rem;
    }

    /* Added: Better mobile stacking + readability */
    .featured-image img {
        max-height: 380px;
        object-fit: cover;
    }

    .content p {
        margin: 0 0 18px;
        font-size: 1.1rem; /* Slightly smaller for better line length */
    }

    .breaking-author-mini {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .single-article {
        padding: 25px 18px;
        margin: 15px 8px;
    }

    .featured-image {
        margin: 0 -18px 0;
    }

    .breaking-category {
        font-size: 1.0rem;
        padding: 4px 16px;
        margin: 5px auto 16px;
        max-width: 80%;
    }

    .article-header {
        max-width: 92%;
    }

    .article-header h1 {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }
    
    .content h2 {
    margin: 12px 0 10px;    
    font-size: 1.4rem;
    }

    .breaking-meta {
        gap: 16px;
    }

    .content {
        padding: 0 4px;
        font-size: 1.4rem;
    }

    .featured-image img {
        max-height: 420px;
    }
}

@media (max-width: 480px) {
    .single-article {
        padding: 20px 15px;
    }

    .breaking-category {
        font-size: 0.7rem;         /* Your sample – very small but readable */
        padding: 1px 10px;         /* Very compact */
        margin: 4px auto 15px;     /* Tight spacing */
        max-width: 100%;           /* Full width on tiny screens */
    }

    .article-header {
        max-width: 100%;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .content h2 {
    margin: 12px 0 10px;    
    font-size: 1.4rem;
    }

    .breaking-meta {
        gap: 14px;
    }

    .content {
        padding: 0 4px;
        font-size: 1.4rem;
    }

    .featured-image img {
        max-height: 380px;
    }
}