/*
Theme Name: Buletin Ollie
Theme URI: https://buletinonlines.net/v7/
Description: Tema berita Buletin Online — child theme atas Ollie (GPL-3.0, github.com/OllieWP/ollie). Laman utama berasaskan seksyen kategori, artikel mudah dibaca di telefon, profil wartawan dan butang kongsi melalui plugin Buletin Newsroom.
Author: Tarbiah Kreatif untuk Buletin Online
Template: ollie
Version: 1.0.2
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: buletin-ollie
*/

/* ---------- Base ---------- */
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{text-underline-offset:.18em}
.bo-wrap{max-width:var(--wp--style--global--wide-size,1240px);margin-inline:auto;padding-inline:var(--wp--preset--spacing--medium,1rem)}
:where(.wp-site-blocks) > *{margin-block-start:0}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- Header ---------- */
.bo-topbar{font-size:.8rem}
.bo-topbar a{color:inherit;text-decoration:none}
.bo-topbar .bo-sosial-laman{display:flex;gap:.75rem}
.bo-topbar .bo-sosial-laman a{opacity:.85}.bo-topbar .bo-sosial-laman a:hover{opacity:1}
.bo-header-main .wp-block-site-logo img{max-height:64px;width:auto}
.bo-header-main .wp-block-search__input{border-radius:999px 0 0 999px;border:0;padding:.55rem .9rem;min-width:220px}
.bo-header-main .wp-block-search__button{border-radius:0 999px 999px 0;margin-left:0;background:#fff;color:var(--wp--preset--color--primary);border:0}
@media (max-width:781px){.bo-header-main .wp-block-search{display:none}.bo-header-main .wp-block-site-logo img{max-height:46px}}

/* Navigation (classic menu rendered by [bo_menu]) */
.bo-nav{position:relative;background:#fff;border-bottom:1px solid var(--wp--preset--color--border-light)}
.bo-nav__inner{display:flex;align-items:center;gap:1rem;max-width:var(--wp--style--global--wide-size,1240px);margin-inline:auto;padding-inline:var(--wp--preset--spacing--medium,1rem)}
.bo-nav__toggle{position:absolute;opacity:0;pointer-events:none}
.bo-nav__btn{display:none;align-items:center;gap:.5rem;padding:.75rem 0;font-weight:700;cursor:pointer}
.bo-nav__btn svg{width:22px;height:22px}
.bo-nav ul{list-style:none;margin:0;padding:0}
.bo-nav .menu{display:flex;flex-wrap:wrap}
.bo-nav .menu > li{position:relative}
.bo-nav .menu a{display:block;padding:.85rem .9rem;color:var(--wp--preset--color--main);font-weight:700;font-size:.92rem;text-decoration:none;letter-spacing:.01em}
.bo-nav .menu > li > a:hover,.bo-nav .menu > li.current-menu-item > a,.bo-nav .menu > li.current-menu-ancestor > a{color:var(--wp--preset--color--primary);box-shadow:inset 0 -3px 0 var(--wp--preset--color--primary-alt)}
.bo-nav .sub-menu{position:absolute;left:0;top:100%;min-width:230px;background:#fff;border:1px solid var(--wp--preset--color--border-light);border-radius:0 0 10px 10px;box-shadow:0 12px 30px rgba(10,40,30,.12);padding:.4rem 0;opacity:0;visibility:hidden;transform:translateY(6px);transition:.15s;z-index:50}
.bo-nav .sub-menu a{font-weight:600;padding:.55rem 1rem}
.bo-nav .sub-menu a:hover{background:var(--wp--preset--color--primary-accent);color:var(--wp--preset--color--primary)}
.bo-nav li:hover > .sub-menu,.bo-nav li:focus-within > .sub-menu{opacity:1;visibility:visible;transform:none}
@media (max-width:781px){
 .bo-nav__btn{display:inline-flex}
 .bo-nav__menu{display:none;width:100%}
 .bo-nav__inner{flex-wrap:wrap}
 .bo-nav__toggle:checked ~ .bo-nav__menu{display:block}
 .bo-nav .menu{flex-direction:column;padding-bottom:.75rem}
 .bo-nav .menu a{padding:.65rem 0;border-bottom:1px solid var(--wp--preset--color--border-light)}
 .bo-nav .sub-menu{position:static;opacity:1;visibility:visible;transform:none;box-shadow:none;border:0;padding:0 0 0 1rem;min-width:0}
}

/* Ticker "Terkini" */
.bo-ticker{border-bottom:1px solid var(--wp--preset--color--border-light);background:#fff}
.bo-ticker__label{flex:none;background:var(--wp--preset--color--merah,#c62828);color:#fff;font-weight:800;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;padding:.3rem .6rem;border-radius:4px}
.bo-ticker .wp-block-post-template{display:flex;gap:2rem;overflow-x:auto;scrollbar-width:none;white-space:nowrap;margin:0}
.bo-ticker .wp-block-post-template::-webkit-scrollbar{display:none}
.bo-ticker .wp-block-post-title{font-size:.88rem;font-weight:600;margin:0}
.bo-ticker .wp-block-post-title a{text-decoration:none;color:var(--wp--preset--color--main)}
.bo-ticker .wp-block-post-title a:hover{color:var(--wp--preset--color--primary)}

/* ---------- Cards & sections ---------- */
.bo-seksyen-tajuk{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;border-bottom:3px solid var(--wp--preset--color--primary-alt);margin-bottom:1.25rem!important}
.bo-seksyen-tajuk h2{margin:0;padding:.2rem 0 .45rem;font-size:clamp(1.15rem,2.2vw,1.4rem);text-transform:uppercase;letter-spacing:.02em}
.bo-seksyen-tajuk a{font-size:.85rem;font-weight:700;text-decoration:none;color:var(--wp--preset--color--primary)}
.bo-kad .wp-block-post-featured-image{margin-bottom:.65rem}
.bo-kad .wp-block-post-featured-image img{border-radius:10px;aspect-ratio:16/9;object-fit:cover;width:100%;transition:transform .3s}
.bo-kad .wp-block-post-featured-image a{display:block;overflow:hidden;border-radius:10px}
.bo-kad:hover .wp-block-post-featured-image img{transform:scale(1.03)}
.bo-kad .wp-block-post-title{margin:0 0 .35rem;line-height:1.3}
.bo-kad .wp-block-post-title a{text-decoration:none;color:var(--wp--preset--color--main)}
.bo-kad .wp-block-post-title a:hover{color:var(--wp--preset--color--primary)}
.bo-kad .wp-block-post-date,.bo-meta{font-size:.78rem;color:var(--wp--preset--color--secondary)}
.bo-kad .wp-block-post-terms{font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;margin-bottom:.3rem}
.bo-kad .wp-block-post-terms a{text-decoration:none;color:var(--wp--preset--color--primary)}
.bo-kad .wp-block-post-excerpt{font-size:.92rem;color:var(--wp--preset--color--secondary);margin-top:.35rem}
.bo-kad .wp-block-post-excerpt__more-link{display:none}

/* Hero */
.bo-hero-utama .wp-block-post-featured-image img{aspect-ratio:16/10;border-radius:14px}
.bo-hero-utama .wp-block-post-title{font-size:clamp(1.5rem,3.4vw,2.35rem);line-height:1.15;letter-spacing:-.01em}
.bo-senarai .wp-block-post-template > li{padding:.85rem 0;border-bottom:1px solid var(--wp--preset--color--border-light)}
.bo-senarai .wp-block-post-template > li:first-child{padding-top:0}
.bo-senarai .bo-kad{display:grid;grid-template-columns:112px 1fr;gap:.85rem;align-items:start}
.bo-senarai .bo-kad .wp-block-post-featured-image{margin:0}
.bo-senarai .bo-kad .wp-block-post-featured-image img{aspect-ratio:4/3;border-radius:8px}
.bo-senarai .bo-kad .wp-block-post-title{font-size:1rem}
.bo-senarai-teks .wp-block-post-template > li{padding:.7rem 0;border-bottom:1px solid var(--wp--preset--color--border-light)}
.bo-senarai-teks .wp-block-post-title{font-size:1rem;margin:0}
.bo-band{background:var(--wp--preset--color--tertiary)}
.bo-band-gelap{background:var(--wp--preset--color--primary-alt-accent);color:#fff}
.bo-band-gelap .bo-kad .wp-block-post-title a,.bo-band-gelap h2{color:#fff}
.bo-band-gelap .bo-seksyen-tajuk a{color:#9de3c8}
.bo-band-gelap .bo-kad .wp-block-post-date{color:#b9cfc6}

/* ---------- Single article ---------- */
.bo-artikel-tajuk{font-size:clamp(1.65rem,4vw,2.6rem)!important;line-height:1.15!important;letter-spacing:-.015em;margin:.35rem 0 1rem!important}
.bo-artikel .wp-block-post-featured-image img{border-radius:12px;aspect-ratio:16/9;object-fit:cover;width:100%}
.bo-artikel .wp-block-post-content{font-size:1.1rem;line-height:1.75}
.bo-artikel .wp-block-post-content > p:first-child{font-size:1.18rem}
.bo-artikel .wp-block-post-content img{border-radius:8px;height:auto}
.bo-artikel .wp-block-post-content a{color:var(--wp--preset--color--primary)}
.bo-artikel .wp-block-post-terms.bo-tag a{display:inline-block;margin:0 .35rem .35rem 0;padding:.25rem .7rem;border-radius:999px;background:var(--wp--preset--color--tertiary);text-decoration:none;font-size:.82rem;color:var(--wp--preset--color--main)}
.bo-artikel .wp-block-post-terms.bo-tag .wp-block-post-terms__separator{display:none}
.bo-sidebar{position:sticky;top:1rem}
@media (max-width:781px){.bo-sidebar{position:static}}

/* ---------- Footer ---------- */
.bo-footer a{color:#d9efe6;text-decoration:none}.bo-footer a:hover{color:#fff;text-decoration:underline}
.bo-footer ul{list-style:none;margin:0;padding:0;display:grid;gap:.45rem;font-size:.92rem}
.bo-footer h3{font-size:.8rem;letter-spacing:.1em;text-transform:uppercase;color:#9de3c8;margin:0 0 .85rem}
.bo-footer .wp-block-site-logo img{max-height:70px;width:auto}
.bo-footer .bo-sosial-laman{display:flex;gap:.85rem}

/* Pagination */
.wp-block-query-pagination{gap:.4rem;margin-top:2rem}
.wp-block-query-pagination .page-numbers{display:inline-flex;min-width:40px;height:40px;align-items:center;justify-content:center;border-radius:8px;border:1px solid var(--wp--preset--color--border-light);text-decoration:none}
.wp-block-query-pagination .page-numbers.current{background:var(--wp--preset--color--primary);color:#fff;border-color:transparent}
@media (min-width:601px) and (max-width:1000px){.wp-block-post-template-is-layout-grid.columns-4,.wp-block-post-template-is-layout-grid.columns-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* ---------- Layout fixes (Ollie gaps, lazy-load wrappers) ---------- */
.wp-block-post-template > li{height:auto!important}
.bo-kad .wp-block-post-featured-image,.bo-kad .wp-block-post-featured-image a{height:auto!important;line-height:0}
.bo-kad .wp-block-post-featured-image img,.bo-artikel .wp-block-post-featured-image img{display:block;height:auto!important}
.bo-kad > .wp-block-group{margin-block-start:.15rem!important}
.bo-kad .wp-block-group > *{margin-block-start:0!important}
.bo-kad .wp-block-group > * + *{margin-block-start:.3rem!important}
.bo-ticker .wp-block-post-template > li{margin:0!important;flex:none}
.bo-ticker .wp-block-query{min-width:0;flex:1}
.bo-seksyen-tajuk{margin-block-start:0!important}
.bo-seksyen-tajuk + .wp-block-query{margin-block-start:0!important}
.bo-artikel > *{margin-block-start:0}
.bo-artikel > * + *{margin-block-start:1rem}
.bo-sidebar > * + *{margin-block-start:0}
.bo-band-gelap .bo-kad .wp-block-post-terms a{color:#9de3c8}
.bo-hero-utama .wp-block-post-excerpt{font-size:1rem}
@media (max-width:781px){.bo-header-main .wp-block-group{justify-content:center!important}}
