/* ==========================================================================
   NANN TV NEWS - Official Cambodian Media Press Design System
   Designed to satisfy Ministry of Information (ក្រសួងព័ត៌មាន) Standards
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Battambang:wght@400;700&family=Kantumruy+Pro:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

/* --- Design Tokens & Color Palette --- */
:root {
  /* Official Press Color Scheme */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;

  --bg-header-top: #0a192f;
  --bg-masthead: #ffffff;
  --bg-nav: #0f172a;
  --bg-footer: #080d1a;

  /* Text & Readability */
  --text-main: #1e293b;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  /* Official Brand Accents */
  --brand-navy: #1e3a8a;
  --brand-navy-dark: #0f172a;
  --brand-red: #b91c1c;
  --brand-red-hover: #991b1b;
  --brand-gold: #d97706;
  --border-line: #cbd5e1;
  --border-light: #e2e8f0;

  /* Typography */
  --font-khmer: 'Kantumruy Pro', 'Battambang', 'Khmer OS Battambang', sans-serif;
  --font-english: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading-en: 'Montserrat', sans-serif;

  /* Dynamic Reader Font Scale */
  --content-font-size: 1rem;
  --content-line-height: 1.75;

  /* Spacing & Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-press: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* --- Base & Accessibility Resets --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-khmer);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: var(--content-line-height);
  font-size: var(--content-font-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  left: 0.75rem;
  z-index: 10000;
  min-height: 44px;
  padding: 0.65rem 1rem;
  display: inline-flex;
  align-items: center;
  background: var(--brand-navy);
  color: #ffffff;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.35);
  outline-offset: 3px;
}

/* ==========================================================================
   ADMIN CONTROL PANEL & MANAGEMENT DASHBOARD STYLES
   ========================================================================== */
.admin-grid-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.75rem;
}

.admin-page .official-top-bar {
  display: block !important;
  padding: 0.5rem 0;
  background: var(--bg-header-top);
  color: #ffffff;
}

.admin-page .top-bar-flex,
.admin-page .top-bar-left,
.admin-page .top-bar-right {
  display: flex;
  align-items: center;
}

.admin-page .top-bar-flex {
  justify-content: space-between;
  gap: 1rem;
}

.admin-page .top-bar-left,
.admin-page .top-bar-right {
  gap: 0.65rem;
}

.admin-page .ministry-accreditation,
.admin-page .live-status {
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-page .live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-page .bar-divider {
  color: rgba(255, 255, 255, 0.35);
}

.admin-page .nav-flex {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
}

.admin-menu-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-press);
}

.admin-menu-header {
  background: var(--brand-navy);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
}

.admin-menu-list {
  list-style: none;
  padding: 0.5rem 0;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.admin-menu-item:hover,
.admin-menu-item.active {
  background: var(--bg-subtle);
  color: var(--brand-navy);
  border-left-color: var(--brand-navy);
}

/* Stat Cards */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow-press);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 0.15rem;
}

/* Admin Panel Card & Forms */
.admin-panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-press);
}

.admin-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-navy);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--brand-navy);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.flex-1 { flex: 1; min-width: 220px; }
.flex-2 { flex: 2; min-width: 300px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
}

.required {
  color: var(--brand-red);
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-khmer);
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-navy);
}

.form-file-input {
  font-family: var(--font-khmer);
  font-size: 0.85rem;
  padding: 0.45rem;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-line);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
}

