/**
 * File: msi-news.css
 * Path: /wp-content/themes/msi-theme/assets/css/msi-news.css
 * Version: 1.0.24-dev
 * Created: 2026-11-28
 * Last Updated: 2026-12-01
 * Author: Lucky Mahrus | https://geraisitus.co.id/
 * Description: Native BeTheme posts index skin, including existing BeBuilder hero and section heading.
 * Changelog: 1.0.14-dev — Red subheader, readable article titles and card spacing.
 */

body.msi-theme.blog {
    --msi-news-title-size: 24px;
    --msi-news-card-padding: 22px;
    --msi-news-section-spacing: 48px;
}

/* Keep the native H1 and breadcrumbs: restyle, do not replace the subheader. */
body.msi-theme.blog #Subheader {
    box-sizing: border-box;
    background: linear-gradient(110deg, #65090e 0%, var(--msi-red-dark, #890c12) 55%, var(--msi-red, #b20d17) 100%) !important;
    padding: 56px 0 !important;
    text-align: center !important;
    color: #fff !important;
}
body.msi-theme.blog #Subheader .container {
    box-sizing: border-box;
    max-width: var(--msi-container-width, 1200px);
}
body.msi-theme.blog #Subheader .title {
    float: none !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    font-size: clamp(30px, 3.2vw, 48px) !important;
    line-height: 1.15 !important;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-align: center !important;
    color: #fff !important;
}
body.msi-theme.blog #Subheader .breadcrumbs {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 14px;
    line-height: 1.5;
    color: #fff !important;
}
body.msi-theme.blog #Subheader .breadcrumbs :is(li,a,span,i) { color: #fff !important; }
body.msi-theme.blog #Subheader .breadcrumbs a { text-decoration: none; }
body.msi-theme.blog #Subheader .breadcrumbs a:hover { text-decoration: underline; }

/* Native blog grid remains owned by BeTheme/Isotope (no position/width overrides). */
body.msi-theme.blog #Content .column_blog .blog_wrapper { padding: var(--msi-news-section-spacing) 0; }
body.msi-theme.blog #Content .column_blog .posts_group.grid .post-item {
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--msi-border, #e4e9e6);
    border-bottom: 3px solid var(--msi-red, #b20d17);
    border-radius: 4px;
    overflow: hidden;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid .post-item .post-photo-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    border: 0 !important;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid .post-item .post-photo-wrapper .image_wrapper > a:first-child {
    display: block;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid .post-item .post-photo-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid .post-item .post-desc-wrapper {
    box-sizing: border-box;
    width: 100%;
    background: #fff !important;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid .post-item .post-desc {
    box-sizing: border-box;
    padding: var(--msi-news-card-padding) !important;
}
/* Global title CSS sets 44px on h4, but does not reset BeTheme's small h4 line-height. */
body.msi-theme.blog #Content .column_blog .post-item .post-title .entry-title {
    font-family: var(--msi-title-font-family, Georgia, serif) !important;
    font-size: var(--msi-news-title-size) !important;
    font-weight: 700 !important;
    line-height: 1.32 !important;
    letter-spacing: normal !important;
    margin: 0 0 12px !important;
    color: var(--msi-red-dark, #890c12) !important;
    overflow-wrap: anywhere;
    word-break: normal;
}
body.msi-theme.blog #Content .column_blog .post-item .post-title .entry-title > a {
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    text-decoration: none;
}
body.msi-theme.blog #Content .column_blog .post-item .post-title .entry-title > a:hover {
    color: var(--msi-green-dark, #08462a) !important;
}
body.msi-theme.blog #Content .column_blog .post-item .post-excerpt {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--msi-muted, #59656b);
    overflow-wrap: anywhere;
    margin-bottom: 18px;
}
body.msi-theme.blog #Content .column_blog .post-item .post-footer {
    background: transparent !important;
    border-top: 1px solid var(--msi-border, #e4e9e6);
    padding: 14px 0 0 !important;
    margin: 0 !important;
}
body.msi-theme.blog #Content .column_blog .post-item .post-footer .post-more {
    color: var(--msi-green-dark, #08462a) !important;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
}
body.msi-theme.blog #Content .column_blog .post-item a:focus-visible,
body.msi-theme.blog #Subheader .breadcrumbs a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
@media (max-width: 1024px) {
    body.msi-theme.blog { --msi-news-title-size: 22px; --msi-news-card-padding: 18px; --msi-news-section-spacing: 36px; }
    body.msi-theme.blog #Subheader { padding: 44px 0 !important; }
}
@media (max-width: 767px) {
    body.msi-theme.blog { --msi-news-title-size: 22px; --msi-news-card-padding: 18px; --msi-news-section-spacing: 28px; }
    body.msi-theme.blog #Subheader { padding: 34px 0 !important; }
}

