/* Desktop branch finder. This is intentionally isolated from existing menu styles. */
@media (min-width: 1025px) {
    .emm-branches-menu { position: relative; overflow: visible !important; }
    .emm-branches-menu > .emm-branches-mega {
        position: absolute;
        z-index: 10020;
        top: calc(100% + 15px);
        right: -350px;
        width: min(1180px, calc(100vw - 32px));
        max-width: none;
        padding: 24px;
        border: 1px solid rgba(207, 231, 251, .88);
        border-radius: 24px;
        isolation: isolate;
        background: #fff;
        box-shadow: 0 28px 62px rgba(12, 62, 107, .20), 0 4px 14px rgba(12, 62, 107, .08), inset 0 1px 0 rgba(255, 255, 255, .82);
        color: #173d63;
        direction: rtl;
        font-family: Vazirmatn, sans-serif;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate(var(--emm-branches-x, 0px), 10px);
        transform-origin: top right;
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }
    .emm-branches-menu > .emm-branches-mega::before {
        position: absolute;
        top: -22px;
        right: var(--emm-branches-arrow-right, 395px);
        width: 16px;
        height: 16px;
        content: "";
        background: #fff;
        border-top: 1px solid rgba(207, 231, 251, .88);
        border-left: 1px solid rgba(207, 231, 251, .88);
        transform: rotate(45deg);
    }
    .emm-branches-menu > .emm-branches-mega::after {
        position: absolute;
        z-index: -1;
        inset: -14px;
        content: "";
        pointer-events: none;
        border: 1px solid rgba(177, 218, 246, .62);
        border-radius: 36px;
        background: rgba(231, 245, 255, .13);
        box-shadow: 0 18px 38px rgba(15, 73, 120, .14), inset 0 1px 0 rgba(255, 255, 255, .92);
        -webkit-backdrop-filter: blur(40px) saturate(135%);
        backdrop-filter: blur(40px) saturate(135%);
    }
    .emm-branches-menu:not(.is-emm-branches-enhanced):hover > .emm-branches-mega,
    .emm-branches-menu:not(.is-emm-branches-enhanced):focus-within > .emm-branches-mega,
    .emm-branches-menu.is-emm-branches-open > .emm-branches-mega {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(var(--emm-branches-x, 0px), 0);
    }
    .emm-branches-mega *, .emm-branches-mega *::before, .emm-branches-mega *::after { box-sizing: border-box; }
    .emm-branches-mega a { text-decoration: none !important; }
    .emm-branches-mega__top { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 0 4px 16px; }
    .emm-branches-mega__intro h2 { margin: 6px 0 5px; color: #133a61; font-size: 22px; font-weight: 900; line-height: 1.35; }
    .emm-branches-mega__intro p { max-width: 560px; margin: 0; color: #68829a; font-size: 13px; line-height: 1.8; }
    .emm-branches-mega__eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #d77513; font-size: 11px; font-weight: 800; }
    .emm-branches-mega__eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #f6a125; box-shadow: 0 0 0 5px rgba(246, 161, 37, .14); }
    .emm-branches-mega__stats { display: flex; flex: 0 0 auto; gap: 7px; padding-top: 8px; }
    .emm-branches-mega__stats span { padding: 7px 10px; border: 1px solid #dcecf9; border-radius: 999px; background: #f5faff; color: #5d7a96; font-size: 11px; white-space: nowrap; }
    .emm-branches-mega__stats b { color: #2378c5; font-weight: 900; }
    .emm-branches-search { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 17px; padding: 6px 7px 6px 8px; border: 1px solid #cfe3f4; border-radius: 15px; background: #fbfdff; transition: border-color .2s ease, box-shadow .2s ease; }
    .emm-branches-search:focus-within { border-color: #62a9e5; box-shadow: 0 0 0 4px rgba(82, 159, 223, .12); }
    .emm-branches-search > svg { flex: 0 0 auto; width: 19px; height: 19px; margin: 0 8px 0 2px; stroke: #6096bf; fill: none; stroke-width: 1.8; }
    .emm-branches-search input { flex: 1; min-width: 0; height: 34px; padding: 0; border: 0 !important; outline: none !important; background: transparent !important; box-shadow: none !important; color: #173d63 !important; font: inherit !important; font-size: 13px !important; }
    .emm-branches-search input::placeholder { color: #91a6bb; }
    .emm-branches-search button { min-height: 34px; padding: 0 15px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #2f8bdd, #2072ba); color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
    .emm-branches-search__loading { display: inline-flex; align-items: center; gap: 6px; color: #5d7a96; font-size: 11px; white-space: nowrap; }
    .emm-branches-search__loading[hidden] { display: none !important; }
    .emm-branches-search__loading i { width: 13px; height: 13px; border: 2px solid #d2e7f8; border-top-color: #2f8bdd; border-radius: 50%; animation: emm-branches-spin .7s linear infinite; }
    .emm-branches-mega__content { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: stretch; }
    .emm-branches-feature { overflow: hidden; min-height: 315px; border: 1px solid #d7eaf9; border-radius: 18px; background: #eff8ff; }
    .emm-branches-feature__visual { min-height: 136px; background: linear-gradient(180deg, rgba(15, 65, 107, .05), rgba(15, 65, 107, .34)), url('../images/branches-mega-hero.webp') center / cover no-repeat; }
    .emm-branches-feature__body { padding: 15px 16px 16px; }
    .emm-branches-feature__badge { display: inline-flex; padding: 4px 8px; border: 1px solid #f8c67d; border-radius: 999px; background: #fff8eb; color: #b96d13; font-size: 10px; font-weight: 800; }
    .emm-branches-feature h3 { margin: 10px 0 6px; color: #183d62; font-size: 16px; font-weight: 900; }
    .emm-branches-feature p { margin: 0 0 14px; color: #6b8298; font-size: 11px; line-height: 1.8; }
    .emm-branches-feature a { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-radius: 10px; background: #fff; color: #2179c5 !important; font-size: 11px; font-weight: 800; box-shadow: 0 5px 14px rgba(27, 93, 147, .08); }
    .emm-branches-feature a b { color: #ef941d; font-size: 15px; }
    .emm-branches-results-wrap { min-width: 0; }
    .emm-branches-results__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 1px 10px; }
    .emm-branches-results__heading strong { color: #2d587d; font-size: 13px; }
    .emm-branches-results__heading span { color: #8095a9; font-size: 11px; }
    .emm-branches-results { max-height: 316px; padding: 1px 2px 2px 8px; overflow: auto; scrollbar-width: thin; scrollbar-color: #b4d7f2 transparent; }
    .emm-branches-grid { display: grid; margin-top:4px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
    .emm-branch-card { position: relative; display: block; min-width: 0; min-height: 108px; padding: 11px 30px 10px 11px; border: 1px solid #dcebf7; border-radius: 13px; background: #fff; color: #183d62 !important; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
    .emm-branch-card:hover, .emm-branch-card:focus-visible { border-color: #77b5e8; box-shadow: 0 9px 18px rgba(41, 115, 176, .12); outline: none; transform: translateY(-2px); }
    .emm-branch-card__meta { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
    .emm-branch-card__meta b { overflow: hidden; color: #2a82ca; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
    .emm-branch-card__meta em { padding: 2px 5px; border-radius: 999px; background: #fff4e4; color: #b56d1f; font-size: 9px; font-style: normal; white-space: nowrap; }
    .emm-branch-card > strong { display: block; overflow: hidden; color: #244d72; font-size: 12px; font-weight: 900; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
    .emm-branch-card small { display: -webkit-box; overflow: hidden; margin-top: 4px; color: #73889c; font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
    .emm-branch-card__phone { display: block; margin-top: 6px; color: #5b7690; font-size: 10px; text-align: right; }
    .emm-branch-card > i { position: absolute; top: 43px; right: 10px; color: #f09820; font-size: 17px; font-style: normal; }
    .emm-branches-empty { grid-column: 1 / -1; padding: 52px 20px; border: 1px dashed #c9e1f3; border-radius: 15px; background: #fafdff; color: #68829a; text-align: center; }
    .emm-branches-empty > span { display: block; color: #f09a28; font-size: 24px; }
    .emm-branches-empty strong { display: block; margin-top: 5px; color: #335f85; font-size: 13px; }
    .emm-branches-empty p { margin: 5px 0 0; font-size: 11px; }
    @keyframes emm-branches-spin { to { transform: rotate(360deg); } }

}

@media (max-width: 1024px) {
    .emm-branches-mega { display: none !important; }
}
