/* ==========================================================================
   KHÔNG TRẺ EM NỮA - STYLESHEET CHÍNH (NO-JS STATIC WEBSITE)
   Phông chữ: Be Vietnam Pro, tự lưu trữ, hỗ trợ đầy đủ tiếng Việt
   Không phụ thuộc JavaScript - 100% Native HTML & CSS
   ========================================================================== */

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-SemiBoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

:root {
  --font-family: "Be Vietnam Pro", "Noto Sans", "DejaVu Sans", sans-serif;
  --color-primary: #013d59;
  --color-primary-dark: #00273a;
  --color-primary-light: #e6f1f7;
  --color-accent: #fed135;
  --color-accent-hover: #e5b920;
  --color-text: #111827;
  --color-text-secondary: #374151;
  --color-text-muted: #6b7280;
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-border: #d1d5db;
  --color-border-subtle: #e5e7eb;
  --color-danger: #991b1b;
  --color-danger-bg: #fef2f2;
  --color-warning: #92400e;
  --color-warning-bg: #fffbeb;
  --color-success: #065f46;
  --color-success-bg: #ecfdf5;
  --max-width: 1200px;
  --max-prose: 78ch;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s;
  text-decoration: none;
  font-weight: bold;
}
.skip-link:focus {
  top: 0;
}

/* Header & Navigation (Pure CSS, NoJS) */
.site-header {
  background-color: var(--color-primary);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-md);
  border-bottom: 3px solid var(--color-accent);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile Nav Toggle (Pure CSS Checkbox Hack) */
.nav-toggle-input {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 24px;
  height: 3px;
  background: #ffffff;
  position: relative;
  transition: all 0.2s;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
}
.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after { bottom: -7px; }

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.15rem;
  flex-wrap: nowrap;
}

.main-nav a {
  display: block;
  padding: 0.45rem 0.5rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-accent);
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  padding: 3.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-emblem {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(254, 209, 53, 0.3);
  border: 3px solid rgba(254, 209, 53, 0.4);
}

.hero h1 {
  font-size: 2.2rem;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.hero p.lead {
  font-size: 1.15rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.75rem;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: bold;
}
.badge-gold {
  background-color: var(--color-accent);
  color: #000000;
  border-color: var(--color-accent);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #000000;
}
.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.btn-outline-dark {
  background-color: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline-dark:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* Page Layout */
.page-container {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Sticky Sidebar TOC */
.sidebar {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: sticky;
  top: 5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.4rem;
}

.sidebar-nav a {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.sidebar-nav a:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.sidebar-nav a.active {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: bold;
}

/* Main Prose Content */
.main-content {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow-sm);
  max-width: var(--max-prose);
}

.content-header {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.content-part-tag {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.35rem;
}

.content-header h1 {
  font-size: 1.85rem;
  line-height: 1.3;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.content-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Headings within content */
.main-content h2 {
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 0.4rem;
}

.main-content h3 {
  font-size: 1.15rem;
  color: var(--color-text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.main-content p {
  margin-bottom: 1.1rem;
  line-height: 1.7;
  color: var(--color-text);
  font-size: 1.05rem;
}

.main-content ul, .main-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  line-height: 1.65;
}

.main-content li {
  margin-bottom: 0.4rem;
}

/* Callout and Alerts */
.callout {
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  background-color: var(--color-primary-light);
}

.callout-title {
  font-weight: bold;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
  display: block;
  font-size: 1rem;
}

.callout-warning {
  border-left-color: var(--color-warning);
  background-color: var(--color-warning-bg);
}
.callout-warning .callout-title {
  color: var(--color-warning);
}

.callout-danger {
  border-left-color: var(--color-danger);
  background-color: var(--color-danger-bg);
}
.callout-danger .callout-title {
  color: var(--color-danger);
}

.quote-box {
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background-color: #f3f4f6;
  border-left: 4px solid #4b5563;
  font-style: italic;
  color: #1f2937;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Feature Grid for Homepage */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.feature-card h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.card-link {
  font-weight: bold;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.card-link:hover {
  text-decoration: underline;
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
  background: #ffffff;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

th {
  background-color: #f1f5f9;
  color: var(--color-primary);
  font-weight: bold;
  border-bottom: 2px solid var(--color-border);
}

tr:nth-child(even) td {
  background-color: #f8fafc;
}

tr.total-row td {
  font-weight: bold;
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-top: 2px solid var(--color-primary);
}

/* Cases Grid & Items */
.case-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.case-id {
  font-size: 0.8rem;
  font-weight: bold;
  background: #fee2e2;
  color: #991b1b;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.case-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #991b1b;
  margin-bottom: 0.5rem;
}

.case-meta {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.case-meta strong {
  color: var(--color-text);
}

.case-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--color-primary);
  text-decoration: underline;
  word-break: break-all;
}

/* Source Lists */
.source-category {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.source-item {
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.source-item .source-title {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.source-item .source-url {
  font-size: 0.85rem;
  color: var(--color-primary);
  text-decoration: underline;
  word-break: break-all;
}

.citation {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.citation:hover,
.citation:focus-visible {
  color: var(--color-primary-dark);
  text-decoration-thickness: 0.14em;
}

.source-item:target {
  border-color: var(--color-primary);
  outline: 3px solid rgba(25, 89, 86, 0.18);
  scroll-margin-top: 6rem;
}

/* 20-Question Interactive Checklist (NoJS) */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.checklist-item input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.checklist-label {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  border-top: 4px solid var(--color-accent);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--color-accent);
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.footer-nav h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.4rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .sidebar {
    position: static;
  }
  .main-content {
    padding: 1.5rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle-label {
    display: block;
  }
  .main-nav {
    display: none;
    width: 100%;
    margin-top: 0.75rem;
  }
  .header-container {
    flex-wrap: wrap;
  }
  .nav-toggle-input:checked ~ .main-nav {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0.2rem;
  }
  .main-nav a {
    padding: 0.6rem 0.8rem;
    background-color: rgba(0, 0, 0, 0.15);
  }
  .hero h1 {
    font-size: 1.7rem;
  }
  .hero p.lead {
    font-size: 1rem;
  }
}

/* Print Stylesheet */
@media print {
  .site-header, .site-footer, .sidebar, .hero-actions, .btn {
    display: none !important;
  }
  .main-content {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
}