.form-file-input::-webkit-file-upload-button {
  background: var(--brand-navy);
  color: #ffffff;
  border: none;
  font-family: var(--font-khmer);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 0.5rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-publish-submit {
  background: var(--brand-navy);
  color: #ffffff;
  border: none;
  font-family: var(--font-khmer);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-publish-submit:hover {
  opacity: 0.92;
}

.btn-draft-submit {
  background: #0284c7;
  color: #ffffff;
  border: none;
  font-family: var(--font-khmer);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-draft-submit:hover {
  opacity: 0.92;
}

.badge-status-published {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  display: inline-block;
}

.badge-status-draft {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  display: inline-block;
}

/* Quick Preset Image Picker & Live Card Preview Styles */
.preset-picker-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
}

.preset-images-grid {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.preset-thumb {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.preset-thumb:hover,
.preset-thumb.active {
  opacity: 1;
  border-color: var(--brand-navy);
  transform: scale(1.05);
}

.live-preview-box {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-line);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.btn-reset-form {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-line);
  font-family: var(--font-khmer);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Admin Management Table */
.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.admin-table th {
  background: var(--bg-subtle);
  color: var(--text-heading);
  font-weight: 700;
  padding: 0.75rem 0.85rem;
  border-bottom: 2px solid var(--border-line);
}

.admin-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.admin-table-img {
  width: 54px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
}

.btn-act-delete {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-family: var(--font-khmer);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
}

.btn-act-delete:hover {
  background: #b91c1c;
  color: #ffffff;
}

.badge-count {
  background: var(--bg-subtle);
  color: var(--brand-navy);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-line);
}

@media (max-width: 992px) {
  .admin-grid-layout {
    grid-template-columns: 1fr;
  }
  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* --- Dark Mode Theme Overrides --- */
body[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #1f2937;
  --bg-masthead: #111827;
  --bg-nav: #0b1120;
  
  --text-main: #e2e8f0;
  --text-heading: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --border-line: #374151;
  --border-light: #1f2937;
  --shadow-press: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .official-masthead {
  border-bottom-color: #374151;
  background-color: #111827;
}

body[data-theme="dark"] .press-card {
  background-color: #111827;
  border-color: #374151;
}

body[data-theme="dark"] .press-card-title {
  color: #f8fafc;
}

body[data-theme="dark"] .hero-lead-wrapper {
  background-color: #111827;
  border-color: #374151;
}

body[data-theme="dark"] .lead-headline {
  color: #f8fafc;
}

body[data-theme="dark"] .press-widget {
  background-color: #111827;
  border-color: #374151;
  color: #e2e8f0;
}

body[data-theme="dark"] .press-widget-title {
  color: #f8fafc;
}

body[data-theme="dark"] .most-read-item {
  border-bottom-color: #1f2937;
}

body[data-theme="dark"] .most-read-item a {
  color: #e2e8f0;
}

body[data-theme="dark"] .ministry-info-box {
  background-color: #0f172a;
  border-color: #1e3a8a;
  color: #e2e8f0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Accessibility Font Scaler Classes --- */
body.font-sm {
  --content-font-size: 0.9rem;
}

body.font-md {
  --content-font-size: 1rem;
}

body.font-lg {
  --content-font-size: 1.15rem;
}

/* --- Clean Minimal Press Header (PostKhmer Style) --- */
.clean-press-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-line);
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.clean-header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.clean-brand-logo {
  text-align: center;
  text-decoration: none;
  flex: 1;
  display: flex;
  justify-content: center;
}

.clean-brand-logo a {
  text-decoration: none;
}

.clean-logo-title {
  font-family: var(--font-khmer);
  font-size: clamp(0.95rem, 3.8vw, 1.65rem);
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
  white-space: nowrap !important;
}

.clean-logo-title span {
  color: var(--brand-red);
}

.clean-theme-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 0.45rem;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.clean-theme-btn:hover {
  background: var(--bg-subtle);
  color: var(--brand-navy);
}

/* --- Top Utility & Official Notice Bar --- */
.official-top-bar {
  display: none !important;
}

.official-top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-left-info,
.top-right-tools {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.khmer-date {
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ministry-badge {
  background-color: rgba(185, 28, 28, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
  font-weight: 600;
}

/* Font Size Resizer Tools */
.font-resizer-tool {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.font-resizer-tool span {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-right: 0.2rem;
}

.font-btn {
  color: #ffffff;
  font-weight: 700;
  padding: 0 0.3rem;
  font-size: 0.8rem;
  border-radius: 2px;
}

.font-btn:hover,
.font-btn.active {
  background-color: var(--brand-red);
  color: #ffffff;
}

/* --- Official Masthead --- */
.official-masthead {
  background-color: var(--bg-masthead);
  padding: 1.5rem 0 1.25rem 0;
  border-bottom: 1px solid var(--border-line);
}

.masthead-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.masthead-left-motto {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.motto-national {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand-navy);
}

.motto-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Main Brand Logo */
.brand-masthead-center {
  text-align: center;
}

.brand-khmer-title {
  font-family: var(--font-khmer);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--brand-navy-dark);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

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

.brand-english-title {
  font-family: var(--font-heading-en);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 3px;
  color: var(--brand-navy);
  margin-top: 0.1rem;
}

.masthead-right-contacts {
  text-align: right;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.hotline-num {
  font-weight: 700;
  color: var(--brand-red);
  font-size: 0.95rem;
}

/* --- Classic Primary Navigation Bar --- */
.official-nav {
  background-color: var(--brand-navy);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.nav-container-list {
  display: flex;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-container-list::-webkit-scrollbar {
  display: none;
}

.nav-link-item a {
  display: block;
  padding: 0.85rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #e2e8f0;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.nav-link-item a:hover,
.nav-link-item.active a {
  background-color: var(--brand-red);
  color: #ffffff;
}

.nav-link-item.highlight-live a {
  background-color: #991b1b;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }

  100% {
    transform: scale(0.9);
    opacity: 1;
  }
}

/* --- Breaking News Ticker --- */
.news-ticker-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-line);
  padding: 0.5rem 0;
}

.submission-status-notice {
  padding: 0.75rem 0;
  border-bottom: 1px solid #fde68a;
  background: #fffbeb;
  color: #78350f;
  font-family: var(--font-khmer);
  font-size: 0.9rem;
  line-height: 1.65;
}

.verified-news-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 70px;
}

.legacy-unverified-content {
  display: none !important;
}

/* Hidden until real advertising and readership data are available. */
.ad-banner-infeed,
.load-more-btn-wrap,
.press-widget:has(.most-read-list) {
  display: none !important;
}

[data-theme="dark"] .submission-status-notice {
  border-color: #92400e;
  background: #451a03;
  color: #fef3c7;
}

.ticker-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticker-label {
  background-color: var(--brand-navy);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.825rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: scrollTicker 30s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-news-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-heading);
}

.ticker-news-link:hover {
  color: var(--brand-red);
}

@keyframes scrollTicker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* --- Main Layout Grid --- */
.press-main-section {
  padding: 1.75rem 0 3rem 0;
}

.press-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

/* Section Header Bar & Category Tabs */
.press-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-navy);
  border-bottom: 2px solid var(--brand-navy);
  padding-bottom: 0;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Category Section Slider Controls & Dots (. . .) */
.section-slider-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.sec-nav-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  color: var(--text-main);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.sec-nav-btn:hover {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

.sec-dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.25rem;
}

.sec-dot {
  width: 8px;
  height: 8px;
  background: var(--border-line);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sec-dot:hover,
.sec-dot.active {
  background: var(--brand-red);
  width: 18px;
  border-radius: 8px;
}

.category-filter-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  list-style: none;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.2rem;
  align-items: center;
}

.category-filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  color: var(--text-main);
  font-family: var(--font-khmer);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

.filter-tab-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--brand-navy);
  border-color: var(--brand-navy);
  transform: translateY(-1px);
}

.filter-tab-btn.active {
  background: linear-gradient(135deg, var(--brand-navy) 0%, #1e3a8a 100%);
  border-color: var(--brand-navy);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
}

/* Secondary Multi-Card News Grid (4-Column Full Layout) */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.press-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-press);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.press-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--brand-navy);
}

.press-card-img {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.press-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.press-card:hover .press-card-img img {
  transform: scale(1.05);
}

.press-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.press-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.45;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.press-card-title a:hover {
  color: var(--brand-red);
}

.press-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.press-card-meta {
  margin-top: auto;
  font-size: 0.775rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 0.65rem;
}

/* Official Newspaper Category Badge Styling & High Contrast Colors */
.category-badge-press {
  display: inline-block;
  background-color: var(--brand-navy);
  color: #ffffff !important;
  font-family: var(--font-khmer);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  align-self: flex-start;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Vibrant Category Badge Variants */
.tag-navy {
  background-color: #1e3a8a !important;
  color: #ffffff !important;
}

.tag-red {
  background-color: #b91c1c !important;
  color: #ffffff !important;
}

.tag-gold {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

.tag-green {
  background-color: #059669 !important;
  color: #ffffff !important;
}

.tag-purple {
  background-color: #7c3aed !important;
  color: #ffffff !important;
}

.tag-blue {
  background-color: #0284c7 !important;
  color: #ffffff !important;
}

/* Load More Button Wrapper */
.load-more-btn-wrap {
  text-align: center;
  margin-bottom: 2.5rem;
}

.load-more-press-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  border: 2px solid var(--brand-navy);
  color: var(--brand-navy);
  font-family: var(--font-khmer);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-press);
  transition: all 0.2s ease;
}

.load-more-press-btn:hover {
  background-color: var(--brand-navy);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
}

/* NANN TV Video Broadcast Feature Box */
.official-video-box {
  background-color: #0b1329;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: #ffffff;
  margin-bottom: 2.5rem;
}

.video-player-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
}

.main-player-wrapper {
  position: relative;
  height: 300px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.main-player-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-circle {
  width: 60px;
  height: 60px;
  background-color: var(--brand-red);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(185, 28, 28, 0.6);
  transition: transform 0.2s ease;
}

.main-player-wrapper:hover .video-play-circle {
  transform: scale(1.1);
}

.video-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
  font-weight: 700;
  font-size: 1.05rem;
}

.video-side-playlist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.video-playlist-card {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}

.video-playlist-card:hover {
  background: rgba(255, 255, 255, 0.15);
}

.video-playlist-card img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
}

.video-playlist-title {
  font-size: 0.825rem;
  font-weight: 600;
  line-height: 1.35;
  color: #e2e8f0;
}

/* --- Sidebar Components --- */
.press-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.press-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-press);
}

.press-widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
  border-bottom: 2px solid var(--brand-navy);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

.most-read-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.most-read-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.65rem;
  align-items: flex-start;
}

