/* ============================================================
   Trang đích nhượng quyền bưu cục (/nhuong-quyen) — Views/Lead/Franchise.cshtml
   Chuyển từ bản thiết kế "Landing page nhượng quyền LADA" (10/2026): một cột cho điện thoại;
   từ 1024 px chia hai cột trong khung 1280 px. Góc vuông ở mọi nơi; đỏ LADA chỉ dùng cho nút,
   vàng chỉ làm vạch nhấn (không làm màu chữ).
   Khác bản thiết kế: dùng phông Be Vietnam Pro của site thay Public Sans để không lệch với
   header/footer chung; header/footer riêng của bản thiết kế thay bằng header/footer site.
   Mọi selector nằm dưới .fr; quy tắc theo thẻ bọc :where(.fr) để class nào cũng thắng được.
   ============================================================ */

.fr {
  --fr-red: var(--lada-red-500, #ED1B2F);
  --fr-red-dark: #C4121F;
  --fr-red-text: #A51020;
  --fr-yellow: var(--lada-yellow-500, #FFCB05);
  --fr-ink: var(--lada-black-900, #231F20);
  --fr-ink-2: #4F4C4D;
  --fr-ink-3: #6F6C6C;
  --fr-line: #DEDCDC;
  --fr-field-border: #8A8588;
  --fr-bg: #FFFFFF;
  --fr-bg-gray: #F5F5F5;
  --fr-photo: #ECEAEA;
  --fr-photo-gray: #E3E0E0;
  --fr-bg-error: #FDF0F1;
  --fr-gutter: 20px;
  --fr-header: var(--header-h, 68px);

  background: var(--fr-bg);
  color: var(--fr-ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
}
@media (min-width: 720px) { .fr { --fr-gutter: 40px; } }
@media (prefers-reduced-motion: no-preference) { html:has(.fr) { scroll-behavior: smooth; } }

/* Thẻ: chặn reboot của Bootstrap (margin h*/p/ul, legend nổi, cỡ chữ h*) */
:where(.fr) h1, :where(.fr) h2, :where(.fr) h3 { margin: 0; color: inherit; text-wrap: balance; }
:where(.fr) p { margin: 0; }
:where(.fr) ul { margin: 0; padding: 0; list-style: none; }
:where(.fr) img { max-width: 100%; display: block; }
:where(.fr) a { color: var(--fr-ink); text-underline-offset: 3px; }
:where(.fr) a:hover { color: #000; }
:where(.fr) :focus-visible { outline: 3px solid var(--fr-ink); outline-offset: 3px; }
:where(.fr) h1 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
:where(.fr) h2 { font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
@media (min-width: 1024px) {
  :where(.fr) h1 { font-size: 50px; line-height: 1.14; letter-spacing: -0.02em; }
  :where(.fr) h2 { font-size: 38px; line-height: 1.2; letter-spacing: -0.015em; }
}

.fr-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fr-wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--fr-gutter); }

/* ---------- Thành phần chung ---------- */
.fr-block { padding-block: 48px; }
.fr-block--gray { background: var(--fr-bg-gray); }
@media (min-width: 1024px) { .fr-block { padding-block: 88px; } }
.fr-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fr-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.fr-eyebrow::before { content: ""; flex: 0 0 24px; height: 4px; background: var(--fr-yellow); }
.fr-lead { font-size: 17px; line-height: 1.6; max-width: 62ch; }
.fr-small { font-size: 14px; line-height: 1.45; color: var(--fr-ink-3); }
@media (min-width: 1024px) {
  .fr-eyebrow { font-size: 14px; }
  .fr-lead { font-size: 19px; }
}

.fr-btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 0;
  background: var(--fr-red); color: #fff;
  font: 700 19px/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
}
.fr-btn:hover { background: var(--fr-red-dark); color: #fff; }
.fr-btn[disabled] { cursor: progress; background: var(--fr-red-dark); }
.fr-btn.fr-btn--preview[disabled] { cursor: not-allowed; opacity: .6; }

/* Băng "Bản xem trước" (?xem-truoc=, plan nhượng quyền website §6.3) — vàng LADA làm vạch nhấn, chữ mực */
.fr-preview { padding-block: 12px; background: #FFF8DB; border-bottom: 4px solid var(--fr-yellow); color: var(--fr-ink); font-size: 15px; line-height: 1.5; }
.fr-preview p { margin: 0; }
.fr-preview__title { font-weight: 700; }
.fr-preview__issue { margin-top: 4px; color: var(--fr-red-text); font-weight: 600; }
.fr-btn--block { width: 100%; }
@media (min-width: 720px) { .fr-btn { white-space: nowrap; flex: 0 0 auto; } }
@media (min-width: 1024px) { .fr-btn { min-height: 56px; padding: 0 28px; } }

.fr-call { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; text-decoration: none; white-space: nowrap; }
.fr-actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.fr-actions .fr-call { align-self: center; }
@media (min-width: 720px) {
  .fr-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
  .fr-actions .fr-call { align-self: auto; }
}

/* Khung ảnh: nền màu thay ảnh thật cho tới khi có buổi chụp */
.fr-photo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fr-photo__frame {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 100%; aspect-ratio: var(--fr-ratio, 4 / 3); background: var(--fr-photo);
}
.fr-block--gray .fr-photo__frame { background: var(--fr-photo-gray); }
.fr-photo__frame svg { width: 52px; height: 52px; fill: none; stroke: var(--fr-field-border); stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
/* Khung mở đầu 16:9 ở mọi bề rộng: khối chỉ có một ảnh tải lên, khung dọc trên điện thoại sẽ cắt mất hai bên ảnh */
.fr-photo__frame--hero { background: var(--fr-ink); --fr-ratio: 16 / 9; }
/* Ảnh thật của khối nội dung (GĐ E): phủ kín khung, giữ tỉ lệ --fr-ratio; hoạ tiết .fr-pattern đứng sau nên nằm trên */
.fr-photo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fr-pattern { position: absolute; right: -6%; bottom: -4%; width: 46%; height: auto; }

.fr-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; background: var(--fr-yellow); }
.fr-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--fr-ink); stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }

.fr-heading { display: flex; flex-direction: column; gap: 16px; max-width: 800px; }
.fr-inner { display: flex; flex-direction: column; gap: 24px; }

/* ---------- S01 Mở đầu ---------- */
.fr-hero { padding-block: 28px 48px; }
.fr-hero__grid { display: grid; gap: 28px; }
.fr-hero .fr-stack { gap: 18px; }
@media (min-width: 1024px) {
  .fr-hero { padding-block: 72px 88px; }
  .fr-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
  .fr-hero .fr-lead { max-width: 560px; }
}

/* ---------- S02 Niềm tin ---------- */
.fr-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.fr-stats li { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 16px; background: var(--fr-bg); border-top: 4px solid var(--fr-yellow); }
.fr-stats li:last-child { grid-column: 1 / -1; }
.fr-stats__value { font-size: 26px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fr-stats__label { font-size: 14px; line-height: 1.4; color: var(--fr-ink-2); }
.fr-provinces { display: flex; flex-direction: column; gap: 6px; }
.fr-provinces__list { font-size: 15px; line-height: 1.6; font-weight: 600; }
.fr-photo-pair { display: grid; gap: 16px; }
@media (min-width: 720px) {
  .fr-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fr-stats li:last-child { grid-column: auto; }
  .fr-photo-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (min-width: 1024px) {
  .fr-stats { gap: 16px; }
  .fr-stats li { padding: 20px 20px 22px; }
  .fr-stats__value { font-size: 34px; }
  .fr-stats__label { font-size: 15px; }
  .fr-provinces { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 24px; }
  .fr-provinces__list { font-size: 16px; }
}

/* ---------- S03 Làm chủ ---------- */
.fr-owner { display: grid; gap: 28px; }
.fr-fit { display: flex; flex-direction: column; gap: 10px; }
.fr-fit__title { font-size: 15px; font-weight: 700; }
.fr-fit ul { display: grid; gap: 8px; }
.fr-fit li { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--fr-line); font-size: 16px; line-height: 1.4; }
.fr-fit li::before { content: ""; flex: 0 0 8px; height: 8px; background: var(--fr-ink); }
@media (min-width: 1024px) {
  .fr-owner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
  .fr-fit { padding-top: 46px; }
  .fr-fit__title { font-size: 16px; }
  .fr-fit ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .fr-fit li { padding: 18px; font-size: 17px; }
}

/* ---------- S04 Thị trường ---------- */
.fr-market__top { display: grid; gap: 28px; }
.fr-segments { display: grid; gap: 12px; }
.fr-segments li { display: flex; gap: 14px; padding: 16px; background: var(--fr-bg); }
.fr-segments__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fr-segments__name { font-size: 16px; font-weight: 700; line-height: 1.35; }
.fr-segments__desc { font-size: 15px; line-height: 1.5; color: var(--fr-ink-2); }
.fr-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fr-tags li { padding: 6px 12px; border: 1px solid var(--fr-line); background: var(--fr-bg); font-size: 14px; line-height: 1.4; }
.fr-market__bottom { display: flex; flex-direction: column; gap: 24px; }
/* Điện thoại: chữ → nhóm khách → ngành hàng → ảnh → nút */
@media (max-width: 1023.98px) {
  .fr-market__top, .fr-market__bottom { display: contents; }
  .fr-market__top .fr-stack { order: 1; }
  .fr-segments { order: 2; }
  .fr-tags { order: 3; }
  .fr-market__top .fr-photo { order: 4; }
  .fr-market__bottom .fr-btn { order: 5; }
}
@media (min-width: 720px) { .fr-segments { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fr-segments li { flex-direction: column; } }
@media (min-width: 1024px) {
  .fr-market__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
  .fr-segments { gap: 16px; }
  .fr-segments li { padding: 24px; gap: 12px; }
  .fr-segments__name { font-size: 18px; }
  .fr-segments__desc { font-size: 16px; }
  .fr-tags li { padding: 8px 14px; font-size: 15px; }
  .fr-market__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- S05 Nền tảng ---------- */
.fr-pillars { display: grid; gap: 12px; }
.fr-pillars li { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 2px solid var(--fr-ink); }
.fr-pillars__name { font-size: 17px; font-weight: 700; line-height: 1.35; }
.fr-pillars__desc { font-size: 15px; line-height: 1.5; color: var(--fr-ink-2); }
.fr-photo-trio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fr-photo--system .fr-photo__frame, .fr-photo--driver .fr-photo__frame { --fr-ratio: 4 / 5; }
.fr-photo--coach { grid-column: 1 / -1; }
@media (min-width: 720px) { .fr-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .fr-pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .fr-pillars li { padding: 24px; gap: 8px; }
  .fr-pillars__name { font-size: 18px; }
  .fr-pillars__desc { font-size: 16px; }
  .fr-photo-trio { grid-template-columns: 5fr 3fr 5fr; gap: 16px; align-items: start; }
  .fr-photo--system .fr-photo__frame { --fr-ratio: 4 / 3; }
  .fr-photo--driver .fr-photo__frame { --fr-ratio: 3 / 4; }
  .fr-photo--coach { grid-column: auto; }
}

/* ---------- S06 Mạng lưới ---------- */
.fr-network { display: grid; gap: 24px; }
.fr-flow-wrap { display: flex; flex-direction: column; gap: 10px; }
.fr-flow { display: flex; flex-direction: column; align-items: stretch; padding: 16px; background: var(--fr-bg); }
.fr-flow__node { display: flex; align-items: center; justify-content: center; padding: 14px; border: 1px solid var(--fr-field-border); text-align: center; font-size: 16px; line-height: 1.3; }
.fr-flow__node--main { background: var(--fr-ink); border-color: var(--fr-ink); color: #fff; font-weight: 700; }
.fr-flow__arrow { display: grid; place-items: center; height: 32px; }
.fr-flow__arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--fr-ink); stroke-width: 2; }
.fr-network .fr-btn { align-self: stretch; }
@media (min-width: 1024px) {
  .fr-network { grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
  .fr-network .fr-btn { align-self: flex-start; }
  .fr-flow { flex-direction: row; padding: 40px 24px; }
  .fr-flow__node { flex: 1 1 0; padding: 18px 8px; }
  .fr-flow__arrow { height: auto; width: 32px; flex: 0 0 32px; align-self: center; }
  .fr-flow__arrow svg { transform: rotate(-90deg); }
}

/* ---------- S07 Biểu mẫu ---------- */
#dang-ky { scroll-margin-top: var(--fr-header); }
.fr-register { display: grid; gap: 28px; }
@media (min-width: 1024px) {
  .fr-register { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .fr-register > .fr-stack { position: sticky; top: calc(var(--fr-header) + 40px); }
}
.fr-card { border: 1px solid var(--fr-line); background: var(--fr-bg); padding: 20px 16px; }
@media (min-width: 1024px) { .fr-card { padding: 32px; } }
.fr-form { display: flex; flex-direction: column; gap: 18px; }
.fr-form__head { display: flex; flex-direction: column; gap: 4px; }
.fr-form__head h3 { font-size: 19px; font-weight: 800; line-height: 1.3; }
@media (min-width: 1024px) { .fr-form__head h3 { font-size: 22px; } }
.fr-form__grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .fr-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; } .fr-form__grid .fr-span { grid-column: 1 / -1; } }

.fr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fr-field > label, .fr-field legend { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0; }
fieldset.fr-field { margin: 0; padding: 0; border: 0; }
.fr-field legend { float: none; width: auto; padding: 0; margin-bottom: 4px; }
.fr-input {
  width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--fr-field-border); border-radius: 0;
  background: var(--fr-bg); color: var(--fr-ink); font: 400 16px/1.4 var(--font-sans);
}
select.fr-input {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--fr-ink) 50%), linear-gradient(135deg, var(--fr-ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
.fr-input::placeholder { color: var(--fr-ink-3); opacity: 1; }
.fr-input:focus-visible { outline: 3px solid var(--fr-ink); outline-offset: 0; border-color: var(--fr-ink); }
.fr-field--error .fr-input { border: 2px solid var(--fr-red-text); }
.fr-error { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--fr-red-text); font-weight: 600; }
.fr-error svg, .fr-summary svg, .fr-alert svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; }
.fr-choices { display: flex; flex-direction: column; }
@media (min-width: 1024px) { .fr-choices { flex-direction: row; flex-wrap: wrap; gap: 0 24px; } }
.fr-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 16px; line-height: 1.4; cursor: pointer; }
.fr-check input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--fr-ink); }
.fr-field > .fr-check--consent { align-items: flex-start; font-size: 15px; font-weight: 400; line-height: 1.5; min-height: 0; }
.fr-check--consent input { flex-basis: 22px; width: 22px; height: 22px; margin-top: 1px; }
.fr-other { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--fr-bg-gray); }
.fr-other p { font-size: 15px; line-height: 1.5; }
.fr-note { font-size: 14px; line-height: 1.5; color: var(--fr-ink-3); }
.fr-summary { display: flex; gap: 8px; padding: 12px 14px; border: 2px solid var(--fr-red-text); background: var(--fr-bg-error); color: var(--fr-red-text); font-size: 15px; font-weight: 600; line-height: 1.45; }
.fr-alert { display: flex; gap: 10px; padding: 14px; border: 2px solid var(--fr-ink); background: var(--fr-bg-gray); font-size: 15px; line-height: 1.5; }
.fr-alert--error { border-color: var(--fr-red-text); background: var(--fr-bg-error); }
.fr-alert--error svg { color: var(--fr-red-text); }
.fr-alert__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fr-alert__title { font-weight: 800; font-size: 16px; }
.fr-summary:focus-visible, .fr-alert:focus-visible, .fr-success:focus-visible { outline-offset: 2px; }
.fr-sending { font-size: 14px; color: var(--fr-ink-2); }
.fr-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.fr-success { display: flex; flex-direction: column; gap: 14px; }
.fr-success__head { display: flex; align-items: center; gap: 12px; }
.fr-success h3 { font-size: 22px; font-weight: 800; line-height: 1.25; }
.fr-success p { font-size: 17px; line-height: 1.6; }
.fr-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; background: var(--fr-bg-gray); padding: 1px 6px; white-space: nowrap; }

