@font-face {
  font-family: Starling;
  src: url('https://use.typekit.net/af/7ced03/00000000000000003b9ae8bd/27/l?fvd=n4&primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&v=3') format('woff2'),
       url('https://use.typekit.net/af/7ced03/00000000000000003b9ae8bd/27/d?fvd=n4&primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&v=3') format('woff'),
       url('https://use.typekit.net/af/7ced03/00000000000000003b9ae8bd/27/a?fvd=n4&primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&v=3') format('opentype');
  font-display: swap;
}

:root {
  --navy: #07122e;
  --red: #ef5350;
  --text: #07122e;
  --muted: #6f7482;
  --light: #f5f5f5;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: Starling, serif;
  font-size: 16px;
  background: #f5f5f5;
  color: #111;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--red);
}

img {
  max-width: 100%;
}

/* Base heading sizes — override chỉ áp dụng khi heading không có class riêng
   (selector class cụ thể như .article-featured-title, .articles-title... có specificity
   cao hơn nên vẫn giữ nguyên font-size riêng của nó) */
h1 {
  font-size: 32px;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 26px;
}

/* ================================
   3-COLUMN PAGE LAYOUT
   ad-col | content (max 1200px) | ad-col
   Outer max-width 1820px = 1200 + 2×(160 ad + 130 gutter)
================================ */
.page-outer {
  max-width: 1820px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  position: relative;
}

.page-content {
  flex: 1;
  min-width: 0;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  overflow-x: hidden;
}

.ad-col {
  width: 160px;
  flex-shrink: 0;
}

.ad-col-left {
  display: flex;
  justify-content: flex-end;
  padding-right: 2px;
}

.ad-col-right {
  display: flex;
  justify-content: flex-start;
  padding-left: 2px;
}

.ad-sticky {
  position: sticky;
  top: 56px;
  align-self: flex-start;
}

.vrec-placeholder {
  width: 160px;
  height: 600px;
  background: #e9e9e9;
  border: 1px dashed #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
  font-weight: 600;
}

/* Hide ad columns below 1600px — not enough space */
@media (max-width: 1599px) {
  .ad-col { display: none; }
}

/* ================================
   HEADER
================================ */
.site-header {
  background: #fff;
  color: var(--text);
  overflow: visible;
}

/* Inner wrapper dùng chung cho cả 3 tầng header — maxw-1200 margin-0-auto như website cũ */
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* header-top: padding-driven như website cũ (.header-content.pad-default = padding:20px 0) */
.header-top {
  background: var(--navy);
  color: #fff;
  padding: 20px 0;
}

.header-top a {
  color: #fff;
  line-height: 1;
}

.header-social i,
.header-actions i {
  font-size: 16px;
}

.header-notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}
.header-notif-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 10px;
  line-height: 1.5;
  min-width: 16px;
  text-align: center;
  pointer-events: none;
}

.newsletter-link {
  font-family: Starling, serif !important;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.newsletter-link i {
  font-size: 16px;
}

/* header-brand: padding-driven, logo 56px + padding 20px = ~96px như website cũ */
.header-brand {
  background: #fff;
  position: relative;
  padding: 20px 0;
}

.header-date {
  flex: 1;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
}

.header-login {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}


.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}


/* ================================
   MAIN NAV
   nav link padding-bottom:18px như website cũ
================================ */
.main-menu {
  background: #fff;
  border: 0;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 999;
  /* box-shadow: 0 2px 8px rgba(0,0,0,.08); */
}

/* header-inner bên trong main-menu: collapse fill full width */
.main-menu .header-inner {
  align-items: stretch;
}

.main-menu .navbar-collapse {
  flex: 1;
}

/* Desktop: force row, spread items */
@media (min-width: 1011px) {
  .main-menu .navbar-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 0;
    width: 100%;
  }
}

.main-menu .nav-link {
  font-family: Starling, serif !important;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  padding: 0 0 18px;
  white-space: nowrap;
}

.main-menu .nav-link:hover {
  color: var(--red);
}

.main-menu .nav-link.active {
  color: var(--red);
}

.navbar-toggler {
  border: 0;
  box-shadow: none !important;
}

/* ================================
   HOME INNER
   Padding wrapper bên trong page-content (maxw đã xử lý bởi page-content)
================================ */
.home-inner {
  padding-left: 24px;
  padding-right: 24px;
}


/* ================================
   MEGA MENU
   Dropdown full-width, pos-absolute relative to .main-menu
================================ */

/* nav-item with mega dropdown — position relative để dropdown tính từ đây */
.mega-item {
  position: static;
}

/* Dropdown panel — hidden by default, shown on hover via opacity+visibility
   (cannot transition `display`, so we use opacity+visibility for the fade) */
.mega-dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 3px solid var(--navy);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  z-index: 1000;
  transition: opacity .18s ease, visibility .18s ease;
}

/* Show dropdown on hover — desktop only */
@media (min-width: 1011px) {
  .mega-item:hover .mega-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Inner container — maxw-1200 centered như website cũ */
.mega-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Section title: icon + tên section — navy bg, white text như website cũ */
.mega-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Starling, serif !important;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy);
}

.mega-section-title img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Cols: cats left | articles right */
.mega-cols {
  display: flex;
  gap: 40px;
}

/* Sub-category list */
.mega-cats {
  min-width: 200px;
  flex-shrink: 0;
}

/* 2-column mode: menus with 6+ children */
.mega-cats--2col {
  min-width: 320px;
}

.mega-cats--2col ul {
  columns: 2;
  column-gap: 24px;
}

.mega-cats--2col ul li {
  break-inside: avoid;
}

.mega-cats ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-cats ul li {
  margin-bottom: 10px;
}