.rank-num {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--brand-red);
  line-height: 1;
}

.rank-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.4;
}

.rank-text a:hover {
  color: var(--brand-red);
}

/* Ministry Legal Information Widget Box */
.ministry-info-box {
  background-color: #f8fafc;
  border: 1px dashed var(--brand-navy);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  font-size: 0.825rem;
  color: var(--text-main);
  line-height: 1.6;
}

.ministry-info-box h4 {
  color: var(--brand-navy);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- Official Footer with Legal Accreditation --- */
.official-footer {
  background-color: var(--bg-footer);
  color: #94a3b8;
  padding-top: 3rem;
  border-top: 4px solid var(--brand-navy);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col h5 {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 0.4rem;
}

.footer-col p {
  font-size: 0.85rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.footer-links-list a:hover {
  color: #ffffff;
}

.legal-accreditation-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.footer-bottom-bar {
  padding: 1.25rem 0;
  font-size: 0.8rem;
  text-align: center;
  color: #64748b;
}

/* Responsive Overrides */
@media (max-width: 1200px) {
  .secondary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .press-layout-grid {
    grid-template-columns: 1fr;
  }

  .lead-grid {
    grid-template-columns: 1fr;
  }

  .lead-content-box {
    padding: 1.5rem;
  }

  .lead-image-box {
    height: 280px;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .secondary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .masthead-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .masthead-right-contacts {
    text-align: center;
  }

  .secondary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-player-container {
    grid-template-columns: 1fr;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .secondary-grid {
    grid-template-columns: 1fr;
  }
}

/* Weather & NBC Currency Exchange Ticker in Header */
/* Hidden by user request (Weather & Exchange Rate Badges). Remove 'display: none !important' to restore anytime. */
.ticker-weather-exchange {
  display: none !important;
}

.weather-badge, .exchange-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.weather-badge strong, .exchange-badge strong {
  color: #fbbf24;
  font-weight: 700;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.775rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

/* In-Page Header Search Box Styling */
.header-search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.65rem;
  max-width: 220px;
  transition: all 0.2s ease;
}

.header-search-box:focus-within {
  background: #ffffff;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.header-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-khmer);
  font-size: 0.8rem;
  color: #ffffff;
  width: 100%;
}

.header-search-box:focus-within input {
  color: #0f172a;
}

.header-search-box input::placeholder {
  color: #cbd5e1;
}

.header-search-box:focus-within input::placeholder {
  color: #94a3b8;
}

.header-search-box button {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}

.header-search-box:focus-within button {
  color: var(--brand-navy);
}

/* Article Reader Modal Styling */
.article-reader-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  z-index: 300;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.article-reader-container {
  background: var(--bg-surface);
  color: var(--text-main);
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-line);
}

.article-reader-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-line);
  background: var(--bg-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-reader-header h4 {
  font-family: var(--font-khmer);
  color: var(--brand-navy);
  font-size: 1.1rem;
}

.article-reader-close {
  font-size: 1.75rem;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.article-reader-close:hover {
  background: rgba(0,0,0,0.1);
  color: var(--brand-red);
}

.article-reader-content {
  padding: 2rem;
}

.article-reader-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.45;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.article-reader-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.article-reader-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.article-reader-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-main);
}

.article-reader-body p {
  margin-bottom: 1.25rem;
}

.article-reader-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-line);
  flex-wrap: wrap;
}

.social-share-group {
  display: flex;
  gap: 0.5rem;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff !important;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  word-break: keep-all;
  transition: opacity 0.2s ease;
}

.btn-share-tg { background-color: #0088cc; }
.btn-share-fb { background-color: #1877f2; }
.btn-share-copy { background-color: #475569; }
.btn-print { background-color: var(--brand-navy); }

.btn-share:hover, .btn-print:hover { opacity: 0.9; }

/* Print Media Stylesheet */
@media print {
  body * {
    visibility: hidden !important;
  }
  .article-detail-card,
  .article-detail-card * {
    visibility: visible !important;
  }
  .article-detail-card {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    padding: 0 !important;
  }
  .article-reader-actions,
  .article-reader-close,
  .article-share-actions {
    display: none !important;
  }
}

/* Hero Carousel Slider & Pagination Dots Component */
.hero-carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-press);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
}

.carousel-track-wrapper {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
}

.hero-lead-wrapper {
  background-color: var(--bg-surface);
}

.lead-grid {
  display: flex;
  flex-direction: column;
}

.lead-image-box {
  position: relative;
  height: 320px;
  overflow: hidden;
}

.lead-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-content-box {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.lead-headline {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0.5rem 0 0.6rem 0;
  color: var(--text-heading);
}

.lead-headline a:hover {
  color: var(--brand-red);
}

.lead-summary {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

/* Arrows centered over the photo area on all resolutions */
.carousel-arrow {
  position: absolute;
  top: 140px;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.carousel-arrow:hover {
  background: var(--brand-red);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.carousel-prev {
  left: 12px;
}

.carousel-next {
  right: 12px;
}

@media (max-width: 768px) {
  .carousel-arrow {
    top: 100px;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
}

/* Pagination Dots (. . .) positioned cleanly below the hero card, NEVER overlapping text! */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem auto 0 auto;
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-full);
  width: fit-content;
  box-shadow: var(--shadow-press);
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: var(--border-line);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.3);
  outline-offset: 3px;
}

.carousel-dots .dot:hover,
.carousel-dots .dot.active {
  background: var(--brand-red);
  width: 22px;
  border-radius: 10px;
}

/* Sponsor Ad Banner Container Styling */
.ad-banner-header,
.ad-banner-sidebar,
.ad-banner-infeed {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ad-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 5;
}

.ad-banner-header img,
.ad-banner-sidebar img,
.ad-banner-infeed img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s ease;
}

.ad-banner-header img:hover,
.ad-banner-sidebar img:hover,
.ad-banner-infeed img:hover {
  opacity: 0.93;
}

/* Floating Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background-color: var(--brand-navy);
  color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 2px solid #ffffff;
  cursor: pointer;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--brand-red);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(185, 28, 28, 0.4);
}

/* Mobile Menu Toggle & Drawer */
/* Desktop Hide for Mobile Drawer */
@media (min-width: 993px) {
  .mobile-menu-toggle,
  .mobile-menu-overlay,
  .mobile-menu-drawer {
    display: none !important;
  }

  .clean-header-grid::before {
    content: "";
    width: 44px;
    flex: 0 0 44px;
  }
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.35rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  z-index: 105;
  touch-action: manipulation;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.mobile-menu-toggle:hover {
  color: var(--brand-navy);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.mobile-menu-toggle:active {
  transform: scale(0.92);
}

.mobile-menu-toggle:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.3);
  outline-offset: 2px;
}

.mobile-menu-toggle svg,
.mobile-menu-toggle svg * {
  pointer-events: none;
}

.mobile-menu-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(0);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms, backdrop-filter 280ms ease;
}

.mobile-menu-overlay.active {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
  backdrop-filter: blur(4px);
  transition: opacity 280ms ease, visibility 0s linear 0s, backdrop-filter 280ms ease;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100dvh;
  background: var(--bg-surface);
  color: var(--text-main);
  z-index: 999999;
  box-shadow: 8px 0 36px rgba(15, 23, 42, 0.28);
  transform: translate3d(-105%, 0, 0);
  visibility: hidden;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 320ms;
  will-change: transform;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
}

.mobile-menu-drawer.open {
  display: block !important;
  visibility: visible !important;
  transform: translate3d(0, 0, 0);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

body.mobile-menu-open {
  overflow: hidden;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--brand-navy);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.drawer-social-bar {
  display: grid;
  grid-template-columns: repeat(4, 36px);
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.25rem 0 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-line);
}

.drawer-social-label {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-family: var(--font-khmer);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
  white-space: nowrap;
}

.drawer-social-bar .social-icon-btn {
  width: 36px;
  height: 36px;
}

.mobile-search-box {
  margin-bottom: 1.25rem;
}

.mobile-search-control {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-left: 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.mobile-search-control:focus-within {
  background: var(--bg-surface);
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.mobile-search-input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-khmer);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.mobile-search-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-khmer);
  opacity: 0.9;
}

.mobile-search-submit {
  flex: 0 0 44px;
  width: 44px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--brand-navy);
  cursor: pointer;
  touch-action: manipulation;
}

