/* ==========================================================================
   KN BASE — Thuê Xe Kim Ngọc
   Tokens + reset + layout + header/footer + buttons + floating CTA.
   Nguồn chuẩn: .claude/references/design.md
   ========================================================================== */

:root {
  /* Nhận diện */
  --kn-primary: #46BE27;
  --kn-primary-dark: #2A7A17;
  --kn-accent: #15803D;
  /* Nền */
  --kn-bg: #FFFFFF;
  --kn-bg-soft: #EEF9EA;
  --kn-bg-mist: #F8FCF7;
  --kn-bg-deep: #D8E9D4;
  /* Chữ */
  --kn-text: #212121;
  --kn-muted: #5B6B58;
  --kn-border: #D8E9D4;
  /* Chức năng */
  --kn-star: #FFB400;
  --kn-danger: #D93025;
  --kn-zalo: #0068FF;
  --kn-footer-bg: #1B3A14;
  /* Dựng hình */
  --kn-radius: 14px;
  --kn-radius-sm: 8px;
  --kn-shadow: 0 6px 24px rgba(35, 80, 20, .10);
  --kn-shadow-lg: 0 14px 40px rgba(35, 80, 20, .16);
  --kn-space: 8px;
  --kn-font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --kn-header-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--kn-font);
  font-size: 16px;
  color: var(--kn-text);
  line-height: 1.7;
  background: var(--kn-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--kn-accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--kn-primary-dark); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--kn-text); }
h1 { font-size: 40px; font-weight: 700; margin: 8px 0 12px; }
h2 { font-size: 30px; font-weight: 700; margin: 6px 0 10px; }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }

::selection { background: var(--kn-primary); color: #fff; }

:focus-visible { outline: 3px solid var(--kn-primary-dark); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.kn-container { max-width: 1200px; margin-inline: auto; padding-inline: 20px; width: 100%; }
.kn-section { padding-block: 64px; }
.kn-bg-soft { background: var(--kn-bg-soft); }
.kn-bg-mist { background: var(--kn-bg-mist); }
.kn-center { text-align: center; }
.kn-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.kn-skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--kn-primary-dark); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.kn-skip:focus { left: 0; color: #fff; }

/* Dùng chung cho mọi trang có phân cấp: /tin-tuc, /dat-xe, /thue-xe-di-*… */
.kn-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--kn-muted); padding-top: 18px;
}
.kn-breadcrumb a { color: var(--kn-primary-dark); font-weight: 600; }
.kn-breadcrumb span[aria-current] { color: var(--kn-muted); }

.kn-head { margin-bottom: 32px; max-width: 760px; }
.kn-head--center { margin-inline: auto; text-align: center; }
.kn-kicker {
  display: inline-block; color: var(--kn-primary-dark); font-weight: 700;
  font-size: 13px; text-transform: uppercase; letter-spacing: .12em;
}
.kn-sub { color: var(--kn-muted); margin: 0; }

/* ---------- Grid ---------- */
.kn-grid { display: grid; gap: 24px; }
.kn-grid--2 { grid-template-columns: repeat(2, 1fr); }
.kn-grid--3 { grid-template-columns: repeat(3, 1fr); }
.kn-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.kn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding-inline: 20px; border-radius: 10px; font-weight: 600;
  font-size: 15px; line-height: 1; border: 1px solid transparent; cursor: pointer;
  text-align: center; white-space: nowrap; transition: background .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.kn-btn:active { transform: translateY(1px); }
