.branches-map-page {
    --branch-navy: #003b4a;
    --branch-navy-deep: #002c39;
    --branch-teal: #05879a;
    --branch-cyan: #2db2ce;
    --branch-gold: #ddc247;
    --branch-ink: #083b49;
    --branch-muted: #526a73;
    --branch-line: #c5dde2;
    --branch-surface: #f6fbfc;
    --branch-canvas: oklch(24% .055 218);
    --branch-on-canvas: oklch(96% .012 210);
    --branch-on-canvas-muted: oklch(82% .025 210);
    --branch-on-canvas-accent: oklch(73% .11 205);
    background: var(--branch-canvas);
}

.branches-map-page .breadcrumb-nav {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(8, 59, 73, .08);
}

#main-content.branches-map-main {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 70vh;
    padding: clamp(48px, 6vw, 88px) 0 clamp(72px, 8vw, 120px);
    background: var(--branch-canvas);
    color: var(--branch-on-canvas);
}

#main-content.branches-map-main::before {
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    width: 100%;
    height: min(560px, 46%);
    content: "";
    background: url('../images/mainbg.webp') center 28% / cover no-repeat;
    opacity: .17;
    pointer-events: none;
}

#main-content.branches-map-main::after {
    position: absolute;
    z-index: -1;
    inset-block-end: -8%;
    inset-inline-start: -9%;
    width: clamp(240px, 30vw, 520px);
    height: auto;
    aspect-ratio: 1;
    content: "";
    background: url('../images/shape5.webp') center / contain no-repeat;
    opacity: .055;
    transform: rotate(180deg);
    pointer-events: none;
}

.branches-map-intro {
    max-width: 920px;
    margin: 0 auto clamp(42px, 5vw, 68px);
    text-align: center;
}

.branches-map-intro__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--branch-on-canvas-accent);
    font-size: clamp(15px, 1.15vw, 18px);
    font-weight: 800;
}

.branches-map-intro__eyebrow > span {
    width: 38px;
    height: 3px;
    border-radius: 999px;
    background: var(--branch-gold);
}

.branches-map-intro h1 {
    margin: 0;
    color: var(--branch-on-canvas);
    font-size: clamp(38px, 5vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.branches-map-intro p {
    max-width: 760px;
    margin: 20px auto 0;
    color: var(--branch-on-canvas-muted);
    font-size: clamp(17px, 1.45vw, 22px);
    line-height: 1.8;
}

.branch-map,
.branch-map * {
    box-sizing: border-box;
}

.branch-map {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
}

.branch-map__root {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    width: min(100%, 650px);
    margin: 0 auto;
    padding: 24px 28px;
    overflow: hidden;
    color: #fff;
    background: oklch(29% .058 218);
    border: 1px solid rgba(221, 194, 71, .52);
    border-color: color-mix(in srgb, var(--branch-gold) 52%, transparent);
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(0, 17, 24, .38);
}

.branch-map__root::before {
    position: absolute;
    inset-block-start: -58px;
    inset-inline-end: -34px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(45, 178, 206, .22);
    border-radius: 50%;
    content: "";
}

.branch-map__root-mark {
    position: relative;
    display: grid;
    width: 92px;
    aspect-ratio: 1;
    place-items: center;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

.branch-map__root-mark img {
    display: block;
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.branch-map__root-copy {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
}

.branch-map__root-copy small {
    color: #8cdbea;
    font-size: 14px;
    font-weight: 800;
}

.branch-map__root-copy strong {
    font-size: clamp(22px, 2.2vw, 32px);
    font-weight: 900;
    line-height: 1.25;
}

.branch-map__root-copy > span {
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
    line-height: 1.7;
}

.branch-map__groups,
.branch-map__leaves {
    padding: 0;
    margin: 0;
    list-style: none;
}

.branch-map__groups {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--branch-columns), minmax(0, 1fr));
    gap: 18px;
    padding-top: 58px;
}

.branch-map__groups::before {
    position: absolute;
    inset-block-start: 28px;
    inset-inline: calc(50% / var(--branch-columns));
    height: 2px;
    content: "";
    background: var(--branch-line);
}

.branch-map__groups::after {
    position: absolute;
    inset-block-start: -30px;
    inset-inline-start: calc(50% - 1px);
    width: 2px;
    height: 59px;
    content: "";
    background: var(--branch-gold);
}

.branch-map__group {
    position: relative;
    min-width: 0;
}

.branch-map__group::before {
    position: absolute;
    inset-block-start: -30px;
    inset-inline-start: calc(50% - 1px);
    width: 2px;
    height: 30px;
    content: "";
    background: var(--branch-line);
}

.branch-map__node {
    height: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--branch-line);
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(0, 59, 74, .08);
}

.branch-map__node-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 176px;
    padding: 20px;
    text-align: center;
    background: #e1f5f8;
    border-bottom: 1px solid var(--branch-line);
}

.branch-map__node-number {
    display: grid;
    flex: 0 0 auto;
    width: 48px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--branch-navy);
    background: var(--branch-gold);
    border-radius: 50%;
    font-size: 15px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.branch-map__node-copy {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    width: 100%;
}