.mobile-search-submit:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.3);
  outline-offset: -3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-toggle,
  .mobile-menu-overlay,
  .mobile-menu-drawer {
    transition-duration: 0.01ms !important;
  }
}

/* Social Media Icons (Facebook, X, Instagram, Telegram) */
.social-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid var(--border-line);
}

.social-icon-btn.fb:hover {
  background: #1877f2;
  color: #ffffff;
  border-color: #1877f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}

.social-icon-btn.x-twitter:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.social-icon-btn.ig:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff;
  border-color: #dc2743;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(220, 39, 67, 0.3);
}

.social-icon-btn.tg:hover {
  background: #0088cc;
  color: #ffffff;
  border-color: #0088cc;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 136, 204, 0.3);
}

.mobile-drawer-header h3 {
  font-family: var(--font-khmer);
  color: var(--brand-navy);
  font-size: 1.1rem;
}

.mobile-drawer-close {
  font-size: 1.5rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-nav-list {
  list-style: none;
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav-list li a {
  display: block;
  padding: 0.75rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.mobile-nav-list li a:hover {
  color: var(--brand-red);
}

@media (max-width: 992px) {
  .clean-press-header {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-line);
  }

  .clean-logo-title {
    font-size: clamp(0.85rem, 4vw, 1.25rem) !important;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    color: var(--text-main);
  }

  /* Completely hide category navbar on mobile/tablet screens <= 992px (PostKhmer style) */
  .official-nav,
  nav.official-nav,
  .nav-container-list {
    display: none !important;
  }

  /* Move sidebar into drawer on mobile viewports */
  .press-sidebar {
    display: none !important;
  }

  .press-layout-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   COMPREHENSIVE ALL-DEVICE RESPONSIVE & MOBILE ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Article detail layout */
.press-content-col,
.admin-main-workspace,
.form-group {
  min-width: 0;
}

.article-breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-line);
}

.article-breadcrumbs {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.article-breadcrumbs a {
  color: var(--brand-navy);
  font-weight: 700;
}

.article-back-link {
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--brand-navy);
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.article-back-link:hover {
  background: var(--bg-surface);
  border-color: var(--brand-navy);
}

.article-detail-card {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-press);
}

.article-detail-title {
  margin: 1rem 0 1.25rem;
  color: var(--text-heading);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: normal;
}

.article-detail-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.article-meta-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.article-share-actions {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 0.45rem;
  flex: 0 0 auto;
}

.article-featured-media {
  margin: 0 0 1.5rem;
  overflow: hidden;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
}

.article-featured-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
}

