/* ============================================
   NEWS SINGLE PAGE STYLES
   Location: static/css/news-single.css
   ============================================ */

/* Compact header layout */
.article-header-compact {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 640px) {
    .article-header-compact {
        grid-template-columns: 1fr;
    }
}

.article-header-compact .compact-image {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-header-compact .meta-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ============================================
   FLOATING IMAGE SYSTEM
   ============================================ */

/* Base styles for all article images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* Figure element styling (from render hook) */
.article-content figure {
    margin: 1rem 0;
}

.article-content figure img {
    display: block;
}

.article-content figcaption {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.dark .article-content figcaption {
    color: #9ca3af;
}

/* Float LEFT variants */
.article-content figure.float-left,
.article-content figure.float-left-sm,
.article-content figure.float-left-lg {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
    clear: left;
}

.article-content figure.float-left { max-width: 45%; }
.article-content figure.float-left-sm { max-width: 30%; }
.article-content figure.float-left-lg { max-width: 55%; }

/* Float RIGHT variants */
.article-content figure.float-right,
.article-content figure.float-right-sm,
.article-content figure.float-right-lg {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
    clear: right;
}

.article-content figure.float-right { max-width: 45%; }
.article-content figure.float-right-sm { max-width: 30%; }
.article-content figure.float-right-lg { max-width: 55%; }

/* Block (centered, full-width) */
.article-content figure.float-block {
    float: none;
    display: block;
    max-width: 100%;
    margin: 1.5rem auto;
    clear: both;
}

.article-content figure.float-block figcaption {
    text-align: center;
}

/* Side-by-side image pair */
.article-content .image-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    clear: both;
    align-items: center;
}

.article-content .image-pair img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.article-content .image-pair .pair-caption {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: -1.0rem;
}

.dark .article-content .image-pair .pair-caption {
    color: #9ca3af;
}

/* Clearfix for article content */
.article-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Clear utility class */
.article-content .clear {
    clear: both;
}

/* Responsive: stack floats on mobile */
@media (max-width: 640px) {
    .article-content figure.float-left,
    .article-content figure.float-right,
    .article-content figure.float-left-sm,
    .article-content figure.float-right-sm,
    .article-content figure.float-left-lg,
    .article-content figure.float-right-lg {
        float: none;
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .article-content .image-pair {
        grid-template-columns: 1fr;
    }
}