.kn-btn--lg { height: 52px; padding-inline: 26px; font-size: 16px; }
.kn-btn--sm { height: 36px; padding-inline: 14px; font-size: 14px; }
.kn-btn--block { width: 100%; }
.kn-btn--primary { background: var(--kn-primary); color: #fff; box-shadow: 0 6px 16px rgba(70, 190, 39, .28); }
.kn-btn--primary:hover { background: var(--kn-primary-dark); color: #fff; }
.kn-btn--outline { border-color: var(--kn-primary); color: var(--kn-primary-dark); background: #fff; }
.kn-btn--outline:hover { background: var(--kn-bg-soft); }
.kn-btn--soft { background: var(--kn-bg-soft); color: var(--kn-primary-dark); }
.kn-btn--soft:hover { background: var(--kn-bg-deep); }
.kn-btn--zalo { background: var(--kn-zalo); color: #fff; }
.kn-btn--zalo:hover { background: #0056d6; color: #fff; }
.kn-btn--light { background: #fff; color: var(--kn-primary-dark); }
.kn-btn--light:hover { background: var(--kn-bg-mist); color: var(--kn-primary-dark); }
.kn-link { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Header ---------- */
.kn-header { position: relative; z-index: 40; }
.kn-topbar { background: var(--kn-bg-mist); font-size: 13px; color: var(--kn-muted); border-bottom: 1px solid var(--kn-border); }
.kn-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 7px; flex-wrap: wrap; }
.kn-topbar__addr { display: inline-flex; align-items: center; gap: 6px; }
.kn-topbar__contact { display: flex; gap: 16px; align-items: center; }
.kn-topbar__zalo { color: var(--kn-zalo); font-weight: 600; }
.kn-topbar .kn-container,
.kn-mainbar .kn-container { max-width: 1360px; width: 100%; }
.kn-mainbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .98); backdrop-filter: saturate(180%) blur(8px); box-shadow: var(--kn-shadow); }
.kn-mainbar__inner { display: flex; align-items: center; justify-content: space-between; gap: clamp(10px, 1.4vw, 24px); padding-block: 12px; }
.kn-nav { display: flex; gap: clamp(8px, 1.15vw, 18px); font-weight: 600; font-size: 14px; align-items: center; white-space: nowrap; flex: 0 1 auto; }
.kn-nav a { color: var(--kn-text); position: relative; padding: 8px clamp(4px, 0.5vw, 8px); white-space: nowrap !important; word-break: keep-all; font-size: 14px; line-height: 1.4; display: inline-flex; align-items: center; flex-shrink: 0; }
.kn-nav a:hover, .kn-nav a.is-active { color: var(--kn-primary-dark); }
.kn-nav a.is-active::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 2.5px; background: var(--kn-primary); border-radius: 2px; }

.kn-logo { display: inline-flex; flex-direction: column; line-height: 1.1; }
.kn-logo__row { display: inline-flex; align-items: center; gap: 10px; }
.kn-logo__mark { width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; }
.kn-logo__name { font-weight: 800; font-size: 22px; color: var(--kn-primary-dark); letter-spacing: .03em; }
.kn-logo__tag { font-size: 10px; letter-spacing: .18em; color: var(--kn-muted); }
.kn-logo--footer .kn-logo__name { color: #fff; }
.kn-logo--footer .kn-logo__tag { color: #B7D3AC; }

/* Hamburger + drawer (mobile) */
.kn-burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--kn-border); border-radius: 10px;
  background: #fff; cursor: pointer; align-items: center; justify-content: center; gap: 5px; flex-direction: column;
}
.kn-burger span { display: block; width: 20px; height: 2px; background: var(--kn-primary-dark); border-radius: 2px; transition: transform .2s, opacity .2s; }
body.kn-drawer-open .kn-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.kn-drawer-open .kn-burger span:nth-child(2) { opacity: 0; }
body.kn-drawer-open .kn-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.kn-drawer {
  position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); background: #fff; z-index: 60;
  transform: translateX(100%); transition: transform .28s ease; box-shadow: var(--kn-shadow-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
}
body.kn-drawer-open .kn-drawer { transform: translateX(0); }
.kn-drawer a { padding: 12px 8px; border-radius: 10px; color: var(--kn-text); font-weight: 500; }
.kn-drawer a:hover { background: var(--kn-bg-soft); }
.kn-drawer__close { align-self: flex-end; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--kn-muted); }
.kn-scrim { position: fixed; inset: 0; background: rgba(9, 26, 6, .45); z-index: 55; opacity: 0; visibility: hidden; transition: opacity .25s; }
body.kn-drawer-open .kn-scrim { opacity: 1; visibility: visible; }

.kn-notice { background: #FFF7E6; color: #8A5A00; font-size: 13px; padding: 6px 20px; text-align: center; }
.kn-notice code { background: rgba(0, 0, 0, .06); padding: 1px 6px; border-radius: 4px; }

/* ---------- Footer ---------- */
.kn-footer { background-color: #EBF5E8; border-top: 1px solid #D8EAD3; color: #2F3E2E; }
.kn-footer__grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 0.9fr; gap: 40px; padding-block: 48px 36px; }
.kn-footer__col h4 { color: var(--kn-primary-dark); margin: 0 0 16px; font-size: 16px; font-weight: 800; letter-spacing: 0.05em; }
.kn-footer a { color: #2D4A27; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.kn-footer a:hover { color: var(--kn-primary-dark); text-decoration: underline; }
.kn-footer p { margin: 0 0 8px; color: #4A5B49; }
.kn-footer__contact a { display: inline-flex; align-items: center; gap: 8px; }
.kn-footer__cta { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.kn-footer__bottom { border-top: 1px solid #D2E4CD; padding-block: 18px; font-size: 13px; color: #5A6D58; }
.kn-footer__bottom .kn-container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Floating CTA Widget 100% Hải Âu Travel (TikTok, WhatsApp, Zalo, Phone, Facebook + Back to Top) ---------- */
@-webkit-keyframes phone-vr-circle-fill {
  0% { -webkit-transform: rotate(0) scale(1) skew(1deg); }
  10% { -webkit-transform: rotate(-25deg) scale(1) skew(1deg); }
  20% { -webkit-transform: rotate(25deg) scale(1) skew(1deg); }
  30% { -webkit-transform: rotate(-25deg) scale(1) skew(1deg); }
  40% { -webkit-transform: rotate(25deg) scale(1) skew(1deg); }
  50% { -webkit-transform: rotate(0) scale(1) skew(1deg); }
  100% { -webkit-transform: rotate(0) scale(1) skew(1deg); }
}
@keyframes phone-vr-circle-fill {
  0% { transform: rotate(0) scale(1) skew(1deg); }
  10% { transform: rotate(-25deg) scale(1) skew(1deg); }
  20% { transform: rotate(25deg) scale(1) skew(1deg); }
  30% { transform: rotate(-25deg) scale(1) skew(1deg); }
  40% { transform: rotate(25deg) scale(1) skew(1deg); }
  50% { transform: rotate(0) scale(1) skew(1deg); }
  100% { transform: rotate(0) scale(1) skew(1deg); }
}

@keyframes kenit-zoomIn {
  from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
  50% { opacity: 1; }
}

@keyframes kenit-pulse {
  from { transform: scale3d(1, 1, 1); }
  50% { transform: scale3d(1.08, 1.08, 1.08); }
  to { transform: scale3d(1, 1, 1); }
}

.animation-ring {
  -webkit-animation: phone-vr-circle-fill 1.1s infinite ease-in-out;
  animation: phone-vr-circle-fill 1.1s infinite ease-in-out;
}

/* ==========================================================================
   Hải Âu Travel Floating CTA Widget & Back To Top
   ========================================================================== */
.kn-floating-cta-dock {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.kn-floating-cta-dock .btn-frame {
  position: relative !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  left: auto !important;
  pointer-events: auto !important;
}

/* Tooltip nhãn hover trượt từ bên trái */
.btn-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 20;
}

.btn-tooltip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid rgba(17, 24, 39, 0.92);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.btn-frame:hover .btn-tooltip,
.progress-wrap:hover .btn-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.btn-frame {
  display: block;
  width: 50px;
  height: 50px;
  position: fixed;
  right: 20px;
  z-index: 1000;
  cursor: pointer;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.btn-frame:hover {
  transform: scale(1.1);
}

.btn-frame i {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e60808;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.btn-frame i img {
  vertical-align: middle;
  width: 56%;
  height: 56%;
  object-fit: contain;
}

.btn-frame .kenit-alo-circle {
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  top: -6px;
  right: -6px;
  position: absolute;
  background-color: transparent;
  border-radius: 100%;
  border: 2px solid #e60808;
  opacity: 0.5;
  animation: kenit-zoomIn 1s infinite both;
  pointer-events: none;
}

.btn-frame .kenit-alo-circle-fill {
  width: calc(100% + 22px);
  height: calc(100% + 22px);
  top: -11px;
  right: -11px;
  position: absolute;
  border-radius: 100%;
  border: 2px solid transparent;
  background-color: rgba(230, 8, 8, 0.35);
  opacity: 0.4;
  animation: kenit-pulse 1s infinite both;
  pointer-events: none;
}

/* 1. TikTok (Đỉnh) */
.btn-tiktok {
  bottom: 440px;
}
.btn-tiktok i {
  background-color: #000000;
}
.btn-tiktok .kenit-alo-circle {
  border-color: #000000;
}
.btn-tiktok .kenit-alo-circle-fill {
  background-color: rgba(0, 0, 0, 0.3);
}

/* 2. WhatsApp */
.btn-whatsapp {
  bottom: 355px;
}
.btn-whatsapp i {
  background-color: #25d366;
}
.btn-whatsapp .kenit-alo-circle {
  border-color: #25d366;
}
.btn-whatsapp .kenit-alo-circle-fill {
  background-color: rgba(37, 211, 102, 0.35);
}

/* 3. Zalo */
.btn-zalo {
  bottom: 270px;
}
.btn-zalo i {
  background-color: #0088cc;
}
.btn-zalo .kenit-alo-circle {
  border-color: #0088cc;
}
.btn-zalo .kenit-alo-circle-fill {
  background-color: rgba(0, 136, 204, 0.35);
}

/* 4. Phone Hotline */
.btn-phone2 {
  bottom: 185px;
}
.btn-phone2 i {
  background-color: #e60808 !important;
}
.btn-phone2 .kenit-alo-circle {
  border-color: #e60808;
}
.btn-phone2 .kenit-alo-circle-fill {
  background-color: rgba(230, 8, 8, 0.35);
}

/* 5. Facebook */
.btn-face {
  bottom: 100px;
}
.btn-face i {
  background-color: #1877f2;
}
.btn-face .kenit-alo-circle {
  border-color: #1877f2;
}
.btn-face .kenit-alo-circle-fill {
  background-color: rgba(24, 119, 242, 0.35);
}

/* 6. Về đầu trang SVG Progress (Hải Âu Travel) */
.progress-wrap {
  position: fixed;
  bottom: 25px;
  right: 20px;
  height: 50px;
  width: 50px;
  cursor: pointer;
  display: block;
  border-radius: 50px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 300ms linear;
  background-color: #ffffff;
}

.progress-wrap.active-progress {
  opacity: 0.95;
  visibility: visible;
  transform: translateY(0);
}

.progress-wrap:hover {
  opacity: 1;
  transform: scale(1.08);
}

.progress-wrap::after {
  position: absolute;
  content: "";
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 9px;
  height: 9px;
  border-top: 2.5px solid #2A7A17;
  border-right: 2.5px solid #2A7A17;
  z-index: 1;
  transition: all 200ms linear;
}

.progress-wrap:hover::after {
  border-color: #46BE27;
  transform: translate(-50%, -64%) rotate(-45deg);
}

.progress-wrap svg path {
  fill: none;
}

.progress-wrap svg.progress-circle path {
  stroke: #2A7A17;
  stroke-width: 4;
  box-sizing: border-box;
  transition: all 400ms linear;
}

/* Mobile responsive cho CTA */
@media (max-width: 768px) {
  .kn-floating-cta-dock {
    display: none !important;
  }
  .btn-frame,
  .btn-frame i {
    width: 38px;
    height: 38px;
  }
  .btn-frame {
    right: 10px;
  }
  .btn-frame i img {
    width: 55%;
    height: 55%;
  }
  .btn-tooltip {
    display: none !important;
  }
  .btn-face {
    bottom: 120px;
  }
  .btn-phone2 {
    bottom: 172px;
  }
  .btn-zalo {
    bottom: 224px;
  }
  .btn-whatsapp {
    bottom: 276px;
  }
  .btn-tiktok {
    bottom: 328px;
  }
  .progress-wrap {
    right: 10px;
    bottom: 68px;
    width: 38px;
    height: 38px;
  }
}

/* Sticky CTA bar (mobile only) */
.kn-mobilecta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; background: #fff; box-shadow: 0 -6px 20px rgba(35, 80, 20, .14); }
.kn-mobilecta__inner { display: grid; grid-template-columns: 1fr 1fr 1.2fr; }
.kn-mobilecta a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; font-size: 12px; font-weight: 600; color: var(--kn-text); }
.kn-mobilecta a svg { width: 22px; height: 22px; }
.kn-mobilecta a.is-primary { background: var(--kn-primary); color: #fff; }

/* ---------- Animation ---------- */
.kn-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.kn-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .kn-reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) and (min-width: 1025px) {
  .kn-nav { gap: 8px; font-size: 13px; }
  .kn-nav a { padding: 6px 3px; font-size: 13px; }
}
@media (max-width: 1024px) {
  .kn-nav, .kn-mainbar__inner > .kn-btn { display: none !important; }
  .kn-burger { display: inline-flex !important; }
  .kn-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .kn-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .kn-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  .kn-section { padding-block: 44px; }
  .kn-topbar__addr { display: none; }
  .kn-grid--2, .kn-grid--3, .kn-grid--4 { grid-template-columns: 1fr; }
  .kn-footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .kn-mobilecta { display: block; }
}
@media (max-width: 480px) {
  .kn-container { padding-inline: 16px; }
  .kn-hero { padding-block: 48px; }
  .kn-btn--lg { height: 48px; padding-inline: 20px; }
}