.branch-map__node-copy small,
.branch-map__node-copy > span {
    color: var(--branch-muted);
    font-size: 12px;
    font-weight: 700;
}

.branch-map__node-copy h2 {
    margin: 0;
    color: var(--branch-navy-deep);
    font-size: clamp(19px, 1.45vw, 24px);
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.branch-map__leaves {
    padding: 10px 18px 16px;
}

.branch-map__leaves li + li {
    border-top: 1px solid rgba(8, 59, 73, .1);
}

.branch-map__leaves a,
.branch-map__leaf,
.branch-map__group-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 3px;
    color: var(--branch-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
    text-decoration: none;
}

.branch-map__leaf {
    grid-template-columns: auto minmax(0, 1fr);
}

.branch-map__leaf-marker {
    width: 9px;
    height: 9px;
    background: var(--branch-cyan);
    border: 2px solid #d9f4f8;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(45, 178, 206, .26);
}

.branch-map__leaves svg,
.branch-map__group-link svg {
    width: 18px;
    height: 18px;
    color: var(--branch-teal);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform .2s ease;
}

[dir="rtl"] .branch-map__leaves svg,
[dir="rtl"] .branch-map__group-link svg {
    transform: rotate(180deg);
}

.branch-map__leaves a:hover,
.branch-map__group-link:hover {
    color: var(--branch-teal);
}

[dir="ltr"] .branch-map__leaves a:hover svg,
[dir="ltr"] .branch-map__group-link:hover svg {
    transform: translateX(3px);
}

[dir="rtl"] .branch-map__leaves a:hover svg,
[dir="rtl"] .branch-map__group-link:hover svg {
    transform: rotate(180deg) translateX(3px);
}

.branch-map__leaves a:focus-visible,
.branch-map__group-link:focus-visible {
    color: var(--branch-navy-deep);
    outline: 3px solid var(--branch-gold);
    outline-offset: 3px;
    border-radius: 8px;
}

.branch-map__group-link {
    margin: 14px 18px 18px;
    padding-inline: 14px;
    background: var(--branch-surface);
    border-radius: 12px;
}

.branch-map__empty-group {
    margin: 0;
    padding: 28px 20px;
    color: var(--branch-muted);
    font-size: 14px;
    line-height: 1.7;
}

.branch-map-empty {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: clamp(32px, 6vw, 64px);
    text-align: center;
    background: #fff;
    border: 1px solid var(--branch-line);
    border-radius: 24px;
}

.branch-map-empty__icon {
    display: inline-grid;
    width: 70px;
    aspect-ratio: 1;
    margin-bottom: 20px;
    place-items: center;
    color: var(--branch-teal);
    background: #e1f5f8;
    border-radius: 50%;
}

.branch-map-empty__icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.branch-map-empty h2 {
    margin: 0 0 10px;
    color: var(--branch-navy-deep);
    font-size: clamp(24px, 3vw, 36px);
}

.branch-map-empty p {
    margin: 0;
    color: var(--branch-muted);
    font-size: 17px;
}

@media (max-width: 1199.98px) {
    .branch-map {
        max-width: 920px;
    }

    .branch-map__groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 20px;
    }

    .branch-map__groups::before {
        display: none;
    }

    .branch-map__groups::after {
        height: 48px;
    }

    .branch-map__group::before {
        inset-block-start: -18px;
        height: 18px;
    }
}

@media (max-width: 767.98px) {
    #main-content.branches-map-main {
        padding-block-start: 38px;
    }

    .branches-map-intro {
        margin-bottom: 34px;
        text-align: start;
    }

    .branches-map-intro h1 {
        font-size: clamp(34px, 11vw, 52px);
    }

    .branches-map-intro p {
        margin-inline: 0;
    }

    .branch-map__root {
        gap: 15px;
        padding: 18px;
        border-radius: 20px;
    }

    .branch-map__root-mark {
        width: 68px;
        border-radius: 16px;
    }

    .branch-map__root-mark img {
        width: 56px;
        height: 56px;
    }

    .branch-map__root-copy > span {
        display: none;
    }

    .branch-map__groups {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding-top: 42px;
        padding-inline-start: 28px;
    }

    .branch-map__groups::before {
        display: block;
        inset-block: 20px 28px;
        inset-inline-start: 8px;
        inset-inline-end: auto;
        width: 2px;
        height: auto;
        background: var(--branch-line);
    }

    .branch-map__groups::after {
        display: none;
    }

    .branch-map__group::before {
        inset-block-start: 40px;
        inset-inline-start: -20px;
        width: 20px;
        height: 2px;
    }

    .branch-map__node-header {
        min-height: 164px;
        padding: 18px;
    }

    .branch-map__node-number {
        width: 44px;
    }

    .branch-map__node-copy h2 {
        font-size: 20px;
    }
}

@media (max-width: 419.98px) {
    .branch-map__root-copy small {
        font-size: 12px;
    }

    .branch-map__root-copy strong {
        font-size: 19px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .branch-map__leaves svg,
    .branch-map__group-link svg {
        transition: none;
    }
}
