/*
 * برگه‌های ثابت قالب Formula: درباره ما، تماس، مجوزها، قوانین، شعب ما و پنجره تماس.
 * چیدمان همان برگه‌های قبلی است؛ ظاهر از شیوه‌نامه افزونه (DESIGN-SYSTEM.md): رنگ و اندازه از
 * توکن‌های --fap-*، دکمه .fap-btn، تب استان‌ها .fap-seg، کارت فقط حاشیه با گوشه ۱۶ و بی‌سایه، هاور
 * فقط رنگ حاشیه. تنها سایه، جعبه شناور شعب روی عکس سربرگ است (--fap-sh-md).
 */

/* ---------- درباره / تماس / مجوزها ---------- */
.fml-kit .fml-info { max-width: calc(var(--fml-container, 1270px) + 20px); margin: 0 auto; padding: 40px 10px; }
.fml-kit .fml-info__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: stretch; }
.fml-kit .fml-info__text { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.fml-kit .fml-info__title { margin: 0; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-3xl, 28px); font-weight: 800; line-height: 1.5; }
.fml-kit .fml-info__body { color: var(--fap-c-text, #34494d); font-size: var(--fap-fs-lg, 16px); line-height: 2; text-align: justify; }
.fml-kit .fml-info__body p { margin: 0 0 14px; }
.fml-kit .fml-info__body p:last-child { margin-bottom: 0; }
.fml-kit .fml-info__media { min-height: 450px; }
.fml-kit .fml-info__media img { display: block; width: 100%; height: 100%; min-height: 450px; object-fit: cover; border-radius: var(--fap-r-xl, 20px); }

/* تماس: کارت شماره مرکز تماس (کلیک‌خور؛ هاور فقط حاشیه) */
.fml-kit a.fml-info__call {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--fap-c-surface, #fff);
    border: 1px solid var(--fap-c-line, #e0e8e9);
    border-radius: var(--fap-r-lg, 16px);
    color: var(--fap-c-ink, #13292d);
    text-decoration: none;
    transition: border-color var(--fap-dur-fast, .15s) ease;
}
.fml-kit a.fml-info__call:hover { border-color: var(--fap-brand-200, #c6e9e4); color: var(--fap-c-ink, #13292d); }
.fml-kit .fml-info__call-icon { display: flex; flex: 0 0 56px; align-items: center; justify-content: center; height: 56px; border-radius: var(--fap-r-md, 12px); background: var(--fap-brand-50, #eef8f6); color: var(--fap-c-link, #0d8276); line-height: 0; }
.fml-kit .fml-info__call-icon .fap-i { width: 30px; height: 30px; }
.fml-kit .fml-info__call-text { display: flex; flex-direction: column; gap: 2px; }
.fml-kit .fml-info__call-title { color: var(--fap-c-muted, #566a6e); font-size: var(--fap-fs-md, 14px); font-weight: 600; line-height: 1.7; }
.fml-kit .fml-info__call-num { color: var(--fap-c-link, #0d8276); font-size: var(--fap-fs-2xl, 22px); font-weight: 800; line-height: 1.4; }

/* «مجوزها»: نوار تمام‌عرض و تصویر بلندتر */
.fml-kit .fml-info--band { max-width: none; background: var(--fap-c-bg, #f3f7f7); }
.fml-kit .fml-info--band .fml-info__grid { max-width: var(--fml-container, 1270px); margin: 0 auto; align-items: center; }
.fml-kit .fml-info--band .fml-info__media, .fml-kit .fml-info--band .fml-info__media img { min-height: 525px; }

.fml-kit .fml-info__badges { display: flex; flex-wrap: wrap; gap: 12px; }
.fml-kit a.fml-info__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 112px;
    padding: 10px;
    background: var(--fap-c-surface, #fff);
    border: 1px solid var(--fap-c-line, #e0e8e9);
    border-radius: var(--fap-r-lg, 16px);
    transition: border-color var(--fap-dur-fast, .15s) ease;
}
.fml-kit a.fml-info__badge:hover { border-color: var(--fap-brand-200, #c6e9e4); }
.fml-kit .fml-info__badge img { max-width: 100%; max-height: 88px; object-fit: contain; }

@media (max-width: 767px) {
    .fml-kit .fml-info { padding: 12px 10px 40px; }
    .fml-kit .fml-info__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .fml-kit .fml-info__media { order: -1; min-height: 0; }
    .fml-kit .fml-info__media img,
    .fml-kit .fml-info--band .fml-info__media,
    .fml-kit .fml-info--band .fml-info__media img { min-height: 0; }
    .fml-kit .fml-info__media img { height: 200px; border-radius: var(--fap-r-lg, 16px); }
    .fml-kit .fml-info__text { gap: 12px; }
    .fml-kit .fml-info__title { font-size: var(--fap-fs-2xl, 22px); }
    .fml-kit .fml-info__body { font-size: var(--fap-fs-md, 14px); }
}

/* ---------- قوانین ---------- */
.fml-kit .fml-terms { max-width: calc(var(--fml-container, 1270px) + 20px); margin: 0 auto; padding: 40px 10px; }
.fml-kit .fml-terms__title { margin: 0 0 12px; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-3xl, 28px); font-weight: 800; line-height: 1.5; }
.fml-kit .fml-terms__body { color: var(--fap-c-text, #34494d); font-size: var(--fap-fs-lg, 16px); line-height: 2; text-align: justify; }
.fml-kit .fml-terms__body h2 { margin: 22px 0 10px; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-2xl, 22px); font-weight: 800; line-height: 1.6; }
.fml-kit .fml-terms__body h3, .fml-kit .fml-terms__body h4 { margin: 18px 0 8px; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-xl, 18px); font-weight: 700; line-height: 1.6; }
.fml-kit .fml-terms__body p { margin: 0 0 10px; }
.fml-kit .fml-terms__call { max-width: 560px; margin-top: 24px; }
/* حریم خصوصی (#privacy): بخش جدا زیر متن قوانین؛ پرش به آن زیر سربرگ چسبان نرود */
.fml-kit .fml-terms__privacy { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--fap-c-line, #e0e8e9); scroll-margin-top: 96px; }
.fml-kit .fml-terms__privacy .fml-terms__date { margin: -4px 0 12px; color: var(--fap-c-muted, #566a6e); font-size: var(--fap-fs-sm, 13px); }
@media (max-width: 767px) {
    .fml-kit .fml-terms { padding: 16px 10px 40px; }
    .fml-kit .fml-terms__title { font-size: var(--fap-fs-2xl, 22px); }
    .fml-kit .fml-terms__body { font-size: var(--fap-fs-md, 14px); }
    .fml-kit .fml-terms__body h2 { font-size: var(--fap-fs-xl, 18px); }
    .fml-kit .fml-terms__body h3, .fml-kit .fml-terms__body h4 { font-size: var(--fap-fs-lg, 16px); }
    .fml-kit .fml-terms__call { max-width: none; }
}

/* ---------- شعب ما ---------- */
.fml-kit .fml-branches__hero {
    position: relative;
    margin-top: -90px; /* زیر سربرگ شیشه‌ای چسبان */
    background: var(--fml-hero-bg) center / cover no-repeat;
}
/* سایه تیره روی عکس (گرادیان کاربردی مجاز شیوه‌نامه) تا متن سفید خوانا باشد */
.fml-kit .fml-branches__hero-in {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    min-height: 640px;
    padding: 60px 10px 100px;
    background-image: linear-gradient(color-mix(in srgb, var(--fml-dark, #1d212b) 42%, transparent) 23%, var(--fml-bg, #f8fafa) 100%);
    text-align: center;
}
.fml-kit .fml-branches__title { margin: 0; color: var(--fap-c-on-solid, #fff); font-size: calc(var(--fap-fs-3xl, 28px) * 1.5); font-weight: 800; line-height: 1.4; }
.fml-kit .fml-branches__lead { max-width: 640px; margin: 0; color: color-mix(in srgb, var(--fap-c-on-solid, #fff) 90%, transparent); font-size: var(--fap-fs-xl, 18px); font-weight: 500; line-height: 1.8; }

.fml-kit .fml-branches__box-wrap { position: relative; z-index: 1; margin: -175px 0 30px; padding: 0 10px; }
.fml-kit .fml-branches__box {
    max-width: var(--fml-container, 1270px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: var(--fap-c-surface, #fff);
    border: 1px solid var(--fap-c-line, #e0e8e9);
    border-radius: var(--fap-r-xl, 20px);
    box-shadow: var(--fap-sh-md, 0 2px 6px rgba(19, 41, 45, .05), 0 12px 28px -8px rgba(19, 41, 45, .16));
}
.fml-kit .fml-branches__box .fap-seg { align-self: flex-start; }
.fml-kit .fml-branches__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fml-kit .fml-branches__grid[hidden] { display: none; }

.fml-kit .fml-branch {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: var(--fap-c-surface, #fff);
    border: 1px solid var(--fap-c-line, #e0e8e9);
    border-radius: var(--fap-r-lg, 16px);
}
.fml-kit .fml-branch .fml-branch__name { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-xl, 18px); font-weight: 700; line-height: 1.5; }
.fml-kit .fml-branch__pin { display: flex; flex: 0 0 40px; align-items: center; justify-content: center; height: 40px; border-radius: var(--fap-r-md, 12px); background: var(--fap-brand-50, #eef8f6); color: var(--fap-c-link, #0d8276); line-height: 0; }
.fml-kit .fml-branch__row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 10px; margin: 0; color: var(--fap-c-text, #34494d); font-size: var(--fap-fs-md, 14px); line-height: 1.8; }
.fml-kit .fml-branch__row .fap-i { flex: 0 0 auto; margin-top: 4px; color: var(--fap-brand-500, #1aa29a); }
.fml-kit .fml-branch__row span { flex: 1 1 0; min-width: 0; }
.fml-kit .fml-branch__row a { color: var(--fap-c-text, #34494d); text-decoration: none; }
.fml-kit .fml-branch__row a:hover { color: var(--fap-c-link, #0d8276); }
.fml-kit .fml-branch__row a + span { flex: 0 0 auto; }
.fml-kit .fml-branch__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: auto; padding-top: 6px; }
.fml-kit .fml-branch__actions .fap-btn { width: 100%; }

.fml-kit .fml-branches__why { max-width: calc(var(--fml-container, 1270px) + 20px); margin: 56px auto 48px; padding: 0 10px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.fml-kit .fml-branches__why .fml-branches__why-title { margin: 0; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-3xl, 28px); font-weight: 800; line-height: 1.5; }
.fml-kit a.fml-branches__why-link { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 4px; color: var(--fap-c-link, #0d8276); font-size: var(--fap-fs-lg, 16px); font-weight: 700; text-decoration: none; }
.fml-kit a.fml-branches__why-link:hover { color: var(--fap-brand-700, #0b6c62); }
.fml-kit .fml-branches__why-grid { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fml-kit .fml-why { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; background: var(--fap-c-surface, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: var(--fap-r-lg, 16px); }
.fml-kit .fml-why__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--fap-r-md, 12px); background: var(--fap-brand-50, #eef8f6); color: var(--fap-c-link, #0d8276); line-height: 0; }
.fml-kit .fml-why .fml-why__title { margin: 0; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-xl, 18px); font-weight: 700; line-height: 1.5; }
.fml-kit .fml-why__text { margin: 0; color: var(--fap-c-muted, #566a6e); font-size: var(--fap-fs-md, 14px); line-height: 1.8; }

@media (max-width: 1024px) {
    .fml-kit .fml-branches__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fml-kit .fml-branches__why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .fml-kit .fml-branches__hero { margin-top: -77px; }
    .fml-kit .fml-branches__hero-in { justify-content: flex-start; min-height: 420px; gap: 10px; padding: 80px 10px 10px; }
    .fml-kit .fml-branches__title { font-size: var(--fap-fs-2xl, 22px); line-height: 1.6; }
    .fml-kit .fml-branches__lead { font-size: var(--fap-fs-md, 14px); }
    .fml-kit .fml-branches__box-wrap { margin-top: -150px; }
    .fml-kit .fml-branches__box { padding: 14px; border-radius: var(--fap-r-lg, 16px); }
    .fml-kit .fml-branches__box .fap-seg { align-self: stretch; display: flex; }
    .fml-kit .fml-branches__box .fap-seg__item { flex: 1 1 0; }
    .fml-kit .fml-branches__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .fml-kit .fml-branch__actions { display: flex; flex-direction: column-reverse; }
    .fml-kit .fml-branches__why { margin-top: 32px; margin-bottom: 40px; }
    .fml-kit .fml-branches__why .fml-branches__why-title { font-size: var(--fap-fs-2xl, 22px); }
    .fml-kit .fml-branches__why-grid { grid-template-columns: minmax(0, 1fr); }
}
