/* ============ СПРАВОЧНИК (универсальные стили) ============ */

.sprav {
    margin: 0;
    padding: 0;
    width: 100%;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1f2a3a;
}

.sprav-container {
    width: 100%;
    max-width: 100%;
    padding: 32px 40px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ============ КНОПКИ ============ */

.sprav-buttons-wrapper {
    margin-bottom: 28px;
}

.sprav-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sprav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.sprav-btn-primary {
    background: #fff300;
    color: #1f2a3a;
}

.sprav-btn-primary:hover {
    background: #e6db00;
    box-shadow: 0 4px 12px rgba(255, 243, 0, 0.4);
}

.sprav-btn-outline {
    background: transparent;
    color: #1f2a3a;
    border: 2px solid #eaeef2;
}

.sprav-btn-outline:hover {
    border-color: #1f2a3a;
    background: #f9fafc;
}

/* ============ НАВИГАЦИЯ ПО ГОРОДАМ ============ */

.sprav-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin: 0 0 36px 0;
    padding: 14px 16px;
    background: #f9fafc;
    border-radius: 12px;
    border: 1px solid #eaeef2;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.sprav-nav::-webkit-scrollbar {
    height: 4px;
}

.sprav-nav::-webkit-scrollbar-thumb {
    background: #d0d7de;
    border-radius: 4px;
}

.sprav-nav-link {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #1f2a3a;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sprav-nav-link:hover {
    background: #ffffff;
    border-color: #eaeef2;
}

.sprav-nav-link.active {
    background: #1f2a3a;
    color: #ffffff;
    border-color: #1f2a3a;
}

/* ============ ГОРОД ============ */

.sprav-city {
    margin: 0 0 48px;
}

.sprav-city-title {
    font-size: 26px;
    font-weight: 700;
    color: #1f2a3a;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fff300;
}

.sprav-city-title span {
    font-size: 14px;
    font-weight: 400;
    color: #7e8c9e;
    margin-left: 4px;
}

/* ============ КАРТОЧКИ КАТКОВ (СПИСОК) ============ */

.sprav-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

.sprav-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #eaeef2;
    border-radius: 12px;
    margin: 0 0 12px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sprav-card-link:hover .sprav-card {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border-color: #d0d7de;
}

/* ===== ФИКСИРОВАННОЕ ФОТО В КАРТОЧКЕ ===== */

.sprav-card-image {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f3f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sprav-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.sprav-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #c5cdd6;
    background: #f0f3f7;
}

.sprav-card-info {
    flex: 1;
    min-width: 200px;
}

.sprav-card-name {
    font-size: 17px;
    font-weight: 700;
    color: #1f2a3a;
    margin: 0 0 6px;
    line-height: 1.3;
}

.sprav-card-details {
    font-size: 14px;
    color: #54656f;
    line-height: 1.6;
}

.sprav-card-details .address {
    display: block;
    margin-bottom: 2px;
}

.sprav-card-details .phone {
    display: block;
}

.sprav-card-details .phone a {
    color: #1f2a3a;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.sprav-card-details .phone a:hover {
    border-bottom-color: #fff300;
}

/* ============ ТЕГИ ============ */

.sprav-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.sprav-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #1f2a3a;
    white-space: nowrap;
}

