/* ============================================================
   CSS VARIABLES - Education theme (red/white) inspired by
   giaoducthoidai.vn. Variable names kept (--brown-dark, --gold, ...)
   for backward compatibility — values now map to red palette.
   Overridden by Thymeleaf inline style from application.yml theme.
   ============================================================ */
:root {
  --brown-dark:   #7a0d12;   /* primary dark red - header/footer */
  --brown-mid:    #a8161c;   /* mid red - nav bar */
  --brown-light:  #e85a5e;   /* light red accent */
  --gold:         #d32027;   /* primary brand red */
  --gold-light:   #ff5a62;   /* hover highlight */
  --gold-pale:    #fde9ea;   /* pale red wash */
  --cream:        #f5f5f5;   /* page background (light gray) */
  --cream-dark:   #e8e8e8;   /* placeholder bg */
  --white:        #ffffff;
  --text-dark:    #1a1a1a;
  --text-mid:     #404040;
  --text-light:   #757575;
  --border:       #d9d9d9;
  --border-light: #ececec;
  --accent-blue:  #1e5fa8;   /* secondary accent for category tags */
  --font-serif:   'Roboto Slab', 'Merriweather', 'Noto Serif', Georgia, serif;
  --font-sans:    'Be Vietnam Pro', 'Roboto', 'Segoe UI', sans-serif;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06);
  --shadow-md:    0 4px 14px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 28px rgba(0,0,0,.12);
  --radius:       4px;
  --container:    1200px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ============================================================
   SECTION TITLES & BADGES
   ============================================================ */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown-dark);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 6px; height: 22px;
  background: var(--gold);
  border-radius: 3px;
  flex-shrink: 0;
}
.badge {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
}
.badge-red  { background: #c0392b; }
.badge-blue { background: #1a6b9a; }
.tag {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 20px;
  transition: all .2s;
}
.tag:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   TOP BAR
   ============================================================ */
#topbar {
  background: var(--brown-dark);
  color: var(--gold-pale);
  font-size: .78rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--brown-mid);
}
#topbar .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
#topbar a { color: var(--gold-light); }
#topbar a:hover { color: var(--white); }
#topbar .sep { opacity: .4; }
#topbar .right { display: flex; gap: 14px; align-items: center; }
.topbar-hotline { color: var(--gold-pale); font-weight: 500; }
.topbar-hotline a { color: var(--white); font-weight: 600; margin-left: 4px; }
.topbar-hotline a:hover { color: var(--gold-light); }

/* ============================================================
   HEADER / MASTHEAD
   ============================================================ */
#masthead {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  padding: 14px 0 12px;
  position: relative;
}
#masthead .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo-wrap { display: inline-flex; align-items: center; }
.logo-img {
  height: 90px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity .2s;
}
.logo-wrap:hover .logo-img { opacity: .85; }
.logo-text-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: opacity .2s;
}
.logo-wrap:hover .logo-text-wrap { opacity: .9; }
.logo-icon {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gold);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.08));
}
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-transform: uppercase;
}
.logo-tagline {
  font-size: .72rem;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: .02em;
  max-width: 360px;
}

/* Search box */
.header-search { display: flex; }
.header-search input {
  width: 240px;
  padding: 8px 14px;
  border: 1px solid rgba(201,144,42,.35);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .85rem;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--brown-dark);
  outline: none;
  transition: border-color .2s;
}
.header-search input::placeholder { color: #999; }
.header-search input:focus { border-color: var(--gold); }
.header-search button {
  padding: 8px 14px;
  background: var(--gold);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--white);
  cursor: pointer;
  font-size: .9rem;
  transition: background .2s;
}
.header-search button:hover { background: var(--gold-light); }

/* ============================================================
   NAV - MEGA MENU
   ============================================================ */
#main-nav {
  background: var(--brown-mid);
  position: sticky; top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}
