/*
Theme Name: Harian Merdeka Final
Theme URI: https://harian-merdeka.com/
Author: Harian Merdeka
Description: Konversi statis News5 Demo Seven ke tema WordPress. Struktur, CSS, JavaScript, font, gambar, dan responsif dipertahankan dari sumber HTML asli sebagai baseline visual sebelum dinamisasi WordPress.
Version: 2.3.3
Text Domain: harmer07-news5-dynamic
Requires at least: 6.0
Requires PHP: 7.4
*/

/* Harian Merdeka Final WordPress integrations: preserve Demo Seven geometry */
.harmer07-custom-logo{width:auto!important;max-width:100%;height:auto;max-height:56px;object-fit:contain}
.hm-ad img{display:block;max-width:100%;height:auto;margin-inline:auto}
@media(max-width:767px){.harmer07-custom-logo{max-height:42px}}


/* v1.2.1 — header: search kiri, logo tepat di tengah, berlangganan kanan */
.harmer07-main-header{
    display:grid!important;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    width:100%;
}
.harmer07-main-header>.harmer07-header-left{
    grid-column:1;
    justify-self:start;
    position:static!important;
}
.harmer07-main-header>.harmer07-header-logo{
    grid-column:2;
    justify-self:center;
    position:static!important;
    transform:none!important;
}
.harmer07-main-header>.harmer07-header-right{
    grid-column:3;
    justify-self:end;
    position:static!important;
}
.harmer07-header-logo .uc-logo,
.harmer07-header-logo .uc-logo>a{
    display:flex;
    align-items:center;
    justify-content:center;
}
.harmer07-header-logo-image{
    width:auto!important;
    height:auto!important;
    max-width:260px!important;
    max-height:62px!important;
    object-fit:contain;
}
.harmer07-desktop-search{
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
@media(max-width:991px){
    .harmer07-main-header{
        grid-template-columns:1fr auto 1fr;
    }
    .harmer07-header-logo-image{
        max-width:190px!important;
        max-height:48px!important;
    }
}
@media(max-width:575px){
    .harmer07-header-logo-image{
        max-width:165px!important;
        max-height:42px!important;
    }
}

/* Harian Merdeka Final Footer Builder */
.harmer07-footer .footer-outer{background:var(--h07-footer-bg,#071126)!important;color:var(--h07-footer-text,#fff)!important}.harmer07-footer a{color:inherit}.harmer07-footer .text-opacity-50,.harmer07-footer p{color:var(--h07-footer-muted,#b6bdca)}.harmer07-footer-ad{margin-bottom:32px;text-align:center}.harmer07-footer-ad img{max-width:100%;height:auto}.harmer07-back-to-top{position:fixed;right:22px;bottom:22px;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:var(--h07-footer-accent,#1675e8);color:#fff!important;z-index:99;text-decoration:none;box-shadow:0 8px 24px rgba(0,0,0,.2)}

/* Harian Merdeka Final Branding Manager */
.harmer07-footer-logo{height:auto;max-width:100%;width:var(--harmer07-footer-logo-width,220px)}


/* Harian Merdeka Final — responsive advertisement widgets */
.harmer07-sidebar-ad,
.harmer07-widget-ad {
    width: 100%;
    margin: 0;
    text-align: center;
}
.harmer07-ad-widget { margin: 0; }
.harmer07-ad-widget-title { display: none; }
.harmer07-sidebar-ad img,
.harmer07-sidebar-ad iframe,
.harmer07-sidebar-ad video,
.harmer07-sidebar-ad ins,
.harmer07-sidebar-ad .widget_media_image,
.harmer07-sidebar-ad .custom-html-widget {
    max-width: 100%;
}
.harmer07-sidebar-ad img {
    width: auto;
    height: auto;
    display: inline-block;
}
.harmer07-sidebar-ad iframe { width: 100%; border: 0; }
@media (max-width: 767px) {
    .harmer07-sidebar-ad { overflow: hidden; }
    .harmer07-sidebar-ad img { width: 100%; object-fit: contain; }
}

/* v1.9.0 — complete WordPress templates: single, page, archive, search, 404 */
.harmer07-single-main,.harmer07-page-main,.harmer07-listing-main{background:#fff}
.dark .harmer07-single-main,.dark .harmer07-page-main,.dark .harmer07-listing-main{background:#000}
.harmer07-article-header{max-width:980px}
.harmer07-article-title{font-weight:800;line-height:1.08;letter-spacing:-.035em;text-wrap:balance}
.harmer07-article-category{font-size:.8rem;letter-spacing:.08em}
.harmer07-featured-image{max-width:980px;margin-inline:auto}
.harmer07-featured-image img{display:block;width:100%;border-radius:12px;object-fit:cover}
.harmer07-article-layout{display:grid;grid-template-columns:minmax(0,760px) 300px;gap:48px;align-items:start;justify-content:center}
.harmer07-article-content{font-size:1.125rem;line-height:1.86;color:#262626}
.dark .harmer07-article-content{color:#e8e8e8}
.harmer07-article-content>*:first-child{margin-top:0}
.harmer07-article-content p{margin:0 0 1.4em}
.harmer07-article-content h2,.harmer07-article-content h3{line-height:1.25;margin-top:1.6em;margin-bottom:.7em}
.harmer07-article-content img{max-width:100%;height:auto;border-radius:8px}
.harmer07-article-content blockquote{border-left:4px solid var(--bs-primary,#d71920);margin:1.8em 0;padding:.2em 0 .2em 1.2em;font-size:1.25em;font-weight:600}
.harmer07-sharebar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0 18px;border-bottom:1px solid #e8e8e8;margin-bottom:28px;font-size:.9rem}
.harmer07-sharebar a{color:inherit;text-decoration:none;font-weight:700}
.harmer07-single-sidebar{position:relative;min-width:0}
.harmer07-single-sidebar .hm-ad img{width:100%;height:auto}
.harmer07-popular-box{border-top:3px solid var(--bs-primary,#d71920);padding-top:16px}
.harmer07-popular-item{display:grid;grid-template-columns:34px 1fr;gap:10px;padding:13px 0;border-bottom:1px solid #e8e8e8}
.harmer07-popular-rank{font-size:1.35rem;font-weight:800;color:var(--bs-primary,#d71920)}
.harmer07-post-navigation{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding-top:24px;border-top:1px solid #e8e8e8}
.harmer07-post-navigation>div:last-child{text-align:right}
.harmer07-post-navigation a{font-weight:700;text-decoration:none}
.harmer07-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.harmer07-related-thumb{aspect-ratio:16/9;object-fit:cover;border-radius:8px}
.harmer07-comments{max-width:760px}
.harmer07-comments .comment-list{list-style:none;padding:0}
.harmer07-comments .comment-body{padding:20px 0;border-bottom:1px solid #e8e8e8}
.harmer07-comments textarea,.harmer07-comments input[type=text],.harmer07-comments input[type=email],.harmer07-comments input[type=url]{width:100%;border:1px solid #d8d8d8;border-radius:8px;padding:12px;background:transparent;color:inherit}
.harmer07-comments input[type=submit]{border:0;border-radius:6px;padding:11px 20px;background:var(--bs-primary,#d71920);color:#fff;font-weight:700}
.harmer07-list-grid{display:grid;gap:28px}
.harmer07-list-card{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;padding-bottom:28px;border-bottom:1px solid #e8e8e8}
.harmer07-list-thumb img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px}
.harmer07-page-card{max-width:900px;margin-inline:auto}
@media(max-width:991px){
 .harmer07-article-layout{grid-template-columns:minmax(0,760px)}
 .harmer07-single-sidebar{margin-top:30px}
 .harmer07-single-sidebar .hm-ad{max-width:360px;margin-inline:auto}
}
@media(max-width:767px){
 .harmer07-single-main{padding-top:26px!important}
 .harmer07-article-title{font-size:2rem!important;line-height:1.12}
 .harmer07-article-meta{font-size:.75rem!important}
 .harmer07-featured-image{margin-top:24px!important;margin-bottom:28px!important}
 .harmer07-featured-image img{border-radius:8px}
 .harmer07-article-content{font-size:1.05rem;line-height:1.78}
 .harmer07-related-grid{grid-template-columns:1fr}
 .harmer07-post-navigation{grid-template-columns:1fr;gap:14px}
 .harmer07-post-navigation>div:last-child{text-align:left}
 .harmer07-list-card{grid-template-columns:120px minmax(0,1fr);gap:14px;padding-bottom:20px}
 .harmer07-list-card p{display:none}
 .harmer07-list-card .h4{font-size:1rem}
}

/* Harian Merdeka Final v2.2.0 — dynamic widget engine */
.hmf-widget-area{width:100%;margin:24px auto}.hmf-dynamic-widget{max-width:100%;overflow:hidden}.hmf-dynamic-widget img{display:block;max-width:100%;height:auto;margin:auto}.hmf-widget-title{font-size:12px;text-align:center;text-transform:uppercase;letter-spacing:.08em;opacity:.55;margin:0 0 8px}.hmf-widget-area:empty{display:none}@media(max-width:767px){.hmf-widget-area{margin:18px auto}}


/* v2.2.4 — Berita Update companion advertisement position and desktop size */
[data-hmf-widget="sidebar-before-latest"] .section-inner {
    display: flex;
    justify-content: center;
}
[data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
}
[data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad img,
[data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad iframe,
[data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad video,
[data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad ins,
[data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad .widget_media_image,
[data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad .custom-html-widget {
    width: 100%;
    max-width: 360px;
    height: auto;
}
@media (max-width: 767px) {
    [data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad,
    [data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad img,
    [data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad iframe,
    [data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad video,
    [data-hmf-widget="sidebar-before-latest"] .harmer07-sidebar-ad ins {
        max-width: 100%;
    }
}


/* v2.2.5 — Berita Update: six posts + fixed single-post-sized advertisement */
#latest-news .hmf-latest-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}
#latest-news .hmf-latest-posts { min-width: 0; }
#latest-news .hmf-latest-post-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 24px !important;
    margin: 0 !important;
}
#latest-news .hmf-latest-post-grid > div {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
}
#latest-news .hmf-latest-post-grid > div:nth-child(n+7) { display: none !important; }
#latest-news .hmf-latest-sidebar {
    width: 300px;
    max-width: 100%;
    align-self: stretch;
}
#latest-news .hmf-latest-sidebar .harmer07-sidebar-ad,
#latest-news .hmf-latest-sidebar .harmer07-widget-ad,
#latest-news .hmf-latest-sidebar .widget,
#latest-news .hmf-latest-sidebar .widget_media_image,
#latest-news .hmf-latest-sidebar .custom-html-widget {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}
#latest-news .hmf-latest-sidebar img,
#latest-news .hmf-latest-sidebar iframe,
#latest-news .hmf-latest-sidebar video,
#latest-news .hmf-latest-sidebar ins {
    display: block;
    width: 100% !important;
    max-width: 300px !important;
    height: auto;
    margin: 0 auto;
}
@media (max-width: 991px) {
    #latest-news .hmf-latest-with-sidebar {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    #latest-news .hmf-latest-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 18px !important;
    }
    #latest-news .hmf-latest-sidebar,
    #latest-news .hmf-latest-sidebar .harmer07-sidebar-ad,
    #latest-news .hmf-latest-sidebar .harmer07-widget-ad,
    #latest-news .hmf-latest-sidebar .widget,
    #latest-news .hmf-latest-sidebar .widget_media_image,
    #latest-news .hmf-latest-sidebar .custom-html-widget,
    #latest-news .hmf-latest-sidebar img,
    #latest-news .hmf-latest-sidebar iframe,
    #latest-news .hmf-latest-sidebar video,
    #latest-news .hmf-latest-sidebar ins {
        width: 100% !important;
        max-width: 100% !important;
    }
    #latest-news .hmf-latest-sidebar {
        margin: 4px 0;
        padding: 0;
    }
}
@media (max-width: 479px) {
    #latest-news .hmf-latest-post-grid { grid-template-columns: 1fr; }
    #latest-news .hmf-latest-sidebar { margin-block: 20px; }
}


/* v2.2.6 — Berita Update DOM structure fix
 * The post grid and advertisement are sibling columns.
 */
#latest-news .hmf-latest-with-sidebar > .hmf-latest-posts { min-width: 0; }
#latest-news .hmf-latest-with-sidebar > .hmf-latest-sidebar { grid-column: 2; grid-row: 1; }
@media (max-width: 991px) {
  #latest-news .hmf-latest-with-sidebar > .hmf-latest-sidebar { grid-column: 1; grid-row: auto; }
}

/* v2.2.7 — Berita Update visual balance
 * Desktop uses a 2x3 article grid beside a fixed 300px advertisement.
 * The larger cards and matched vertical rhythm prevent the section from
 * looking compressed on the left and empty below the advertisement.
 */
@media (min-width: 992px) {
    #latest-news .hmf-latest-with-sidebar {
        grid-template-columns: minmax(0, 1fr) 300px;
        column-gap: 36px;
        align-items: start;
    }

    #latest-news .hmf-latest-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        column-gap: 26px !important;
        row-gap: 30px !important;
    }

    #latest-news .hmf-latest-post-grid .post-media {
        border-radius: 0;
    }

    #latest-news .hmf-latest-post-grid .post-title {
        font-size: clamp(17px, 1.08vw, 20px) !important;
        line-height: 1.22 !important;
    }

    #latest-news .hmf-latest-sidebar {
        width: 300px;
        max-width: 300px;
        align-self: start;
    }

    #latest-news .hmf-latest-sidebar img {
        max-height: 620px;
        object-fit: contain;
        object-position: top center;
    }

    #latest-news .section-footer {
        width: calc(100% - 336px);
        margin-right: 336px;
        margin-left: 0;
        justify-content: flex-end !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    #latest-news .hmf-latest-with-sidebar {
        grid-template-columns: minmax(0, 1fr) 280px;
        column-gap: 28px;
    }

    #latest-news .hmf-latest-sidebar,
    #latest-news .hmf-latest-sidebar img,
    #latest-news .hmf-latest-sidebar iframe,
    #latest-news .hmf-latest-sidebar video,
    #latest-news .hmf-latest-sidebar ins {
        width: 280px !important;
        max-width: 280px !important;
    }

    #latest-news .section-footer {
        width: calc(100% - 308px);
        margin-right: 308px;
    }
}

@media (max-width: 991px) {
    #latest-news .hmf-latest-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        row-gap: 26px !important;
    }

    #latest-news .hmf-latest-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        margin: 28px 0 !important;
    }

    #latest-news .hmf-latest-sidebar img,
    #latest-news .hmf-latest-sidebar iframe,
    #latest-news .hmf-latest-sidebar video,
    #latest-news .hmf-latest-sidebar ins {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    #latest-news .section-footer {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 575px) {
    #latest-news .hmf-latest-post-grid {
        grid-template-columns: 1fr !important;
        row-gap: 24px !important;
    }
}

/* Harian Merdeka Final — Tulisan Pembaca */
.hmf-reader-form-wrap{max-width:920px;margin:48px auto 80px;padding:0 20px}.hmf-reader-intro{text-align:center;margin-bottom:32px}.hmf-reader-intro h1{font-size:clamp(32px,5vw,54px);margin:0 0 12px}.hmf-reader-intro p{max-width:720px;margin:auto;line-height:1.7;color:#666}.hmf-reader-form{display:grid;gap:20px;padding:30px;border:1px solid #e5e5e5;background:#fff}.hmf-reader-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.hmf-reader-form label{display:grid;gap:8px;font-weight:700}.hmf-reader-form input,.hmf-reader-form select,.hmf-reader-form textarea{width:100%;box-sizing:border-box;border:1px solid #ccc;border-radius:3px;padding:12px 14px;font:inherit;background:#fff}.hmf-reader-form textarea{resize:vertical}.hmf-reader-consent{grid-template-columns:auto 1fr!important;align-items:start;font-weight:400!important;line-height:1.6}.hmf-reader-consent input{width:auto;margin-top:5px}.hmf-reader-form button{justify-self:start;border:0;background:#d71937;color:#fff;padding:13px 24px;font-weight:800;cursor:pointer}.hmf-reader-notice{margin:0 0 20px;padding:15px 18px;border-left:4px solid #d71937;background:#f6f6f6}.hmf-reader-hp{position:absolute!important;left:-9999px!important;opacity:0!important}@media(max-width:680px){.hmf-reader-form{padding:22px 18px}.hmf-reader-grid{grid-template-columns:1fr}.hmf-reader-form-wrap{margin-top:28px}}
