/* =============================================
   JOKVA Pobočky Mapa – Styles
   ============================================= */

/* ------- Reset & Base ------- */
.jpm-map-section,
.jpm-carousel-section {
    box-sizing: border-box;
    font-family: inherit;
}

.jpm-map-section *,
.jpm-carousel-section * {
    box-sizing: border-box;
}

/* ------- MAP SECTION ------- */

/* Mobile dropdown – hidden on desktop */
.jpm-mobile-dropdown {
    display: none;
}

/* Map wrapper: map + detail panel side by side */
.jpm-map-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    width: 100%;
}

/* Map container */
.jpm-map-container {
    flex: 1 1 65%;
    min-width: 0;
    position: relative;
}

.jpm-svg-wrap {
    position: relative;
    width: 100%;
    line-height: 0;
}

.jpm-svg-wrap img.jpm-map-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Pins layer – overlays the SVG */
.jpm-pins-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Individual pin */
.jpm-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    cursor: pointer;
    pointer-events: auto;
    z-index: 5;
    transition: z-index 0s;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.jpm-pin::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 50%;
    transform: scale(0.5) translateX(-50%);
    min-width: 130%;
    min-height: 130%;
    aspect-ratio: 1 / 1 !important;
    background-image: radial-gradient(#3a3f6350 0%, transparent 70%);
    z-index: -1;
    opacity: 0;
    pointer-events: none;
}

.jpm-pin.is-active::before {
    transform: scale(1) translateX(-50%);
    opacity: 1;
}

.jpm-pin:hover,
.jpm-pin.is-active {
    z-index: 10;
}

.jpm-pin-img {
    width: 48px;
    height: 60px;
    display: block;
    transition: transform 0.5s ease;
    pointer-events: all;
}

.jpm-pin-default {
    display: block;
}

.jpm-pin-active {
    display: none;
}

.jpm-pin.is-active .jpm-pin-default {
    display: none;
}

.jpm-pin.is-active .jpm-pin-active {
    display: block;
}

.jpm-pin:hover .jpm-pin-img,
.jpm-pin.is-active .jpm-pin-img {
    transform: scale(1.2) translateY(2px);
}

/* Pin title label */
.jpm-pin-title {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    display: block;
    margin-top: 2px;
    font-size: 16px;
    font-weight: 700;
    color: var(--awb-color7);
    text-align: center;
    background: var(--awb-color2);
    padding: 4px;
    pointer-events: all;
    line-height: 1.3;
    max-width: 180px;
    white-space: nowrap;
    border: var(--awb-color3) 1px solid;
    transition: all 0.5s;
}

.jpm-pin .jpm-pin-oznaceni {
    font-weight: 400;
}

.jpm-pin.is-active .jpm-pin-title,
.jpm-pin:hover .jpm-pin-title {
    border: var(--awb-color3) 1px solid;
    background: var(--awb-color1);
    transform: translateX(-50%) scale(1);
}

/* ------- Detail Panel (desktop) ------- */
.jpm-detail-panel {
    position: relative;
    flex: 0 0 35%;
    max-width: 35%;
    padding: 40px 40px 40px 50px;
    min-height: 300px;
    display: flex;
    align-items: flex-start;
}

.jpm-detail-panel::before {
    content: '';
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: scale(0.5) translateX(-50%) translateY(-50%);
    min-width: 130%;
    min-height: 130%;
    aspect-ratio: 1 / 1 !important;
    background-image: radial-gradient(rgba(256, 256, 256, 0.5) 0%, transparent 70%);
    z-index: -1;
    opacity: 0;
    pointer-events: none;
}

.jpm-detail-content {
    width: 100%;
}

/* Detail populated */
.jpm-detail-content .jpm-detail-title {
    font-size: 24px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--awb-color6);
    margin: 0;
    line-height: 1.3;
}

p.jpm-detail-oznaceni {
    margin-block-start: 0px;
}

