/* ═══════════════════════════════════════════════════════════
   giao-thong.css  –  Tra cứu xử phạt vi phạm giao thông
   Nghị định 168/2024/NĐ-CP
   Màu chủ đạo: vàng giao thông #f59e0b / #fbbf24 + đen biển báo
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&display=swap');

:root {
  --gt-yellow:   #f59e0b;
  --gt-yellow2:  #d97706;
  --gt-yellow3:  #fbbf24;
  --gt-amber:    #fcd34d;
  --gt-dark:     #1a1a1a;
  --gt-dark2:    #2d2d2d;
  --gt-red:      #dc2626;
  --gt-green:    #16a34a;
  --gt-blue:     #0284c7;
  --gt-bg:       #fffdf7;
  --gt-white:    #ffffff;
  --gt-text:     #1f1f1f;
  --gt-muted:    #6b7280;
  --gt-border:   rgba(245,158,11,.2);

  /* Màu nhóm lỗi */
  --grp-con:    #dc2626;  /* nồng độ cồn - đỏ */
  --grp-matuy:  #7c3aed;  /* ma túy - tím */
  --grp-toc:    #ea580c;  /* tốc độ - cam */
  --grp-den:    #16a34a;  /* đèn tín hiệu - xanh lá */
  --grp-giayto: #0284c7;  /* giấy tờ - xanh dương */
  --grp-other:  #d97706;  /* khác - vàng */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  background: var(--gt-bg);
  color: var(--gt-text);
  font-size: 15px;
  line-height: 1.65;
}

/* Nền trang trí dạng vạch kẻ đường mờ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(245,158,11,.05) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 0% 100%, rgba(217,119,6,.04) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
#site-header, .gt-page, #site-footer { position: relative; z-index: 1; }

.gt-page { width: 92%; max-width: 1200px; margin: 0 auto; padding: 1.75rem 0 4rem; }

/* ── Breadcrumb ── */
.gt-bc { font-size: .78rem; color: var(--gt-muted); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.gt-bc a { color: var(--gt-yellow2); text-decoration: none; font-weight: 600; }
.gt-bc a:hover { text-decoration: underline; }
.gt-bc-sep { color: #ccc; }

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.gt-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 20px;
  padding: 2.75rem 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
/* Vạch vàng-đen cảnh báo ở mép trên */
.gt-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(45deg, var(--gt-yellow) 0 20px, var(--gt-dark) 20px 40px);
}
.gt-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -30px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.15) 0%, transparent 70%);
}
.gt-hero-content { position: relative; z-index: 1; }
.gt-hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(245,158,11,.15);
  border: 1px solid rgba(245,158,11,.4);
  color: var(--gt-yellow3);
  font-size: .72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 16px; border-radius: 20px; margin-bottom: 1rem;
}
.gt-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: .75rem;
}
.gt-hero h1 span { color: var(--gt-yellow3); }
.gt-hero p {
  font-size: .92rem; color: rgba(255,255,255,.75);
  line-height: 1.8; max-width: 640px;
}
.gt-hero-meta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 1rem; padding: 6px 14px;
  background: rgba(255,255,255,.08); border-radius: 8px;
  font-size: .8rem; color: rgba(255,255,255,.85); font-weight: 500;
}
.gt-hero-meta i { color: var(--gt-yellow3); }

