/*
Theme Name:        Bom Bom Cow
Author:            Nexiamath.com
Author URI:        https://nexiamath.com
Description:       Bom Bom Cow is a fast, mobile-first WordPress news and magazine theme crafted for modern media publishers, editorial blogs, and news portals. It features a bold dual sticky header with brand bar and navigation, a card-based story grid with category sections, AJAX load-more pagination, dark mode, a sticky sidebar with popular posts and recent comments, a reading progress bar on single posts, a mobile bottom navigation bar, and social sharing built into the Customizer. Clean, lightweight, and optimized for readability and engagement out of the box — no plugins required.
Version:           1.2.2
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License:           GPL v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       bombomcow
Tags:              news, magazine, blog, custom-logo, custom-menu, custom-background, featured-images, footer-widgets, full-width-template, sticky-header, right-sidebar, dark-mode, grid-layout, editor-style, translation-ready, responsive-design, mobile-first, threaded-comments, rtl-language-support, accessibility-ready
*/

:root{--accent:#bb1919;--text:#000;--muted:#666;--border:#e5e5e5;--brandbar-h:48px;--navbar-h:0px;--gutter:24px;--right-col-w:308px}
html{box-sizing:border-box}
*,*::before,*::after{box-sizing:inherit}
/* body padding-top is now controlled by --bbc-h via inline CSS; fallback kept */
body{margin:0;font-family:'Tinos', serif;color:#000;background:#fff;padding-top:60px}

a{color:#000;text-decoration:none}
a:visited{color:#000}
a:hover{text-decoration:underline}

.site-header{border-bottom:1px solid var(--border)}
.site-header__inner{max-width:1100px;margin:0 auto;padding:12px 16px;text-align:center}
.site-brandbar .site-header__inner{height:var(--brandbar-h);padding:0 16px;display:flex;align-items:center;justify-content:center}
.site-navbar .site-header__inner{padding:6px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left}
.site-brand{margin-bottom:0}
.site-brandbar{border-bottom:1px solid var(--border)}

.site-brandbar{position:fixed;top:0;left:0;right:0;z-index:1000;background:#fff;transition:box-shadow .28s ease-in-out}
.site-brandbar.scrolled{box-shadow:0 1px 0 var(--border)}
.site-navbar{position:fixed;top:var(--brandbar-h);left:0;right:0;z-index:900;background:#fff;transition:transform .28s ease-in-out, opacity .28s ease-in-out, box-shadow .28s ease-in-out;will-change:transform,opacity;box-shadow:0 1px 0 var(--border)}
.site-navbar.compact{transform:translateY(-12px);box-shadow:0 1px 0 var(--border)}
.site-navbar.hide{transform:translateY(-100%);opacity:0;pointer-events:none}

.site-brand{display:inline-flex;justify-content:center;align-items:center;gap:6px;text-decoration:none;margin-bottom:0;line-height:1;max-width:100%}
.bbc-logo{display:inline-flex;align-items:center;max-width:100%;line-height:1}
.bbc-logo .custom-logo-link{display:inline-flex;align-items:center;max-width:min(180px,42vw)}
.bbc-logo img{display:block;max-height:32px;max-width:100%;width:auto;object-fit:contain}
.site-brand .brand-box{min-width:36px;height:32px;background:#000;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;padding:0 10px;letter-spacing:0;white-space:nowrap;transition:transform .28s ease-in-out}
.site-brand .custom-logo-link{display:inline-flex;align-items:center;max-width:min(180px,46vw)}
.site-brand img{max-height:32px;max-width:100%;width:auto;display:block;object-fit:contain}

.site-brandbar .site-header__inner{transition:height .28s ease-in-out}
/* Sticky/compact header becomes a single row in the navbar */
body.brandbar-shrink{--brandbar-h:0px}
body.brandbar-shrink .site-brandbar{border-bottom:0;box-shadow:none;overflow:hidden}
body.brandbar-shrink .site-brandbar .site-header__inner{height:0;padding:0}
body.brandbar-shrink .site-navbar{top:0}
body.brandbar-shrink .site-navbar .site-header__inner{display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left}
body.brandbar-shrink .site-navbar .site-brand{margin:0}

.site-mainnav{display:flex;flex:1 1 auto;justify-content:center;min-width:0}

.header-search{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end}

/* Header search (custom searchform.php) */
.header-search__form{position:relative;display:flex;align-items:center;margin:0}
.header-search__label{margin:0}
.header-search__input{
  height:36px;
  width:min(360px, 28vw);
  min-width:220px;
  padding:0 44px 0 14px;
  border:1px solid rgba(0,0,0,.14);
  background:linear-gradient(#fafafa,#f3f3f3);
  border-radius:999px;
  outline:none;
  font:inherit;
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.header-search__input::placeholder{color:rgba(0,0,0,.55)}
.header-search__input:hover{border-color:rgba(0,0,0,.22)}
.header-search__input:focus{background:#fff;border-color:rgba(187,25,25,.65);box-shadow:0 0 0 4px rgba(187,25,25,.14)}

.header-search__button{
  position:absolute;
  right:6px;
  height:28px;
  width:28px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#111;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.header-search__button:hover{background:rgba(0,0,0,.06)}
.header-search__button:focus{outline:2px solid rgba(187,25,25,.35);outline-offset:2px}

@media (max-width:640px){
  .header-search{display:none}
}

.primary-nav{border-top:none}
.primary-nav{display:flex;align-items:center;justify-content:center;gap:10px;position:relative}
.primary-nav.is-compact{justify-content:space-between}
.primary-nav.is-compact .primary-menu{flex:1;justify-content:center}
.primary-nav.is-compact .primary-menu-toggle{margin-left:auto}
.primary-menu{list-style:none;display:flex;flex-wrap:nowrap;justify-content:center;gap:12px;padding:4px 0;margin:0;overflow-x:auto;white-space:nowrap}.primary-menu::-webkit-scrollbar{display:none}
body.brandbar-shrink .primary-menu{overflow-x:hidden}
.primary-menu li a{text-decoration:none;color:#000;font-weight:500}
.primary-menu .current-menu-item a,.primary-menu .current_page_item a{border-bottom:2px solid var(--accent);padding-bottom:4px}
.primary-menu li.current a{border-bottom:2px solid var(--accent);padding-bottom:4px}

.secondary-nav{border-top:1px solid var(--border)}
.secondary-menu{list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;justify-content:center;gap:12px;padding:6px 0;margin:0;font-size:12px;white-space:nowrap}
.secondary-menu li a{color:#000;text-decoration:none}
.secondary-menu li a:hover{text-decoration:underline}
.secondary-menu li.current a{border-bottom:2px solid var(--accent);padding-bottom:4px}

/* Compact/floating primary menu overflow */
.primary-menu-toggle{display:none;align-items:center;justify-content:center;border:0;background:transparent;color:#000;cursor:pointer;padding:6px;border-radius:6px;line-height:1}
.primary-menu-toggle:hover{background:#f5f5f5}
.primary-menu-toggle:focus{outline:2px solid rgba(187,25,25,.35);outline-offset:2px}
.primary-menu-toggle .bars{display:inline-flex;flex-direction:column;gap:3px}
.primary-menu-toggle .bars span{display:block;width:18px;height:2px;background:#000}

.primary-menu-overflow{display:none;position:absolute;top:100%;right:0;min-width:220px;max-width:80vw;background:#fff;border:1px solid var(--border);box-shadow:0 10px 24px rgba(0,0,0,.08);border-radius:10px;padding:8px 0;margin:6px 0 0;list-style:none;z-index:1100}
.primary-menu-overflow li a{display:block;padding:10px 14px;color:#000;text-decoration:none;white-space:nowrap}
.primary-menu-overflow li a:hover{text-decoration:underline;background:#fafafa}

.primary-nav.is-compact .primary-menu-toggle{display:inline-flex}
.primary-nav.is-overflow-open .primary-menu-overflow{display:block}

.site-main{max-width:1248px;margin:24px auto;padding:0 16px}
.entry-title{font-size:2rem;margin:0 0 1rem}
.entry-content{line-height:1.6}

.home-hero{display:grid;grid-template-columns:calc(100% - var(--right-col-w) - var(--gutter)) var(--right-col-w);gap:var(--gutter);margin-top:8px;align-items:start}
.home-hero>*{min-width:0}
.hero-composite{display:grid;grid-template-columns:minmax(0,33%) minmax(0,67%);gap:var(--gutter);align-items:start}
.hero-left{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;gap:16px;height:auto}
.hero-left>.side-item{display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:hidden}
.hero-center{display:flex;flex-direction:column;gap:12px;height:100%}
.hero-center .hero-image{max-height:55vh;overflow:hidden}
.hero-center,.hero-right{min-height:0}
.hero-right{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,1fr);gap:0;height:100%}
.hero-main{display:flex;flex-direction:column;gap:8px}
.hero-title{font-size:2rem;font-weight:700;margin:0;line-height:1.3}
.hero-excerpt{color:var(--muted);margin:0;line-height:1.6}
.hero-excerpt p{margin:0 0 10px}
.hero-excerpt p:last-child{margin-bottom:0}
.hero-meta{color:var(--muted);font-size:.9rem}
.hero-image{aspect-ratio:16/9;width:100%;overflow:hidden}
.hero-image img{width:100%;height:100%;display:block;object-fit:cover}
.hero-center .hero-title{font-size:clamp(1.6rem,2.2vw,2.2rem)}
.hero-center .hero-excerpt{margin-top:6px}

.side-item{padding:12px 0;border-bottom:1px solid var(--border)}
.side-item:last-child{border-bottom:none}
.hero-left .side-item:first-child{padding-top:0;margin-top:0}
.side-thumb img{aspect-ratio:16/9;object-fit:cover}
.side-title{font-weight:700}
.side-excerpt{font-size:.95rem}
.side-meta{font-size:.85rem}

.right-item{padding:0;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:4px;height:100%}
.right-item:first-child{border-top:none;padding-top:0}
.right-title{font-size:.98rem;line-height:1.3;margin:10px 0 0;font-weight:700}
.right-excerpt{color:var(--muted);margin:6px 0 0;font-size:.86rem;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.right-meta{color:var(--muted);font-size:.8rem;margin-top:auto;padding-bottom:10px}
.right-item:first-child .right-title{margin-top:0}
.right-item:first-child .right-excerpt{margin-top:4px}

.hero-side{display:grid;grid-template-rows:auto auto;gap:16px}

.section-band{background:transparent;color:#000;margin:20px 0 10px}
.section-band__inner{max-width:1248px;margin:0 auto;padding:0 16px;border-top:4px solid #222}
.section-band__link{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:8px;padding-top:8px;font-weight:700;letter-spacing:.5px;line-height:1}
.section-band__link:hover{text-decoration:underline}
.section-band__arrow{display:inline-block;height:.9em;width:.9em;vertical-align:middle}
.section-band__arrow path{vector-effect:non-scaling-stroke}
.also-right .right-item{padding:12px 0;border-bottom:1px solid var(--border)}
.side-item{display:flex;flex-direction:column;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.hero-left .side-item{display:grid;grid-template-rows:minmax(0,1fr) auto}
.side-thumb{width:100%;height:100%;overflow:hidden;display:block}
.side-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.side-text{display:flex;flex-direction:column;gap:6px}
.side-title{font-size:1rem;margin:0}
.hero-left .side-excerpt{display:block}
.side-meta{color:var(--muted);font-size:.85rem}

.cards-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:16px;margin:24px 0}
.card{display:flex;flex-direction:column;gap:6px}
.card-thumb img{width:100%;height:auto;display:block}
.card-title{font-size:.95rem;margin:0}
.card-meta{color:var(--muted);font-size:.8rem}

.home-teasers .teasers-row{display:grid;grid-template-columns:repeat(6,1fr);gap:16px;margin:24px 0}
.teaser{display:flex;flex-direction:column;gap:6px}
.teaser-thumb img{width:100%;height:auto;display:block}
.teaser-title{font-size:.95rem;margin:0}
.teaser-excerpt{color:var(--muted);font-size:.9rem;margin:0}
.teaser-meta{color:var(--muted);font-size:.8rem}

.home-links .links-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:8px 0 24px}
.link-item{padding-top:8px;border-top:1px solid var(--border)}
.link-title{font-size:1rem;margin:0}

.sub-title{font-size:.95rem;color:#000;border-top:1px solid var(--border);padding-top:10px;margin:0 0 14px;letter-spacing:.3px}
.also-grid{display:grid;grid-template-columns:1.4fr 1.6fr 1fr;gap:20px}
.also-left{display:flex;flex-direction:column;gap:8px}
.also-lead{display:flex;flex-direction:column;gap:12px;align-items:start}
.also-lead-media{aspect-ratio:16/9;width:100%;overflow:hidden}
.also-lead-media img{width:100%;height:100%;object-fit:cover;display:block}
.also-lead-text{display:flex;flex-direction:column;gap:8px}
.also-title{font-size:2rem;font-weight:800;margin:0;line-height:1.2}
.also-excerpt{color:var(--muted);margin:0;line-height:1.6}
.also-title{font-size:1.6rem;font-weight:800;margin:0}
.also-excerpt{color:var(--muted);margin:0}
.also-meta{color:var(--muted);font-size:.9rem}
.also-center{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;align-items:start}
.also-media{aspect-ratio:16/9;overflow:hidden}
.also-media img{width:100%;height:100%;object-fit:cover}
.also-center-list{grid-column:1 / 3;display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}
.center-item{display:flex;flex-direction:column;gap:6px}
.center-title{font-size:1rem;margin:0}
.center-excerpt{color:var(--muted);font-size:.9rem;line-height:1.5;margin:0;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.center-meta{color:var(--muted);font-size:.85rem}
.center-item .thumb{aspect-ratio:4/3;overflow:hidden}
.center-item .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.also-media{position:relative}
.also-media img{width:100%;display:block}
.play{display:none}
.play::before{display:none}
.also-right{display:grid;grid-template-columns:1fr;gap:18px}
.right-media{aspect-ratio:4/3;overflow:hidden}
.right-media img{width:100%;height:100%;object-fit:cover;display:block}
.also-item-title{font-size:1rem;margin:0}
.also-item-excerpt{color:var(--muted);margin:6px 0 0;font-size:.9rem;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.also-item-meta{color:var(--muted);font-size:.85rem;margin-top:4px}
.also-lower{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-top:40px}
.also-lower > *{min-width:0}
.load-more-container{text-align:center;margin-top:20px}.load-more-btn{background-color:var(--accent);color:#fff;border:none;padding:10px 20px;cursor:pointer;font-size:1rem;border-radius:5px}.load-more-btn:hover{background-color:#c00}.loading-spinner{display:inline-block;width:40px;height:40px;border:4px solid rgba(0,0,0,.1);border-left-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.also-more a{font-weight:600}
.also-card{display:grid;grid-template-columns:150px 1fr;gap:12px;align-items:start}
.also-card.v{display:flex;flex-direction:column}
.also-card.v .thumb{width:100%}
.also-card.v .thumb img{width:100%;display:block}
.also-card.v .title{font-size:1rem;margin:8px 0 0}
.also-card.v .excerpt{color:var(--muted);margin:6px 0 0;font-size:.95rem;line-height:1.6}
.also-card.v .meta{color:var(--muted);font-size:.85rem;margin-top:4px}
.also-card .thumb img{width:100%;display:block}
.also-card .title{font-size:1rem;margin:0}
.also-card .excerpt{color:var(--muted);margin:6px 0 0;font-size:.95rem}
.also-card .meta{color:var(--muted);font-size:.85rem;margin-top:4px}
.also-single{display:grid;grid-template-rows:1fr auto;gap:12px;height:100%}
.also-single__media{overflow:hidden;display:block;height:100%}
.also-single__media img{width:100%;height:100%;object-fit:cover;display:block}
.also-single__text{display:flex;flex-direction:column;gap:8px}
.also-two{display:grid;grid-template-columns:1.618fr 1fr;gap:20px;align-items:start}
.also-two__right{display:flex;flex-direction:column;gap:12px}
.also-sidecard{display:flex;flex-direction:column;gap:8px}
.also-sidecard .thumb{height:140px;overflow:hidden;display:block}
.also-sidecard .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.also-sidecard .title{font-size:1rem;margin:8px 0 0}
.also-sidecard .excerpt{color:var(--muted);margin:6px 0 0;font-size:.95rem;line-height:1.6}
.also-sidecard .meta{color:var(--muted);font-size:.85rem;margin-top:4px}
.also-rightlist{display:grid;grid-template-columns:1fr;gap:12px;margin-top:8px}
.rightlist-item{display:flex;flex-direction:column;gap:6px;padding:12px 0;border-bottom:1px solid var(--border)}
.rightlist-title{font-weight:700;font-size:1rem;margin:0}
.rightlist-title a{color:#000;text-decoration:none}
.rightlist-excerpt{color:var(--muted);margin:0;font-size:.9rem;line-height:1.5}
.rightlist-meta{color:var(--muted);font-size:.85rem}

.hard-sidebar{display:flex;flex-direction:column;gap:18px}
.sidebar-box{border-top:4px solid #222;padding-top:10px}
.sidebar-title{margin:0 0 10px;font-size:.95rem;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:#000}
.sidebar-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:0}
.sidebar-item{margin:0;padding:12px 0;border-bottom:1px solid var(--border)}
.sidebar-item:last-child{border-bottom:none}
.sidebar-item a{color:#000;text-decoration:none}
.sidebar-item a:hover{text-decoration:underline}
.sidebar-item--empty{color:var(--muted)}

.sidebar-post{display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:start;text-decoration:none}
.sidebar-post__thumb{width:72px;height:54px;border-radius:0;overflow:hidden;background:#f3f3f3;border:1px solid var(--border);display:block}
.sidebar-post__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.sidebar-post__thumb-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#999;font-size:16px}
.bbc-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:1}
.bbc-icon svg{display:block;width:1em;height:1em}
.bbc-icon--text{font-size:.72rem;font-weight:700;letter-spacing:.04em}
.sidebar-post__text{display:flex;flex-direction:column;gap:6px;min-width:0}
.sidebar-post__title{font-weight:700;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sidebar-post__meta{color:var(--muted);font-size:.82rem;line-height:1}

.sidebar-comment{display:block;text-decoration:none}

.sidebar-comment{gap:6px}
.sidebar-comment__author{font-weight:700}
.sidebar-comment__on{color:var(--muted)}
.sidebar-comment__excerpt{display:block;color:var(--muted);font-size:.9rem;line-height:1.45;margin-top:4px}
.also-parent{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:20px;
  margin-bottom: 40px;
}

/* div2: kiri besar atas */
.also-parent .div2{
  grid-column:1 / 13;
}

/* div1: kiri bawah gabung */
.also-parent .div1{
  grid-column:1 / 13;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.home .also-parent .div1 {
  grid-template-columns: repeat(3, 1fr);
}

/* right column is now a shared page sidebar */

.with-sidebar{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
.with-sidebar__main{min-width:0}
.with-sidebar__side{min-width:0;align-self:start;position:sticky;top:calc(var(--navbar-h, 56px) + var(--brandbar-h, 0px) + 16px)}

/* Homepage: Section 3 variant (1 column list, image left + text right) */
.home .also.also--list .also-parent{margin-bottom:0}
.home .also.also--list .also-parent .div1{grid-template-columns:1fr}
.home .also.also--list .also-tile{display:grid;grid-template-columns:180px 1fr;grid-template-areas:"thumb title" "thumb excerpt" "thumb meta";gap:10px;align-items:start;padding:12px 0;border-bottom:1px solid var(--border)}
.home .also.also--list .also-tile:last-child{border-bottom:none}
.home .also.also--list .also-tile .thumb{grid-area:thumb;aspect-ratio:3/2;height:auto;min-height:108px;border-radius:0;overflow:hidden;display:block;background:#f3f3f3}
.home .also.also--list .also-tile .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.home .also.also--list .also-tile .title{grid-area:title;margin:0;font-size:1.05rem;font-weight:800;line-height:1.25;-webkit-line-clamp:2;line-clamp:2}
.home .also.also--list .also-tile .excerpt{grid-area:excerpt;margin:6px 0 0;-webkit-line-clamp:4;line-clamp:4}
.home .also.also--list .also-tile .meta{grid-area:meta;margin-top:6px}

/* Homepage: Section 4 (home-showcase) split (left 2 cards + right 4 text-only) */
.home .home-showcase--split{margin:24px 0}
.home .home-showcase--split .showcase-split__grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}

.home .home-showcase--split .showcase-split__left{display:flex;flex-direction:column;gap:16px}
.home .home-showcase--split .showcase-card{display:flex;flex-direction:column;gap:8px}
.home .home-showcase--split .showcase-card__thumb{display:block;overflow:hidden;aspect-ratio:4/3;background:#f3f3f3}
.home .home-showcase--split .showcase-card__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.home .home-showcase--split .showcase-card__title{margin:0;font-size:1.05rem;font-weight:800;line-height:1.25}
.home .home-showcase--split .showcase-card__title a{color:#000;text-decoration:none}
.home .home-showcase--split .showcase-card__title a:hover{text-decoration:underline}
.home .home-showcase--split .showcase-card__excerpt{margin:0;color:var(--muted);font-size:.95rem;line-height:1.55;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

.home .home-showcase--split .showcase-split__right{display:flex;flex-direction:column}
.home .home-showcase--split .showcase-text{padding:12px 0;border-bottom:1px solid var(--border)}
.home .home-showcase--split .showcase-text:first-child{padding-top:0}
.home .home-showcase--split .showcase-text:last-child{border-bottom:none}
.home .home-showcase--split .showcase-text__title{margin:0;font-size:1.02rem;font-weight:800;line-height:1.25}
.home .home-showcase--split .showcase-text__title a{color:#000;text-decoration:none}
.home .home-showcase--split .showcase-text__title a:hover{text-decoration:underline}
.home .home-showcase--split .showcase-text__excerpt{margin:6px 0 0;color:var(--muted);font-size:.95rem;line-height:1.55;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.also-tile{display:flex;flex-direction:column;gap:8px;padding:0}
.also-tile .thumb{aspect-ratio:4/3;overflow:hidden;display:block;height:150px}
.also-tile .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.also-tile .title{font-size:1rem;margin:8px 0 0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;}
.also-tile .excerpt{color:var(--muted);margin:6px 0 0;font-size:.95rem;line-height:1.6;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;}
.also-tile .meta{color:var(--muted);font-size:.85rem;margin-top:4px}

@media (max-width:960px){
  .home-hero{grid-template-columns:1fr}
  .hero-side{grid-template-columns:1fr}
  .cards-grid{grid-template-columns:repeat(3,1fr)}
  .home-teasers .teasers-row{grid-template-columns:repeat(3,1fr)}
  .also-grid{grid-template-columns:1fr}
  .also-center{grid-template-columns:1fr}
  .also-lower{grid-template-columns:repeat(2,1fr)}
  .with-sidebar{grid-template-columns:1fr}
  .with-sidebar__side{position:static;top:auto}
  .also-parent{display:flex;flex-direction:column;gap:20px;height:auto}
  .also-parent .div1{grid-template-columns:repeat(2, 1fr)}
  .home .also-parent .div1{grid-template-columns:repeat(2, 1fr)}
  .home .home-showcase--split .showcase-split__grid{grid-template-columns:1fr}
  .showcase-row{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  body{font-size:95%;overflow-wrap:break-word}
  :root{--gutter:16px}
  .site-main{margin:16px auto}
  .hero-composite{grid-template-columns:1fr;gap:16px}
  .hero-center .hero-image{max-height:40vh}
  .cards-grid{grid-template-columns:repeat(2,1fr);gap:12px}
  .home-teasers .teasers-row{grid-template-columns:repeat(2,1fr);gap:12px}
  .home-links .links-row{grid-template-columns:1fr}
  .also-grid{gap:16px}
  .also-two{grid-template-columns:1fr;gap:16px}
  .also-lower{grid-template-columns:1fr;gap:20px}
  .also-parent .div1{grid-template-columns:1fr}
  .home .also-parent .div1{grid-template-columns:1fr}
  .home .also.also--list .also-tile{grid-template-columns:1fr;grid-template-areas:"thumb" "title" "excerpt" "meta"}
  .home .also.also--list .also-tile .thumb{min-height:0}
  .home .home-showcase--split .showcase-split__grid{grid-template-columns:1fr}
  .also-center-list{grid-template-columns:repeat(2,1fr)}
  .showcase-row{grid-template-columns:1fr}
  .paper-head{grid-template-columns:1fr}
  .entry-title, .paper-title{font-size:1.5rem}
  .hero-title{font-size:1.6rem}
  .also-title{font-size:1.4rem}

  .side-item, .hero-left .side-item {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 12px;
    grid-template-rows: unset;
  }
  .side-item .side-thumb{
    width:120px;
    height:auto;
    flex-shrink:0;
  }
  .side-item .side-text{
    flex-grow:1;
  }

  .site-footer__inner{grid-template-columns:1fr}
  .footer-cats ul{columns:1}

  .stream-grid{grid-template-columns:1fr}
  .primary-menu, .secondary-menu {
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
    overflow-x: hidden;
  }

  .stream-card {
    flex-direction: column;
    gap: 12px;
  }
  .stream-card .stream-thumb{
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 4/3;
  }

  .hero-left {
    display: block;
    height: auto;
  }
  .also-single {
    height: auto;
  }
  .also-single__media {
    height: auto;
    aspect-ratio: 16/9;
  }
  .also {
    margin-bottom: 20px;
  }
  .load-more-container {
    display: grid;
    gap: 20px;
  }
  .also-tile__media, .stream-card__media, .stream-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    display: block;
    width: 100%;
  }
  .also-tile__media img, .stream-card__media img, .stream-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .paper {
    padding: 24px 0;
    border-radius: 0;
    box-shadow: none;
    margin-top: 16px;
    margin-bottom: 16px;
  }
  .paper-head, .paper-body {
    padding: 0 var(--gutter);
  }
  .stream-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer{border-top:1px solid var(--border);margin-top:32px;background:#fff;padding:24px 0;}
.site-footer__inner{max-width:1248px;margin:0 auto;padding:0 16px;color:var(--muted);font-size:.9rem}
.site-footer__inner a{color:#000}
.footer-top{padding-bottom:12px;border-bottom:1px solid var(--border)}
.footer-top .site-brand .custom-logo-link{max-width:min(180px,46vw)}
.footer-top .site-brand img{max-height:32px;max-width:100%}
.footer-nav{padding:12px 0;border-bottom:1px solid var(--border)}
.footer-nav .primary-menu{justify-content:flex-start;overflow-x:hidden;padding-right:0}
.footer-nav .primary-menu::-webkit-scrollbar{display:none}
.footer-nav .primary-menu-fader{display:none}
.footer-row{padding:12px 0;border-bottom:1px solid var(--border)}
.footer-item{display:flex;align-items:center;gap:12px}
.footer-heading{margin:0;font-size:1rem;font-weight:700}
.footer-social{list-style:none;padding:0;margin:0;display:flex;gap:10px;align-items:center}
.footer-social a{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid var(--border);border-radius:999px;background:#fff;color:#111;text-decoration:none;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.footer-social a:hover{background:#f6f6f6;border-color:#bbb;transform:translateY(-1px)}
.footer-social a.is-disabled{opacity:.55}
.footer-social a.is-disabled:hover{background:#fff;border-color:var(--border);transform:none}
.footer-social .bbc-icon{font-size:.74rem}
.footer-social li{display:flex}
.footer-legal{padding-top:12px}
.footer-links{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-wrap:wrap;gap:8px 12px;font-size:.85rem}
.footer-copy{font-size:.85rem;color:var(--muted);margin:0}

.stream-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;margin-top:24px}
.stream-card{display:flex;flex-direction:column;gap:8px}
.stream-thumb{aspect-ratio:16/9;overflow:hidden}
.stream-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.stream-title{font-size:1rem;margin:0}

/* Single post: MORE FROM THIS CATEGORY + YOU MAY ALSO LIKE */
.stream-grid--more{grid-template-columns:repeat(4,1fr)}
.stream-excerpt{margin:0;color:var(--muted);font-size:.92rem;line-height:1.55;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

@media (max-width:960px){
  .stream-grid--more{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:640px){
  .stream-grid--more{grid-template-columns:1fr}
}

.paper{max-width:1248px;margin:0 auto;background:#fff;padding:0 16px}
.paper-head{padding:0 8px 12px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:12px}.paper-title{grid-column:1 / 3}.paper-meta{grid-column:1 / 2}.paper-actions a{display:inline-flex;align-items:center;gap:8px}.paper-by{font-weight:700}
.paper-title{font-size:2rem;margin:0}
.paper-meta{color:var(--muted);font-size:.9rem}
.paper-thumb{margin:0 0 16px}
.paper-thumb img{width:100%;height:auto;display:block}
.paper-body{font-size:1.05rem;line-height:1.8}
.paper-related{margin-top:28px;padding:0 8px}
.paper-under{margin-top:28px;border-top:1px solid var(--border);padding-top:16px}
.paper-body table{width:100%;border-collapse:collapse;margin:16px 0}
.paper-body th,.paper-body td{border:1px solid var(--border);padding:8px;text-align:left}
.paper-body thead th{background:#f8f8f8}

.home-showcase{margin:24px 0}
.showcase-row{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.showcase-item{display:flex;flex-direction:column;gap:10px}
.showcase-thumb{display:block;overflow:hidden;aspect-ratio:16/9}
.showcase-thumb img{width:100%;height:100%;object-fit:cover}
.showcase-text{display:flex;flex-direction:column;gap:6px}
.showcase-title{font-size:1.1rem;font-weight:700;margin:0}
.showcase-excerpt{font-size:.95rem;color:var(--muted);margin:0;line-height:1.5}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
#reading-progress{position:fixed;top:0;left:0;width:0%;height:3px;background:var(--accent);z-index:9999;transition:width .1s linear;pointer-events:none}
body.single #reading-progress{display:block}

/* ============================================================
   SHARE BAR (single posts)
   ============================================================ */
.share-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:20px 0 0}
.share-bar__label{font-size:.85rem;font-weight:700;color:var(--muted);white-space:nowrap}
.share-bar__btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;font-size:.85rem;font-weight:600;text-decoration:none;color:#fff;border:none;cursor:pointer;transition:filter .15s ease}
.share-bar__btn:hover{filter:brightness(.9);text-decoration:none}
.share-bar__btn:visited{color:#fff}
.share-bar__btn--x{background:#000}
.share-bar__btn--fb{background:#1877f2}
.share-bar__btn--wa{background:#25d366}
.share-bar__btn--copy{background:var(--accent)}
.share-bar__btn.copied{background:#555!important}
.share-bar__btn-label{display:inline-block}

/* ============================================================
   READING TIME BADGE
   ============================================================ */
.reading-time-badge{display:inline-flex;align-items:center;gap:4px;font-size:.82rem;color:var(--muted);white-space:nowrap}
.reading-time-badge .bbc-icon{font-size:.8rem}

/* ============================================================
   FOCUS / ACCESSIBILITY
   ============================================================ */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.skip-link{position:absolute;top:-100%;left:16px;background:var(--accent);color:#fff;padding:8px 14px;border-radius:0 0 6px 6px;font-size:.9rem;font-weight:700;z-index:10000;text-decoration:none}
.skip-link:focus{top:0}

/* ============================================================
   MOBILE IMPROVEMENTS
   ============================================================ */
@media (max-width:640px){
  /* Bottom navigation bar on mobile for primary categories */
  .mobile-bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--border);z-index:950;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;padding:0 4px 4px}
  .mobile-bottom-nav::-webkit-scrollbar{display:none}
  .mobile-bottom-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:0;white-space:nowrap;width:100%}
  .mobile-bottom-nav ul li a{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6px 12px;font-size:.72rem;font-weight:700;color:#000;text-transform:uppercase;letter-spacing:.3px;text-decoration:none;border-bottom:3px solid transparent;min-width:60px}
  .mobile-bottom-nav ul li a:hover,.mobile-bottom-nav ul li.current a{border-bottom-color:var(--accent);color:var(--accent)}
  /* Push page content up from bottom nav */
  .site-footer{padding-bottom:60px}
}
@media (min-width:641px){
  .mobile-bottom-nav{display:none}
}

/* ============================================================
   CARD HOVER EFFECTS
   ============================================================ */
.also-tile .thumb img,.side-thumb img,.stream-thumb img,.showcase-thumb img,.showcase-card__thumb img,.also-single__media img,.right-media img,.also-lead-media img{transition:transform .35s ease}
.also-tile:hover .thumb img,.side-item:hover .side-thumb img,.stream-card:hover .stream-thumb img,.showcase-item:hover .showcase-thumb img,.showcase-card:hover .showcase-card__thumb img,.also-single:hover .also-single__media img{transform:scale(1.04)}

/* ============================================================
   LOAD MORE BUTTON IMPROVEMENTS
   ============================================================ */
.load-more-btn{display:inline-flex;align-items:center;gap:8px;padding:11px 28px;font-size:.95rem;font-weight:700;letter-spacing:.3px;border-radius:4px;border:none;cursor:pointer;background:var(--accent);color:#fff;transition:background .15s ease,transform .1s ease}
.load-more-btn:hover{background:#c00;transform:translateY(-1px)}
.load-more-btn:active{transform:translateY(0)}
.load-more-container{text-align:center;margin:24px 0;padding:8px 0}

/* ============================================================
   DARK MODE
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e5e5e5;
    --muted: #999;
    --border: #2a2a2a;
    --bg: #111;
    --surface: #1a1a1a;
    --surface-2: #222;
  }
  body{background:var(--bg);color:var(--text)}
  a{color:var(--text)}
  a:visited{color:var(--text)}
  .site-brandbar,.site-navbar{background:var(--surface);border-color:var(--border)}
  .site-footer{background:var(--surface);border-color:var(--border)}
  .paper{background:var(--surface)}
  .paper-body thead th{background:var(--surface-2)}
  .sidebar-box{border-color:var(--accent)}
  .sidebar-item,.rightlist-item{border-color:var(--border)}
  .hard-sidebar .sidebar-post__thumb{background:var(--surface-2);border-color:var(--border)}
  .sidebar-item a,.rightlist-title a,.also-tile .title a,.side-title a,.stream-title a,.showcase-card__title a,.showcase-text__title a,.card-title a,.hero-title a,.also-title a,.right-title a,.center-title a,.also-item-title a,.paper-title,.paper-by{color:var(--text)}
  .section-band__link,.section-band__inner{border-color:var(--text)}
  .section-band__link{color:var(--text)}
  .primary-menu-overflow{background:var(--surface);border-color:var(--border)}
  .primary-menu-overflow li a{color:var(--text)}
  .primary-menu-overflow li a:hover{background:var(--surface-2)}
  .header-search__input{background:var(--surface-2);color:var(--text);border-color:var(--border)}
  .footer-social a{background:var(--surface-2);border-color:var(--border);color:var(--text)}
  .footer-social a:hover{background:var(--surface)}
  .sidebar-box{border-top-color:var(--text)}
  .sidebar-title{color:var(--text)}
  .footer-heading{color:var(--text)}
  .footer-nav .primary-menu li a,.secondary-menu li a,.primary-menu li a,.footer-links a{color:var(--text)}
  .footer-copy,.footer-links a{color:var(--muted)}
  .mobile-bottom-nav{background:var(--surface);border-color:var(--border)}
  .mobile-bottom-nav ul li a{color:var(--text)}
  .share-bar__btn--copy{background:var(--accent)}
  .load-more-btn{color:#fff}
  .brand-box{color:var(--text)}
  .sub-title{color:var(--text);border-color:var(--border)}
}