.jpm-detail-content .jpm-detail-address {
    font-size: 15px;
    color: var(--awb-color5);
    margin: 0 0 6px;
    line-height: 1.5;
}

.jpm-detail-content .jpm-detail-address a:hover {
    opacity: 0.8;
}

.jpm-detail-content .jpm-detail-contact {
    margin: 16px 0 0;
}

.jpm-detail-content .jpm-detail-contact a,
.jpm-detail-content .jpm-detail-address a,
.jpm-mobile-popup a,
.jpm-mobile-popup .jpm-detail-address a {
    display: block;
    width: fit-content;
    color: var(--awb-color5);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.8;
    transition: opacity 0.2s;
    text-decoration: none;
    background-image: linear-gradient(var(--awb-color5), var(--awb-color5));
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition:
        background-size 0.35s ease 0.15s,
        background-image 0s linear;
}

.jpm-detail-content .jpm-detail-contact a:hover,
.jpm-detail-content .jpm-detail-address a:hover,
.jpm-mobile-popup a:hover,
.jpm-mobile-popup .jpm-detail-address a:hover {
    background-image: linear-gradient(var(--awb-color5), var(--awb-color5));
    background-size: 0% 1px;
    background-position: 100% 100%;
}

.jpm-detail-content .jpm-detail-text {
    margin: 20px 0 0;
    font-size: 16px;
    color: var(--awb-color7);
    line-height: 1.6;
}

.jpm-detail-content .jpm-detail-text p {
    margin: 0 0 10px;
}

.jpm-detail-content .jpm-detail-text p:last-child {
    margin-bottom: 0;
}

.jpm-detail-content .jpm-detail-custom,
.jpm-popup-content .jpm-detail-custom {
    font-size: 15px;
    color: var(--awb-color5);
    margin: 4px 0;
    line-height: 1.5;
}

/* ------- Mobile Popup ------- */
.jpm-mobile-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 999999;
}

.jpm-mobile-popup.is-open {
    display: flex;
}

.jpm-popup-inner {
    position: relative;
    background: var(--awb-color6);
    color: var(--awb-color1);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 36px 60px 32px;
}

.jpm-popup-close {
    position: sticky;
    top: 0;
    float: right;
    background: none;
    border: none;
    color: var(--awb-color1);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 10px;
    z-index: 2;
    transition: opacity 0.2s;
}

.jpm-popup-close:hover {
    opacity: 0.7;
}

.jpm-popup-content .jpm-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--awb-color1);
    margin: 0 0 14px;
    line-height: 1.3;
}

.jpm-popup-content .jpm-detail-address {
    font-size: 15px;
    color: var(--awb-color1);
    margin: 0 0 6px;
    line-height: 1.5;
}

.jpm-popup-content .jpm-detail-contact {
    margin: 16px 0 0;
}

.jpm-popup-content .jpm-detail-contact a {
    display: block;
    color: var(--awb-color5);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.8;
}

.jpm-popup-content .jpm-detail-text {
    margin: 20px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.jpm-popup-content .jpm-detail-text p {
    margin: 0 0 10px;
}

/* ------- CAROUSEL SECTION ------- */
.jpm-carousel-section {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.jpm-carousel-track {
    display: flex;
    gap: 0;
    transition: transform 0.4s ease;
    width: 100%;
}

.jpm-carousel-card {
    flex: 0 0 25%;
    max-width: 25%;
    cursor: pointer;
}

.jpm-card-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 50px 80px 50px;
    transition: background-color 0.3s ease;
}

.jpm-carousel-card:hover .jpm-card-inner {
    background-color: var(--awb-color7);
}

.jpm-carousel-card.is-active .jpm-card-inner {
    background-color: var(--awb-color5);
}

.jpm-card-title {
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--awb-color1);
    margin: 0;
    line-height: 1.3;
}

.jpm-card-oznaceni {
    color: var(--awb-color1);
    font-size: 16px;
    margin-block-start: 0px;
    margin-block-end: 0px;
    font-weight: 400;
}

