/* Places component — isolated selectors, no parent coupling. */

/* ── Cards Grid (compass-matched) ── */
.places-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.place-card-wrap {
    min-width: 0;
    height: 100%;
}
.place-card-wrap .place-card {
    height: 100%;
}

.place-card {
    border-radius: var(--z-card-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s;
    border: var(--z-card-gap) solid #fff;
    box-sizing: border-box;
    position: relative;
}
.place-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,.12);
}

/* Image */
.place-card-img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--z-card-photo-radius);
    isolation: isolate;
    line-height: 0;
}
.place-card-img > .card-carousel,
.place-card-img .card-carousel {
    width: 100%;
    height: 100%;
    aspect-ratio: unset !important;
    border-radius: inherit;
}
.place-card-img .card-carousel__track,
.place-card-img .card-carousel__slide {
    height: 100%;
}
.place-card-img .card-carousel__slide {
    overflow: hidden;
    position: relative;
    z-index: 0;
}
.place-card-img .card-carousel__slide.active {
    z-index: 1;
}
.place-card-img .card-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
.place-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
    display: block;
    border-radius: inherit;
    box-sizing: border-box;
    transform-origin: center center;
    -webkit-clip-path: inset(0 round var(--z-card-photo-radius));
    clip-path: inset(0 round var(--z-card-photo-radius));
}
/* Только активный слайд — иначе соседние img с scale перекрывают текущее фото */
.place-card:hover .place-card-img .card-carousel__slide.active img { transform: scale(1.06); }
.place-card:hover .place-card-img > img { transform: scale(1.06); }

/* No-image placeholder */
.place-card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #6ee7b7;
}

/* Region badge on image */
.place-card-region-badge {
    position: absolute;
    bottom: 10px; left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(15,23,42,.75);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: rgba(255,255,255,.9);
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    z-index: 2;
    border: 1px solid rgba(255,255,255,.15);
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gradient overlay on image */
.place-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--z-card-photo-radius);
    pointer-events: none;
}

/* Body */
.place-card-body {
    flex: 1;
    padding: 14px 16px 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 6px;
}
.place-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
}
/* Заголовок → описание на всю ширину → ниже строка с кнопкой справа */
.place-card-text-block {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.place-card-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    min-width: 0;
    width: 100%;
}
.place-card-actions {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}
.place-card-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary, #0a7575);
    background: none;
    border: none;
    border-radius: 0;
    transition: gap .2s, color .2s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}
.place-card:hover .place-card-read-btn {
    gap: 3px;
    color: var(--color-primary-dark, #047a7c);
}
.place-card-arrow {
    width: 23px; height: 23px;
    background: #e9f6f6;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem;
    color: var(--color-primary, #0a7575);
    transition: all .2s;
    flex-shrink: 0;
}
.place-card:hover .place-card-arrow {
    background: var(--color-primary, #0a7575);
    color: #fff;
}
