/*
Theme Name: Cambank News
Theme URI: https://cambanknews.com/
Author: Cambank News
Description: A modern Khmer-first news theme for banking, insurance, microfinance, entrepreneurship and business news in Cambodia. Hero slider, market-rates box, category strip, video and featured sections, newsletter box and a navy footer. Colours, rates, banners and sections are set in Appearance → Customize → Cambank News Options.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cambank
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--cb-primary: #0b2a63;        /* navy — navbar, footer, headings */
	--cb-primary-dark: #071c45;
	--cb-accent: #1769e8;         /* bright blue — buttons, badges, links */
	--cb-accent-soft: #e8f0fe;
	--cb-up: #16a34a;
	--cb-down: #dc2626;
	--cb-gold: #f5a524;
	--cb-bg: #f3f6fb;
	--cb-surface: #ffffff;
	--cb-text: #0f1b33;
	--cb-muted: #5b6b85;
	--cb-border: #e2e8f2;
	--cb-radius: 14px;
	--cb-radius-sm: 10px;
	--cb-shadow: 0 1px 2px rgba(15, 27, 51, .04), 0 6px 22px rgba(15, 27, 51, .06);
	--cb-shadow-lg: 0 10px 34px rgba(11, 42, 99, .16);
	--cb-font: "Kantumruy Pro", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cb-font-latin: "Inter", "Kantumruy Pro", system-ui, sans-serif;
	--cb-container: 1240px;
	--cb-gap: 24px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--cb-font);
	font-size: 16px;
	line-height: 1.7;
	color: var(--cb-text);
	background: var(--cb-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--cb-accent); }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.5; font-weight: 700; color: var(--cb-text); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cb-accent); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0; z-index: 1000; top: 8px; left: 8px;
	padding: 10px 16px; background: #fff; color: var(--cb-primary); border-radius: 8px; box-shadow: var(--cb-shadow-lg);
}

.container { width: 100%; max-width: var(--cb-container); margin: 0 auto; padding: 0 20px; }
.cb-icon { flex: none; display: inline-block; vertical-align: middle; }

.card {
	background: var(--cb-surface);
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius);
	box-shadow: var(--cb-shadow);
}

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 20px; border: 0; border-radius: 10px;
	background: var(--cb-accent); color: #fff; font-weight: 600; line-height: 1.4;
	transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--cb-primary); color: #fff; }
.btn--sm { padding: 6px 14px; font-size: 14px; border-radius: 8px; }
.btn--block { width: 100%; }
.btn--light { background: #fff; color: var(--cb-primary); }
.btn--light:hover { background: var(--cb-accent-soft); color: var(--cb-primary); }

.badge {
	display: inline-block; padding: 2px 10px; border-radius: 6px;
	background: var(--cb-accent); color: #fff !important;
	font-size: 13px; font-weight: 600; line-height: 1.7;
}
.badge:hover { background: var(--cb-primary); }
.badge--on-media { position: absolute; top: 14px; left: 14px; z-index: 2; }

.meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--cb-muted); font-family: var(--cb-font); }
.meta__item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

.cover { width: 100%; height: 100%; object-fit: cover; }
.cover--placeholder {
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--cb-primary), var(--cb-accent)); color: rgba(255, 255, 255, .5);
}

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title {
	display: flex; align-items: center; gap: 8px;
	font-size: 22px; color: var(--cb-primary); position: relative; padding-left: 14px;
}
.section-title::before {
	content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 4px;
	border-radius: 4px; background: var(--cb-accent);
}
.section-title__icon { color: var(--cb-gold); }
.section-title:has(.section-title__icon) { padding-left: 0; }
.section-title:has(.section-title__icon)::before { display: none; }
.view-all { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--cb-accent); white-space: nowrap; }
.view-all:hover { color: var(--cb-primary); }

