/* Website buudienvandon.com — trang tư vấn dịch vụ bưu điện tại Vân Đồn. Không dùng logo, màu nhận diện VNPost. */
:root {
  --brand: #0f5e6e; --brand-d: #0a4350; --brand-l: #e4f1f3;
  --accent: #e8772e; --accent-d: #c95f1b;
  --ink: #15262c; --ink-2: #5b6d73; --line: #d8e3e6; --bg: #f7faf9; --card: #fff;
  --radius: 14px; --shadow: 0 6px 24px rgba(15, 50, 60, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink);
  background: var(--bg); line-height: 1.6; font-size: 16px; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; color: var(--accent-d); margin: 0 0 6px; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 680px; }
section { padding: 56px 0; }

/* Đầu trang */
header.site { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
header.site .wrap { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 38px; height: 38px; flex: 0 0 38px; }
.brand strong { display: block; font-size: 17px; line-height: 1.1; }
.brand small { display: block; font-size: 12px; color: var(--ink-2); }
nav.menu { margin-left: auto; display: flex; gap: 4px; }
nav.menu a { text-decoration: none; color: var(--ink); font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
nav.menu a:hover, nav.menu a[aria-current] { background: var(--brand-l); color: var(--brand-d); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; }
.btn svg { width: 18px; height: 18px; }
.btn-main { background: var(--accent); color: #fff; }
.btn-main:hover { background: var(--accent-d); }
.btn-line { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-line:hover { background: var(--brand-l); }
.head-call { margin-left: 8px; padding: 9px 16px; }
#burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
#burger svg { width: 26px; height: 26px; }

/* Phần mở đầu */
.hero { background: linear-gradient(135deg, var(--brand-d), var(--brand) 60%, #16808f); color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 119, 46, .35), transparent 70%); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); }
.hero h1 em { font-style: normal; color: #ffc48f; }
.hero p { color: #d7ecef; font-size: 18px; }
.hero .btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .btn-line:hover { background: rgba(255, 255, 255, .12); }
.hero-card { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius); padding: 22px; }
.hero-card h3 { font-size: 16px; margin-bottom: 12px; }
.hero-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-card li { display: flex; gap: 10px; align-items: flex-start; color: #eaf6f7; font-size: 15px; }
.hero-card li svg { width: 20px; height: 20px; flex: 0 0 20px; color: #ffc48f; margin-top: 2px; }

/* Thẻ dịch vụ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; }
.card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-l); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.card .ic svg { width: 24px; height: 24px; }
.card h3 { font-size: 18px; }
.card p { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; flex: 1; }
.card a.more { font-weight: 600; text-decoration: none; font-size: 15px; }
.card a.more:hover { text-decoration: underline; }
.card.hl { border-color: var(--accent); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-d); background: #fdeee3; padding: 2px 8px; border-radius: 99px; margin-bottom: 8px; }

/* Các bước */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: b; margin-top: 28px; }
.step { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); counter-increment: b; }
.step::before { content: counter(b); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 10px; }
.step h3 { font-size: 16px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.alt { background: #fff; }

/* Liên hệ */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.box h3 { font-size: 18px; }
.line-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.line-item:first-of-type { border-top: 0; }
.line-item .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-l); color: var(--brand); display: grid; place-items: center; flex: 0 0 42px; }
.line-item .ic svg { width: 20px; height: 20px; }
.line-item small { display: block; color: var(--ink-2); font-size: 13px; }
.line-item strong { font-size: 18px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 10px 0; border-top: 1px solid var(--line); }
.hours tr:first-child td { border-top: 0; }
.hours td:last-child { text-align: right; font-weight: 600; }
.hours .off td:last-child { color: var(--accent-d); }

/* Bảng cước */
.page-head { background: var(--brand-d); color: #fff; padding: 40px 0; }
.page-head p { color: #cfe6ea; margin: 0; }
.note { background: #fff8ec; border: 1px solid #f3d7a8; border-radius: 12px; padding: 14px 18px; font-size: 15px; }
.note strong { color: var(--accent-d); }
.tra-cuu { background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.tra-cuu .fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tra-cuu label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.tra-cuu select { width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.tra-cuu select:focus { outline: none; border-color: var(--brand); }
.ket-qua { margin-top: 18px; padding: 16px 18px; background: var(--brand-l); border-radius: 12px; }
.ket-qua strong { font-size: 26px; color: var(--brand-d); }
.ket-qua p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 14px 0; }
table.cuoc { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.cuoc th, table.cuoc td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
table.cuoc th:first-child, table.cuoc td:first-child { text-align: left; }
table.cuoc thead th { background: var(--brand); color: #fff; font-weight: 600; font-size: 14px; }
table.cuoc thead tr + tr th { background: #187483; }
table.cuoc tbody tr:nth-child(even) { background: #f5f9f9; }
table.cuoc.small { min-width: 0; }
.bang h2 { margin-top: 8px; }
.bang .src { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; }
.bang ul { padding-left: 20px; }
.bang li { margin: 4px 0; }
.bang + .bang { margin-top: 48px; }

/* Chân trang */
footer.site { background: #0c2f37; color: #bcd3d7; padding: 36px 0 90px; font-size: 14.5px; }
footer.site .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
footer.site strong { color: #fff; }
footer.site a { color: #fff; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site ul { list-style: none; padding: 0; margin: 8px 0 0; }
footer.site li { margin: 4px 0; }
.disclaimer { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; font-size: 13px; color: #8fb0b6; }

/* Nút liên hệ nổi và khung chat */
.contact-dock { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.dock-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.dock-btn { position: relative; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  display: grid; place-items: center; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); transition: transform .15s; }
.dock-btn:hover { transform: scale(1.06); }
.dock-btn svg { width: 24px; height: 24px; }
.dock-btn em { position: absolute; right: 64px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-style: normal;
  background: var(--ink); color: #fff; font-size: 13px; padding: 5px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.dock-btn:hover em, .dock-btn:focus-visible em { opacity: 1; }
.dock-zalo { background: #0068ff; }
.zalo-mark { font-weight: 700; font-size: 14px; letter-spacing: -.02em; }
.dock-call { background: var(--accent); }
.dock-call::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: dock-ring 2s infinite; }
@keyframes dock-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.dock-chat { width: 60px; height: 60px; background: var(--brand); }
.dock-chat svg { width: 28px; height: 28px; }
.contact-dock.open .dock-chat em, .contact-dock.open .dock-zalo, .contact-dock.open .dock-call { display: none; }
@media (prefers-reduced-motion: reduce) { .dock-call::before { animation: none; } html { scroll-behavior: auto; } }
.chat-box { width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 110px); background: #fff;
  border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); display: flex; flex-direction: column; overflow: hidden; }
.chat-box[hidden] { display: none; }
.chat-box header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--brand); color: #fff; }
.chat-box header strong { display: block; font-size: 15px; }
.chat-box header small { opacity: .85; font-size: 12px; }
.chat-ava { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: 0 0 36px; }
.chat-ava svg { width: 26px; height: 26px; }
.chat-close { margin-left: auto; background: transparent; border: 0; color: #fff; cursor: pointer; padding: 6px; display: grid; }
.chat-close svg { width: 20px; height: 20px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f3f8f8; }
.chat-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.typing { display: flex; gap: 4px; padding: 13px 14px; }
.chat-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); opacity: .4; animation: chat-dot 1s infinite; }
.chat-msg.typing i:nth-child(2) { animation-delay: .15s; }
.chat-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 50% { opacity: 1; transform: translateY(-3px); } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; background: #f3f8f8; }
.chat-suggest:not(:empty) { padding-bottom: 12px; }
.chat-suggest button { font: inherit; font-size: 13px; border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 99px; padding: 5px 11px; cursor: pointer; }
.chat-suggest button:hover { background: var(--brand); color: #fff; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; font: inherit; font-size: 14px; border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; max-height: 110px; }
.chat-form textarea:focus { outline: none; border-color: var(--brand); }
.chat-form button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; flex: 0 0 40px; }
.chat-form button svg { width: 18px; height: 18px; }
.chat-note { font-size: 11.5px; color: var(--ink-2); text-align: center; padding: 0 12px 10px; margin: 0; }
.chat-note a { color: var(--brand); font-weight: 600; }

@media (max-width: 900px) {
  .hero .wrap, .contact { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  footer.site .wrap { grid-template-columns: 1fr; }
  .tra-cuu .fields { grid-template-columns: 1fr; }
  #burger { display: block; }
  .head-call { display: none; }
  nav.menu { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
  nav.menu.open { display: flex; }
}
@media (max-width: 560px) {
  section { padding: 40px 0; }
  .steps { grid-template-columns: 1fr; }
  .contact-dock { right: 14px; bottom: 14px; }
  .dock-btn { width: 50px; height: 50px; }
  .dock-chat { width: 56px; height: 56px; }
  .dock-btn em { display: none; }
  .chat-box { position: fixed; inset: 0; width: auto; max-width: none; height: auto; max-height: none; border-radius: 0; }
  .contact-dock.open .dock-btns { display: none; }
}