.sprav-tag-indoor { background: #e3f2fd; }
.sprav-tag-outdoor { background: #fff3e0; }
.sprav-tag-free { background: #e8f5e9; }
.sprav-tag-seasonal { background: #fce4ec; }
.sprav-tag-year-round { background: #e8f5e9; }

/* ============ СТАТУС РАБОТЫ ============ */

.sprav-working-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #212529;
    transition: color 0.2s;
    margin: 6px 0;
    padding: 2px 0;
    user-select: none;
}

.sprav-working-status:hover {
    color: #000;
}

.sprav-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sprav-status-dot.open {
    background: #34a853;
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.15);
}

.sprav-status-dot.closed {
    background: #ea4335;
    box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.15);
}

.sprav-status-message {
    font-weight: 500;
}

.sprav-status-until,
.sprav-status-next {
    color: #7e8c9e;
    font-size: 12px;
    margin-left: 2px;
    font-weight: normal;
}

/* ============ РАСПИСАНИЕ (в списке) ============ */

.sprav-schedule-detailed {
    margin-top: 8px;
    padding: 12px 16px;
    background: #f9fafc;
    border: 1px solid #eaeef2;
    border-radius: 10px;
    width: 100%;
    animation: fadeInSprav 0.2s ease;
}

@keyframes fadeInSprav {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.sprav-schedule-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.sprav-schedule-table tr {
    border-bottom: 1px solid #e9ecef;
}

.sprav-schedule-table tr:last-child {
    border-bottom: none;
}

.sprav-schedule-table td {
    padding: 6px 0;
}

.sprav-schedule-day {
    width: 40px;
    color: #7e8c9e;
    font-weight: 500;
}

.sprav-schedule-time {
    color: #212529;
    text-align: right;
}

/* ============ ПУСТОЕ СОСТОЯНИЕ ============ */

.sprav-empty {
    text-align: center;
    color: #7e8c9e;
    padding: 60px 0;
    font-size: 16px;
}

.sprav-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ============ КОНТАКТЫ (внизу) ============ */

.sprav-contacts {
    margin: 48px 0 0;
    padding: 32px;
    background: #f9fafc;
    border: 1px solid #eaeef2;
    border-radius: 16px;
    text-align: center;
}

.sprav-contacts-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2a3a;
    margin: 0 0 8px;
}

.sprav-contacts-text {
    font-size: 15px;
    color: #54656f;
    margin: 0 0 20px;
}

.sprav-contacts-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sprav-contacts-phone,
.sprav-contacts-telegram {
    font-size: 17px;
    font-weight: 600;
    color: #1f2a3a;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.sprav-contacts-phone:hover,
.sprav-contacts-telegram:hover {
    border-bottom-color: #fff300;
}

.sprav-contacts-separator {
    color: #c5cdd6;
    font-size: 14px;
}

/* ============ ДЕТАЛЬНАЯ СТРАНИЦА ============ */

.sprav-detail {
    margin: 0 0 32px;
}

.sprav-detail-top {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.sprav-detail-gallery-main {
    flex: 1;
    min-width: 280px;
    max-width: 520px;
    border-radius: 16px;
    overflow: hidden;
    background: #f0f3f7;
}

.sprav-detail-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.sprav-detail-info {
    flex: 1;
    min-width: 280px;
}

.sprav-detail-title {
    font-size: 28px;
    font-weight: 800;
    color: #1f2a3a;
    margin: 0 0 12px;
    line-height: 1.25;
}

.sprav-detail-props {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
    margin: 20px 0;
}

.sprav-detail-prop-label {
    font-size: 11px;
    color: #7e8c9e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.sprav-detail-prop-value {
    font-size: 15px;
    color: #1f2a3a;
    font-weight: 500;
}

.sprav-detail-prop-value a {
    color: #1f2a3a;
    text-decoration: none;
    border-bottom: 1px solid #eaeef2;
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.sprav-detail-prop-value a:hover {
    border-bottom-color: #fff300;
}

/* Галерея (миниатюры) */
.sprav-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.sprav-gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f0f3f7;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sprav-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.sprav-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Описание (DETAIL_TEXT) */
.sprav-detail-text {
    font-size: 16px;
    color: #54656f;
    line-height: 1.8;
    margin: 32px 0;
    padding-top: 24px;
    border-top: 1px solid #eaeef2;
}

.sprav-detail-text p {
    margin: 0 0 12px;
}

/* Скидки */
.sprav-detail-discount {
    background: #fff8e6;
    border-left: 4px solid #fff300;
    padding: 16px 20px;
    border-radius: 10px;
    margin: 24px 0;
}

.sprav-detail-discount-label {
    font-size: 12px;
    color: #7e8c9e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.sprav-detail-discount-value {
    font-size: 15px;
    color: #1f2a3a;
}

/* Как добраться */
.sprav-detail-route {
    background: #f9fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
    border: 1px solid #eaeef2;
}

.sprav-detail-route-label {
    font-size: 12px;
    color: #7e8c9e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.sprav-detail-route a {
    color: #1f2a3a;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #eaeef2;
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.sprav-detail-route a:hover {
    border-bottom-color: #fff300;
}

/* Кнопки внизу детальной */
.sprav-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid #eaeef2;
    margin-top: 32px;
}

.sprav-detail-actions .sprav-btn {
    padding: 12px 24px;
}

/* ============ МОДАЛКА ГАЛЕРЕИ ============ */

.sprav-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.sprav-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.sprav-gallery-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.sprav-gallery-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    display: block;
}

.sprav-gallery-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.sprav-gallery-close:hover {
    opacity: 1;
}

.sprav-gallery-prev,
.sprav-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.sprav-gallery-prev:hover,
.sprav-gallery-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sprav-gallery-prev { left: -64px; }
.sprav-gallery-next { right: -64px; }

.sprav-gallery-caption {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 14px;
    font-size: 14px;
}

/* ============ АДАПТИВНОСТЬ ============ */

@media (max-width: 991px) {
    .sprav-container {
        padding: 24px 20px;
    }

    .sprav-detail-gallery-main {
        max-width: 100%;
    }

    .sprav-detail-props {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sprav-container {
        padding: 16px 16px;
    }

    .sprav-nav {
        padding: 10px 12px;
        margin: 0 0 24px 0;
    }

    .sprav-nav-link {
        font-size: 13px;
        padding: 6px 14px;
    }

    .sprav-card {
        padding: 14px 16px;
        gap: 12px;
    }

    /* Фиксированное фото 64x64 на мобилке */
    .sprav-card-image {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
        min-width: 64px;
    }

    .sprav-card-name {
        font-size: 15px;
    }

    .sprav-card-tags {
        width: 100%;
        margin-top: 8px;
    }

    .sprav-city-title {
        font-size: 22px;
    }

    .sprav-detail-title {
        font-size: 22px;
    }

    .sprav-contacts {
        padding: 24px 20px;
    }

    .sprav-contacts-links {
        flex-direction: column;
        gap: 10px;
    }

    .sprav-contacts-separator {
        display: none;
    }

    .sprav-btn {
        width: 100%;
    }

    .sprav-buttons,
    .sprav-detail-actions {
        flex-direction: column;
    }

    .sprav-gallery-prev { left: -12px; }
    .sprav-gallery-next { right: -12px; }

    .sprav-gallery-prev,
    .sprav-gallery-next {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .sprav-container {
        padding: 12px 12px;
    }

    .sprav-card {
        padding: 12px 14px;
    }

    /* Фиксированное фото 56x56 на телефоне */
    .sprav-card-image {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
        min-width: 56px;
    }

    .sprav-city-title {
        font-size: 20px;
    }

    .sprav-detail-title {
        font-size: 20px;
    }

    .sprav-gallery-prev,
    .sprav-gallery-next {
        width: 34px;
        height: 34px;
        font-size: 22px;
    }
}