/* Основной дл¤ слайдера */
.popular-slider-wrap {
    position: relative;
}
.popular-slider-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
}
.popular-slider-track.is-animating,
.popular-slider-track.is-dragging {
    scroll-snap-type: none;
    scroll-behavior: auto !important;
}
.popular-slider-track.is-dragging {
    cursor: grabbing;
}
.popular-slider-track::-webkit-scrollbar {
    display: none;
}
.popular-slider-item {
    flex: 0 0 calc((100% - (var(--slides-count, 4) - 1) * 1rem) / var(--slides-count, 4));
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-user-drag: none;
}
.popular-slider-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.popular-slider-img {
    aspect-ratio: 16 / 10;
    width: 100%;
    overflow: hidden;
    background: #f3f4f6;
}
.popular-slider-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.popular-slider-body {
/*    padding: 0.75rem;*/
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}
.popular-slider-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.6rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.popular-slider-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: #6b7280;
}
.popular-slider-cat {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.popular-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #1f2937;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.popular-slider-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}
.popular-slider-btn:hover {
    background: #ffffff;
    color: #0d6efd;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    transform: translateY(-50%) scale(1.06);
}
.popular-slider-btn.prev:hover svg {
    transform: translateX(-1.5px);
}
.popular-slider-btn.next:hover svg {
    transform: translateX(1.5px);
}
.popular-slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}
.popular-slider-btn.prev { left: -18px; }
.popular-slider-btn.next { right: -18px; }

@media (max-width: 992px) {
    .popular-slider-item { flex: 0 0 calc((100% - 1rem) / 2); }
    .popular-slider-btn.prev { left: -10px; }
    .popular-slider-btn.next { right: -10px; }
}
@media (max-width: 576px) {
    .popular-slider-item {
        flex: 0 0 82%;
    }
    .popular-slider-btn {
        width: 34px;
        height: 34px;
    }
    .popular-slider-btn svg {
        width: 17px;
        height: 17px;
    }
    .popular-slider-btn.prev { left: 8px; }
    .popular-slider-btn.next { right: 8px; }
}
.popular-slider-btn.prev { left: -14px; }
.popular-slider-btn.next { right: -14px; }

.popular-slider-track.is-dragging {
    cursor: grabbing;
}
.popular-slider-track.is-dragging .popular-slider-item {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}
.popular-slider-item:focus {
    outline: none;
}


@media (max-width: 992px) {
    .popular-slider-item { flex: 0 0 calc((100% - 1rem) / 2); }
}
@media (max-width: 576px) {
    .popular-slider-item {
        flex: 0 0 82%;
    }
    .popular-slider-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    .popular-slider-btn.prev { left: 6px; }
    .popular-slider-btn.next { right: 6px; }
}
/* Для рамки */
.border-item {
    position: relative;
    padding: 20px 30px 10px;
    border: 5px solid #b2d1e4;
    border-radius: 15px;
}
.border-head {
    position: absolute;
    top: 0;
    left: 50%;
    padding: 0 15px;
    transform: translateX(-50%) translateY(-15px);
    font-size: 22px;
    line-height: 25px;
    font-weight: bold;
    text-transform: uppercase;
    color: #337AB7;
    background: #FFF;
}
/* Для карточек */
.grid * {
    box-sizing: border-box;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    column-gap: 30px;
    row-gap: 30px;
    padding: 20px 0;
}
.grid-item {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.1);
    transition: box-shadow .3s;
    width: 100%;
    height: 100%;  
    border-radius: 8px;
    overflow: hidden;
}
.grid-item .image {
    height: 250px;
    overflow: hidden;
}
.grid-item .info {
    position: relative;
    height: calc(100% - 250px);
    padding: 16px 14px 90px 14px;
}
.grid-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), 0 16px 20px rgba(0,0,0,0.2);
}
.grid-item .image img  {
      transition: transform 280ms ease-in-out;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;    
}
.grid-item:hover .image img  {
    transform: scale(1.1);
}
.info h2 {
    color: #337AB7;
    font-size: 20px;
    font-weight: normal;
    margin: 0 0 10px 0;
    text-align: center;
}
.upbutton {
    display: block;
    width: 100%;
    position: absolute;
    bottom: 78px;
    left: 15px;
	
	font-size: 12px;
	line-height: 14px;
	color: #ba7c1b;
    text-align: left;
}
.info-text p {
	font-family: 'Commissioner', sans-serif;
	color: #303030;
	letter-spacing: .1px;
    font-size: 14px;
    line-height: 16px;
    margin-bottom: 10px;
	padding: 0 0 10px 0;
}
.info-text p:last-child {
    margin-bottom: 0;
}
.grid-item .button-wrap {
    display: block;
    width: 100%;
    position: absolute;
    bottom: 14px;
    left: 0;
    text-align: center;
}
/*  Кнопка подробнее */
.atuin-btn {
    display: inline-flex;
    text-decoration: none;
    position: relative;
    font-size: 16px;
    line-height: 20px;
    padding: 8px 30px;
    color: #FFF;
    font-weight: bold;
    text-transform: uppercase; 
    background: #337AB7;
    cursor: pointer; 
    border: 2px solid #BFE2FF;
    border-radius: 8px;    
}
.atuin-btn:hover,
.atuin-btn:active,
.atuin-btn:focus {
    color: #FFF;
}
.atuin-btn:after,
.atuin-btn:before {
    position: absolute;
    height: 4px;
    left: 50%;
    background: #337AB7;
    bottom: -6px;
    content: "";
    transition: all 280ms ease-in-out;
    width: 0;
}
.atuin-btn:before {
    top: -6px;
}
.atuin-btn:hover:after,
.atuin-btn:hover:before,
.atuin-btn:active:after,
.atuin-btn:active:before,
.atuin-btn:focus:after,
.atuin-btn:focus:before {
    width: 100%;
    left: 0;
}
