/* ==============================================
   LOCATIONS PAGE
   ============================================== */
.locations__wrapper {
    width: 100%;
    height: 74.7rem;
    position: relative;
}

/* --- Sidebar --- */
.locations__list {
    position: absolute;
    left: 1.7rem;
    top: 1.7rem;
    height: calc(100% - 3.4rem);
    border: 1.5px solid rgba(217,217,217,0.25);
    border-radius: 0.8rem;
    width: 30.1rem;
    z-index: 777;
    backdrop-filter: blur(32px);
    background: rgba(10,10,10,0.58);
    padding: 1.3rem 1.8rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.locations__list-inner {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.locations__list-inner::-webkit-scrollbar { width: 4px; }
.locations__list-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.locations__item {
    display: flex; align-items: center; gap: 1rem;
    cursor: pointer; border-radius: 0.6rem;
    padding: 0.6rem 0.8rem;
    transition: background 0.2s; flex-shrink: 0;
}
.locations__item:hover,
.locations__item.active { background: rgba(255,255,255,0.1); }
.locations__item img {
    border-radius: 0.8rem; width: 9.5rem; height: 6.5rem;
    object-fit: cover; flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.1);
}
.locations__item-info { flex: 1; }
.locations__item-name {
    font: 700 1.6rem/156% "Manrope", sans-serif;
    color: #fff; margin-bottom: 0.3rem;
}
.locations__item span {
    font: 500 1.3rem/120% "Manrope", sans-serif;
    color: rgba(255,255,255,0.55);
}

.locations__map-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #fff; font-size: 1.6rem;
    opacity: 0.5; padding: 2rem; text-align: center;
}

/* ==============================================
   SVG PIN ICON
   ============================================== */
.ymap-pin-svg {
    cursor: pointer;
    display: block;
    width: 31px;
    height: 36px;
    line-height: 0;
    transition: transform 0.15s;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
}
.ymap-pin-svg:hover {
    transform: scale(1.15) translateY(-2px);
}
.ymap-pin-svg.is-active {
    transform: scale(1.2) translateY(-3px);
    filter: drop-shadow(0 4px 12px rgba(222,31,53,0.55));
}
/* Красный цвет активной иконки */
.ymap-pin-svg.is-active svg path:first-child {
    fill: #b01020;
}

/* ==============================================
   POPUP — позиционируется абсолютно внутри #locationsMap
   ============================================== */
.ymap-popup {
    position: absolute;   /* внутри .locations__map (position:relative нужен на карте) */
    z-index: 900;
    width: 30rem;
    background: #fff;
    border-radius: 1.6rem;
    overflow: visible;
    box-shadow: 0 10px 40px rgba(0,0,0,0.22);
    pointer-events: auto;
}

/* хвостик вниз */
.ymap-popup__tail {
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
    pointer-events: none;
}

/* кнопка закрыть */
.ymap-popup__close {
    position: absolute; top: 1rem; right: 1rem; z-index: 10;
    width: 2.8rem; height: 2.8rem;
    background: rgba(0,0,0,0.42); backdrop-filter: blur(6px);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s;
}
.ymap-popup__close:hover { background: rgba(0,0,0,0.65); }

/* слайдер */
.ymap-popup__slider {
    position: relative; height: 18rem;
    overflow: hidden; border-radius: 1.6rem 1.6rem 0 0;
    background: #1a1a1a; flex-shrink: 0;
}
.ymap-popup__slides { width: 100%; height: 100%; position: relative; }
.ymap-popup__slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity 0.3s;
}
.ymap-popup__slide.active { opacity: 1; }
.ymap-popup__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* стрелки */
.ymap-popup__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; width: 2.8rem; height: 2.8rem;
    background: rgba(255,255,255,0.2); backdrop-filter: blur(4px);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s;
}
.ymap-popup__arrow:hover { background: rgba(255,255,255,0.38); }
.ymap-popup__arrow--prev { left: 0.8rem; }
.ymap-popup__arrow--next { right: 0.8rem; }

/* dots */
.ymap-popup__dots {
    position: absolute; bottom: 0.8rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: 0.4rem; z-index: 5;
}
.ymap-popup__dot {
    width: 0.6rem; height: 0.6rem; border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none; cursor: pointer; padding: 0;
    transition: background 0.2s, transform 0.15s;
}
.ymap-popup__dot.active { background: #fff; transform: scale(1.3); }

/* badge */
.ymap-popup__badge {
    position: absolute; top: 1rem; left: 1rem; z-index: 5;
    background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font: 500 1.1rem/1 "Manrope", sans-serif;
    padding: 0.5rem 1rem; border-radius: 10rem;
}

/* body */
.ymap-popup__body { padding: 1.4rem 1.6rem 2rem; }
.ymap-popup__title {
    font: 700 1.6rem/130% "Manrope", sans-serif;
    color: #1a1a1a; margin: 0 0 0.6rem;
}
.ymap-popup__hr { border: none; border-top: 1px solid #ebebeb; margin: 0 0 1.2rem; }
.ymap-popup__footer {
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.ymap-popup__stat {
    font: 500 1.3rem/140% "Manrope", sans-serif; color: #666;
}
.ymap-popup__btn {
    flex-shrink: 0;
    font: 600 1.3rem/1 "Manrope", sans-serif;
    background: #E63939; color: #fff;
    border-radius: 10rem; padding: 0.9rem 1.6rem;
    text-decoration: none; transition: background 0.2s;
    white-space: nowrap;
}
.ymap-popup__btn:hover { background: #c42a2a; }

/* карта должна быть relative чтобы попап позиционировался внутри */
#locationsMap { position: relative; }

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    .locations__wrapper { height: 55rem; }
    .locations__list { width: 22rem; left: 1rem; top: 1rem; height: calc(100% - 2rem); }
    .ymap-popup { width: 26rem; }
}
@media (max-width: 480px) {
    .locations__list { display: none; }
    .locations__wrapper { height: 50rem; }
    .ymap-popup { width: 90vw; max-width: 30rem; }
}