.nav-inner {
  display: flex;
  align-items: stretch;
}
.nav-inner > li { position: relative; }
.nav-inner > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 48px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gold-pale);
  white-space: nowrap;
  transition: background .2s, color .2s;
  letter-spacing: .02em;
}
.nav-inner > li > a:hover,
.nav-inner > li:hover > a {
  background: var(--brown-dark);
  color: var(--gold-light);
}
.nav-inner > li > a .caret {
  font-size: .6rem; opacity: .7; margin-left: 2px;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%; left: 0;
  background: var(--white);
  border-top: 2px solid var(--gold);
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius) var(--radius);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .2s;
  z-index: 100;
}
.nav-inner > li:hover .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: 9px 18px;
  font-size: .82rem;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border-light);
  transition: background .15s, color .15s;
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover {
  background: var(--cream);
  color: var(--gold);
  padding-left: 24px;
}

/* Hamburger & mobile search toggle — ẩn trên desktop */
#hamburger, #search-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer;
  padding: 10px;
  color: var(--brown-mid);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Nav container (desktop: căn giữa như .container) */
.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: stretch;
}

/* Nav overlay backdrop (mobile) */
#nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
}
#nav-overlay.open { display: block; }

/* Nav panel header (mobile close button row) */
.nav-panel-header {
  display: none;
}

/* Mobile search bar */
.mobile-search-bar {
  display: none;
  width: 100%;
  background: var(--brown-mid);
  border-top: 2px solid var(--gold);
}
.mobile-search-bar.open { display: block; }
.mobile-search-bar .container { padding-top: 10px; padding-bottom: 10px; }
.mobile-search-bar form {
  display: flex;
}
.mobile-search-bar input {
  flex: 1;
  padding: 9px 14px;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .9rem;
  font-family: var(--font-sans);
  background: rgba(255,255,255,.15);
  color: var(--white);
  outline: none;
}
.mobile-search-bar input::placeholder { color: rgba(255,255,255,.5); }
.mobile-search-bar input:focus { background: rgba(255,255,255,.22); }
.mobile-search-bar button {
  padding: 9px 16px;
  background: var(--gold);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
}

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */
#ticker {
  background: var(--gold-pale);
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  padding: 6px 0;
  overflow: hidden;
}
#ticker .inner { display: flex; align-items: center; gap: 12px; }
#ticker .label {
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: .72rem;
  padding: 2px 10px;
  border-radius: 2px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-list {
  display: flex;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
}
.ticker-list span { padding: 0 40px; color: var(--text-mid); }
.ticker-list span::before { content: '\25C6 '; color: var(--gold); font-size: .6rem; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
#hero { background: var(--brown-dark); overflow: hidden; }
.hero-slider { position: relative; }
.slide {
  display: none;
  position: relative;
  height: 500px;
  overflow: hidden;
}
.slide.active { display: block; }
.slide-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}
.slide-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.slide-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 48px;
  background: linear-gradient(to top, rgba(20,8,2,.92) 0%, transparent 100%);
}
.slide-cat {
  color: var(--gold-light);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
}
.slide-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 10px;
  max-width: 700px;
}
.slide-title a { color: var(--white); }
.slide-title a:hover { color: var(--gold-light); }
.slide-meta { color: rgba(255,255,255,.6); font-size: .8rem; }

/* Slider controls */
.slider-dots {
  position: absolute;
  bottom: 18px; right: 48px;
  display: flex; gap: 6px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer; border: none;
  transition: background .2s, transform .2s;
}
.dot.active { background: var(--gold); transform: scale(1.3); }
.slider-arrows {
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px;
}
.arr {
  background: rgba(255,255,255,.15);
  border: none; color: white;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer; font-size: 1rem;
  transition: background .2s;
}
.arr:hover { background: var(--gold); }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
#main { padding: 32px 0 40px; }
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.card-large {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow .2s;
  margin-bottom: 20px;
}
.card-large:hover { box-shadow: var(--shadow-md); }
.card-large .img-wrap { height: 220px; overflow: hidden; background: var(--cream-dark); }
.card-large .img-wrap img,
.card-large .img-wrap .ep { width: 100%; height: 100%; object-fit: cover; }
.card-large .body { padding: 20px 20px 20px 0; display: flex; flex-direction: column; }

.card {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  transition: background .15s;
}
.card:last-child { border-bottom: none; }
.card .thumb {
  width: 100px; height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-dark);
}
.card .thumb img,
.card .thumb .ep { width: 100%; height: 100%; object-fit: cover; }
.card .info { flex: 1; min-width: 0; }