/* ---------- Lưu ý pháp lý ---------- */
.fr-legal { padding-block: 24px 32px; border-top: 1px solid var(--fr-line); font-size: 14px; line-height: 1.55; color: var(--fr-ink-2); }
.fr-legal .fr-wrap { display: flex; flex-direction: column; gap: 8px; }
.fr-legal p { max-width: 760px; }

/* ---------- Nội dung tự do + câu hỏi thường gặp (khối RichText / Faq, GĐ E) ---------- */
.fr-richtext { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fr-faq { display: grid; gap: 12px; max-width: 800px; }
.fr-faq__item { border: 1px solid var(--fr-line); padding: 16px 18px; }
.fr-faq__item summary { cursor: pointer; font-size: 17px; font-weight: 700; line-height: 1.4; }
.fr-faq__item p { margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--fr-ink-2); }

/* ---------- Nút cố định trên điện thoại ---------- */
.fr-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px var(--fr-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--fr-bg); box-shadow: 0 -2px 10px rgba(35, 31, 32, 0.14);
  transition: transform 0.2s ease, visibility 0.2s;
}
.fr-sticky--hidden { transform: translateY(110%); visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .fr-sticky { transition: none; } }
@media (min-width: 1024px) { .fr-sticky { display: none; } }
/* Các nút nổi của site (cuộn lên, hotline, bong bóng Zalo) cũng nằm sát đáy màn hình — khi thanh nút cố định
   đang hiện thì nhấc chúng lên đúng chiều cao thanh (~76 px). Zalo SDK đặt bottom bằng inline style nên cần !important. */
@media (max-width: 1023.98px) {
  body:has(.fr-sticky:not(.fr-sticky--hidden)) #scrollUp.scrollUpVisible { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  body:has(.fr-sticky:not(.fr-sticky--hidden)) .ld-float-hotline { bottom: calc(210px + env(safe-area-inset-bottom, 0px)); }
  body:has(.fr-sticky:not(.fr-sticky--hidden)) .zalo-chat-widget { bottom: calc(132px + env(safe-area-inset-bottom, 0px)) !important; }
}
