.representatives {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background-color: #701100;
}

.representatives::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../../images/bar.png") center/cover repeat;
    opacity: 0.3;
    pointer-events: none;
}

.representatives > * {
    position: relative;
    z-index: 1;
}

.representatives-container {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr);
    gap: 72px;
    min-height: 560px;
    margin-block: 0;
    padding-block: 58px;

}

.representatives-text h2 {
    margin-bottom: 28px;
}

.representatives-text p {
    max-width: 500px;
    color: var(--white);
    font-weight: 200;
    line-height: 3.2rem;
}

.representatives-map {
    display: flex;
    justify-content: center;
    align-items: center;
}

.representatives-map img,
.representatives-map svg {
    display: block;
    width: min(100%, 620px);
    height: auto;
}

@media (max-width: 1200px) {
    .representatives-container {
        gap: 48px;
        min-height: 500px;
    }

    .representatives-map img,
    .representatives-map svg {
        width: min(100%, 560px);
    }
}

@media (max-width: 860px) {
    .representatives-container {
        grid-template-columns: 1fr;
        gap: 34px;
        min-height: auto;
        padding-block: 44px;
    }

    .representatives-text,
    .representatives-text h2,
    .representatives-text p {
        max-width: none;
    }

    .representatives-map {
        justify-content: flex-start;
    }

    .representatives-map img,
    .representatives-map svg {
        width: min(100%, 460px);
    }
}

@media (max-width: 580px) {
    .representatives-container {
        padding-block: 38px;
    }

}

#svg-map {
    overflow: visible;
}

#svg-map a {
    text-decoration: none;
    cursor: default;
}

#svg-map path {
    fill: transparent;
    stroke: transparent;
    transition: fill 0.2s ease, opacity 0.2s ease;
}

#svg-map a > path:first-of-type {
    fill: #d9afa6;
    stroke: rgba(117, 26, 13, 0.55);
    transition: fill 0.2s ease, opacity 0.2s ease;
}

#svg-map text {
    display: none;
}

#svg-map .circle {
    display: none;
}

#svg-map .representative-state > path:first-of-type {
    fill: #dc4734;
}

#svg-map a:hover > path:first-of-type {
    fill: #c99a91;
}

#svg-map .representative-state {
    cursor: pointer;
}

#svg-map .representative-state:hover > path:first-of-type,
#svg-map .representative-state:focus-visible > path:first-of-type {
    fill: #bf3728;
}

#svg-map .representative-state:focus-visible > path:first-of-type {
    stroke: var(--white);
    stroke-width: 2;
}

body.representatives-modal-open {
    overflow: hidden;
}

.representatives-modal {
    max-width: none;
    max-height: none;
    padding: 0;
    margin: auto;
    overflow: visible;
    background: transparent;
    border: 0;
}

.representatives-modal::backdrop {
    background: rgba(15, 13, 8, 0.78);
}

.representatives-modal-content {
    position: relative;
}

.representatives-modal img {
    display: block;
    width: auto;
    max-width: min(90vw, 560px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    object-fit: contain;
    border-radius: 6px;
}

.representatives-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: var(--white);
    font-size: 2rem;
    background: rgba(15, 13, 8, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    cursor: pointer;
}

.representatives-modal-close:hover,
.representatives-modal-close:focus-visible {
    background: #701100;
}

.representatives-modal-close:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}