.article-featured-media figcaption {
  padding: 0.7rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.article-detail-body {
  color: var(--text-main);
  font-size: clamp(1rem, 1.6vw, 1.075rem);
  line-height: 1.9;
}

.article-detail-body p {
  max-width: 75ch;
}

/* --- Verified-source labels, cards and editorial disclosures --- */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.source-use-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin: 1rem 0 1.5rem;
  padding: 1.15rem;
  color: #172554;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--brand-navy);
  border-radius: var(--radius-md);
}

.source-use-notice-icon {
  min-width: 58px;
  height: 32px;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--brand-navy);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.source-use-notice h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  color: #172554;
}

.source-use-notice p {
  max-width: 92ch;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.75;
}

.source-use-notice a {
  min-height: 40px;
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  color: var(--brand-navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-loading-state {
  grid-column: 1 / -1;
  padding: 1.5rem;
  color: var(--text-muted);
  text-align: center;
}

.press-card-img > a,
.lead-image-box > a {
  display: block;
  width: 100%;
  height: 100%;
}

.press-card-labels,
.article-label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.press-card-labels .category-badge-press {
  margin-bottom: 0;
}

.official-source-badge,
.summary-label {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.official-source-badge {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.summary-label {
  color: #713f12;
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.verified-source-card {
  cursor: pointer;
}

.verified-source-card .press-card-title {
  -webkit-line-clamp: 3;
}

.verified-source-card .press-card-meta {
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
}

.verified-source-card .press-card-meta > * {
  flex: 1 1 50%;
}

.verified-source-card .press-card-meta time {
  text-align: right;
}

.press-card-source {
  margin-top: 0.75rem;
  padding: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.55;
}

.press-card-source-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.press-card-source-row + .press-card-source-row {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-line);
}

.source-department {
  max-width: 55%;
  text-align: right;
}

.press-card-source-link {
  color: var(--brand-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.hero-source-meta {
  flex-wrap: wrap;
  row-gap: 0.15rem;
}

.article-label-row {
  margin-bottom: 0.75rem;
}

.article-label-row .category-badge-press {
  margin-bottom: 0;
}

.article-summary-notice {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  color: #713f12;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--brand-gold);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.7;
}

.article-lead-summary {
  margin-bottom: 1.2rem;
  color: var(--text-heading);
  font-size: 1.08em;
  font-weight: 600;
}

.article-detail-body p + p {
  margin-top: 1.2rem;
}

.article-original-source-cta {
  padding: 1rem;
  background: var(--bg-subtle);
  border-left: 4px solid var(--brand-navy);
  border-radius: var(--radius-sm);
}

.article-original-source-cta a {
  color: var(--brand-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-source-disclosure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.25rem;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
}

.article-source-disclosure h2 {
  margin-bottom: 0.8rem;
  color: var(--text-heading);
  font-size: 1.05rem;
}

.article-source-disclosure > div > p {
  margin-top: 0.8rem;
  max-width: 78ch;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.source-detail-list {
  display: grid;
  gap: 0.45rem;
  font-size: 0.84rem;
}

.source-detail-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 0.7rem;
}

.source-detail-list dt {
  color: var(--text-muted);
  font-weight: 600;
}

.source-detail-list dd {
  color: var(--text-heading);
  font-weight: 700;
}

.source-disclosure-actions {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.65rem;
}

.official-source-link,
.source-policy-link {
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.official-source-link {
  color: #ffffff;
  background: var(--brand-navy);
  border: 1px solid var(--brand-navy);
}

.official-source-link:hover {
  color: #ffffff;
  background: #172554;
}

.source-policy-link {
  color: var(--brand-navy);
  background: var(--bg-surface);
  border: 1px solid var(--brand-navy);
}

/* --- Source-use policy page --- */
.policy-header-grid {
  grid-template-columns: 44px 1fr 44px;
}

.policy-header-grid::before {
  display: none;
}

.policy-home-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-heading);
  background: var(--bg-subtle);
  border: 1px solid var(--border-line);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 700;
}

.policy-page-container {
  max-width: 980px;
}

.policy-breadcrumbs {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.policy-breadcrumbs a {
  color: var(--brand-navy);
  font-weight: 700;
}

.policy-document {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-press);
}

.policy-document-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-line);
}

.policy-document-header h1 {
  margin: 0.8rem 0;
  color: var(--text-heading);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.45;
}

.policy-document-header p,
.policy-document section p,
.policy-document li {
  max-width: 82ch;
  color: var(--text-main);
  line-height: 1.85;
}

.policy-document section {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border-light);
}

.policy-document section h2 {
  margin-bottom: 0.7rem;
  color: var(--text-heading);
  font-size: 1.15rem;
}

.policy-document ul {
  padding-left: 1.4rem;
}

.policy-document li + li {
  margin-top: 0.45rem;
}

.policy-document section a {
  color: var(--brand-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.policy-highlight {
  margin-top: 1.4rem;
  padding: 1.15rem !important;
  background: #fffbeb;
  border: 1px solid #fde68a !important;
  border-left: 5px solid var(--brand-gold) !important;
  border-radius: var(--radius-md);
}

.policy-document-footer {
  padding-top: 1.4rem;
}

.policy-document-footer p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

body[data-theme="dark"] .source-use-notice {
  color: #dbeafe;
  background: #172554;
  border-color: #1e40af;
}

body[data-theme="dark"] .source-use-notice h3,
body[data-theme="dark"] .source-use-notice p {
  color: #dbeafe;
}

body[data-theme="dark"] .official-source-badge {
  color: #bbf7d0;
  background: #14532d;
  border-color: #166534;
}

body[data-theme="dark"] .summary-label,
body[data-theme="dark"] .article-summary-notice,
body[data-theme="dark"] .policy-highlight {
  color: #fef3c7;
  background: #451a03;
  border-color: #92400e !important;
}

/* Clear empty state shared by search and category filtering. */
.news-empty-state {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px dashed var(--border-line);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
}

/* 1. Global Touch & Text Wrapping Resets */
html, body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-wrap: break-word;
  word-break: normal;
}

/* 2. Responsive Aspect Ratio for Videos & Embeds */
iframe, video, embed, object {
  max-width: 100%;
  aspect-ratio: 16 / 9;
}

/* 3. Responsive Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 4. Touch Target Accessibility (Min 44px for Touch) */
.mobile-menu-toggle,
.theme-toggle-btn,
.scroll-top-btn,
.mobile-drawer-close,
.filter-tab-btn,
.carousel-arrow,
.sec-nav-btn,
.load-more-press-btn,
.btn-publish-submit,
.btn-draft-submit,
.btn-reset-form,
.btn-act-delete {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drawer-social-bar {
  grid-template-columns: repeat(4, 44px);
}

.drawer-social-bar .social-icon-btn {
  width: 44px;
  height: 44px;
}

/* 5. Mobile Form Input 16px Rule (Prevents iOS Safari Auto-Zoom) */
@media (max-width: 768px) {
  .source-use-notice {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .source-use-notice-icon {
    justify-self: start;
  }

  .article-source-disclosure {
    grid-template-columns: 1fr;
  }

  .source-disclosure-actions {
    min-width: 0;
  }

  .policy-document {
    padding: 1.25rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important;
  }

  .admin-panel-card {
    padding: 1rem;
  }

  .lead-image-box {
    height: 220px;
  }

  .ticker-flex {
    flex-direction: row;
    gap: 0.5rem;
  }

  .ticker-label {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .press-main-section {
    padding-top: 1rem;
  }

  .article-breadcrumb-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .article-back-link {
    align-self: flex-start;
  }

  .article-detail-card {
    padding: 1.25rem;
  }

  .article-detail-title {
    font-size: clamp(1.4rem, 6vw, 1.75rem);
    line-height: 1.5;
  }

  .article-detail-meta {
    flex-direction: column;
  }

  .article-meta-info {
    align-items: flex-start;
    flex-direction: column;
  }

  .meta-separator {
    display: none;
  }

  .article-share-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-share-actions .btn-share {
    width: 100%;
    padding-inline: 0.6rem;
  }

  .article-featured-media {
    border-radius: var(--radius-md);
  }

  .admin-grid-layout {
    gap: 1rem;
  }

  .admin-menu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.35rem;
    gap: 0.25rem;
  }

  .admin-menu-item {
    min-height: 44px;
    padding: 0.55rem 0.65rem;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: var(--radius-sm);
  }

  .admin-menu-item:hover,
  .admin-menu-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--brand-navy);
  }

  .flex-1,
  .flex-2 {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .admin-card-header {
    align-items: flex-start;
    font-size: 1rem;
  }

  .admin-table {
    min-width: 760px;
  }

  #adminTableFilters {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  #adminTableFilters .filter-tab-btn {
    min-height: 40px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-page .top-bar-flex {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-page .top-bar-left,
  .admin-page .top-bar-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .admin-page .bar-divider {
    display: none;
  }
}

/* 6. Extra Small Mobile Devices (< 480px) */
@media (max-width: 480px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .clean-logo-title {
    font-size: clamp(0.8rem, 4.5vw, 1.1rem) !important;
    white-space: normal !important;
    text-align: center;
  }

  .clean-header-grid {
    gap: 0.35rem;
  }

  .stat-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .form-actions {
    flex-direction: column;
    width: 100%;
  }

  .form-actions button {
    width: 100%;
  }

  .mobile-menu-drawer {
    width: min(356px, 85vw);
  }

  .press-card-source-row,
  .verified-source-card .press-card-meta {
    flex-direction: column;
  }

  .verified-source-card .press-card-meta time,
  .source-department {
    max-width: 100%;
    text-align: left;
  }

  .source-detail-list > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .policy-header-grid {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .policy-document {
    padding: 1rem;
  }

  .article-detail-card {
    padding: 1rem;
  }

  .article-detail-title {
    font-size: clamp(1.3rem, 7vw, 1.55rem);
    line-height: 1.52;
  }

  .article-breadcrumbs {
    font-size: 0.82rem;
  }

  .article-share-actions {
    gap: 0.5rem;
  }

  .article-share-actions .btn-share {
    font-size: 0.78rem;
    gap: 0.3rem;
  }

  .article-featured-media figcaption {
    padding-inline: 0.75rem;
  }

  .article-detail-body {
    font-size: 1rem;
    line-height: 1.85;
  }

  .admin-menu-list {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 82px;
  }

  .admin-page .top-bar-left .country-flag,
  .admin-page .top-bar-right .live-status {
    display: none;
  }

  .admin-page .top-bar-right {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-page .top-bar-right .btn-share {
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .scroll-top-btn {
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 15px;
    width: 42px;
    height: 42px;
  }

  .hero-lead-wrapper {
    margin-bottom: 1.25rem;
  }

  .lead-content-box {
    padding: 1.25rem 1rem;
  }

  .lead-headline {
    font-size: 1.15rem;
    line-height: 1.45;
  }
}

/* 7. Safe Area Insets Support for Notched Mobile Displays */
@supports (padding: env(safe-area-inset-bottom)) {
  .clean-press-header {
    padding-top: max(0.6rem, env(safe-area-inset-top));
  }

  .mobile-menu-drawer {
    padding-top: max(1.5rem, env(safe-area-inset-top));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

  footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   RESPONSIVE CATEGORY NAVIGATION + HORIZONTAL HERO NEWS CARD RAIL
   ========================================================================== */

.official-nav > .container {
  min-width: 0;
}

.nav-container-list {
  width: 100%;
  min-width: 0;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.nav-link-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.nav-link-item a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}

.nav-link-item a:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid #ffffff;
  outline-offset: -4px;
}

.hero-news-rail {
  margin-bottom: 2rem;
  padding: 1rem;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero-news-rail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.hero-news-rail-kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--brand-red);
  font-size: 0.75rem;
  font-weight: 800;
}

.hero-news-rail-header h2 {
  color: var(--text-heading);
  font-family: var(--font-khmer);
  font-size: 1.2rem;
  line-height: 1.45;
}

.hero-news-rail-header p {
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.hero-news-rail-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.hero-news-rail-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--brand-navy);
  border: 1px solid var(--brand-navy);
  border-radius: var(--radius-full);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.hero-news-rail-btn:hover:not(:disabled) {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.hero-news-rail-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.hero-news-rail-btn:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.28);
  outline-offset: 3px;
}

.hero-news-rail-btn:disabled {
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-color: var(--border-line);
  cursor: not-allowed;
  opacity: 0.58;
}

.hero-news-rail-track {
  display: flex;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  padding: 0.2rem 0.1rem 0.8rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.1rem;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--brand-navy) var(--bg-subtle);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.hero-news-rail-track:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.22);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.hero-news-rail-track::-webkit-scrollbar {
  height: 7px;
}

.hero-news-rail-track::-webkit-scrollbar-track {
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
}

.hero-news-rail-track::-webkit-scrollbar-thumb {
  background: var(--brand-navy);
  border-radius: var(--radius-full);
}

.hero-news-card {
  flex: 0 0 min(270px, 76vw);
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hero-news-card:hover {
  border-color: var(--brand-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-press);
}

.hero-news-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-subtle);
}

.hero-news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-news-card:hover .hero-news-card-media img {
  transform: scale(1.025);
}

.hero-news-card-body {
  padding: 0.85rem;
}

.hero-news-card-body .category-badge-press {
  margin-bottom: 0.55rem;
}

.hero-news-card-body h3 {
  min-height: 4.65em;
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
}

.hero-news-card-body h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hero-news-card-body h3 a:hover {
  color: var(--brand-red);
}

.hero-news-card-body h3 a:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.28);
  outline-offset: 3px;
  border-radius: 2px;
}

.hero-news-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  font-size: 0.7rem;
  line-height: 1.5;
}

.hero-news-card-meta time {
  text-align: right;
}

.hero-news-rail-loading {
  width: 100%;
  padding: 1.5rem;
  color: var(--text-muted);
  text-align: center;
}

body[data-theme="dark"] .hero-news-rail,
body[data-theme="dark"] .hero-news-card {
  background: var(--bg-surface);
  border-color: var(--border-line);
}

@media (max-width: 992px) {
  /* Restore the category bar as a touch-friendly horizontal navigation rail. */
  .official-nav,
  nav.official-nav {
    display: block !important;
  }

  .official-nav > .container {
    display: block !important;
    max-width: none;
    padding-inline: 0;
  }

  .nav-container-list {
    display: flex !important;
    padding-inline: max(0.25rem, env(safe-area-inset-left));
  }

  .nav-link-item a {
    min-height: 48px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-news-rail {
    margin-inline: -0.1rem;
    padding: 0.85rem;
  }

  .hero-news-rail-header {
    align-items: center;
    flex-wrap: wrap;
  }

  .hero-news-rail-header p {
    max-width: 25ch;
  }

  .hero-news-rail-controls {
    margin-left: auto;
  }

  .hero-news-card {
    flex-basis: min(280px, 82vw);
  }

  .hero-news-card-meta {
    flex-direction: column;
  }

  .hero-news-card-meta time {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track,
  .hero-news-rail-track {
    scroll-behavior: auto !important;
  }

  .hero-news-card,
  .hero-news-card-media img,
  .hero-news-rail-btn {
    transition-duration: 0.01ms !important;
  }

  .hero-news-card:hover,
  .hero-news-card:hover .hero-news-card-media img {
    transform: none;
  }
}