.jpm-card-adresa {
    font-size: 14px;
    color: var(--awb-color2);
    margin: 0 0 8px;
    line-height: 1.5;
    flex-grow: 1;
}

.jpm-card-link {
    font-size: 16px;
    line-height: 18px;
    color: var(--awb-color1);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.jpm-card-link::after {
    content: '';
    display: inline-flex;
    background: url('/wp-content/uploads/2026/01/arrow-righ_wh.svg') center center no-repeat;
    position: relative;
    transform: translateX(0%) translateY(-2px);
    width: 24px;
    height: 18px;
    background-size: contain;
    transition: all 0.5s;
}

.jpm-carousel-card:not(.is-active):hover .jpm-card-link {
    color: var(--awb-color5);
}

.jpm-carousel-card:not(.is-active):hover .jpm-card-link::after {
    color: var(--awb-color5);
    background: url('/wp-content/uploads/2026/01/arrow-right_or.svg') center center no-repeat;
    transform: translateX(2px) translateY(-2px);
}

/* Carousel nav */
.jpm-carousel-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.jpm-carousel-prev,
.jpm-carousel-next {
    background: var(--awb-custom_color_3);
    border: 1px solid var(--awb-color3);
    color: var(--awb-color1);
    width: 40px;
    height: 40px;
    /* border-radius: 50%; */
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    pointer-events: all;
}

.jpm-carousel-prev {
    transform: scaleX(-1);
    transform-origin: center center;
}

.jpm-carousel-prev:hover,
.jpm-carousel-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* MASKA na columnu */
.col__logo-mask.fusion-layout-column .fusion-column-wrapper {
  -webkit-mask-image: url("/wp-content/uploads/2026/02/logo-mask.svg");
  mask-image: url("/wp-content/uploads/2026/02/logo-mask.svg");

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  -webkit-mask-position: center center;
  mask-position: right center;

  -webkit-mask-size: contain;
  mask-size: contain;
}

/* =============================================
   RESPONSIVE – ≤ 1000px
   ============================================= */
@media (max-width: 1000px) {

    /* Show dropdown, hide desktop detail panel */
    .jpm-mobile-dropdown {
        display: block;
        padding: 0 0px 20px;
    }

    .jpm-dropdown-select {
        width: 100%;
        padding: 14px 28px 14px 14px;
        font-size: 15px;
        border: 2px solid var(--awb-color8);
        border-radius: 0px !important;
        background: var(--awb-color3);
        color: var(--awb-color6);
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23000' stroke-width='2' fill='none'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        cursor: pointer;
    }

    .jpm-dropdown-select option {
        background: var(--awb-color2);
        color: var(--awb-color7);
    }

    /* Map full width, no detail panel */
    .jpm-map-wrapper {
        flex-direction: column;
        padding-bottom: 0px;
    }

    .jpm-detail-panel {
        display: none;
    }

    .jpm-map-container {
        flex: 1 1 100%;
    }

    /* Hide pin titles on mobile */
    .jpm-pin-title {
        display: none !important;
    }

    /* Pin size smaller on mobile */
    .jpm-pin-img {
        width: 26px;
        height: 36px;
    }

    /* Map not scrollable */
    .jpm-svg-wrap {
        overflow: hidden;
        touch-action: pan-x pan-y;
    }

    /* Carousel → hidden on mobile (dropdown replaces it) */
    .jpm-carousel-section {
        display: none;

    }

    .fusion-fullwidth:has(.jpm-carousel-section)>.fusion-builder-row>.fusion-layout-column>.fusion-column-wrapper>.fusion-builder-row>.fusion-layout-column>.fusion-column-wrapper {
        height: 0px !important;
        min-height: 0px !important;
    }
}

/* Medium desktop adjustments */
@media (min-width: 1001px) and (max-width: 1400px) {
    .jpm-card-inner {
        padding: 32px 40px 24px;
    }

    .jpm-detail-panel {
        padding: 30px 30px 30px 40px;
    }
}