/* ==========================================================================
   NEWS-HOME.CSS — Trang Tin Tức (home.php / blog)
   Matches design nodes: fxOy0, ORrTc, QNi4y (hanoi-value.pen)
   Colors: primary=#1E3A5F accent=#F26522 bg=#F2EFE8
   ========================================================================== */

/* --------------------------------------------------------------------------
   NEWS HERO — fxOy0
   -------------------------------------------------------------------------- */
.nws-hero {
	position: relative;
	height:   240px;
	display:  flex;
	align-items: center;
	overflow: hidden;
}
.nws-hero__bg {
	position:            absolute;
	inset:               0;
	background-size:     cover;
	background-position: center;
	z-index:             0;
	transition:          transform 8s ease;
}
.nws-hero:hover .nws-hero__bg { transform: scale(1.03); }

.nws-hero__overlay {
	position: absolute;
	inset:    0;
	background: linear-gradient(180deg, rgba(16,30,51,.93) 0%, rgba(16,30,51,.55) 100%);
	z-index:  1;
}
.nws-hero__inner {
	position:       relative;
	z-index:        2;
	display:        flex;
	flex-direction: column;
	gap:            12px;
	justify-content: center;
	height:         100%;
}

/* Breadcrumb */
.nws-hero__breadcrumb {
	display:     flex;
	align-items: center;
	gap:         8px;
	font-size:   .8125rem;
}
.nws-hero__breadcrumb a           { color: rgba(255,255,255,.7); text-decoration: none; }
.nws-hero__breadcrumb a:hover     { color: #fff; }
.nws-hero__breadcrumb .current    { color: var(--color-accent); }
.nws-hero__breadcrumb i,
.nws-hero__breadcrumb svg         { width: 14px; height: 14px; color: rgba(255,255,255,.5); flex-shrink: 0; }

/* Title & sub */
.nws-hero__title {
	font-size:      3.25rem;
	font-weight:    700;
	color:          #fff;
	line-height:    1.05;
	letter-spacing: -.5px;
	margin:         0;
}
.nws-hero__sub {
	font-size:   1.0625rem;
	color:       rgba(255,255,255,.9);
	margin:      0;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
   CATEGORY FILTER BAR — ORrTc
   -------------------------------------------------------------------------- */
.nws-catbar {
	background:  var(--color-bg-white, #fff);
	border-bottom: 1px solid var(--color-border, #E6E1D6);
}
.nws-catbar__inner {
	display:     flex;
	align-items: center;
	gap:         10px;
	padding-top:    16px;
	padding-bottom: 16px;
	flex-wrap:   wrap;
}
.nws-catbar__pill {
	display:       inline-flex;
	align-items:   center;
	padding:       8px 18px;
	border-radius: var(--radius-xs, 4px);
	font-size:     .8125rem;
	font-weight:   normal;
	color:         var(--color-text-secondary, #334155);
	background:    var(--color-surface, #F8F6F0);
	border:        1px solid var(--color-border, #E6E1D6);
	text-decoration: none;
	white-space:   nowrap;
	transition:    background .2s, color .2s, border-color .2s;
}
.nws-catbar__pill:hover {
	border-color: var(--color-primary);
	color:        var(--color-primary);
}
.nws-catbar__pill.is-active {
	background:   var(--color-primary);
	border-color: var(--color-primary);
	color:        #fff;
	font-weight:  600;
}

/* --------------------------------------------------------------------------
   NEWS BODY WRAPPER — QNi4y
   -------------------------------------------------------------------------- */
.nws-body {
	background: var(--color-bg, #F2EFE8);
	padding:    40px 0 60px;
}
.nws-body__inner {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap:     40px;
	align-items: flex-start;
}

/* --------------------------------------------------------------------------
   FEATURED CARD — kEDUQ / nwsFeatCard
   -------------------------------------------------------------------------- */
.nws-feat {
	display:         grid;
	grid-template-columns: 420px 1fr;
	height:          280px;
	background:      var(--color-bg-white, #fff);
	border:          1px solid var(--color-border, #E6E1D6);
	border-radius:   var(--radius-md, 6px);
	overflow:        hidden;
	text-decoration: none;
	margin-bottom:   24px;
	transition:      box-shadow .25s, transform .2s;
}
.nws-feat:hover {
	box-shadow: 0 8px 28px rgba(30,58,95,.12);
	transform:  translateY(-2px);
}

/* Image side */
.nws-feat__img-wrap {
	overflow:   hidden;
	flex-shrink: 0;
	height:     100%;
}
.nws-feat__img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	transition: transform .6s ease;
}
.nws-feat:hover .nws-feat__img { transform: scale(1.04); }
.nws-feat__img--placeholder {
	width:      100%;
	height:     100%;
	background: var(--color-surface);
}

/* Body side */
.nws-feat__body {
	display:        flex;
	flex-direction: column;
	justify-content: center;
	gap:            12px;
	padding:        28px;
}

/* Category badge on featured card */
.nws-cat-badge {
	display:       inline-flex;
	align-items:   center;
	padding:       4px 12px;
	border-radius: 3px;
	background:    var(--color-accent);
	color:         var(--color-primary);
	font-size:     .6875rem;
	font-weight:   700;
	letter-spacing: .5px;
	white-space:   nowrap;
	width:         fit-content;
}

.nws-feat__title {
	font-size:   1.25rem;
	font-weight: 700;
	color:       var(--color-text-primary);
	line-height: 1.5;
	margin:      0;
}
.nws-feat__excerpt {
	font-size:   .875rem;
	color:       var(--color-text-secondary);
	line-height: 1.7;
	margin:      0;
	display:     -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow:    hidden;
}
.nws-feat__meta {
	display:     flex;
	align-items: center;
	gap:         16px;
	font-size:   .75rem;
	color:       var(--color-text-muted);
}
.nws-meta-dot {
	width:       4px;
	height:      4px;
	border-radius: 50%;
	background:  var(--color-text-muted);
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   SMALL CARD GRID — nwsCardGrid
   -------------------------------------------------------------------------- */
.nws-grid {
	display:               grid;
	grid-template-columns: repeat(3, 1fr);
	gap:                   20px;
}

.nws-card {
	display:         flex;
	flex-direction:  column;
	background:      var(--color-bg-white, #fff);
	border-radius:   var(--radius-md, 6px);
	overflow:        hidden;
	text-decoration: none;
	border:          1px solid var(--color-border, #E6E1D6);
	transition:      box-shadow .2s, transform .2s;
}
.nws-card:hover {
	box-shadow: 0 6px 20px rgba(30,58,95,.1);
	transform:  translateY(-3px);
}

/* Card thumbnail */
.nws-card__thumb { overflow: hidden; flex-shrink: 0; }
.nws-card__img {
	width:      100%;
	height:     160px;
	object-fit: cover;
	display:    block;
	transition: transform .5s ease;
}
.nws-card:hover .nws-card__img { transform: scale(1.05); }
.nws-card__img--placeholder {
	width:      100%;
	height:     160px;
	background: var(--color-surface);
}

/* Card body */
.nws-card__body {
	display:        flex;
	flex-direction: column;
	gap:            8px;
	padding:        14px 16px 18px;
	flex:           1;
}

/* Inline category label (colored text) */
.nws-cat-label {
	font-size:      .625rem;
	font-weight:    700;
	letter-spacing: 1px;
	color:          var(--color-accent);
	text-transform: uppercase;
}

.nws-card__title {
	font-size:   .875rem;
	font-weight: 600;
	color:       var(--color-text-primary);
	line-height: 1.5;
	margin:      0;
	display:     -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow:    hidden;
}
.nws-card__meta {
	font-size: .6875rem;
	color:     var(--color-text-muted);
	margin:    0;
}

/* --------------------------------------------------------------------------
   PAGINATION
   -------------------------------------------------------------------------- */
.nws-pagination {
	display:         flex;
	justify-content: center;
	gap:             8px;
	margin-top:      32px;
}
.nws-pagination .page-numbers {
	display:       flex;
	align-items:   center;
	justify-content: center;
	width:         36px;
	height:        36px;
	border-radius: var(--radius-sm, 4px);
	border:        1.5px solid var(--color-border);
	color:         var(--color-text-primary);
	font-size:     .875rem;
	font-weight:   600;
	text-decoration: none;
	transition:    background .2s, border-color .2s, color .2s;
}
.nws-pagination .page-numbers:hover {
	border-color: var(--color-primary);
	color:        var(--color-primary);
}
.nws-pagination .page-numbers.current {
	background:   var(--color-primary);
	border-color: var(--color-primary);
	color:        #fff;
}

/* --------------------------------------------------------------------------
   SIDEBAR
   -------------------------------------------------------------------------- */
.nws-sidebar {
	position: sticky;
	top:      calc(var(--header-height, 80px) + 20px);
}

/* Sidebar box */
.nws-sidebar-box {
	background:    var(--color-bg-white, #fff);
	border-radius: var(--radius-md, 6px);
	padding:       20px;
	border:        1px solid var(--color-border, #E6E1D6);
}
.nws-sidebar-box--cta {
	background:  var(--color-primary);
	border-color: transparent;
}
.nws-sidebar-box__title {
	font-size:   .9375rem;
	font-weight: 700;
	color:       var(--color-text-primary);
	margin:      0 0 12px;
}
.nws-sidebar-box--cta .nws-sidebar-box__title { color: #fff; }
.nws-sidebar-box__divider {
	height:     1px;
	background: var(--color-border, #E6E1D6);
	margin:     0 0 16px;
}

/* Popular posts list */
.nws-popular-list {
	list-style: none;
	padding:    0;
	margin:     0;
	display:    flex;
	flex-direction: column;
	gap:        16px;
}
.nws-popular-item {
	display:     flex;
	align-items: flex-start;
	gap:         12px;
}
.nws-popular-idx {
	display:         flex;
	align-items:     center;
	justify-content: center;
	width:           28px;
	height:          28px;
	border-radius:   4px;
	background:      var(--color-surface, #F8F6F0);
	color:           var(--color-text-secondary);
	font-size:       .8125rem;
	font-weight:     700;
	flex-shrink:     0;
}
.nws-popular-idx.is-first {
	background: var(--color-accent);
	color:      var(--color-primary);
}
.nws-popular-title {
	font-size:       .8125rem;
	color:           var(--color-text-primary);
	line-height:     1.5;
	text-decoration: none;
	transition:      color .2s;
}
.nws-popular-title:hover { color: var(--color-accent); }

/* Category list in sidebar */
.nws-cat-list {
	list-style: none;
	padding:    0;
	margin:     0;
}
.nws-cat-list__item { border-top: 1px solid var(--color-border); }
.nws-cat-list__link {
	display:         flex;
	align-items:     center;
	justify-content: space-between;
	padding:         10px 0;
	font-size:       .875rem;
	color:           var(--color-text-secondary);
	text-decoration: none;
	transition:      color .2s;
}
.nws-cat-list__link:hover     { color: var(--color-primary); }
.nws-cat-list__link.is-active { color: var(--color-accent); font-weight: 600; }
.nws-cat-list__count {
	font-size:     .75rem;
	background:    var(--color-surface);
	padding:       2px 8px;
	border-radius: 10px;
	color:         var(--color-text-muted);
}

/* CTA button in sidebar */
.nws-cta-btn {
	display:       flex;
	align-items:   center;
	justify-content: center;
	gap:           8px;
	width:         100%;
	padding:       12px 20px;
	background:    var(--color-accent);
	color:         #fff;
	font-size:     .9375rem;
	font-weight:   700;
	text-decoration: none;
	border-radius: 6px;
	transition:    background .2s, transform .2s;
}
.nws-cta-btn:hover {
	background: var(--color-accent-light, #FF8A4C);
	color:      #fff;
	transform:  translateY(-1px);
}
.nws-cta-btn i,
.nws-cta-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media ( max-width: 1200px ) {
	.nws-body__inner { grid-template-columns: 1fr 300px; gap: 28px; }
}

@media ( max-width: 1024px ) {
	.nws-body__inner { grid-template-columns: 1fr; }
	.nws-sidebar {
		position: static;
		display:  grid;
		grid-template-columns: repeat(2, 1fr);
		gap:      16px;
	}
	.nws-sidebar > div[style*="margin-top"] { margin-top: 0 !important; }
	.nws-hero__title { font-size: 2.5rem; }
	.nws-feat {
		grid-template-columns: 320px 1fr;
	}
	.nws-grid { grid-template-columns: repeat(2, 1fr); }
}

@media ( max-width: 768px ) {
	/* Hero */
	.nws-hero         { height: 200px; }
	.nws-hero__title  { font-size: 1.875rem; }
	.nws-hero__sub    { font-size: .9375rem; }

	/* Category bar */
	.nws-catbar__inner { overflow-x: auto; flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; }

	/* Body */
	.nws-body { padding: 28px 0 48px; }

	/* Featured card stacks vertically */
	.nws-feat {
		grid-template-columns: 1fr;
		height:                auto;
	}
	.nws-feat__img-wrap { height: 200px; }
	.nws-feat__body     { padding: 20px; gap: 10px; }
	.nws-feat__title    { font-size: 1.0625rem; }
	.nws-feat__excerpt  { -webkit-line-clamp: 2; }

	/* Grid: 2 → 1 col */
	.nws-grid { grid-template-columns: 1fr; gap: 12px; }

	/* Sidebar: stack */
	.nws-sidebar { grid-template-columns: 1fr; }
}

@media ( max-width: 480px ) {
	.nws-hero__title   { font-size: 1.5rem; }
	.nws-hero__sub     { font-size: .875rem; display: none; }
	.nws-catbar__pill  { font-size: .75rem; padding: 6px 12px; }
}
