/* =========================================================
   Chuỗi nhà thuốc Phúc Khang · template yt-07 (thietkeweb.dev)
   Mobile-first · no framework
   ========================================================= */
:root {
  --bg: #ffffff;
  --surface: #eef3fa;
  --ink: #14223a;
  --muted: #56647a;
  --pri: #0047ab;
  --acc: #ff7a00;
  --acc-ink: #fff;
  --acc-text: #c75f00;
  --line: #e1e8f2;
  --line-strong: #c8d4e5;
  --shadow: 0 22px 44px -30px rgba(0,71,171,.5);
  --font: Barlow, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Barlow Semi Condensed", Barlow, system-ui, sans-serif;
  --head-w: 700;
  --head-ls: 0;
  --header-h: 70px;
  --call: #ff7a00;
  --footer-bg: #002d6e;
  --btn-r: 8px;
  --input-r: 8px;
  --logo: #0047ab;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-variant-numeric: lining-nums; }
h1, h2 { font-family: var(--head); font-weight: var(--head-w, 700); letter-spacing: var(--head-ls, -.01em); text-wrap: balance; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { fill: currentColor; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 999; background: var(--pri); color: #fff; padding: 10px 16px; }
.skip:focus { left: 10px; top: 10px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: var(--btn-r, 10px); border: 1.5px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .2s, box-shadow .25s; white-space: nowrap; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn--pri { background: var(--pri); color: var(--pri-ink, #fff); }
.btn--pri:hover { filter: brightness(1.08); box-shadow: var(--shadow); }
.btn--acc { background: var(--acc); color: var(--acc-ink, #fff); }
.btn--acc:hover { filter: brightness(1.06); box-shadow: var(--shadow); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--line { border-color: currentColor; color: var(--pri); }
.btn--line:hover { background: var(--pri); color: var(--pri-ink, #fff); border-color: var(--pri); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }

.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acc-text, var(--acc)); margin-bottom: 10px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg, rgba(255,255,255,.96)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0,0,0,.35); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--logo, var(--ink)); flex: none; }
.logo__mark { width: 38px; height: 38px; flex: none; color: var(--acc); }
.logo__text { font-family: var(--head); font-size: 21px; font-weight: 700; line-height: 1; display: flex; flex-direction: column; letter-spacing: -.01em; }
.logo__text small { font-family: var(--font); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-top: 5px; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.burger { width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-content: center; gap: 5px; cursor: pointer; border-radius: 8px; color: var(--logo, var(--ink)); }
.burger span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); background: var(--nav-bg, var(--bg)); color: var(--nav-ink, var(--ink)); padding: 12px 20px 40px; opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; border-top: 1px solid var(--line); }
.menu-open .nav { opacity: 1; transform: none; visibility: visible; }
.menu-open { overflow: hidden; }
.nav ul { display: flex; flex-direction: column; }
.nav li a { display: block; padding: 13px 4px; font-size: 17px; font-weight: 500; border-bottom: 1px solid var(--line); }
.nav li a:hover { color: var(--acc-text, var(--acc)); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--surface); }
.sec-head { max-width: 680px; margin: 0 0 32px; }
.sec-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 12px; }
.sec-head p { color: var(--muted); margin: 0; }
.sec-head--light h2 { color: #fff; }
.sec-head--light p { color: rgba(255,255,255,.78); }
.muted { color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label span { color: var(--acc-text, var(--acc)); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--input-r, 8px); border: 1.5px solid var(--line-strong, var(--line)); background: var(--input-bg, #fff); color: var(--input-ink, var(--ink)); transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23777'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 22px; padding-right: 38px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 22%, transparent); }
.field [aria-invalid="true"] { border-color: #d33c3c; }
.err { display: block; color: #d33c3c; font-size: 13px; min-height: 0; margin-top: 4px; }
.err:empty { display: none; }
.form__privacy { font-size: 12.5px; color: var(--muted); margin: 0; }
.form__ok { padding: 14px 16px; border-radius: 10px; background: #e8f6ec; color: #1d5e33; border: 1px solid #b9e2c6; font-size: 14.5px; }

/* ---------- Footer ---------- */
.footer { background: var(--footer-bg, #111); color: var(--footer-ink, rgba(255,255,255,.72)); padding: 56px 0 0; font-size: 14.5px; }
.footer__grid { display: grid; gap: 32px; padding-bottom: 36px; }
.footer .logo { color: #fff; }
.footer .logo__text small { color: rgba(255,255,255,.55); }
.footer__brand p { margin: 16px 0 0; max-width: 360px; }
.footer__title { font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer__links li { margin-bottom: 9px; }
.footer__links a:hover { color: #fff; text-decoration: underline; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; padding-bottom: 72px; font-size: 13px; }
.footer__bottom p { margin: 0; }
.footer__bottom a { text-decoration: underline; }

/* ---------- Floating contact + demo badge ---------- */
.float { position: fixed; right: 16px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.float__btn { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); position: relative; transition: transform .2s; }
.float__btn:hover { transform: scale(1.06); }
.float__btn--zalo { background: #0068ff; }
.float__btn--zalo svg { width: 38px; height: 38px; }
.float__btn--call { background: var(--call, var(--acc)); }
.float__btn--call svg { width: 24px; height: 24px; fill: var(--call-ink, #fff); }
.float__btn--call::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--call, var(--acc)); animation: ring 2s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.demo-badge { position: fixed; left: 10px; bottom: 10px; z-index: 65; max-width: calc(100% - 90px); font: 500 11px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; background: rgba(17,17,17,.82); padding: 6px 11px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.2); opacity: .9; transition: opacity .2s; }
.demo-badge:hover { opacity: 1; text-decoration: underline; }
@media (min-width: 600px) { .demo-badge { font-size: 12px; } }

@media (min-width: 768px) {
  .section { padding: 88px 0; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .float { right: 24px; bottom: 28px; }
  .float__btn { width: 56px; height: 56px; }
}
@media (min-width: 1024px) {
  .burger { display: none; }
  .nav { position: static; height: auto; background: none; color: inherit; padding: 0; opacity: 1; transform: none; visibility: visible; flex-direction: row; align-items: center; gap: 24px; border: 0; overflow: visible; }
  .nav ul { flex-direction: row; gap: 26px; }
  .nav li a { padding: 6px 0; font-size: 15px; border: 0; color: var(--logo, var(--ink)); }
  .nav__cta { display: none; }
  .container { padding: 0 32px; }
}
@media (max-width: 1023.98px) { .header__actions .btn--hide-m { display: none; } }
.logo { min-width: 0; flex: 0 1 auto; }
.logo__text { min-width: 0; white-space: nowrap; }
.logo__text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .header__inner { gap: 8px; }
  .logo { gap: 8px; }
  .logo__mark { width: 32px; height: 32px; }
  .logo__text { font-size: 18px; }
  .logo__text small { font-size: 8.5px; letter-spacing: .1em; }
  .header__actions { gap: 2px; }
  .header__actions .btn--sm { padding: 8px 12px; font-size: 13px; min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- File upload (demo) ---------- */
.file__label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.file__drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--line-strong, var(--line)); border-radius: var(--input-r, 8px); background: var(--input-bg, #fff); cursor: pointer; transition: border-color .2s, background .2s; }
.file__drop:hover, .file__drop:focus-within { border-color: var(--acc); }
.file__drop svg { width: 34px; height: 34px; flex: none; fill: var(--acc); }
.file__names { display: flex; flex-direction: column; font-size: 14px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.file__names b { font-weight: 600; }
.file__names small { color: var(--muted); font-size: 12.5px; }
.file__drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file.has-file .file__drop { border-style: solid; border-color: var(--acc); }
.file__demo { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- Booking slots ---------- */
.book__days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin-bottom: 14px; }
.book__days::-webkit-scrollbar { display: none; }
.book__day { flex: none; width: 64px; padding: 8px 4px; border-radius: var(--input-r, 10px); border: 1.5px solid var(--line-strong, var(--line)); background: var(--input-bg, #fff); color: var(--ink); display: flex; flex-direction: column; align-items: center; line-height: 1.2; cursor: pointer; transition: border-color .2s, background .2s; }
.book__day b { font-size: 20px; font-family: var(--head); }
.book__day small { font-size: 11.5px; color: var(--muted); }
.book__day:hover { border-color: var(--acc); }
.book__day.is-on { background: var(--pri); border-color: var(--pri); color: var(--pri-ink, #fff); }
.book__day.is-on small { color: inherit; opacity: .8; }
.book__times { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.book__t { min-height: 42px; border-radius: var(--input-r, 10px); border: 1.5px solid var(--line-strong, var(--line)); background: var(--input-bg, #fff); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.book__t:hover:not(:disabled) { border-color: var(--acc); }
.book__t.is-on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink, #fff); }
.book__t:disabled { cursor: not-allowed; text-decoration: line-through; opacity: .45; background: transparent; }
.book__hint { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); padding: 10px 12px; border-radius: var(--input-r, 10px); background: var(--surface); }
.book__sum { margin: 10px 0 0; font-size: 14px; }
.book__sum:empty { display: none; }
.book__note { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Medical note ---------- */
.mednote { background: var(--mednote-bg, var(--surface)); border-top: 1px solid var(--line); }
.mednote__in { display: flex; gap: 12px; align-items: flex-start; padding-top: 18px; padding-bottom: 18px; }
.mednote svg { width: 22px; height: 22px; flex: none; fill: var(--pri); margin-top: 2px; }
.mednote p { margin: 0; font-size: 14px; color: var(--muted); max-width: 900px; }
.mednote b { color: var(--ink); }
.form, .form > *, .book { min-width: 0; }

.social { display: flex; gap: 10px; margin-top: 20px; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); }
.social a:hover { background: rgba(255,255,255,.1); }
.social svg { width: 17px; height: 17px; fill: #fff; }

/* ===== template-specific ===== */
h1, h2 { font-weight: 700; text-transform: none; }
.hero { position: relative; color: #fff; padding: 72px 0 64px; overflow: hidden; background: var(--pri); }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: .5; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,40,100,.95) 0, rgba(0,50,120,.75) 55%, rgba(0,50,120,.2) 100%); z-index: 1; }
.hero__in { position: relative; z-index: 2; }
.hero .eyebrow { color: #ffb366; }
.hero h1 { font-size: clamp(40px, 7.4vw, 76px); line-height: 1; max-width: 780px; margin-bottom: 18px; letter-spacing: -.01em; }
.hero h1 span { color: #ffb366; }
.hero__lead { font-size: 18px; color: rgba(255,255,255,.85); max-width: 560px; }
.hero__q { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 32px; }
.hero__q svg { fill: currentColor; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 14px 36px; }
.hero__stats li { display: flex; flex-direction: column; font-size: 14px; color: rgba(255,255,255,.75); border-left: 3px solid var(--acc); padding-left: 12px; }
.hero__stats b { font-family: var(--head); font-size: 34px; line-height: 1.1; color: #fff; }
.loc { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.loc__bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.loc__24 { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; cursor: pointer; min-height: 44px; }
.loc__24 input { width: 20px; height: 20px; accent-color: var(--pri); }
.loc__near { grid-column: 1 / -1; }
.loc__near svg { fill: #fff; }
.loc__msg { font-size: 13.5px; color: var(--acc-text); margin: 10px 0 0; min-height: 1em; }
.loc__msg:empty { display: none; }
.loc__grid { display: grid; gap: 14px; margin-top: 14px; }
.map { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 5 / 4; background: #e9f0f8; }
.map svg { width: 100%; height: 100%; display: block; }
.map .pin { transition: transform .2s; }
.map .pin.is-on path { fill: var(--acc); }
.map__lbl { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.92); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.stores { display: grid; gap: 10px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.store { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s; }
.store:hover { border-color: var(--pri); }
.store--none { color: var(--muted); justify-content: center; }
.store__n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--pri); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.store__b { flex: 1; min-width: 0; }
.store h3 { font-family: var(--head); font-size: 20px; font-weight: 700; color: var(--pri); }
.store h3 small { font-family: var(--font); font-size: 13px; color: var(--acc-text); font-weight: 700; margin-left: 6px; }
.store p { margin: 2px 0; font-size: 14px; color: var(--muted); }
.store__t span { font-weight: 700; margin-right: 8px; }
.store__t .on { color: #148a4a; } .store__t .off { color: #c0392b; }
.store__s em { display: inline-block; font-style: normal; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--pri); border-radius: 6px; padding: 1px 8px; margin: 4px 6px 0 0; }
.store__a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.serv { display: grid; gap: 14px; }
.serv li { background: #fff; border-radius: 16px; padding: 22px; border-top: 4px solid var(--pri); }
.serv li:last-child { border-top-color: #c0392b; }
.serv svg { width: 36px; height: 36px; fill: var(--pri); margin-bottom: 10px; }
.serv li:last-child svg { fill: #c0392b; }
.serv h3 { font-family: var(--head); font-size: 21px; font-weight: 700; color: var(--pri); margin-bottom: 4px; }
.serv p { margin: 0; font-size: 14.5px; color: var(--muted); }
.gal { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gal figure { margin: 0; }
.gal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.gal figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.lic { display: grid; gap: 14px; margin-top: 28px; }
.lic li { display: flex; gap: 12px; align-items: center; }
.lic svg { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--surface); fill: var(--pri); flex: none; }
.lic span { display: flex; flex-direction: column; font-size: 13.5px; color: var(--muted); }
.lic b { color: var(--ink); font-size: 15px; }
.section--blue { background: var(--pri); color: #fff; }
.section--blue .eyebrow { color: #ffb366; }
.contact { display: grid; gap: 28px; align-items: center; }
.contact h2 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 12px; }
.contact p { color: rgba(255,255,255,.8); }
.card-form { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px 18px; }
.faq-wrap { display: grid; gap: 8px; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; font-weight: 700; font-size: 17px; color: var(--pri); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 26px; color: var(--acc); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 18px; color: var(--muted); }
@media (min-width: 600px) {
  .serv { grid-template-columns: 1fr 1fr; }
  .gal { grid-template-columns: repeat(4, 1fr); }
  .lic { grid-template-columns: repeat(3, 1fr); }
  .card-form { grid-template-columns: 1fr 1fr; padding: 28px; }
  .field--full { grid-column: 1 / -1; }
  .loc { padding: 22px; }
}
@media (min-width: 960px) {
  .hero { padding: 120px 0 100px; }
  .loc__bar { grid-template-columns: 1fr 1fr auto auto auto; gap: 16px; }
  .loc__near { grid-column: auto; }
  .loc__grid { grid-template-columns: 1.05fr .95fr; gap: 20px; }
  .map { aspect-ratio: auto; min-height: 520px; }
  .serv { grid-template-columns: repeat(4, 1fr); }
  .contact { grid-template-columns: 1fr 1.1fr; gap: 64px; }
  .faq-wrap { grid-template-columns: .8fr 1.2fr; gap: 64px; }
}