.grid { display: grid; gap: var(--cb-gap); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.play-btn {
	position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; z-index: 2;
	background: rgba(255, 255, 255, .95); color: var(--cb-primary); box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	transition: transform .2s ease;
}
.play-btn svg { margin-left: 3px; }
.play-btn--sm { width: 44px; height: 44px; }
.play-btn--xs { width: 30px; height: 30px; }
a:hover > .play-btn { transform: scale(1.08); }
.duration {
	position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 1px 7px; border-radius: 5px;
	background: rgba(0, 0, 0, .75); color: #fff; font: 600 12px/1.6 var(--cb-font-latin);
}

/* ==========================================================================
   3. Top bar
   ========================================================================== */
.topbar { background: var(--cb-primary); color: rgba(255, 255, 255, .88); font-size: 13px; }
.topbar__inner { display: flex; align-items: center; gap: 18px; min-height: 40px; }
.topbar__date { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ticker { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .2); }
.ticker__label {
	display: inline-flex; align-items: center; gap: 4px; flex: none;
	padding: 1px 9px; border-radius: 5px; background: var(--cb-down); color: #fff; font-weight: 600; font-size: 12px;
}
.ticker__viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__track { display: inline-flex; gap: 40px; white-space: nowrap; animation: cb-ticker 60s linear infinite; }
.ticker__track a { color: rgba(255, 255, 255, .9); position: relative; }
.ticker__track a::before { content: "•"; position: absolute; left: -24px; color: var(--cb-gold); }
.ticker__track a:hover { color: #fff; text-decoration: underline; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes cb-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.topbar__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.social { display: flex; gap: 8px; }
.social__link {
	width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, .12); color: #fff;
}
.social__link:hover { color: #fff; transform: translateY(-1px); }
.social__link--facebook:hover { background: #1877f2; }
.social__link--youtube:hover { background: #ff0000; }
.social__link--telegram:hover { background: #229ed9; }
.social__link--tiktok:hover { background: #000; }
.social--top .social__link { width: 26px; height: 26px; }
.social--top .social__link--facebook { background: #1877f2; }
.social--top .social__link--youtube { background: #ff0000; }
.social--top .social__link--telegram { background: #229ed9; }
.social--top .social__link--tiktok { background: #111; }

.lang-switch { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; text-transform: uppercase; font-family: var(--cb-font-latin); font-weight: 600; }
.lang-switch li + li::before { content: "|"; margin-right: 6px; opacity: .4; }
.lang-switch a { color: #fff; }
.lang-switch .current-lang a { color: var(--cb-gold); }

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header { background: var(--cb-surface); }
.site-header__inner { display: flex; align-items: center; gap: 28px; padding-top: 16px; padding-bottom: 16px; }
.brand { flex: none; }
.brand__link { display: flex; align-items: center; gap: 10px; color: var(--cb-primary); }
.brand__link:hover { color: var(--cb-primary); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font: 800 32px/1.05 var(--cb-font-latin); letter-spacing: -.02em; color: var(--cb-primary); }
.brand__name em { font-style: normal; color: var(--cb-accent); }
.brand__tagline { margin-top: 5px; font: 500 12px/1.2 var(--cb-font-latin); color: var(--cb-muted); letter-spacing: .01em; }
.custom-logo { max-height: 70px; width: auto; }

.header-search { flex: 1; max-width: 420px; display: flex; border: 1px solid var(--cb-border); border-radius: 10px; overflow: hidden; background: var(--cb-bg); }
.header-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 14px; outline: none; }
.header-search button { flex: none; width: 50px; border: 0; background: var(--cb-accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.header-search button:hover { background: var(--cb-primary); }
.header-search:focus-within { border-color: var(--cb-accent); box-shadow: 0 0 0 3px var(--cb-accent-soft); }

.header-banner {
	margin-left: auto; flex: none; position: relative; overflow: hidden;
	width: 380px; height: 76px; border-radius: 12px; display: flex; align-items: center;
	background: radial-gradient(circle at 85% 30%, #2f6fd8 0, transparent 55%), linear-gradient(110deg, var(--cb-primary-dark), var(--cb-primary) 55%, #1d4f9e);
	color: #fff;
}
.header-banner:hover { color: #fff; }
.header-banner__text { position: relative; z-index: 1; padding: 0 20px; font: 700 17px/1.3 var(--cb-font-latin); letter-spacing: -.01em; }
.header-banner__art { position: absolute; right: 0; bottom: 0; height: 100%; width: 62%; }
.header-banner--image { width: auto; max-width: 480px; background: none; height: auto; }
.header-banner--image img { border-radius: 12px; max-height: 90px; width: auto; }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--cb-primary); color: #fff; align-items: center; justify-content: center; }

/* ==========================================================================
   5. Primary navigation
   ========================================================================== */
.nav-wrap { position: sticky; top: 0; z-index: 50; background: var(--cb-surface); padding-bottom: 12px; }
.admin-bar .nav-wrap { top: 32px; }
.nav-wrap.is-stuck { box-shadow: 0 6px 20px rgba(11, 42, 99, .12); padding-top: 8px; padding-bottom: 8px; }
.primary-nav { background: var(--cb-primary); border-radius: 12px; padding: 0 8px; }
.primary-nav__head, .primary-nav__search { display: none; }
.primary-nav .menu { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.primary-nav .menu > li { position: relative; display: flex; align-items: center; }
.primary-nav .menu > li > a {
	display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: #fff; font-weight: 600; font-size: 15.5px; white-space: nowrap; border-radius: 8px;
}
.primary-nav .menu > li > a:hover,
.primary-nav .menu > li:hover > a { background: rgba(255, 255, 255, .1); color: #fff; }
.primary-nav .menu > .current-menu-item > a,
.primary-nav .menu > .current-menu-ancestor > a,
.primary-nav .menu > .current-post-ancestor > a,
.primary-nav .menu > .current-category-ancestor > a { background: var(--cb-accent); }
.primary-nav .menu > li { margin: 6px 0; }
.submenu-toggle { border: 0; background: none; color: rgba(255, 255, 255, .75); padding: 4px; margin-left: -12px; margin-right: 4px; display: flex; }
.primary-nav .sub-menu {
	position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 230px;
	list-style: none; margin: 0; padding: 8px; background: #fff; border-radius: 12px; box-shadow: var(--cb-shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s ease;
}
.primary-nav .sub-menu .sub-menu { top: -8px; left: 100%; }
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu li { position: relative; }
.primary-nav .sub-menu a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 15px; color: var(--cb-text); }
.primary-nav .sub-menu a:hover { background: var(--cb-accent-soft); color: var(--cb-accent); }
.primary-nav .sub-menu .submenu-toggle { display: none; }
.nav-overlay { position: fixed; inset: 0; background: rgba(7, 28, 69, .55); z-index: 90; }

/* ==========================================================================
   6. Main / sections
   ========================================================================== */
.site-main { padding-bottom: 48px; }
.site-main > section, .site-main > nav { margin-top: var(--cb-gap); }
.home-hero { margin-top: 8px !important; }

/* Hero */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr) minmax(0, .92fr); gap: 20px; align-items: stretch; }
.slider { position: relative; border-radius: var(--cb-radius); overflow: hidden; background: var(--cb-primary); min-height: 420px; box-shadow: var(--cb-shadow); }
.slider__track { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide > .cover { position: absolute; inset: 0; transform: scale(1.04); transition: transform 6s ease; }
.slide.is-active > .cover { transform: scale(1); }
.slide__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7, 28, 69, 0) 30%, rgba(7, 28, 69, .6) 58%, rgba(7, 28, 69, .95) 100%); pointer-events: none; }
.slide__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px 28px 40px; color: #fff; }
.slide__title { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.6; color: #fff; margin-bottom: 6px; text-shadow: 0 2px 10px rgba(0, 0, 0, .3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide__title a:hover { color: #fff; text-decoration: none; }
.slide__excerpt { color: rgba(255, 255, 255, .88); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.slide__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slide__foot .meta, .feature-card .meta { color: rgba(255, 255, 255, .85); }
.slider__nav {
	position: absolute; top: 26%; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .5); background: rgba(7, 28, 69, .35); color: #fff;
	display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: background .15s;
}
.slider__nav:hover { background: var(--cb-accent); border-color: var(--cb-accent); }
.slider__nav--prev { left: 14px; }
.slider__nav--next { right: 14px; }
.slider__dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; display: flex; justify-content: center; gap: 6px; }
.slider__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .5); transition: width .25s, background .25s; }
.slider__dot.is-active { width: 24px; background: var(--cb-accent); }

.hero-stack { display: grid; grid-template-rows: repeat(3, 1fr); gap: 14px; }
.stack-item { display: grid; grid-template-columns: 42% 1fr; overflow: hidden; min-height: 0; transition: box-shadow .2s, transform .2s; }
.stack-item:hover { box-shadow: var(--cb-shadow-lg); transform: translateY(-2px); }
.stack-item__media { position: relative; overflow: hidden; background: var(--cb-accent-soft); }
.stack-item__media .cover { position: absolute; inset: 0; }
.stack-item__body { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stack-item__cat { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--cb-accent); background: var(--cb-accent-soft); padding: 0 8px; border-radius: 5px; }
.stack-item__title { font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stack-item .meta { margin-top: auto; font-size: 12px; }

.hero-side { display: flex; flex-direction: column; gap: 14px; }

/* Market box */
.market { padding: 16px; }
.market__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.market__title { display: flex; align-items: center; gap: 7px; font-size: 16.5px; color: var(--cb-primary); }
.market__title .cb-icon { color: var(--cb-accent); }
.market .view-all { font-size: 13px; }
.market__tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--cb-bg); border-radius: 9px; margin-bottom: 12px; }
.market__tab { border: 0; background: none; padding: 5px 0; border-radius: 7px; font: 700 12.5px/1.5 var(--cb-font-latin); color: var(--cb-muted); }
.market__tab.is-active { background: var(--cb-accent); color: #fff; box-shadow: 0 2px 6px rgba(23, 105, 232, .35); }
.market__pair { font: 600 13px/1.4 var(--cb-font-latin); color: var(--cb-muted); }
.market__big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.market__value { font: 800 28px/1.3 var(--cb-font-latin); color: var(--cb-text); letter-spacing: -.01em; }
.chg { font: 700 14px/1.4 var(--cb-font-latin); white-space: nowrap; }
.chg--sm { font-size: 12px; }
.chg--up { color: var(--cb-up); }
.chg--down { color: var(--cb-down); }
.spark { display: block; width: 100%; height: 54px; margin: 6px 0 4px; }
.spark__line { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark--up .spark__line { stroke: var(--cb-up); }
.spark--up .spark__area { fill: rgba(22, 163, 74, .1); }
.spark--down .spark__line { stroke: var(--cb-down); }
.spark--down .spark__area { fill: rgba(220, 38, 38, .08); }
.market__list { list-style: none; margin: 8px 0 0; padding: 0; }
.market__list li { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--cb-border); font: 500 13px/1.4 var(--cb-font-latin); }
.market__num { font-weight: 700; color: var(--cb-text); }
.market__sym { width: 20px; height: 20px; border-radius: 5px; }
.market__sym--gold { background: linear-gradient(135deg, #ffd66b, #d4920f); }
.market__sym--oil { background: linear-gradient(135deg, #4b5563, #111827); border-radius: 4px 4px 6px 6px; }
.market__sym--dow { background: linear-gradient(180deg, #b22234 0 15%, #fff 15% 30%, #b22234 30% 45%, #fff 45% 60%, #b22234 60% 75%, #fff 75%); position: relative; overflow: hidden; }
.market__sym--dow::after { content: ""; position: absolute; left: 0; top: 0; width: 55%; height: 55%; background: #3c3b6e; }
.market__note { margin: 6px 0 0; font-size: 11.5px; color: var(--cb-muted); }

.promo-card {
	position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 76px;
	padding: 14px 80px 14px 18px; border-radius: var(--cb-radius); color: #fff;
	background: linear-gradient(120deg, var(--cb-accent), #2b86ff 60%, #5aa5ff);
	box-shadow: 0 8px 22px rgba(23, 105, 232, .3);
}
.promo-card:hover { color: #fff; }
.promo-card__text { font-weight: 700; font-size: 15px; line-height: 1.55; }
.promo-card__arrow { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .8); display: flex; align-items: center; justify-content: center; }
.promo-card__phone { position: absolute; right: 14px; bottom: -14px; width: 54px; transform: rotate(10deg); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); transition: transform .3s; }
.promo-card:hover .promo-card__phone { transform: rotate(4deg) translateY(-4px); }

/* Category strip */
.cat-strip { list-style: none; margin: 0; padding: 14px 8px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.cat-strip li + li { border-left: 1px solid var(--cb-border); }
.cat-strip__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 4px; text-align: center; border-radius: 10px; }
.cat-strip__icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--cb-accent-soft); color: var(--cb-accent); transition: transform .2s, background .2s, color .2s; }
.cat-strip__name { font-size: 14.5px; font-weight: 600; color: var(--cb-text); line-height: 1.5; }
.cat-strip__item:hover .cat-strip__icon { background: var(--cb-accent); color: #fff; transform: translateY(-3px); }
.cat-strip__item--shield .cat-strip__icon { color: #1d4ed8; background: #e0e9ff; }
.cat-strip__item--handshake .cat-strip__icon { color: #0891b2; background: #dcf5fb; }
.cat-strip__item--rocket .cat-strip__icon { color: #7c3aed; background: #efe7ff; }
.cat-strip__item--coins .cat-strip__icon { color: #d97706; background: #fff3dc; }
.cat-strip__item--building .cat-strip__icon { color: #059669; background: #dcfbef; }
.cat-strip__item--exchange .cat-strip__icon { color: #db2777; background: #ffe4f1; }
.cat-strip__item--globe .cat-strip__icon { color: #0284c7; background: #e0f2fe; }

/* Latest + video */
.home-latest { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: 28px; }
.latest-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.feature-card { position: relative; border-radius: var(--cb-radius); overflow: hidden; min-height: 340px; background: var(--cb-primary); box-shadow: var(--cb-shadow); }
.feature-card__media { position: absolute; inset: 0; }
.feature-card__media .cover { position: absolute; inset: 0; transition: transform .5s ease; }
.feature-card:hover .feature-card__media .cover { transform: scale(1.04); }
.feature-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px; color: #fff; }
.feature-card__title { color: #fff; font-size: 22px; line-height: 1.5; margin-bottom: 6px; }
.feature-card__title a:hover { color: #fff; text-decoration: none; }
.feature-card__excerpt { color: rgba(255, 255, 255, .85); font-size: 14.5px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.latest-list { display: flex; flex-direction: column; gap: 16px; }
.list-item { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; align-items: start; }
.list-item + .list-item { padding-top: 16px; border-top: 1px solid var(--cb-border); }
.list-item__media { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: var(--cb-radius-sm); overflow: hidden; background: var(--cb-accent-soft); }
.list-item__media .cover { position: absolute; inset: 0; transition: transform .4s; }
.list-item:hover .list-item__media .cover { transform: scale(1.06); }
.list-item__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.list-item__cat { font-size: 12.5px; font-weight: 600; color: var(--cb-accent); }
.list-item__title { font-size: 15.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.video-box { display: flex; flex-direction: column; gap: 12px; }
.video-main__media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--cb-radius); overflow: hidden; background: var(--cb-primary); }
.video-main__media .cover { position: absolute; inset: 0; }
.video-main__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .45)); }
.video-main__title { margin-top: 10px; font-size: 16.5px; line-height: 1.6; }
.video-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--cb-radius-sm); overflow: hidden; background: var(--cb-primary); }
.video-thumb .cover { position: absolute; inset: 0; }

/* Featured + newsletter */
.home-featured { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.post-card { position: relative; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: var(--cb-shadow-lg); transform: translateY(-3px); }
.post-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--cb-accent-soft); }
.post-card__media .cover { position: absolute; inset: 0; transition: transform .5s; }
.post-card:hover .post-card__media .cover { transform: scale(1.05); }
.post-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card__title { font-size: 16.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__excerpt { margin: 0; color: var(--cb-muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .meta { margin-top: auto; }

.newsletter {
	position: relative; overflow: hidden; padding: 26px 22px; border-radius: var(--cb-radius); color: #fff; text-align: center;
	background: radial-gradient(circle at 100% 0, rgba(23, 105, 232, .55), transparent 55%), var(--cb-primary);
	box-shadow: var(--cb-shadow-lg);
}
.newsletter__icon { display: inline-flex; color: #fff; margin-bottom: 6px; }
.newsletter__plane { position: absolute; top: 14px; right: 14px; color: rgba(255, 255, 255, .25); transform: rotate(8deg); }
.newsletter__title { color: #fff; font-size: 20px; margin-bottom: 4px; }
.newsletter__text { color: rgba(255, 255, 255, .78); font-size: 14px; }
.newsletter__form--sc input[type="email"], .newsletter__form--sc input[type="text"] { width: 100%; padding: 10px 12px; border-radius: 8px; border: 0; margin-bottom: 8px; color: var(--cb-text); }
.newsletter__form--sc input[type="submit"], .newsletter__form--sc button { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: var(--cb-accent); color: #fff; font-weight: 600; }
.newsletter__form--sc .wpcf7-response-output { color: #fff; font-size: 13px; margin: 6px 0 0; }
.newsletter__points { list-style: none; margin: 16px 0 0; padding: 0; text-align: left; font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.newsletter__points li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.newsletter__points .cb-icon { color: #4ade80; }

/* Category blocks */
.home-blocks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--cb-gap); }
.cat-block { display: flex; flex-direction: column; gap: 14px; }
.cat-block .section-head { margin-bottom: 2px; padding-bottom: 10px; border-bottom: 2px solid var(--cb-border); }
.cat-block .section-title { font-size: 19px; }
.cat-block .list-item { grid-template-columns: 96px minmax(0, 1fr); }
.cat-block .list-item__title { font-size: 14.5px; }
.cat-block .post-card__title { font-size: 16px; }

/* ==========================================================================
   7. Archive / single
   ========================================================================== */
.page-hero {
	margin-bottom: var(--cb-gap); padding: 24px 0 26px; color: #fff;
	background: radial-gradient(circle at 90% 0, rgba(23, 105, 232, .55), transparent 50%), var(--cb-primary);
}
.page-hero .breadcrumbs, .page-hero .breadcrumbs a { color: rgba(255, 255, 255, .75); }
.page-hero .breadcrumbs a:hover { color: #fff; }
.page-hero__title { display: flex; align-items: center; gap: 12px; color: #fff; font-size: clamp(24px, 3vw, 32px); }
.page-hero__icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .14); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.page-hero__desc { margin-top: 6px; color: rgba(255, 255, 255, .8); max-width: 760px; }
.page-hero__desc p:last-child { margin: 0; }
.page-hero .search-form { margin-top: 14px; max-width: 560px; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13.5px; color: var(--cb-muted); margin-bottom: 8px; }
.breadcrumbs__sep { opacity: .6; display: inline-flex; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.layout--page { grid-template-columns: minmax(0, 860px); justify-content: center; }
.layout__side { display: flex; flex-direction: column; gap: var(--cb-gap); }
.layout--single { margin-top: 12px; }

.feature-card--archive { min-height: 420px; margin-bottom: var(--cb-gap); }
.feature-card--archive .feature-card__title { font-size: clamp(22px, 2.4vw, 28px); }
.archive-grid .post-card__title { font-size: 17px; }

.pagination { margin-top: 32px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination .page-numbers {
	min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
	background: var(--cb-surface); border: 1px solid var(--cb-border); font: 600 15px/1 var(--cb-font-latin);
}
.pagination .page-numbers.current { background: var(--cb-primary); border-color: var(--cb-primary); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--cb-accent); color: var(--cb-accent); }

.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--cb-border); background: #fff; color: var(--cb-text); }
.search-form input:focus { outline: none; border-color: var(--cb-accent); box-shadow: 0 0 0 3px var(--cb-accent-soft); }

.empty-state { padding: 48px 28px; text-align: center; color: var(--cb-muted); }
.empty-state > .cb-icon { color: var(--cb-accent); margin-bottom: 10px; }
.empty-state h1, .empty-state h2 { color: var(--cb-primary); margin-bottom: 6px; }
.empty-state .search-form { max-width: 480px; margin: 18px auto; }
.empty-state--404 { margin-top: 12px; }
.empty-state__code { display: block; font: 800 96px/1 var(--cb-font); color: var(--cb-accent); opacity: .9; margin-bottom: 8px; }

/* Single */
.entry__header { margin-bottom: 18px; }
.entry__header .badge { margin-bottom: 10px; }
.entry__title { font-size: clamp(25px, 3vw, 34px); line-height: 1.55; color: var(--cb-primary); margin-bottom: 14px; }
.entry__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: var(--cb-muted); padding-bottom: 16px; border-bottom: 1px solid var(--cb-border); }
.entry__author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--cb-text); }
.entry__author .avatar { border-radius: 50%; }
.entry__media { margin: 0 0 18px; border-radius: var(--cb-radius); overflow: hidden; }
.entry__media img { width: 100%; }
.entry__media figcaption { padding: 8px 4px; font-size: 13.5px; color: var(--cb-muted); }
.entry__share--top { margin-bottom: 18px; }

.entry__content { font-size: 18px; line-height: 1.95; }
.entry__content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry__content h2 { font-size: 24px; color: var(--cb-primary); margin-top: 1.5em; }
.entry__content h3 { font-size: 20px; margin-top: 1.4em; }
.entry__content a { color: var(--cb-accent); text-decoration: underline; text-underline-offset: 3px; }
.entry__content img { border-radius: var(--cb-radius-sm); }
.entry__content figure { margin-left: 0; margin-right: 0; }
.entry__content figcaption, .entry__content .wp-caption-text { font-size: 14px; color: var(--cb-muted); text-align: center; margin-top: 6px; }
.entry__content blockquote { margin-left: 0; padding: 16px 22px; border-left: 4px solid var(--cb-accent); background: var(--cb-accent-soft); border-radius: 0 var(--cb-radius-sm) var(--cb-radius-sm) 0; font-size: 18.5px; color: var(--cb-primary); }
.entry__content blockquote p:last-child { margin: 0; }
.entry__content table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.entry__content th, .entry__content td { border: 1px solid var(--cb-border); padding: 8px 12px; text-align: left; }
.entry__content th { background: var(--cb-bg); }
.entry__content ul, .entry__content ol { padding-left: 1.4em; }
.entry__content iframe { width: 100%; border-radius: var(--cb-radius-sm); }
.entry__content .alignleft { float: left; margin: 0 1.2em 1em 0; }
.entry__content .alignright { float: right; margin: 0 0 1em 1.2em; }
.entry__content .aligncenter { margin-left: auto; margin-right: auto; }

.entry__footer { display: flex; flex-direction: column; gap: 16px; padding: 18px 0; margin-top: 8px; border-top: 1px solid var(--cb-border); }
.entry__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--cb-muted); }
.entry__tags a { padding: 3px 12px; border-radius: 20px; background: var(--cb-surface); border: 1px solid var(--cb-border); font-size: 14px; }
.entry__tags a:hover { border-color: var(--cb-accent); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share__label { font-weight: 600; font-size: 14px; color: var(--cb-muted); margin-right: 4px; }
.share__btn { width: 38px; height: 38px; border: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: transform .15s, opacity .15s; }
.share__btn:hover { color: #fff; transform: translateY(-2px); }
.share__btn--facebook { background: #1877f2; }
.share__btn--telegram { background: #229ed9; }
.share__btn--x { background: #111; }
.share__btn--linkedin { background: #0a66c2; }
.share__btn--copy { background: var(--cb-primary); }
.share__btn--copy.is-copied { background: var(--cb-up); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 28px; }
.post-nav__link { padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.post-nav__link--next { text-align: right; grid-column: 2; }
.post-nav__label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--cb-accent); font-weight: 600; }
.post-nav__link--next .post-nav__label { justify-content: flex-end; }
.post-nav__title { font-weight: 600; font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related { margin: 12px 0 28px; }
.empty-state + .related { margin-top: 32px; }

/* Sidebar widgets */
.widget { padding: 18px; }
.widget-title { font-size: 18px; margin-bottom: 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget > ul > li { padding: 7px 0; border-bottom: 1px dashed var(--cb-border); }
.widget > ul > li:last-child { border-bottom: 0; }
.popular { list-style: none; margin: 0; padding: 0; counter-reset: pop; }
.popular[start="2"] { counter-reset: pop 1; }
.popular__item { counter-increment: pop; position: relative; padding: 10px 0 10px 46px; border-bottom: 1px dashed var(--cb-border); }
.popular__item:last-child { border-bottom: 0; padding-bottom: 0; }
.popular__item::before {
	content: counter(pop, khmer); position: absolute; left: 0; top: 12px; width: 32px; height: 32px; border-radius: 9px;
	display: flex; align-items: center; justify-content: center; font: 700 15px/1 var(--cb-font);
	background: var(--cb-accent-soft); color: var(--cb-accent);
}
.popular__item:first-child::before { background: var(--cb-accent); color: #fff; }
.popular__link { display: block; font-weight: 600; font-size: 15px; line-height: 1.6; margin-bottom: 2px; }

/* Most read */
.most-read__top { padding-bottom: 12px; border-bottom: 1px dashed var(--cb-border); }
.most-read__media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--cb-radius-sm); overflow: hidden; background: var(--cb-accent-soft); margin-bottom: 10px; }
.most-read__media .cover { position: absolute; inset: 0; transition: transform .4s; }
.most-read__top:hover .most-read__media .cover { transform: scale(1.05); }
.most-read__rank {
	position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border-radius: 10px;
	display: flex; align-items: center; justify-content: center; background: var(--cb-accent); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.most-read__title { font-size: 16px; line-height: 1.6; margin-bottom: 2px; }
.most-read .popular__item:first-child::before { background: var(--cb-accent-soft); color: var(--cb-accent); }

/* Sidebar CTA */
.side-cta {
	display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--cb-radius); color: #fff;
	background: linear-gradient(120deg, #1c8fd1, #229ed9 55%, #3bb4ee); box-shadow: 0 8px 22px rgba(34, 158, 217, .3);
}
.side-cta:hover { color: #fff; }
.side-cta__icon { flex: none; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; }
.side-cta__text { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.side-cta__text strong { font-size: 15.5px; }
.side-cta__text span { font-size: 13px; opacity: .9; }
.side-cta__arrow { flex: none; transition: transform .2s; }
.side-cta:hover .side-cta__arrow { transform: translateX(3px); }
.cat-list li.is-current a { color: var(--cb-accent); }
.cat-list li.is-current .cat-list__icon { background: var(--cb-accent); color: #fff; }

/* Archive hero extras */
.page-hero__avatar { border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3); }
.page-hero__stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.page-hero__stats span { display: inline-flex; align-items: center; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { padding: 4px 14px; border-radius: 20px; font-size: 14px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); }
.chip:hover { color: #fff; background: rgba(255, 255, 255, .22); }
.chip.is-active { background: #fff; color: var(--cb-primary); }

/* Reading progress */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.admin-bar .read-progress { top: 32px; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cb-accent), #4ade80); }

/* Author box */
.author-box { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin: 4px 0 24px; }
.author-box__avatar { flex: none; border-radius: 50%; }
.author-box__body { flex: 1; min-width: 0; }
.author-box__label { font-size: 12.5px; color: var(--cb-muted); }
.author-box__name { font-size: 18px; color: var(--cb-primary); }
.author-box__bio { margin: 2px 0 0; font-size: 14.5px; color: var(--cb-muted); }
.btn--ghost { background: var(--cb-accent-soft); color: var(--cb-accent); }
.btn--ghost:hover { background: var(--cb-accent); color: #fff; }

/* Builder (Elementor) pages */
.page-builder { min-height: 200px; }
.page-builder .elementor-section.elementor-section-boxed > .elementor-container { max-width: 100%; }

/* Contact page */
.contact { display: flex; flex-direction: column; gap: var(--cb-gap); }
.contact__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cb-gap); }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 20px; transition: transform .2s, box-shadow .2s; }
a.contact-card:hover { transform: translateY(-3px); box-shadow: var(--cb-shadow-lg); color: inherit; }
.contact-card__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--cb-accent-soft); color: var(--cb-accent); margin-bottom: 8px; }
.contact-card__label { font-size: 13.5px; color: var(--cb-muted); }
.contact-card__value { font-weight: 700; font-size: 17px; color: var(--cb-primary); font-family: var(--cb-font); word-break: break-word; }
.contact__main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--cb-gap); align-items: start; }
.contact__form { padding: 26px; }
.contact__intro { color: var(--cb-muted); margin: 6px 0 18px; }
.contact__side { display: flex; flex-direction: column; gap: var(--cb-gap); }
.contact__social .social { justify-content: center; margin-top: 10px; }
.contact__ads { padding: 20px; }
.contact__ads p { color: var(--cb-muted); font-size: 14.5px; }
.contact__map { overflow: hidden; }
.contact__map iframe { display: block; }

/* Contact Form 7 (anywhere) */
.wpcf7 form p { margin: 0 0 14px; }
.wpcf7 label { display: block; font-weight: 600; font-size: 14px; }
.wpcf7 br { display: none; }
.wpcf7-form-control-wrap { display: block; margin-top: 4px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="url"], .wpcf7 input[type="number"], .wpcf7 select, .wpcf7 textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--cb-border); border-radius: 10px; background: var(--cb-bg); color: var(--cb-text); transition: border-color .15s, box-shadow .15s, background .15s;
}
.wpcf7 textarea { min-height: 150px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: none; background: #fff; border-color: var(--cb-accent); box-shadow: 0 0 0 3px var(--cb-accent-soft); }
.wpcf7 input[type="submit"] {
	padding: 12px 28px; border: 0; border-radius: 10px; background: var(--cb-accent); color: #fff; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: background .15s;
}
.wpcf7 input[type="submit"]:hover { background: var(--cb-primary); }
.wpcf7-not-valid-tip { font-size: 13px; color: var(--cb-down); margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.wpcf7-spinner { vertical-align: middle; }

.cat-list li a { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--cb-border); }
.cat-list li:last-child a { border-bottom: 0; }
.cat-list__icon { width: 32px; height: 32px; border-radius: 8px; background: var(--cb-accent-soft); color: var(--cb-accent); display: flex; align-items: center; justify-content: center; }
.cat-list__name { flex: 1; font-weight: 600; font-size: 15px; }
.cat-list__count { font-size: 12.5px; padding: 0 8px; border-radius: 10px; background: var(--cb-bg); color: var(--cb-muted); }

/* Comments */
.comments { padding: 22px; margin-top: 8px; }
.comment-list { list-style: none; padding: 0; margin: 14px 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--cb-border); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { font-size: 13px; color: var(--cb-muted); margin: 2px 0 6px 54px; }
.comment-content { margin-left: 54px; }
.reply { margin-left: 54px; font-size: 14px; font-weight: 600; }
.comment-respond { margin-top: 10px; }
.comment-reply-title { font-size: 20px; color: var(--cb-primary); margin-bottom: 10px; }
.comment-form p { margin-bottom: 12px; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--cb-border); border-radius: 10px; background: #fff;
}
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
	color: rgba(255, 255, 255, .78); font-size: 15px;
	background:
		radial-gradient(circle at 15% 0, rgba(23, 105, 232, .25), transparent 40%),
		radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.4px) 0 0 / 14px 14px,
		var(--cb-primary);
}
.site-footer a { color: rgba(255, 255, 255, .82); }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.35fr .9fr 1.1fr 1.2fr 1.45fr; gap: 32px; padding-top: 48px; padding-bottom: 40px; }
.brand__link--footer { color: #fff; margin-bottom: 14px; }
.brand__link--footer .brand__name { color: #fff; font-size: 30px; }
.brand__link--footer .brand__name em { color: #fff; }
.brand__link--footer .brand__tagline { color: rgba(255, 255, 255, .7); }
.brand__link--footer .brand__mark rect { fill: #fff; }
.brand__link--footer .brand__mark path { stroke: #fff; }
.footer-about { font-size: 14px; line-height: 1.75; color: rgba(255, 255, 255, .7); }
.footer-title { color: #fff; font-size: 17px; margin-bottom: 14px; padding-bottom: 8px; position: relative; }
.footer-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 32px; height: 3px; border-radius: 3px; background: var(--cb-accent); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 3px 0; }
.footer-links a { display: inline-flex; align-items: flex-start; gap: 6px; }
.footer-links a::before { content: ""; flex: none; margin-top: .75em; width: 5px; height: 5px; border-radius: 50%; background: var(--cb-accent); opacity: .9; }
.footer-links--cats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; }
.footer-contact .cb-icon { margin-top: 4px; color: #fff; }
.app-row { display: flex; gap: 12px; align-items: flex-start; }
.app-badges { display: flex; flex-direction: column; gap: 10px; }
.app-badge {
	display: inline-flex; align-items: center; gap: 8px; min-width: 150px; padding: 6px 14px; border-radius: 9px;
	background: #000; border: 1px solid rgba(255, 255, 255, .35); color: #fff !important; font: 600 16px/1.15 var(--cb-font-latin);
}
.app-badge small { display: block; font-size: 10px; font-weight: 500; opacity: .85; }
.app-badge:hover { border-color: #fff; }
.app-qr { width: 92px; height: 92px; border-radius: 8px; background: #fff; padding: 5px; }
.social--footer { margin-top: 16px; }
.social--footer .social__link { width: 34px; height: 34px; }

.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 18px; padding-bottom: 18px; font-size: 13.5px; }
.copyright { margin: 0; font-family: var(--cb-font-latin); }
.bottom-links { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.bottom-links li + li::before { content: "|"; margin: 0 10px; opacity: .4; }

.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border: 0; border-radius: 12px;
	background: var(--cb-accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--cb-shadow-lg);
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--cb-primary); }

/* Block editor alignment helpers */
.alignwide { margin-left: -40px; margin-right: -40px; max-width: calc(100% + 80px); }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.wp-block-image img { border-radius: var(--cb-radius-sm); }
.sticky, .bypostauthor, .gallery-caption { outline: 0; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 1200px) {
	.site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.footer-col--brand { grid-column: span 3; }
	.home-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.header-banner { width: 300px; }
}

@media (max-width: 1100px) {
	.home-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.slider { grid-column: 1 / -1; min-height: 440px; }
	.home-latest, .home-featured { grid-template-columns: minmax(0, 1fr); }
	.home-latest__side .video-box { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
	.video-thumbs { grid-template-columns: 1fr; }
	.newsletter { max-width: none; }
	.layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
	.cat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; }
	.cat-strip li:nth-child(4n + 1) { border-left: 0; }
}

@media (max-width: 960px) {
	.header-banner, .header-search { display: none; }
	.nav-toggle { display: inline-flex; }
	.site-header__inner { padding-top: 12px; padding-bottom: 12px; }
	.nav-wrap { position: static; padding: 0; }
	.primary-nav {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(340px, 86vw); border-radius: 0; padding: 0;
		overflow-y: auto; transform: translateX(100%); transition: transform .3s ease; visibility: hidden;
	}
	.admin-bar .primary-nav { top: 46px; }
	.primary-nav.is-open { transform: none; visibility: visible; box-shadow: -10px 0 40px rgba(0, 0, 0, .3); }
	.primary-nav__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); color: #fff; font-weight: 700; font-size: 18px; }
	.nav-close { border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
	.primary-nav .menu { flex-direction: column; flex-wrap: nowrap; padding: 10px; }
	.primary-nav .menu > li { flex-wrap: wrap; margin: 0; }
	.primary-nav .menu > li > a { flex: 1; padding: 12px 14px; }
	.submenu-toggle { margin: 0; width: 44px; height: 44px; justify-content: center; align-items: center; }
	.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.primary-nav .sub-menu, .primary-nav .sub-menu .sub-menu {
		position: static; flex-basis: 100%; min-width: 0; opacity: 1; visibility: visible; transform: none; display: none;
		background: rgba(255, 255, 255, .06); box-shadow: none; margin: 0 0 6px; border-radius: 10px;
	}
	.primary-nav li.is-open > .sub-menu { display: block; }
	.primary-nav .sub-menu a { color: rgba(255, 255, 255, .88); }
	.primary-nav .sub-menu a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
	.primary-nav__search { display: flex; margin: 8px 18px 24px; border-radius: 10px; overflow: hidden; background: #fff; }
	.primary-nav__search input { flex: 1; min-width: 0; border: 0; padding: 10px 12px; outline: none; }
	.primary-nav__search button { border: 0; width: 46px; background: var(--cb-accent); color: #fff; display: flex; align-items: center; justify-content: center; }
	.layout { grid-template-columns: minmax(0, 1fr); }
	.contact__main { grid-template-columns: minmax(0, 1fr); }
	.admin-bar .read-progress { top: 46px; }
	.topbar__date { display: none; }
	.ticker { padding-left: 0; border-left: 0; }
}

@media (max-width: 760px) {
	:root { --cb-gap: 18px; }
	.container { padding: 0 16px; }
	.brand__name { font-size: 25px; }
	.brand__mark { width: 44px; height: 44px; }
	.brand__tagline { font-size: 10.5px; }
	.topbar .social--top { display: none; }
	.home-hero { grid-template-columns: minmax(0, 1fr); }
	.slider { min-height: 400px; }
	.slide__body { padding: 20px 18px 36px; }
	.slide__title { font-size: 18px; }
	.slide__excerpt { display: none; }
	.slider__nav { top: 30%; width: 34px; height: 34px; }
	.hero-stack { grid-template-rows: none; }
	.stack-item { grid-template-columns: 120px 1fr; min-height: 96px; }
	.latest-grid { grid-template-columns: minmax(0, 1fr); }
	.feature-card { min-height: 320px; }
	.home-latest__side .video-box { display: flex; }
	.video-thumbs { grid-template-columns: 1fr 1fr; }
	.grid--3, .grid--2 { grid-template-columns: 1fr; }
	.home-featured .grid--3 { grid-template-columns: 1fr; }
	.home-blocks { grid-template-columns: minmax(0, 1fr); }
	.cat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 4px; }
	.cat-strip__icon { width: 44px; height: 44px; border-radius: 12px; }
	.cat-strip__icon svg { width: 24px; height: 24px; }
	.cat-strip__name { font-size: 13px; }
	.list-item { grid-template-columns: 110px minmax(0, 1fr); }
	.list-item__title { font-size: 15px; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-top: 36px; }
	.footer-col--brand, .footer-col--app { grid-column: 1 / -1; }
	.site-footer__bottom-inner { flex-direction: column; text-align: center; }
	.entry__content { font-size: 17px; }
	.post-nav { grid-template-columns: 1fr; }
	.contact__cards { grid-template-columns: minmax(0, 1fr); }
	.contact__form { padding: 18px; }
	.author-box { flex-wrap: wrap; }
	.author-box__body { flex-basis: calc(100% - 90px); }
	.post-nav__link--next { grid-column: auto; }
	.feature-card--archive { min-height: 340px; }
	.alignwide { margin-left: 0; margin-right: 0; max-width: 100%; }
}

@media (max-width: 420px) {
	.footer-links--cats { grid-template-columns: 1fr; }
	.site-footer__grid { grid-template-columns: 1fr; }
	.cat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.ticker__track { animation: none; }
}

/* ==========================================================================
   10. Language switch (ខ្មែរ | English) and translation notice
   ========================================================================== */
.primary-nav { display: flex; align-items: center; }
.primary-nav .menu { flex: 1; min-width: 0; }
.lang-pills { flex: none; display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .1); gap: 2px; }
.lang-pill { padding: 5px 12px; border-radius: 8px; color: rgba(255, 255, 255, .85); font-weight: 600; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.lang-pill:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.lang-pill.is-active { background: #fff; color: var(--cb-primary); }
.lang-pill[lang="en"] { font-family: var(--cb-font-latin); }
.lang-pills--nav { margin: 0 4px 0 12px; }

.translate-notice {
	display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--cb-radius-sm);
	background: #fff8e6; border: 1px solid #f5d48a; color: #6b4e00; font-size: 14.5px; line-height: 1.6; font-family: var(--cb-font-latin);
}
.translate-notice .cb-icon { flex: none; margin-top: 2px; }

html[lang="en"] body { font-family: var(--cb-font-latin); }
html[lang="en"] .entry__content { font-size: 17.5px; line-height: 1.8; }

@media (max-width: 960px) {
	.primary-nav { display: block; }
	.lang-pills--nav { display: flex; margin: 4px 18px 10px; background: rgba(255, 255, 255, .08); }
	.lang-pills--nav .lang-pill { flex: 1; text-align: center; padding: 8px 12px; }
}
.lang-pill[lang="km"] { font-family: var(--cb-font); }
html[lang="en"] .popular__item::before { content: counter(pop); font-family: var(--cb-font-latin); }
html[lang="en"] .most-read__rank { font-family: var(--cb-font-latin); }