.mega-cats ul li a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.mega-cats ul li a:hover,
.mega-cats ul li a.is-active {
  color: var(--red);
}

/* Active cat link — bold underline */
.mega-cats ul li a.is-active {
  font-weight: 700;
  border-left: 3px solid var(--red);
  padding-left: 8px;
  margin-left: -11px;
}

/* Latest-items panel — visibility controlled by Alpine.js x-show */
.mega-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Alpine x-transition helpers for panel fade-in */
.mega-panel-enter        { transition: opacity .15s ease; }
.mega-panel-enter-start  { opacity: 0; }
.mega-panel-enter-end    { opacity: 1; }

/* List of 3 latest items */
.mega-latest {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-latest-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.mega-latest-img {
  flex-shrink: 0;
}

.mega-latest-img img {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.mega-latest-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mega-latest-title:hover {
  color: var(--red);
}

/* "View All" link */
.mega-view-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  font-style: italic;
  text-align: right;
  margin-top: auto;
}

.mega-view-all:hover {
  text-decoration: underline;
}

/* ================================
   BREAKING BAR
================================ */
.breaking-bar {
  background: #f7f7f7;
  border-bottom: 1px solid #e5e5e5;
  color: var(--text);
  padding: 16px 0;
  font-size: 16px;
  font-weight: 600;
}

.breaking-bar .label {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  padding: 3px 8px;
  margin-right: 12px;
  letter-spacing: .5px;
}

/* ================================
   SECTION TITLE
================================ */
.section-title {
  border-bottom: 3px solid #111;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title h2 {
  background: #111;
  color: #fff;
  padding: 10px 16px;
  font-size: 16px;
  margin: 0;
  text-transform: uppercase;
  font-family: Starling, serif !important;
}

.section-title a {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ================================
   HERO CARD
================================ */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Layer 1: dominant full-width card */
.hero-card--large {
  grid-column: 1 / -1;
}

.hero-card--large .hero-img {
  height: 420px;
}

.hero-card {
  background: #fff;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.hero-img {
  height: 260px;
  object-fit: cover;
  width: 100%;
}

.category {
  display: inline-block;
  background: #c40000;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-content {
  padding: 24px;
}

.hero-content h1,
.hero-content h2 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.5px;
  font-family: Starling, serif !important;
}

.meta {
  color: #777;
  font-size: 16px;
  margin-bottom: 10px;
}

/* ================================
   ARTICLES CARD — theo cấu trúc live site
   img-holder > a > img (16:9)
   articles-cat (đỏ, uppercase, small)
   articles-title > a
   articles-excerpt > a
   articles-meta > time
================================ */
.articles-card {
  background: #fff;
  transition: .2s;
}

.articles-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* img-holder: wrapper giữ tỉ lệ 16:9 */
.img-holder {
  overflow: hidden;
  display: block;
}

.img-holder img {
  width: 100%;
  display: block;
  transition: transform .3s ease;
}

.articles-card:hover .img-holder img {
  transform: scale(1.03);
}

/* Half-height image variant */
.img-holder--half {
  aspect-ratio: 32 / 9;
}

.img-holder--half img {
  aspect-ratio: unset;
  height: 100%;
}

/* category link — đỏ, uppercase, font-size nhỏ như website cũ */
.articles-cat {
  display: inline-block;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 12px;
  margin-bottom: 6px;
}

.articles-cat:hover {
  color: #c40000;
}

/* title — Starling bold, cùng h3 */
.articles-title {
  font-family: Starling, serif !important;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

.articles-title a {
  color: var(--text);
}

.articles-title a:hover {
  color: var(--red);
}

.articles-title--lg {
  font-size: 22px;
}

/* excerpt — text nhỏ, link mờ */
.articles-excerpt {
  font-size: 15px;
  line-height: 1.5;
  color: #555;
  margin-bottom: 8px;
}

.articles-excerpt a {
  color: #555;
}

.articles-excerpt a:hover {
  color: var(--text);
}

/* meta / date — dùng <time> như live site */
.articles-meta {
  font-size: 13px;
  color: var(--muted);
}

.articles-meta time {
  display: inline-block;
}

/* ================================
   TRENDING TODAY
================================ */
.trending-today {
  width: 100%;
  margin-top: 20px;
}

.trending-title {
  font-family: Starling, serif !important;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.trending-title span {
  color: var(--red);
}

.trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trending-list li {
  border-bottom: 1px solid #eee;
  padding: 12px 0;
}

.trending-list li:first-child {
  padding-top: 0;
}

.trending-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.trending-list li a {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--text);
}

.trending-list li a:hover {
  color: var(--red);
}

.trending-row {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.trending-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.trending-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.trending-list li a:hover .trending-img-wrap img {
  transform: scale(1.03);
}

.trending-caption {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 0;
  z-index: 1;
  background: rgba(222, 75, 73, .8);
  display: flex;
  align-items: center;
  padding: 8px 10px;
}

.trending-caption p {
  font-family: Starling, serif !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #fff;
}

.trending-left {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  z-index: 2;
  background: #ef5350;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  display: flex;
  align-items: center;
  padding-left: 8px;
}

.trending-left::after {
  content: none;
}

.trending-number {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* ================================
   EXCERPT NAVY (quote block)
================================ */
.excerpt-navy {
  width: 100%;
  margin-top: 16px;
}

.excerpt-bg {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.excerpt-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #fff;
}

.excerpt-content blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: Starling, serif !important;
  font-size: 21px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}

.excerpt-quote-icon {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--red);
}

.excerpt-quote-icon svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.excerpt-readmore {
  display: flex;
  justify-content: flex-end;
}

.excerpt-readmore a {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.excerpt-readmore a:hover {
  color: var(--red);
}

.excerpt-caret {
  color: var(--red);
  display: inline-flex;
  align-items: center;
}

.excerpt-caret svg {
  width: 8px;
  height: 16px;
}

/* ================================
   ARTICLE FEATURED (full-width image + title + excerpt)
================================ */
.article-featured {
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 16px;
}

.article-featured .img-holder {
  margin-bottom: 10px;
}

.article-featured-title {
  font-family: Starling, serif !important;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin: 4px 0 8px;
}

.article-featured-title a {
  color: var(--text);
}

.article-featured-title a:hover {
  color: var(--red);
}

/* Home Part 2 — Col Centre: override chỉ trong scope này, không đụng .article-featured chung */
.home-centre-featured .img-holder img {
  height: 270px;
  object-fit: cover;
}

.home-centre-featured .article-featured-title {
  font-size: 32px;
}

/* ================================
   ARTICLES LIST (image left + text right)
================================ */
.articles-list-holder {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.articles-list-holder li {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.articles-list-holder li:last-child {
  border-bottom: 0;
}

.articles-list-holder .img-holder {
  flex-shrink: 0;
  width: 240px;
}

.articles-list-holder .img-holder img {
  width: 240px;
  height: 135px;
  display: block;
  transition: transform .3s ease;
}

.articles-list-holder li:hover .img-holder img {
  transform: scale(1.03);
}

.articles-list {
  flex: 1;
  min-width: 0;
}

.articles-list .card-header {
  padding: 0;
  background: none;
  border: 0;
  margin-bottom: 4px;
}

.articles-list .card-header > a {
  display: inline-block;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 4px;
}

.articles-list .card-header > a:hover {
  color: #c40000;
}

.articles-list .card-header h3 {
  font-family: Starling, serif !important;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.articles-list .card-header h3 a {
  color: var(--text);
}

.articles-list .card-header h3 a:hover {
  color: var(--red);
}

/* Scoped riêng cho Article list ở Main content part 1 — .articles-list và
   .metaDetails dùng chung với articles_centre_homepage.php, articles_left_homepage.php,
   news/reviews list_with_promo.php, không đổi rule gốc để tránh ảnh hưởng chỗ khác. */
.home-top-row .articles-list .card-header h3 {
  font-size: 26px;
}

.home-top-row .articles-list {
  display: flex;
  flex-direction: column;
}

.home-top-row .articles-list .metaDetails {
  margin-top: auto;
  text-align: left;
}

.metaDetails {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* ================================
   SIDEBAR
================================ */
.popular-box {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  overflow: hidden;
}

.popular-box .hero-sidebar-holder {
  padding: 16px;
}

.title-sidebar {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-family: Starling, serif !important;
  font-size: 18px;
  width: 100%;
}

/* Scoped riêng cho Sidebar Section ở Main content part 1 — .popular-box,
   .hero-sidebar, .title-sidebar dùng chung với news/sidebar_articles.php và
   reviews/sidebar_popular.php, không đổi rule gốc để tránh ảnh hưởng chỗ khác. */
.home-top-row .popular-box {
  background: #f0f6f9;
}

.home-top-row .hero-sidebar h3 {
  font-size: 19px;
}

.home-top-row .title-sidebar {
  font-size: 26px;
}

/* Home Part 4 — Col Right "Community" heading only; .title-sidebar base (18px)
   dùng chung với hub_pages.php, news/sidebar_articles.php, reviews/sidebar_popular.php */
.home-community-title {
  font-size: 26px;
}

.title-sidebar strong {
  font-weight: 700;
  color: #fff;
}

.title-sidebar span {
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
}

.title-sidebar--italic {
  font-style: italic;
  font-size: 26px;
}

.new-et-items {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  width: 100%;
}

.new-et-items li {
  border-bottom: 1px solid #eee;
}

.new-et-items li:last-child {
  border-bottom: 0;
}

.new-et-items h4 {
  margin: 0;
}

.new-et-items h4 a {
  display: block;
  padding: 10px 14px;
  font-family: Starling, serif !important;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.new-et-items h4 a:hover {
  color: var(--red);
  background: #fafafa;
}

.new-et-btn {
  color: #fff;
  font-style: italic;
  font-weight: 700;
  border-bottom: 3px solid var(--red);
  padding-bottom: 1px;
}

.new-et-btn:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.hero-sidebar-holder {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-sidebar {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.hero-sidebar:first-child {
  padding-top: 0;
}

.hero-sidebar:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hero-sidebar .img-holder {
  display: block;
  overflow: hidden;
  margin-bottom: 10px;
}

.hero-sidebar .img-holder img {
  width: 100%;
  display: block;
  transition: transform .3s ease;
}

.hero-sidebar:hover .img-holder img {
  transform: scale(1.03);
}

.hero-sidebar h3 {
  font-family: Starling, serif !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.hero-sidebar h3 a {
  color: var(--text);
}

.hero-sidebar h3 a:hover {
  color: var(--red);
}

.latest-box {
  background: #fff;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.latest-item {
  border-bottom: 1px solid #eee;
  padding: 14px 0;
}

.latest-item:first-child {
  padding-top: 0;
}

.latest-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.latest-item h4 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  font-family: Starling, serif !important;
}

.ad-box {
  height: 280px;
  background: #e9e9e9;
  border: 1px dashed #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-weight: 600;
  margin-bottom: 24px;
}

.newsletter {
  background: #111;
  color: #fff;
  padding: 28px;
}

.newsletter h3 {
  font-family: Starling, serif !important;
}

.newsletter input {
  border-radius: 0;
  border: 0;
  padding: 12px;
}

.newsletter .btn-subscribe {
  border-radius: 0;
  background: #c40000;
  border: 0;
  font-weight: 700;
  color: #fff;
  width: 100%;
  padding: 10px;
}

.newsletter .btn-subscribe:hover {
  background: #a50000;
}

/* ================================
   FOOTER
================================ */
/* ================================
   FOOTER — theo live HTML website cũ
   bg-navyblue full-width, inner maxw-1200
================================ */
.site-footer {
  background: var(--navy);
  color: #fff;
  font-size: 16px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px;
}

/* Top: brand trái / links phải — flex row */
.footer-top {
  display: flex;
  flex-direction: row;
  gap: 40px;
  padding-bottom: 20px;
}

/* Brand col: maxw-190 như website cũ */
.footer-brand-col {
  max-width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* foot-logo-social: logo trên, social dưới */
.foot-logo-social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  display: block;
  width: 184px;
  height: 65px;
  object-fit: contain;
}

.footer-social {
  display: flex;
  flex-direction: row;
  gap: 14px;
}

.footer-social a {
  color: #fff;
  font-size: 18px;
}

.footer-social a:hover { color: #adb5bd; }

/* Newsletter form: span + label > input + button */
.footer-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-newsletter-form span {
  display: block;
  font-family: Starling, serif !important;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-newsletter-label {
  display: block;
  width: 100%;
  margin-bottom: 8px;
}

.footer-newsletter-form input[type="email"] {
  border: 0;
  height: 37px;
  width: 100%;
  padding: 0 10px;
  font-size: 16px;
  border-radius: 4px 4px 0 0;
}

.footer-newsletter-form button[type="submit"] {
  background: var(--red);
  color: #fff;
  border: 0;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border-radius: 0 0 4px 4px;
  width: 100%;
}

.footer-newsletter-form button[type="submit"]:hover { background: #c40000; }

/* Links: 4 outer divs — grid */
.footer-links {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* footer-col: margin-bottom 20px như website cũ */
.footer-col {
  margin-bottom: 20px;
}

/* title: đỏ, uppercase, 14px — đúng website cũ */
.footer-col-title {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-col-title a {
  color: var(--red);
}

.footer-col-title a:hover { color: #ff7875; }

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 16px;
  color: #fff;
  width: 100%;
}

.footer-col ul li a {
  color: #fff;
}

.footer-col ul li a:hover { color: #adb5bd; }

/* Bottom bar: flex-column-reverse mobile → flex-row desktop (như website cũ) */
.footer-bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
}

.copyright {
  font-size: 13px;
  color: #5068a5;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-links a {
  color: #adb5bd;
  font-size: 13px;
}

.footer-bottom-links a:hover { color: #fff; }

/* ================================
   RESPONSIVE
================================ */

/* ≤1240px: header-top padding giảm như website cũ */
@media (max-width: 1240px) {
  .header-top { padding: 10px 0; }
  .header-brand { padding: 10px 0; }
  .header-inner { padding: 0 10px; }
}

/* ≤900px: footer stack — brand trên, links dưới */
@media (max-width: 900px) {
  .footer-top { flex-direction: column; }
  .footer-brand-col { max-width: 100%; flex-direction: row; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
  .foot-logo-social { flex-direction: row; align-items: center; gap: 16px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

/* ≤576px: 1 cột, bottom bar đảo ngược (copyright dưới) */
@media (max-width: 576px) {
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
  .footer-bottom-links { gap: 10px; }
}

/* Newsletter signup bar */
.newsletter-signup {
  background: var(--navy);
  width: 100%;
  padding: 20px 0;
}
.newsletter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.newsletter-logo {
  flex-shrink: 0;
}
.newsletter-logo img {
  display: block;
}
.newsletter-label {
  color: #fff;
  font-family: Starling, serif;
  font-size: 18px;
  white-space: nowrap;
}
.newsletter-form {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}
.newsletter-input {
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  width: 260px;
  font-family: Inter, sans-serif;
}
.newsletter-btn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 10px 22px;
  font-size: 14px;
  font-family: Inter, sans-serif;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background .2s;
}
.newsletter-btn:hover {
  background: #d32f2f;
}

@media (max-width: 1399px) {
  .main-menu .navbar-nav { gap: 18px; }
}

@media (max-width: 1199px) {
  .main-menu .nav-link { font-size: 16px; }
}

/* ≤1010px: mobile layout, ẩn header-brand như website cũ */
@media (max-width: 1010px) {
  .header-brand { display: none; }
  .header-top { padding: 12px 0; position: sticky; top: 0; z-index: 9999; }
  .newsletter-link { font-size: 0; }
  .newsletter-link i { font-size: 16px; margin-right: 0 !important; }
  .main-menu { padding: 8px 0; }
  .main-menu .navbar-nav { align-items: flex-start !important; gap: 0; padding: 12px 0; }
  .main-menu .nav-link { font-size: 16px; padding: 8px 0; }
  .hero-img { height: 200px; }
  .hero-content h1, .hero-content h2 { font-size: 20px; }
}

/* Community block */
.community h4 {
  font-size: 13px;
  color: #00649b;
  margin-top: 1em;
  text-transform: uppercase;
}
.community ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.community ul li {
  padding: 10px;
}
.community ul li a {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
  text-decoration: none;
  color: #343d5a;
}
.community ul li a strong {
  font-size: 13px;
  font-weight: 700;
  color: #343d5a;
}
.community ul li a span {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  padding-top: 10px;
}

@media (max-width: 640px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card--large { grid-column: auto; }
  .hero-card--large .hero-img { height: 240px; }
  .hero-img { height: 240px; }
}

@media (max-width: 575px) {
  .header-social { gap: 14px !important; }
  .header-actions { gap: 14px !important; }
}

/* Header user dropdown */
.header-user-btn {
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
}
.header-user-btn i { font-size: 16px; }
.header-user-btn:focus-visible { outline: 2px solid #fff; border-radius: 2px; }

.header-user-menu {
  min-width: 200px;
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  padding: 8px 0;
  margin-top: 8px !important;
}
.header-user-greeting {
  font-size: 13px;
  color: #555;
  padding: 6px 16px;
}
.header-user-menu .dropdown-item {
  font-size: 14px;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  color: var(--text);
}
.header-user-menu .dropdown-item:hover {
  background: var(--bg-light, #f5f5f5);
  color: var(--navy);
}
.header-user-menu .dropdown-divider { margin: 4px 0; }

/* Login Modal */
.login-modal-dialog {
  max-width: 420px;
}
.login-modal-content {
  border-radius: 4px;
  border: none;
  overflow: hidden;
}
.login-form {
  display: flex;
  flex-direction: column;
}
.login-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e8e8;
}
.login-modal__title {
  font-family: Starling, serif;
  font-size: 22px;
  font-weight: 700;
  color: #07122e;
}
.login-modal__close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.login-modal__close:hover { color: #111; }
.login-modal__content {
  padding: 20px 24px;
}
.login-modal__desc {
  font-family: Starling, serif;
  font-size: 15px;
  color: #444;
  margin-bottom: 16px;
}
.login-modal__field {
  margin-bottom: 14px;
}
.login-modal__field--password {
  position: relative;
}
.login-modal__field--remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.login-input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.login-input:focus { border-color: #07122e; }
.login-forgot {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #ef5350;
  text-decoration: none;
}
.login-forgot:hover { text-decoration: underline; }
.login-checkbox { cursor: pointer; }
.login-checkbox-label {
  font-size: 13px;
  color: #555;
  cursor: pointer;
  margin: 0;
}
.login-btn {
  width: 100%;
  background: #07122e;
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: background .2s;
}
.login-btn:hover { background: #0e1e4a; }
.login-modal__footer {
  padding: 14px 24px;
  border-top: 1px solid #e8e8e8;
  background: #f7f8fa;
}
.login-modal__footer p {
  margin: 0;
  font-size: 13px;
  color: #555;
  text-align: center;
}
.login-modal__footer a { color: #07122e; text-decoration: none; }
.login-modal__footer a:hover { text-decoration: underline; }

/* ── Signup modal ───────────────────────────────────────────── */
.signup-modal-dialog { max-width: 440px; }
.signup-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.signup-modal__field { position: relative; }
.signup-field-error {
  font-size: 12px;
  color: #dc3545;
  margin-top: 4px;
  min-height: 16px;
}
.login-input.is-invalid { border-color: #dc3545; }

/* Shared utility — sticky sidebar offset below fixed header */
.sidebar-sticky { position: sticky; top: 80px; }

/* ── Ad banner row (shared across listing and view pages) ────── */
.news-hrec {
  background: #f5f5f5;
  text-align: center;
  padding: 16px 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Profile edit page ──────────────────────────────────────── */
.profile-edit-outer {
  max-width: 1060px;
  padding: 20px 16px 60px;
  display: flex;
  align-items: stretch;
  gap: 28px;
}
/* Sidebar */
.profile-sidebar {
  width: 240px;
  flex-shrink: 0;
}
.profile-sidebar-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
}
.profile-sidebar-header {
  background: var(--navy);
  padding: 16px;
  text-align: center;
}
.profile-sidebar-username {
  color: #fff;
  font-family: Starling, serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  word-break: break-word;
}
.profile-sidebar-body { padding: 16px; }
.profile-sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  overflow: hidden;
}
.profile-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-sidebar-since {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-bottom: 14px;
}
.profile-sidebar-section { margin-bottom: 14px; }
.profile-sidebar-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #aaa;
  margin: 0 0 6px;
}
.profile-sidebar-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #444;
  padding: 3px 0;
}
.profile-sidebar-stat strong { color: var(--navy); }
.profile-sidebar-loyalty { list-style: none; padding: 0; margin: 0; }
.profile-sidebar-loyalty li { font-size: 12.5px; color: #444; padding: 2px 0; }
/* Main form area */
.profile-edit-wrap {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.profile-edit-header { margin-bottom: 28px; }
.profile-edit-title {
  font-family: Starling, serif;
  font-size: 28px;
  font-weight: 700;
  color: #07122e;
  margin-bottom: 6px;
}
.profile-edit-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
}
.profile-edit-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 28px 28px 20px;
  margin-bottom: 24px;
}
.profile-edit-section-title {
  font-family: Starling, serif;
  font-size: 17px;
  font-weight: 700;
  color: #07122e;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

/* ── Profile accordion ───────────────────────────── */
.profile-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.profile-accordion .accordion-item {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.profile-accordion .accordion-item:last-child {
  border-bottom: none;
}
.profile-accordion .accordion-header {
  margin: 0;
}
.profile-accordion .accordion-button {
  font-family: Starling, serif;
  font-size: 15px;
  font-weight: 700;
  color: #07122e;
  background: #fff;
  padding: 16px 20px;
  box-shadow: none;
  border-radius: 0 !important;
}
.profile-accordion .accordion-button:not(.collapsed) {
  color: #b91c1c;
  background: #fafafa;
  box-shadow: none;
}
.profile-accordion .accordion-button::after {
  filter: none;
}
.profile-accordion .accordion-button:not(.collapsed)::after {
  filter: none;
}
.profile-accordion .accordion-button:focus {
  box-shadow: none;
  outline: none;
}
.profile-accordion .accordion-body {
  padding: 20px 20px 16px;
  background: #fff;
}
.profile-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.required-mark { color: #dc3545; }
.profile-field-hint {
  font-size: 12px;
  color: #888;
  font-weight: 400;
}
.profile-field-input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 9px 12px;
  font-size: 14px;
  color: #111;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
.profile-field-input:focus { border-color: #07122e; }
.profile-field-textarea { resize: vertical; min-height: 100px; }
.profile-char-count {
  font-size: 12px;
  color: #888;
  text-align: right;
  margin-top: 4px;
}
.profile-social-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  overflow: hidden;
  transition: border-color .2s;
}
.profile-social-input-wrap:focus-within { border-color: #07122e; }
.profile-social-prefix {
  padding: 9px 10px 9px 12px;
  font-size: 14px;
  color: #888;
  background: #f7f8fa;
  border-right: 1px solid #e0e0e0;
  flex-shrink: 0;
}
.profile-field-input--social {
  border: none;
  border-radius: 0;
  flex: 1;
}
.profile-field-input--social:focus { border-color: transparent; }
.profile-loyalty-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}
.profile-notif-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.profile-notif-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.profile-notif-checkbox { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; accent-color: #07122e; }
.profile-notif-label { font-size: 14px; color: #333; }
.profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}
.profile-save-btn {
  background: #07122e;
  color: #fff;
  border: none;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background .2s;
}
.profile-save-btn:hover { background: #0e1e4a; }
.profile-save-btn:disabled { background: #a0aab8; cursor: not-allowed; }

/* Profile picture */
.profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.profile-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e7eb;
}
.profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #07122e;
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #e5e7eb;
}
.profile-avatar-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.profile-avatar-select-btn {
  display: inline-block;
  padding: 8px 18px;
  background: #f0f2f5;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.profile-avatar-select-btn:hover { background: #e2e5ea; }
.profile-avatar-file-input { display: none; }
.profile-avatar-progress { margin-bottom: 8px; }
.profile-avatar-progress progress { width: 100%; height: 6px; border-radius: 3px; }
.profile-avatar-error {
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #fdf2f2;
  border-radius: 3px;
  border: 1px solid #f5c6c6;
}

@media (max-width: 767px) {
  .profile-edit-outer { flex-direction: column; padding: 24px 16px 48px; }
  .profile-sidebar { width: 100%; position: static; }
  .profile-edit-card { padding: 20px 16px 16px; }
}

/* ============================================================
   Messages
   ============================================================ */
.msg-page {
  margin: 40px 20px 60px;
}

/* ---- Two-column layout ---- */
.msg-layout {
  display: flex;
  background: #fff;
  border: 1px solid #DDE1EC;
  border-radius: 12px;
  overflow: visible;
  min-height: 520px;
  box-shadow: 0 2px 14px rgba(27,58,107,.07);
}

/* ---- Sidebar ---- */
.msg-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #F6F8FC;
  border-right: 1px solid #DDE1EC;
  border-radius: 12px 0 0 12px;
  padding: 20px 12px 24px;
  display: flex;
  flex-direction: column;
}
.msg-compose-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 18px;
  transition: background .15s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.msg-compose-btn:hover { background: #8c0c1c; color: #fff; text-decoration: none; }
.msg-compose-btn i { font-size: 13px; }

.msg-nav { display: flex; flex-direction: column; gap: 2px; }
.msg-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: #5A6578;
  text-decoration: none;
  border-radius: 7px;
  transition: background .12s, color .12s;
}
.msg-nav-link i { font-size: 15px; flex-shrink: 0; }
.msg-nav-link:hover { background: #ECF0F8; color: var(--navy); text-decoration: none; }
.msg-nav-link.is-active { background: #E4EAF7; color: var(--navy); font-weight: 700; }
.msg-nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.6;
}

/* ---- Main content pane ---- */
.msg-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.msg-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 13px;
  border-bottom: 1px solid #EEF0F7;
}
.msg-content-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin: 0;
}
.msg-content-count { font-size: 12px; color: #9AA0B0; }

/* ---- Bulk action bar ---- */
.msg-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 8px 14px;
  border-bottom: 1px solid #EEF0F7;
  background: #F8F9FC;
  min-height: 44px;
}
.msg-bulk-selectall {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #5A6578;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  user-select: none;
}
.msg-bulk-selectall input[type="checkbox"] { cursor: pointer; }
.msg-bulk-selectall:hover { background: #ECF0F8; color: var(--navy); }
.msg-bulk-actions { display: flex; align-items: center; gap: 4px; }
.msg-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #5A6578;
  background: #fff;
  border: 1px solid #DDE1EC;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.msg-bulk-btn i { font-size: 12px; }
.msg-bulk-btn:hover:not(:disabled) { background: #E4EAF7; color: var(--navy); border-color: #B8C3E0; }
.msg-bulk-btn--danger:hover:not(:disabled) { background: #FDEAEA; color: #B01025; border-color: #F0B8C0; }
.msg-bulk-btn:disabled { opacity: .35; cursor: default; }

/* ---- Thread list ---- */
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 20px 13px 14px;
  border-bottom: 1px solid #EEF0F7;
  transition: background .1s;
}
/* Per-row checkbox */
.msg-row__check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  cursor: pointer;
}
.msg-row__check input[type="checkbox"] { cursor: pointer; }
.msg-row:last-child { border-bottom: none; }
/* Read = trắng bình thường */
.msg-row:hover { background: #F5F7FC; }
/* Unread = xanh xám nhẹ, nổi bật so với nền trắng */
.msg-row--unread { background: #EDF2FF !important; }
.msg-row--unread:hover { background: #E2EAFF !important; }
.msg-row--unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--navy);
  border-radius: 0 2px 2px 0;
}
/* Chấm tròn navy trước subject của unread */
.msg-row--unread .msg-row__subject::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy);
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Avatar circle */
.msg-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  user-select: none;
}
.msg-avatar[data-hue="0"] { background: #1B3A6B; }
.msg-avatar[data-hue="1"] { background: #B01025; }
.msg-avatar[data-hue="2"] { background: #2E63A8; }
.msg-avatar[data-hue="3"] { background: #3D7A5E; }
.msg-avatar[data-hue="4"] { background: #6A4D9A; }
.msg-avatar.msg-avatar--photo { background: transparent; padding: 0; overflow: hidden; }
.msg-avatar.msg-avatar--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Row body */
.msg-row__body { flex: 1; min-width: 0; }
.msg-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.msg-row__from {
  font-size: 13.5px;
  font-weight: 600;
  color: #1B2E50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-row--unread .msg-row__from { font-weight: 700; }
.msg-row__time {
  font-size: 11px;
  color: #9AA0B0;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.msg-row__subject {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  color: #4A556A;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  margin-bottom: 2px;
}
.msg-row--unread .msg-row__subject { font-weight: 700; color: #1B2E50; }
.msg-row__subject:hover { color: var(--red); }
.msg-row__preview {
  font-size: 12px;
  color: #9AA0B0;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* Actions — revealed on row hover */
.msg-row__actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.msg-row:hover .msg-row__actions { opacity: 1; }
.msg-row__actions button,
.msg-row__actions a.msg-action-link {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8A93A8;
  font-size: 14px;
  cursor: pointer;
  transition: background .12s, color .12s;
  padding: 0;
  text-decoration: none;
}
.msg-row__actions button:hover,
.msg-row__actions a.msg-action-link:hover { background: #E4EAF7; color: var(--navy); }

/* Empty state */
.msg-empty { padding: 80px 0 60px; text-align: center; }
.msg-empty i { font-size: 44px; color: #C8D0E2; display: block; margin-bottom: 14px; }
.msg-empty p { font-size: 14px; color: #9AA0B0; margin: 0; }

/* Pagination */
.msg-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid #EEF0F7;
}
.msg-pagination .btn-outline-secondary {
  font-size: 12.5px;
  padding: 4px 16px;
  border-color: #C8D0E2;
  color: #5A6578;
}
.msg-pagination .btn-outline-secondary:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.msg-page-info { font-size: 12px; color: #9AA0B0; }

/* ---- Thread view ---- */
.msg-thread-header {
  padding: 20px 24px 18px;
  border-bottom: 1px solid #EEF0F7;
}
.msg-thread__subject {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
  line-height: 1.3;
}
.msg-thread__participants { display: flex; gap: 6px; flex-wrap: wrap; }
.msg-participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 4px;
  background: #EEF1F8;
  border-radius: 20px;
  font-size: 12px;
  color: var(--navy);
  font-weight: 500;
}
.msg-chip-avatar { width: 20px; height: 20px; font-size: 9px; }

/* Message bubbles */
.msg-messages {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 24px 0;
}
.msg-message { display: flex; gap: 11px; align-items: flex-start; }
.msg-message--mine { flex-direction: row-reverse; }
.msg-message .msg-avatar { width: 33px; height: 33px; font-size: 12px; flex-shrink: 0; }
.msg-message__bubble {
  max-width: 72%;
  background: #F0F3F9;
  border-radius: 3px 12px 12px 12px;
  padding: 11px 15px;
}
.msg-message--mine .msg-message__bubble {
  background: #E4EAF7;
  border-radius: 12px 3px 12px 12px;
}
.msg-message__meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.msg-message__author { font-size: 12px; font-weight: 700; color: var(--navy); }
.msg-message__time { font-size: 11px; color: #9AA0B0; font-variant-numeric: tabular-nums; }
.msg-message__body { font-size: 14px; line-height: 1.7; color: #2A3250; }

/* Reply form */
.msg-reply {
  border-top: 1px solid #E2E5EE;
  padding: 20px 24px 24px;
  margin-top: 24px;
}
.msg-reply__label {
  font-size: 11px;
  font-weight: 600;
  color: #9AA0B0;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.msg-reply__textarea {
  width: 100%;
  border: 1px solid #D5D9E8;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 96px;
  color: #1A2540;
  font-family: inherit;
  transition: border-color .15s;
  box-sizing: border-box;
}
.msg-reply__textarea:focus { outline: none; border-color: var(--navy); }
.msg-reply__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 12px; }
.msg-reply__send {
  padding: 9px 22px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.msg-reply__send:hover { background: var(--red); }
.msg-thread-actions { display: flex; gap: 8px; }

/* ---- Compose ---- */
.msg-compose-form {
  padding: 24px 28px 28px;
}
.msg-compose-title { font-size: 16px; font-weight: 700; color: var(--navy); margin: 0 0 20px; }
.msg-field { margin-bottom: 14px; }
.msg-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #8892A4;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 5px;
}
.msg-field-wrap { position: relative; }
.msg-field input,
.msg-field textarea {
  width: 100%;
  border: 1px solid #D5D9E8;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 14px;
  color: #1A2540;
  font-family: inherit;
  transition: border-color .15s;
  box-sizing: border-box;
  background: #fff;
}
.msg-field input:focus,
.msg-field textarea:focus { outline: none; border-color: var(--navy); }
.msg-field textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.msg-compose-footer { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.msg-send-btn {
  padding: 10px 24px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.msg-send-btn:hover { background: #8c0c1c; }

/* Autocomplete dropdown */
.msg-autocomplete {
  position: absolute;
  left: 0; right: 0; top: 100%;
  margin-top: 2px;
  background: #fff;
  border: 1px solid #D5D9E8;
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  z-index: 100;
  list-style: none;
  padding: 4px 0;
  margin: 2px 0 0;
}
.msg-autocomplete:empty { display: none; }
.msg-autocomplete li { padding: 8px 14px; font-size: 13px; cursor: pointer; color: #1A2540; }
.msg-autocomplete li:hover { background: #F0F3F9; color: var(--navy); }

/* Mobile */
@media (max-width: 680px) {
  .msg-page { padding: 0; margin-top: 0; }
  .msg-layout { border-radius: 0; border-left: none; border-right: none; }
  .msg-sidebar { width: 52px; padding: 14px 6px; }
  .msg-compose-btn span,
  .msg-nav-link span { display: none; }
  .msg-compose-btn { padding: 10px; }
  .msg-nav-link { padding: 10px; justify-content: center; }
  .msg-thread__subject { font-size: 17px; }
  .msg-compose-form { padding: 16px; }
  .msg-messages { padding: 16px 16px 0; }
  .msg-reply { padding: 16px; }
  .msg-message__bubble { max-width: 88%; }
  .msg-thread-header { padding: 16px 16px 14px; }
  .msg-content-head { padding: 12px 16px; }
  .msg-row { padding: 12px 14px 12px 14px; }
}

/* ============================================================
   SEARCH — overlay + results page
   ============================================================ */

/* Header search button (replaces <a> so it can have type="button") */
.search-icon-btn {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255,255,255,.8);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color .15s;
}
.search-icon-btn:hover { color: #fff; }

/* Search overlay — slides down from top over the page */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  background: var(--navy);
  padding: 22px 24px;
  animation: searchSlideDown .18s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}
@keyframes searchSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.search-overlay__inner { max-width: 860px; margin: 0 auto; }
.search-overlay__form {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid rgba(255,255,255,.25);
  padding-bottom: 10px;
}
.search-overlay__icon { color: rgba(255,255,255,.45); font-size: 20px; flex-shrink: 0; }
.search-overlay__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 24px;
  font-family: 'Starling', Georgia, serif;
  letter-spacing: .01em;
  min-width: 0;
}
.search-overlay__input::placeholder { color: rgba(255,255,255,.35); }
.search-overlay__submit,
.search-overlay__close {
  background: none;
  border: none;
  color: rgba(255,255,255,.65);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color .15s;
  flex-shrink: 0;
}
.search-overlay__submit:hover,
.search-overlay__close:hover { color: #fff; }

/* ---- Search results page ---- */
.search-page {
  max-width: 900px;
  margin: 36px auto 60px;
  padding: 0 20px;
}
.search-page__header {
  border-bottom: 2px solid var(--navy);
  margin-bottom: 32px;
  padding-bottom: 18px;
}
.search-page__form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.search-page__icon { color: #9AA4B8; font-size: 18px; flex-shrink: 0; }
.search-page__input {
  flex: 1;
  border: none;
  border-bottom: 2px solid #D4D9E8;
  outline: none;
  font-size: 22px;
  font-family: 'Starling', Georgia, serif;
  padding: 4px 0;
  color: var(--navy);
  background: transparent;
  transition: border-color .15s;
  min-width: 0;
}
.search-page__input:focus { border-bottom-color: var(--navy); }
.search-page__submit {
  background: var(--navy);
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background .15s;
}
.search-page__submit:hover { background: var(--red); }
.search-page__meta { font-size: 13.5px; color: #7A859A; margin: 0; }
.search-page__meta strong { color: var(--navy); }

/* Empty state */
.search-page__empty {
  text-align: center;
  padding: 60px 20px;
  color: #7A859A;
}
.search-page__empty-icon { font-size: 48px; display: block; margin-bottom: 16px; color: #C8D0E0; }
.search-page__empty p { margin: 4px 0; font-size: 15px; color: var(--navy); }
.search-page__empty-hint { font-size: 13.5px; color: #9AA4B8; }

/* Results grid — 3 columns */
.search-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}
.search-card {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #E8EBF4;
  transition: box-shadow .15s, transform .15s;
}
.search-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.10);
  transform: translateY(-2px);
}
.search-card__img-wrap {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #EEF0F7;
  flex-shrink: 0;
}
.search-card__img-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-card__img-placeholder { font-size: 32px; color: #C4CDE0; }
.search-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.search-card:hover .search-card__img { transform: scale(1.04); }
.search-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 16px;
}
.search-card__kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 5px;
}
.search-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--navy);
}
.search-card__title a { color: inherit; text-decoration: none; }
.search-card__title a:hover { color: var(--red); }
.search-card__snippet {
  font-size: 13px;
  color: #5C6B82;
  line-height: 1.55;
  margin: 0 0 10px;
  flex: 1;
}
.search-card__date {
  font-size: 11.5px;
  color: #9AA4B8;
  margin-top: auto;
}

/* Pagination */
.search-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}
.search-pagination__btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border: 1.5px solid var(--navy);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.search-pagination__btn:hover { background: var(--navy); color: #fff; }
.search-pagination__btn--disabled {
  opacity: .35;
  pointer-events: none;
}
.search-pagination__info { font-size: 13px; color: #7A859A; }

@media (max-width: 768px) {
  .search-results { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 500px) {
  .search-results { grid-template-columns: 1fr; }
  .search-page { padding: 0 14px; margin-top: 20px; }
  .search-overlay__input { font-size: 18px; }
  .search-page__input { font-size: 18px; }
}