.card-grid {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card-grid:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-grid .img-wrap { height: 160px; overflow: hidden; background: var(--cream-dark); }
.card-grid .img-wrap img,
.card-grid .img-wrap .ep { width: 100%; height: 100%; object-fit: cover; }
.card-grid .body { padding: 14px; }

.card-cat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 5px;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 6px;
}
.card-title a:hover { color: var(--gold); }
.card-title-lg { font-size: 1.25rem; }
.card-desc {
  font-size: .83rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: .73rem;
  color: var(--text-light);
  margin-top: 6px;
}
.card-meta span { margin-right: 10px; }

/* Emoji placeholders */
.ep {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--cream-dark), var(--gold-pale));
}
.ep-sm { font-size: 1.5rem; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* img-wrap & thumb: dam bao anh khong tran khung */
.img-wrap {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream-dark);
}
.img-wrap img,
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.img-wrap:hover img,
.thumb:hover img { transform: scale(1.04); }

.section { margin-bottom: 36px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-box {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sidebar-box .box-title {
  background: var(--brown-dark);
  color: var(--gold-pale);
  font-family: var(--font-serif);
  font-size: .95rem;
  font-weight: 700;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-box .box-body { padding: 14px; }

.sb-list { display: flex; flex-direction: column; gap: 0; }
.sb-item {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.sb-item:last-child { border-bottom: none; }
.sb-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  min-width: 28px;
  flex-shrink: 0;
}
.sb-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.45;
}
.sb-title:hover { color: var(--gold); }
.sb-meta { font-size: .7rem; color: var(--text-light); margin-top: 2px; }

/* Quote box */
.quote-box {
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-mid) 100%);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quote-box::before {
  content: '\275D';
  position: absolute; top: -10px; left: 10px;
  font-size: 5rem;
  color: rgba(201,144,42,.2);
  font-family: Georgia, serif;
  line-height: 1;
}
.quote-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--gold-pale);
  margin-bottom: 12px;
  position: relative;
}
.quote-author {
  font-size: .75rem;
  color: var(--gold-light);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.dharma-wheel {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 16px;
  animation: spin-slow 20s linear infinite;
  display: inline-block;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ============================================================
   ARTICLE DETAIL PAGE
   ============================================================ */
.article-page-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
.breadcrumb {
  font-size: .78rem;
  color: var(--text-light);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--gold); }
.breadcrumb span { color: var(--border); }
.article-header { margin-bottom: 24px; }
.article-header .cat {
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold); margin-bottom: 10px;
}
.article-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 14px;
}
.article-lead {
  font-size: 1.05rem;
  color: var(--text-mid);
  font-style: italic;
  border-left: 4px solid var(--gold);
  padding-left: 16px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.article-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: .78rem; color: var(--text-light);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.article-meta .author { color: var(--brown-mid); font-weight: 600; }
.article-img-ep {
  width: 100%; height: 380px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem;
  background: linear-gradient(135deg, var(--cream-dark), var(--gold-pale));
  margin-bottom: 8px;
}
.img-caption { font-size: .73rem; color: var(--text-light); text-align: center; margin-bottom: 24px; }
/* Anh trong noi dung bai viet: khong cho tran khung du co width inline */
.article-body img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: var(--radius);
  margin: 16px auto;
}
/* Featured image bai viet */
.article-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin-bottom: 24px;
}
.article-body h2, .article-body h3 {
  font-family: var(--font-serif);
  color: var(--brown-dark);
  margin: 28px 0 12px;
}
.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.1rem; }
.article-body p {
  margin-bottom: 16px;
  font-size: .95rem;
  color: var(--text-dark);
  line-height: 1.85;
}
.article-body blockquote {
  border-left: 4px solid var(--gold);
  background: var(--cream);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-mid);
}
.article-tags { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article-tags span { font-size: .78rem; color: var(--text-light); }
.related-section { margin-top: 36px; }

/* ============================================================
   DIALOGUE BOX - Goi mo doi thoai
   ============================================================ */
.dialogue-box {
  margin: 36px 0;
  background: linear-gradient(135deg, var(--brown-dark) 0%, #4e2510 60%, var(--brown-mid) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}
.dialogue-box::before {
  content: '\275D';
  position: absolute; top: -16px; right: 20px;
  font-size: 8rem;
  color: rgba(201,144,42,.12);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}
.dialogue-box .dlg-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.dialogue-box .dlg-sub {
  font-size: .88rem;
  color: rgba(255,255,255,.75);
  font-style: italic;
  margin-bottom: 18px;
  line-height: 1.7;
}
.dialogue-box .dlg-questions {
  list-style: none;
  margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.dialogue-box .dlg-questions li {
  font-size: .88rem;
  color: var(--gold-pale);
  display: flex; align-items: flex-start; gap: 8px;
  line-height: 1.6;
}
.dialogue-box .dlg-questions li::before {
  content: '•';
  color: var(--gold-light);
  flex-shrink: 0;
  margin-top: 2px;
}
.dialogue-box .dlg-cta {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 14px;
}
.dialogue-box .dlg-email {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s;
  text-decoration: none;
}
.dialogue-box .dlg-email:hover { background: var(--gold-light); color: var(--brown-dark); }
.dialogue-box .dlg-note {
  margin-top: 14px;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  font-style: italic;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .dialogue-box { padding: 20px 18px; }
}

/* ============================================================
   FULL WIDTH BAND
   ============================================================ */
.band {
  background: linear-gradient(135deg, var(--brown-dark) 0%, #4e2510 50%, var(--brown-mid) 100%);
  padding: 48px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.band-quote {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--gold-pale);
  max-width: 720px;
  margin: 0 auto 12px;
  line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--brown-dark);
  color: rgba(255,255,255,.75);
  padding: 48px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-col h4 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 1rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,144,42,.25);
}
.footer-col p, .footer-col li { font-size: .8rem; line-height: 1.8; }
.footer-col li a:hover { color: var(--gold-light); }
.footer-col .info-item {
  display: flex; gap: 8px; margin-bottom: 6px; font-size: .78rem;
}
.footer-col .info-item .icon { flex-shrink: 0; color: var(--gold); }
.footer-logo-icon {
  width: 50px; height: 50px;
  background: radial-gradient(circle, #e8b94a, #c9902a);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.footer-logo-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 700;
}
.footer-logo-issn { font-size: .7rem; color: var(--gold-light); letter-spacing: .05em; }
.footer-desc { font-size: .78rem; line-height: 1.9; color: rgba(255,255,255,.65); margin-bottom: 14px; }
.footer-staff { border-top: 1px solid rgba(201,144,42,.2); padding-top: 12px; }
.staff-row { display: flex; gap: 6px; margin-bottom: 6px; font-size: .78rem; line-height: 1.5; }
.staff-label { color: var(--gold-pale); flex-shrink: 0; }
.staff-name { color: var(--white); font-weight: 500; }
.footer-contact .info-item { align-items: flex-start; margin-bottom: 10px; }
.footer-license { border-top: 1px solid rgba(201,144,42,.2); padding-top: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .73rem;
  color: rgba(255,255,255,.4);
}
.footer-issn {
  background: rgba(201,144,42,.15);
  border: 1px solid rgba(201,144,42,.3);
  border-radius: 3px;
  padding: 2px 10px;
  font-weight: 600;
  color: var(--gold-light);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; gap: 4px; justify-content: center;
  margin-top: 24px;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .82rem;
  color: var(--text-mid);
  transition: all .15s;
}
.pagination a:hover, .pagination .cur {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

/* ============================================================
   UTILITY
   ============================================================ */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--gold);
  color: var(--white);
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 600;
  transition: background .2s;
  cursor: pointer; border: none;
}
.btn:hover { background: var(--brown-light); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--white); }
.text-center { text-align: center; }
.view-all {
  font-size: .78rem; font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 4px 12px;
  border-radius: var(--radius);
  transition: all .15s;
}
.view-all:hover { background: var(--gold); color: var(--white); }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-head .section-title { margin-bottom: 0; }

/* Search results */
.search-info { font-size: .85rem; color: var(--text-light); margin-bottom: 20px; }
.search-keyword { font-weight: 700; color: var(--gold); }

/* ============================================================
   RESPONSIVE - TABLET (iPad portrait ~ landscape)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-inner { flex-wrap: wrap; }
  .header-search input { width: 180px; }
  .layout-grid { grid-template-columns: 1fr 260px; }
  .article-page-grid { grid-template-columns: 1fr 260px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .slide-title { font-size: 1.6rem; }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 768px) {
  #topbar { display: none; }
  .header-search { display: none; }

  /* Masthead: sticky, 3-col grid [☰] [LOGO] [🔍] */
  #masthead {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 8px 0;
    border-bottom: 2px solid var(--gold);
  }
  #masthead .inner {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 0;
    justify-items: center;
  }
  .logo-wrap { justify-self: center; }
  .logo-img { height: 52px; }
  .logo-text-wrap { gap: 8px; }
  .logo-icon { font-size: 1.8rem; }
  .logo-title { font-size: 1.15rem; }
  .logo-tagline { display: none; }
  #hamburger { display: flex; justify-self: start; color: var(--brown-mid); }
  #search-toggle { display: flex; justify-self: end; color: var(--brown-mid); }

  /* Main nav: ẩn bar, chỉ dùng slide panel */
  #main-nav {
    background: none;
    box-shadow: none;
    position: static;
    height: 0;
    overflow: visible; /* cho phép fixed child hiện ra ngoài */
  }
  /* Không dùng display:none vì sẽ ẩn cả fixed child bên trong */
  .nav-container { visibility: hidden; height: 0; overflow: visible; }

  /* navList: slide-in từ trái — position:fixed thoát khỏi luồng */
  #navList {
    display: flex !important;
    visibility: visible; /* override lại từ parent */
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    width: 82%; max-width: 300px;
    height: 100dvh;
    background: var(--brown-dark);
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1001;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #navList.open { transform: translateX(0); }

  /* Header panel bên trong (tên + nút đóng) */
  .nav-panel-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--brown-mid);
    border-bottom: 2px solid var(--gold);
    font-size: .85rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: .05em;
    text-transform: uppercase;
    flex-shrink: 0;
  }
  .nav-close-btn {
    background: none; border: none;
    color: var(--gold-pale);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
  }

  .nav-inner > li > a { height: auto; padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }

  /* Dropdown mobile: ẩn mặc định, toggle bằng JS */
  .dropdown {
    display: none;
    position: static;
    opacity: 1; visibility: visible; transform: none;
    border-top: none; box-shadow: none;
    background: rgba(0,0,0,.2);
  }
  .dropdown.open { display: block; }
  .dropdown li a { color: rgba(255,255,255,.7); background: none; padding-left: 32px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .dropdown li a:hover { color: var(--gold-light); padding-left: 36px; background: none; }

  .slide { height: 300px; }
  .slide-title { font-size: 1.3rem; }
  .slide-content { padding: 24px 20px; }

  .layout-grid { grid-template-columns: 1fr; }
  .article-page-grid { grid-template-columns: 1fr; }
  #sidebar { order: 2; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  .card-large { grid-template-columns: 1fr; }
  .card-large .body { padding: 16px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .band-quote { font-size: 1.2rem; }
  .article-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   AD SLOTS
   ============================================================ */
.ad-slot {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.ad-label {
  display: inline-block;
  font-size: 10px;
  color: #999;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  padding: 1px 6px;
  border-radius: 2px;
  margin-bottom: 4px;
}
.ad-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.ad-html { overflow: hidden; }

/* Leaderboard — 728×90 — dưới nav, trên content */
.ad-leaderboard {
  margin: 0 auto 18px;
  max-width: 728px;
  padding: 6px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.ad-leaderboard .ad-img { margin: 0 auto; }

/* Rectangle — 300×250 — sidebar */
.ad-rectangle {
  margin-bottom: 24px;
  border-radius: 6px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  padding: 8px;
}
.ad-rectangle .ad-img { margin: 0 auto; border-radius: 4px; }

/* Home mid — 970×90 — banner giữa trang chủ */
.ad-home-mid {
  margin: 32px auto;
  max-width: 970px;
  background: #fafafa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}
.ad-home-mid .ad-img { margin: 0 auto; }

/* Article inline — 300×250 — float phải trong bài viết */
.ad-article-inline {
  float: right;
  margin: 0 0 20px 24px;
  max-width: 300px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  padding: 8px;
  border-radius: 6px;
  clear: right;
}

/* Article bottom — 728×90 — cuối bài */
.ad-article-bottom {
  margin: 32px auto 24px;
  max-width: 728px;
  background: #fafafa;
  border-top: 2px solid var(--gold-pale);
  border-bottom: 2px solid var(--gold-pale);
  padding: 10px 0;
}
.ad-article-bottom .ad-img { margin: 0 auto; }

/* Mobile: ẩn leaderboard lớn, thu gọn ad */
@media (max-width: 768px) {
  .ad-leaderboard,
  .ad-home-mid,
  .ad-article-bottom { display: none; }
  .ad-article-inline { float: none; margin: 0 auto 20px; }
}

/* ============================================================
   HOMEPAGE - TIN NÓNG BAND (red scrolling marquee)
   ============================================================ */
#hot-band {
  background: linear-gradient(90deg, var(--gold-pale) 0%, #fff5f5 100%);
  border-top: 1px solid var(--gold-pale);
  border-bottom: 1px solid var(--gold-pale);
  padding: 8px 0;
  overflow: hidden;
}
.hot-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hot-label {
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: .78rem;
  padding: 4px 12px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.hot-track { overflow: hidden; flex: 1; }
.hot-list {
  display: flex;
  gap: 48px;
  animation: hot-scroll 50s linear infinite;
  white-space: nowrap;
}
.hot-track:hover .hot-list { animation-play-state: paused; }
.hot-item {
  font-size: .85rem;
  color: var(--text-dark);
  font-weight: 500;
  transition: color .15s;
}
.hot-item::before {
  content: '●';
  color: var(--gold);
  margin-right: 10px;
  font-size: .55rem;
  vertical-align: middle;
}
.hot-item:hover { color: var(--gold); }
@keyframes hot-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   HOMEPAGE - HERO GRID 1 + 4
   ============================================================ */
#hero-grid { padding: 24px 0 8px; }
.hero-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  min-height: 460px;
}
.hero-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-dark);
  box-shadow: var(--shadow-md);
}
.hero-img {
  display: block;
  height: 100%;
  min-height: 460px;
  overflow: hidden;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.hero-main:hover .hero-img img { transform: scale(1.04); }
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 28px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.6) 50%, transparent 100%);
  color: var(--white);
}
.hero-cat {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}
.hero-title a { color: var(--white); }
.hero-title a:hover { color: var(--gold-light); }
.hero-summary {
  font-size: .92rem;
  color: rgba(255,255,255,.85);
  line-height: 1.55;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
}

.hero-side {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 12px;
}
.hero-side-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.hero-side-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.hero-side-img {
  display: block;
  overflow: hidden;
  background: var(--cream-dark);
}
.hero-side-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.hero-side-item:hover .hero-side-img img { transform: scale(1.06); }
.hero-side-body {
  padding: 10px 12px 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.hero-side-cat {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gold);
}
.hero-side-title {
  font-family: var(--font-serif);
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-side-title a:hover { color: var(--gold); }

/* ============================================================
   HOMEPAGE - QUICK TOOLS STRIP
   ============================================================ */
#quick-tools { padding: 18px 0 6px; }
.qt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.qt-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.qt-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--gold);
}
.qt-icon {
  font-size: 2rem;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-pale);
  color: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}