/* ═══════════════════════════════════════════════════════════
   GRID CARD (index)
═══════════════════════════════════════════════════════════ */
.gt-section-title {
  font-size: 1.15rem; font-weight: 700; color: var(--gt-text);
  margin-bottom: 1.25rem; display: flex; align-items: center; gap: .6rem;
}
.gt-section-title::after {
  content: ''; flex: 1; height: 3px;
  background: linear-gradient(90deg, var(--gt-yellow), transparent);
  border-radius: 2px;
}
.gt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.1rem; margin-bottom: 2.5rem;
}
.gt-idx-card {
  background: var(--gt-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  text-decoration: none; color: var(--gt-text);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,.05);
  border-top: 3px solid var(--gt-yellow);
}
.gt-idx-card:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(245,158,11,.18); }
.gt-idx-card-top {
  height: 70px; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.gt-idx-card-body { padding: .9rem 1.1rem 1.1rem; }
.gt-idx-card-title { font-size: .98rem; font-weight: 700; color: var(--gt-text); margin-bottom: .3rem; text-align: center; }
.gt-idx-card-desc { font-size: .79rem; color: var(--gt-muted); line-height: 1.55; text-align: center; }
.gt-idx-card-cta { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: .65rem; font-size: .75rem; font-weight: 700; color: var(--gt-yellow2); }

/* ═══════════════════════════════════════════════════════════
   TOOL PAGE HERO (trang lỗi)
═══════════════════════════════════════════════════════════ */
.gt-tool-hero {
  border-radius: 16px; padding: 2rem; margin-bottom: 1.75rem;
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--gt-dark) 0%, var(--gt-dark2) 100%);
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
}
.gt-tool-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(45deg, var(--gt-yellow) 0 16px, var(--gt-dark) 16px 32px);
}
.gt-tool-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.25rem; }
.gt-tool-hero-emoji {
  font-size: 2.75rem; flex-shrink: 0;
  width: 72px; height: 72px; border-radius: 16px;
  background: rgba(245,158,11,.15); border: 2px solid rgba(245,158,11,.35);
  display: flex; align-items: center; justify-content: center;
}
.gt-tool-hero h1 { font-size: clamp(1.2rem, 2.5vw, 1.65rem); font-weight: 800; color: #fff; margin: 0 0 .3rem; line-height: 1.25; }
.gt-tool-hero p { font-size: .85rem; color: rgba(255,255,255,.8); margin: 0; line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   BỘ LỌC
═══════════════════════════════════════════════════════════ */
.gt-filter {
  background: var(--gt-white);
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
  border: 1px solid var(--gt-border);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.gt-filter-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
.gt-filter-group { flex: 1; min-width: 180px; }
.gt-filter-label { display: block; font-size: .72rem; font-weight: 700; color: var(--gt-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .4rem; }
.gt-select {
  width: 100%; border: 1.5px solid #e8e0d0; border-radius: 10px;
  padding: 11px 38px 11px 14px; font-family: inherit; font-size: .92rem; font-weight: 600;
  color: var(--gt-text); background: #fff; cursor: pointer; outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%23d97706' stroke-width='2' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.gt-select:focus { border-color: var(--gt-yellow); box-shadow: 0 0 0 3px rgba(245,158,11,.12); }

.gt-search-wrap {
  display: flex; align-items: center; border: 1.5px solid #e8e0d0;
  border-radius: 10px; background: #fff; padding: 0 14px;
  transition: border-color .2s, box-shadow .2s;
}
.gt-search-wrap:focus-within { border-color: var(--gt-yellow); box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.gt-search-wrap i { color: #c0a878; font-size: .95rem; margin-right: 10px; flex-shrink: 0; }
.gt-search-wrap input { flex: 1; border: none; outline: none; font-size: .95rem; background: transparent; color: #333; padding: 11px 0; font-family: inherit; }

/* Toggle KD vận tải */
.gt-kd-toggle { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.gt-kd-opt {
  padding: 7px 16px; border-radius: 20px; border: 1.5px solid #e8e0d0;
  background: #fff; color: var(--gt-muted); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: .2s;
}
.gt-kd-opt:hover { border-color: var(--gt-yellow3); }
.gt-kd-opt.active { background: var(--gt-yellow); border-color: var(--gt-yellow); color: #fff; }

/* Đếm kết quả */
.gt-result-count { font-size: .85rem; color: var(--gt-muted); margin-bottom: 1rem; font-weight: 500; }
.gt-result-count strong { color: var(--gt-yellow2); }

/* ═══════════════════════════════════════════════════════════
   THẺ LỖI VI PHẠM
═══════════════════════════════════════════════════════════ */
.gt-list { display: flex; flex-direction: column; gap: 1rem; }
.gt-card {
  background: var(--gt-white);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.05);
  border-left: 4px solid var(--gt-yellow);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.gt-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.gt-card-head {
  padding: 1rem 1.25rem .85rem;
  display: flex; align-items: flex-start; gap: .75rem;
  border-bottom: 1px solid #f5f0e5;
}
.gt-card-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.4; }
.gt-card-hanhvi { flex: 1; font-size: .95rem; font-weight: 600; color: var(--gt-text); line-height: 1.5; }
.gt-card-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.gt-tag {
  font-size: .68rem; font-weight: 700; padding: 2px 9px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .3px;
}
.gt-tag-xe { background: #fef3c7; color: var(--gt-yellow2); }
.gt-tag-nhom { background: #f1f5f9; color: #475569; }
.gt-tag-kd { background: #ecfccb; color: #4d7c0f; border: 1px solid #bef264; }

/* Thân thẻ: mức phạt */
.gt-card-body { padding: 1rem 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .85rem; }
.gt-stat { text-align: center; padding: .6rem; background: #fafafa; border-radius: 10px; }
.gt-stat-lbl { font-size: .65rem; font-weight: 700; color: var(--gt-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: .3rem; }
.gt-stat-val { font-size: .98rem; font-weight: 800; line-height: 1.2; }
.gt-stat-val.money { color: var(--gt-red); }
.gt-stat-val.point { color: var(--gt-yellow2); }
.gt-stat-val.extra { color: var(--gt-blue); font-size: .82rem; font-weight: 700; }
.gt-stat-val.none { color: #cbd5e1; font-weight: 600; }

/* Chân thẻ: căn cứ */
.gt-card-foot {
  padding: .7rem 1.25rem; background: #fffdf7;
  border-top: 1px dashed #f0e6d0;
  font-size: .76rem; color: var(--gt-muted);
  display: flex; align-items: center; gap: 6px;
}
.gt-card-foot i { color: var(--gt-yellow2); }
.gt-card-foot strong { color: var(--gt-text); font-weight: 700; }

/* Empty state */
.gt-empty { text-align: center; padding: 3rem 1rem; color: var(--gt-muted); }
.gt-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR / INFO (nếu dùng layout 2 cột)
═══════════════════════════════════════════════════════════ */
.gt-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
.gt-info-card {
  background: var(--gt-white); border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,.06); padding: 1.25rem;
  margin-bottom: 1.1rem; border: 1px solid rgba(0,0,0,.05);
}
.gt-info-card h3 { font-size: .88rem; font-weight: 700; color: var(--gt-yellow2); border-left: 3px solid var(--gt-yellow); padding-left: .55rem; margin: 0 0 .8rem; }
.gt-info-card p, .gt-info-card li { font-size: .82rem; color: #475569; line-height: 1.75; }
.gt-info-card ul { padding-left: 1.1rem; margin-top: .3rem; }

/* Cảnh báo / lưu ý */
.gt-note {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  font-size: .84rem; color: #78510f; line-height: 1.7;
}
.gt-note strong { color: #92400e; }
.gt-note::before { content: '⚠️ '; }

/* ── Xem thêm ── */
.gt-xemthem { background: var(--gt-white); border-radius: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.06); padding: 1.25rem 1.5rem; margin-top: 1.5rem; border: 1px solid rgba(0,0,0,.05); }
.gt-xemthem-title { font-size: .88rem; font-weight: 700; color: var(--gt-text); margin-bottom: .8rem; display: flex; align-items: center; gap: .4rem; }
.gt-xemthem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .55rem; }
.gt-xemthem-item { text-decoration: none; background: #fffdf7; border: 1.5px solid var(--gt-border); border-radius: 10px; padding: .6rem .75rem; text-align: center; transition: .2s; }
.gt-xemthem-item:hover { background: #fef3c7; border-color: var(--gt-yellow); transform: translateY(-2px); }
.gt-xemthem-emoji { font-size: 1.3rem; display: block; margin-bottom: .2rem; }
.gt-xemthem-name { font-size: .73rem; font-weight: 700; color: var(--gt-text); }

/* ── SEO ── */
.gt-seo { background: var(--gt-white); border-radius: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.06); padding: 1.5rem; margin-top: 1.5rem; border-top: 3px solid var(--gt-yellow); }
.gt-seo h2 { font-size: .95rem; color: var(--gt-yellow2); border-left: 4px solid var(--gt-yellow); padding-left: .6rem; margin: 0 0 .8rem; }
.gt-seo p { font-size: .84rem; color: #475569; line-height: 1.8; margin-bottom: .5rem; }
.gt-seo p:last-child { margin: 0; }

/* Disclaimer */
.gt-disclaimer { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: .85rem 1rem; margin-top: 1rem; font-size: .78rem; color: #64748b; line-height: 1.6; }

/* ── Responsive ── */
@media (max-width: 900px) { .gt-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .gt-grid { grid-template-columns: repeat(2, 1fr); }
  .gt-hero { padding: 2rem 1.5rem; }
  .gt-tool-hero { padding: 1.5rem; }
  .gt-tool-hero-inner { flex-direction: column; text-align: center; gap: .85rem; }
  .gt-filter-row { flex-direction: column; }
  .gt-filter-group { width: 100%; }
  .gt-card-body { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .gt-grid { grid-template-columns: 1fr; }
  .gt-page { width: 96%; }
  .gt-card-body { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .gt-card, .gt-idx-card { transition: none; } }
