.pi-reach-map {
    overflow-x: clip;
    --canvas: #f5f3f2;
    --wine: #930d13;
    --teal: #20bbb1;
    --ink: #111418;
    --paper: #ffffff;
    /* Official green of the Bangladesh national flag */
    --bangladesh-green: #006A4E;

    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 74% 31%, rgba(255, 255, 255, 0.95), transparent 35%),
        var(--canvas);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

.pi-reach-map button,
.pi-reach-map a {
    font: inherit;
}

.pi-reach-map .page-shell {
    min-height: 100vh;
    margin: 0;
    padding: 36px 0;
    display: grid;
    place-items: start center;
}

.pi-reach-map .reach-stage {
    position: relative;
    /* Scale the whole 2-column design down to fit the viewport so the
       complete card (map on the right) is visible without horizontal scroll.
       --reach-scale is computed in pi-reach-map.js (1 at >=~1382px). */
    width: calc(1382px * var(--reach-scale, 1));
    height: calc(1010px * var(--reach-scale, 1));
    transform: scale(var(--reach-scale, 1));
    transform-origin: top left;
}

.pi-reach-map .reach-copy {
    position: absolute;
    inset: 0 auto auto 0;
    width: 690px;
    height: 1010px;
    color: #fff;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(circle at 55% 42%, rgba(46, 0, 3, 0.14), transparent 43%),
        linear-gradient(135deg, #7a1517 0%, #6f1215 54%, #741316 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pi-reach-map .copy-inner {
    position: relative;
    z-index: 2;
    padding: 64px 48px 44px;
}

.pi-reach-map .reach-copy .eyebrow {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Override the global .clp-home-page .eyebrow red so it reads white on the maroon card */
    color: #fff;
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.pi-reach-map .eyebrow-line {
    width: 38px;
    height: 5px;
    border-radius: 100px;
    background: var(--teal);
}

.pi-reach-map .reach-copy h1 {
    margin: 33px 0 0;
    max-width: 455px;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 62px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

.pi-reach-map .bangladesh-green {
    color: var(--bangladesh-green);
}

.pi-reach-map .section-rule {
    display: block;
    width: 116px;
    height: 6px;
    margin-top: 29px;
    border-radius: 100px;
    background: var(--teal);
}

.pi-reach-map .description {
    margin: 25px 0 0 2px;
    color: rgba(255, 255, 255, 0.93);
    font-size: 21px;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: -0.012em;
}

.pi-reach-map .location-status {
    width: fit-content;
    min-height: 50px;
    margin-top: 30px;
    padding: 0 18px 0 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #111418;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: #eceae7;
    box-shadow: 0 8px 20px rgba(47, 0, 2, 0.13);
    font-size: 16px;
    font-weight: 600;
}

.pi-reach-map .location-pin {
    width: 15px;
    height: 18px;
    flex: 0 0 auto;
    /* Red pin icon, matched to the homepage primary red */
    color: #A3181E;
}

.pi-reach-map .centers-button {
    width: 301px;
    height: 66px;
    margin-top: 28px;
    padding: 0 52px 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #9b1119;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(60, 0, 3, 0.22);
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.pi-reach-map .centers-button:hover {
    color: #9b1119;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 26px rgba(60, 0, 3, 0.26);
}

.pi-reach-map .centers-button:focus-visible,
.pi-reach-map .zoom-controls button:focus-visible {
    outline: 3px solid #48d2c9;
    outline-offset: 4px;
}

.pi-reach-map .arrow-icon {
    width: 20px;
    height: 20px;
}

.pi-reach-map .dot-field {
    position: absolute;
    left: 8px;
    bottom: -4px;
    width: 183px;
    height: 185px;
    opacity: 0.2;
    background-image: radial-gradient(circle, #ffffff 1.6px, transparent 1.8px);
    background-size: 18px 18px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 8%, transparent 72%);
    mask-image: radial-gradient(circle at 50% 50%, #000 8%, transparent 72%);
}

.pi-reach-map .orbit {
    position: absolute;
    left: 88px;
    bottom: -226px;
    border: 2px solid rgba(255, 255, 255, 0.23);
    border-radius: 50%;
}

.pi-reach-map .orbit-one {
    width: 420px;
    height: 420px;
}

.pi-reach-map .orbit-two {
    left: 106px;
    bottom: -208px;
    width: 384px;
    height: 384px;
}

.pi-reach-map .orbit-three {
    left: 124px;
    bottom: -190px;
    width: 348px;
    height: 348px;
}

.pi-reach-map .orbit-dot {
    position: absolute;
    z-index: 1;
    left: 412px;
    bottom: 130px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--teal);
}

.pi-reach-map .map-card {
    position: absolute;
    z-index: 3;
    top: 23px;
    left: 540px;
    width: 826px;
    height: 968px;
    overflow: hidden;
    border: 1px solid rgba(227, 226, 224, 0.72);
    border-radius: 21px;
    background: var(--paper);
    box-shadow: 0 17px 40px rgba(24, 24, 22, 0.17);
}

.pi-reach-map .map-toolbar {
    height: 61px;
    padding: 0 42px 0 27px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0dfdd;
    background: rgba(255, 255, 255, 0.98);
}

.pi-reach-map .map-toolbar h2 {
    margin: 0;
    color: #111418;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.pi-reach-map .live-badge {
    height: 31px;
    min-width: 60px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #087f7b;
    border-radius: 999px;
    background: #ebf4f3;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pi-reach-map .map-viewport {
    position: relative;
    width: 778px;
    height: 872px;
    margin: 16px 27px 18px 21px;
    overflow: hidden;
    background: #fff;
}

.pi-reach-map .map-asset {
    width: 100%;
    height: 100%;
    transform: scale(1);
    transform-origin: 50% 50%;
    transition: transform 300ms ease;
}

.pi-reach-map .map-asset img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: fill;
    user-select: none;
    -webkit-user-drag: none;
}

/* Active district location names (shown in the location area) */
.pi-reach-map .location-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding: 0;
    list-style: none;
    /* Keep the list inside the visible part of the left card so it is not
       hidden behind the overlapping map card in the 2-column layout. */
    max-width: 492px;
}

.pi-reach-map .location-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 7px 8px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
}

.pi-reach-map .zoom-level {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 3;
    min-width: 66px;
    height: 36px;
    margin: 0;
    padding: 0 11px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 0;
    border-radius: 0 0 10px 0;
    background: rgba(48, 48, 48, 0.92);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
    font-size: 17px;
    font-weight: 700;
}

.pi-reach-map .zoom-controls {
    position: absolute;
    z-index: 4;
    right: 20px;
    bottom: 4px;
    display: flex;
    gap: 11px;
}

.pi-reach-map .zoom-controls button {
    width: 45px;
    height: 45px;
    margin: 0;
    padding: 0 0 2px;
    display: grid;
    place-items: center;
    color: #13181a;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 13px rgba(0, 0, 0, 0.17);
    cursor: pointer;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    transition: transform 140ms ease, opacity 140ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.pi-reach-map .zoom-controls button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.pi-reach-map .zoom-controls button:disabled {
    cursor: default;
    opacity: 0.78;
}

/* Below 768px the 2-column design is too small to read, so fall back to the
   existing stacked (fluid) layout. Above that the 2-column design is kept and
   scaled to fit via --reach-scale. */
@media (max-width: 767px) {
    .pi-reach-map .page-shell {
        padding: 28px 0;
    }

    .pi-reach-map .reach-stage {
        width: min(100%, 860px);
        height: auto;
        transform: none;
        display: flex;
        flex-direction: column;
    }

    .pi-reach-map .reach-copy,
    .pi-reach-map .map-card {
        position: relative;
        inset: auto;
        width: 100%;
    }

    .pi-reach-map .reach-copy {
        height: auto;
        min-height: 850px;
        border-radius: 20px 20px 0 0;
    }

    .pi-reach-map .copy-inner {
        padding-right: 64px;
        padding-bottom: 110px;
    }

    .pi-reach-map .map-card {
        height: auto;
        margin-top: -42px;
        border-radius: 21px;
    }

    .pi-reach-map .map-viewport {
        width: calc(100% - 48px);
        height: auto;
        aspect-ratio: 790 / 872;
    }

    .pi-reach-map .location-list {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .pi-reach-map .page-shell {
        padding: 12px 0;
    }

    .pi-reach-map .reach-copy {
        min-height: 742px;
        border-radius: 16px 16px 0 0;
    }

    .pi-reach-map .copy-inner {
        padding: 39px 25px 86px;
    }

    .pi-reach-map .eyebrow {
        gap: 11px;
        font-size: 17px;
    }

    .pi-reach-map .eyebrow-line {
        width: 29px;
        height: 4px;
    }

    .pi-reach-map .reach-copy h1 {
        margin-top: 28px;
        font-size: clamp(39px, 12.2vw, 54px);
        line-height: 1.12;
    }

    .pi-reach-map .section-rule {
        width: 88px;
        height: 5px;
        margin-top: 27px;
    }

    .pi-reach-map .description {
        margin-top: 23px;
        font-size: 17px;
        line-height: 1.6;
    }

    .pi-reach-map .desktop-break {
        display: none;
    }

    .pi-reach-map .location-status {
        min-height: 46px;
        margin-top: 22px;
        font-size: 14px;
    }

    .pi-reach-map .location-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
    }

    .pi-reach-map .location-chip {
        padding: 6px 10px;
        font-size: 12.5px;
    }

    .pi-reach-map .centers-button {
        width: min(100%, 290px);
        height: 59px;
        margin-top: 22px;
        padding: 0 39px 0 35px;
        font-size: 18px;
    }

    .pi-reach-map .orbit {
        left: 26px;
    }

    .pi-reach-map .orbit-dot {
        left: 72%;
        bottom: 84px;
    }

    .pi-reach-map .map-card {
        margin-top: -25px;
        border-radius: 16px;
    }

    .pi-reach-map .map-toolbar {
        height: 56px;
        padding: 0 16px;
    }

    .pi-reach-map .map-toolbar h2 {
        font-size: 14px;
    }

    .pi-reach-map .live-badge {
        height: 27px;
        min-width: 51px;
        padding: 0 10px;
        font-size: 10px;
    }

    .pi-reach-map .map-viewport {
        width: calc(100% - 20px);
        margin: 10px 10px 12px;
    }

    .pi-reach-map .zoom-level {
        top: 1px;
        left: 1px;
        min-width: 52px;
        height: 30px;
        font-size: 13px;
    }

    .pi-reach-map .zoom-controls {
        right: 9px;
        bottom: 3px;
        gap: 7px;
    }

    .pi-reach-map .zoom-controls button {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pi-reach-map .centers-button,
    .pi-reach-map .map-asset,
    .pi-reach-map .zoom-controls button {
        transition: none;
    }
}
