/* SFORT - staticka mapa pobocky / shortcode [sfort_mapa] */
.sfort-map-section,
.sfort-map-section * {
    box-sizing: border-box;
}

.sfort-map-section {
    width: 100%;
    max-width: 92rem;
    margin: 3rem auto 8rem;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}


.sfort-map-stage {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: #efefe9;
}

.sfort-map-stage img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.sfort-map-stage--placeholder {
    min-height: 58rem;
    aspect-ratio: 1 / 0.98;
    background:
        linear-gradient(135deg, rgba(103, 30, 45, 0.035) 25%, transparent 25%) -2rem 0/4rem 4rem,
        linear-gradient(225deg, rgba(17, 31, 86, 0.03) 25%, transparent 25%) -2rem 0/4rem 4rem,
        #f4f4ef;
}

.sfort-map-placeholder-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 6rem);
    color: #777;
    font-size: 1.5rem;
    line-height: 1.45;
    text-align: center;
}

/*
 * Klikací body – finální varianta.
 * Pin je skutečné SVG, ne skládaný CSS tvar. Díky tomu se nedeformuje
 * a vypadá stejně v různých prohlížečích a při různých velikostech.
 */
.sfort-map-marker {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 2;
    width: clamp(4.4rem, 5.4vw, 6.2rem);
    height: clamp(6.1rem, 7.5vw, 8.4rem);
    transform: translate(-50%, -91%);
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent url('../images/sfort-map/pin-sfort.svg') center / contain no-repeat;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    filter: drop-shadow(0 .45rem .45rem rgba(0, 0, 0, .20));
    transition: transform .18s ease, filter .18s ease;
}

.sfort-map-marker::before,
.sfort-map-marker::after {
    content: none;
}

.sfort-map-marker:hover,
.sfort-map-marker:focus-visible {
    transform: translate(-50%, -91%) scale(1.08);
    filter: drop-shadow(0 .7rem .65rem rgba(0, 0, 0, .28));
    outline: none;
}

/* Všechny body mají jednotný vzhled. */
.sfort-map-marker--blue {
    background-image: url('../images/sfort-map/pin-sfort.svg');
}

.sfort-map-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Modal */
body.sfort-map-modal-open {
    overflow: hidden;
}

.sfort-map-modal[hidden] {
    display: none !important;
}

.sfort-map-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000;
    display: grid;
    place-items: center;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 2.5rem;
    font-family: 'Poppins', sans-serif;
}

.sfort-map-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, .72);
    backdrop-filter: blur(2px);
}

.sfort-map-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(30rem, .95fr);
    width: min(108rem, 100%);
    max-height: min(84vh, 76rem);
    overflow: hidden;
    background: #fff;
    border-radius: 1.6rem;
    box-shadow: 0 2.4rem 7rem rgba(0,0,0,.35);
}

.sfort-map-modal__media {
    min-height: 48rem;
    background: #e6e6e2;
}

.sfort-map-modal__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 48rem;
    object-fit: cover;
}

.sfort-map-modal__body {
    position: relative;
    overflow-y: auto;
    padding: 6.2rem 5.2rem 5.2rem;
}

.sfort-map-modal__eyebrow {
    display: block;
    margin: 0 0 1rem;
    color: #671e2d;
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.entry-content .sfort-map-modal__title,
.sfort-map-modal__title {
    margin: 0 0 2rem;
    color: #671e2d;
    font-size: 3rem;
    line-height: 1.16;
    font-weight: 700;
}

.entry-content .sfort-map-modal__text,
.sfort-map-modal__text {
    margin: 0 0 2.4rem;
    color: #2a2a2a;
    font-size: 1.6rem;
    line-height: 1.65;
}

.sfort-map-modal__address {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    margin-top: 2.4rem;
    padding-top: 2.1rem;
    border-top: 1px solid #deded8;
    color: #2a2a2a;
    font-size: 1.5rem;
    line-height: 1.5;
    font-style: normal;
}

.sfort-map-modal__address-icon {
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    margin-top: .05rem;
    color: #671e2d;
}

.sfort-map-modal__close {
    position: absolute;
    top: 1.8rem;
    right: 1.8rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 4.4rem;
    height: 4.4rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #671e2d;
    box-shadow: 0 .3rem 1.3rem rgba(0,0,0,.16);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.sfort-map-modal__close:hover,
.sfort-map-modal__close:focus-visible {
    background: #671e2d;
    color: #fff;
    outline: none;
}

.sfort-map-modal__close svg {
    width: 2rem;
    height: 2rem;
    stroke: currentColor;
}

@media (max-width: 782px) {
    .sfort-map-section {
        margin-top: 2rem;
        margin-bottom: 6rem;
    }

    .sfort-map-stage--placeholder {
        min-height: 0;
    }

    .sfort-map-modal {
        padding: 1.4rem;
        align-items: center;
    }

    .sfort-map-modal__dialog {
        display: block;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 1.2rem;
    }

    .sfort-map-modal__media {
        min-height: 0;
        height: min(44vw, 30rem);
    }

    .sfort-map-modal__media img {
        min-height: 0;
        height: 100%;
    }

    .sfort-map-modal__body {
        overflow: visible;
        padding: 3.2rem 2.5rem 3rem;
    }

    .entry-content .sfort-map-modal__title,
    .sfort-map-modal__title {
        padding-right: 2.4rem;
        font-size: 2.35rem;
    }

    .entry-content .sfort-map-modal__text,
    .sfort-map-modal__text {
        font-size: 1.5rem;
        line-height: 1.58;
    }

    .sfort-map-modal__close {
        top: 1rem;
        right: 1rem;
        width: 4rem;
        height: 4rem;
    }
}

@media (max-width: 480px) {
    .sfort-map-section {
        width: 100%;
    }

    .sfort-map-modal__media {
        height: 24rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sfort-map-marker::before,
    .sfort-map-modal__close {
        transition: none;
    }
}