.qt-text { display: flex; flex-direction: column; min-width: 0; }
.qt-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}
.qt-sub {
  font-size: .75rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* ============================================================
   HOMEPAGE - CATEGORY SECTION (1 lớn + 4 thumbs)
   ============================================================ */
.cat-section {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.cat-section .section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
  font-size: 1.4rem;
}
.cat-section .section-title::before {
  background: var(--section-accent, var(--gold));
}
.cat-section .section-head { margin-bottom: 14px; }

.sub-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--border-light);
}
.sub-chip {
  font-size: .76rem;
  color: var(--text-mid);
  padding: 4px 12px;
  border: 1px solid var(--border-light);
  background: var(--cream);
  border-radius: 20px;
  font-weight: 500;
  transition: all .15s;
}
.sub-chip:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.cat-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}
.cat-feature { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cat-feature-img {
  display: block;
  height: 240px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-dark);
}
.cat-feature-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.cat-feature:hover .cat-feature-img img { transform: scale(1.04); }
.cat-feature-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-dark);
}
.cat-feature-title a:hover { color: var(--gold); }
.cat-feature-desc {
  font-size: .85rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cat-list-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.cat-list-item:first-child { padding-top: 0; }
.cat-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.cat-list-thumb {
  display: block;
  height: 64px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-dark);
}
.cat-list-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.cat-list-item:hover .cat-list-thumb img { transform: scale(1.06); }
.cat-list-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.cat-list-title {
  font-size: .87rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-list-title:hover { color: var(--gold); }
.cat-list-meta {
  font-size: .7rem;
  color: var(--text-light);
}

/* ============================================================
   HOMEPAGE - NEWSLETTER CTA
   ============================================================ */
#newsletter { margin: 32px 0 12px; }
.nl-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-mid) 100%);
  color: var(--white);
  padding: 26px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.nl-icon {
  font-size: 2.6rem;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
  flex-shrink: 0;
}
.nl-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-pale);
  margin-bottom: 4px;
}
.nl-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}
.nl-form {
  display: flex;
  gap: 0;
  min-width: 320px;
}
.nl-form input {
  flex: 1;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .88rem;
  font-family: var(--font-sans);
  outline: none;
  background: var(--white);
  color: var(--text-dark);
  min-width: 0;
}
.nl-form button {
  padding: 11px 22px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.nl-form button:hover { background: var(--gold-light); }

/* ============================================================
   HOMEPAGE - RESPONSIVE
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-wrap { grid-template-columns: 1.6fr 1fr; min-height: 380px; }
  .hero-img { min-height: 380px; }
  .hero-title { font-size: 1.5rem; }
  .hero-side-item { grid-template-columns: 90px 1fr; }
  .qt-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-body { grid-template-columns: 1fr; }
  .cat-feature-img { height: 220px; }
}

@media (max-width: 768px) {
  /* Hot band: ẩn label, scroll nguyên list */
  .hot-inner { gap: 8px; }
  .hot-label { font-size: .68rem; padding: 3px 8px; }
  .hot-item { font-size: .78rem; }

  /* Hero: stack dọc, bài lớn full width + 4 nhỏ scroll ngang */
  #hero-grid { padding: 14px 0 4px; }
  .hero-wrap {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
  }
  .hero-img, .hero-main { min-height: 240px; }
  .hero-img { height: 240px; }
  .hero-overlay { padding: 18px 16px 14px; }
  .hero-cat { font-size: .65rem; padding: 2px 8px; margin-bottom: 8px; }
  .hero-title { font-size: 1.15rem; }
  .hero-summary { display: none; }

  .hero-side {
    grid-template-rows: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .hero-side-item { scroll-snap-align: start; }
  .hero-side-item { grid-template-columns: 90px 1fr; }
  .hero-side-title { font-size: .85rem; -webkit-line-clamp: 2; }

  /* Quick tools: 2x2 grid */
  #quick-tools { padding: 14px 0 4px; }
  .qt-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .qt-item { padding: 12px; gap: 10px; }
  .qt-icon { width: 40px; height: 40px; font-size: 1.5rem; }
  .qt-title { font-size: .85rem; }
  .qt-sub { font-size: .68rem; }

  /* Cat section: 1 column, feature + list stacked */
  .cat-section { padding: 16px 14px 18px; }
  .cat-section .section-title { font-size: 1.15rem; }
  .cat-body { grid-template-columns: 1fr; gap: 16px; }
  .cat-feature-img { height: 200px; }
  .cat-feature-title { font-size: 1.02rem; }
  .cat-list-item { grid-template-columns: 80px 1fr; }
  .cat-list-thumb { height: 56px; }
  .sub-chips { gap: 6px; }
  .sub-chip { font-size: .7rem; padding: 3px 9px; }

  /* Newsletter: stack vertical */
  .nl-box {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 22px 18px;
    gap: 14px;
  }
  .nl-icon { margin: 0 auto; width: 52px; height: 52px; font-size: 2rem; }
  .nl-form { min-width: 0; width: 100%; }
}

@media (max-width: 480px) {
  .qt-grid { grid-template-columns: 1fr; }
  .hero-side { grid-auto-columns: 86%; }
  .hero-title { font-size: 1.05rem; }
  .nl-title { font-size: 1.05rem; }
}