/* 1.0.19-dev: Live posts index now has a BeBuilder image and heading, not a subheader.
 * Match FAQ/Clients, without depending on autogenerated BeBuilder section IDs. */
body.msi-theme.blog #Content .extra_content .mfn-builder-content > .mcb-section:first-child:has(.column_image):not(:has(.column_heading)) {
    padding: 0 !important;
}
body.msi-theme.blog #Content .extra_content .mfn-builder-content > .mcb-section:first-child:has(.column_image):not(:has(.column_heading)) > .section_wrapper {
    width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
}
body.msi-theme.blog #Content .extra_content .mfn-builder-content > .mcb-section:first-child:has(.column_image):not(:has(.column_heading)) :is(.wrap,.column,.mcb-wrap-inner,.mcb-column-inner,.image_frame,.image_wrapper) {
    box-sizing: border-box; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
}
body.msi-theme.blog #Content .extra_content .mfn-builder-content > .mcb-section:first-child:has(.column_image):not(:has(.column_heading)) img {
    display: block; width: 100% !important; height: auto !important; max-width: 100%;
}
body.msi-theme.blog #Content .extra_content .mfn-builder-content > .mcb-section:has(.column_heading):not(:has(.column_image)) {
    --msi-title-color: var(--msi-red-dark); padding: clamp(40px,5vw,72px) 0 clamp(24px,3vw,40px) !important; background: #fff;
}
body.msi-theme.blog #Content .extra_content .mfn-builder-content > .mcb-section:has(.column_heading):not(:has(.column_image)) > .section_wrapper {
    width: calc(100% - 40px) !important; max-width: 1000px !important; margin: 0 auto !important; padding: 0 !important;
}
body.msi-theme.blog #Content .extra_content .mfn-builder-content > .mcb-section:has(.column_heading):not(:has(.column_image)) :is(.wrap,.column,.mcb-wrap-inner,.mcb-column-inner) {
    box-sizing: border-box; margin: 0 !important; padding: 0 !important; min-width: 0;
}
body.msi-theme.blog #Content .extra_content .column_heading .title {
    color: var(--msi-red-dark) !important; line-height: 1.18 !important; text-align: center !important; margin: 0 !important; overflow-wrap: anywhere;
}
body.msi-theme.blog #Content .content_wrapper:has(.extra_content .column_heading) .column_blog .blog_wrapper {
    padding-top: 0;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid .post-item .post-photo-wrapper .image_wrapper > a:first-child > img {
    aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; object-position: center;
}
body.msi-theme.blog #Content .column_blog .post-item .post-footer .post-more:is(:hover,:focus-visible) {
    color: var(--msi-red) !important;
}

/* 1.0.20-dev: Equalize rendered cards without replacing native Isotope positioning. */
body.msi-theme.blog #Content .column_blog .posts_group.grid > .post-item {
    display: flex;
    flex-direction: column;
    min-height: var(--msi-news-equal-card-height, 0px);
}
body.msi-theme.blog #Content .column_blog .posts_group.grid > .post-item::before,
body.msi-theme.blog #Content .column_blog .posts_group.grid > .post-item::after {
    display: none;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid > .post-item > .post-photo-wrapper {
    flex: 0 0 auto;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid > .post-item > .post-desc-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-width: 0;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid > .post-item .post-desc {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-width: 0;
}
body.msi-theme.blog #Content .column_blog .posts_group.grid > .post-item .post-desc > .post-footer {
    margin-top: auto !important;
    flex: 0 0 auto;
}
