/* ===== Page hero ===== */
.page-hero {
    padding: 160px 0 60px;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.page-hero__content {
    max-width: 760px;
}

.page-hero__title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin: 14px 0 18px;
    color: var(--text);
}

.page-hero__subtitle {
    font-size: 17px;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 640px;
}

/* Компактная вариация — заголовок над календарём, без отступов и подзаголовка */
.page-hero--compact {
    padding: 100px 0 14px;
    background: var(--bg);
    border-bottom: none;
}
.page-hero--compact .page-hero__title {
    font-size: clamp(22px, 2.4vw, 30px);
    margin: 0;
    letter-spacing: -0.5px;
}

/* ===== Booking section ===== */
.booking-section {
    padding: 60px 0 120px;
}

.booking-section--tight {
    padding: 14px 0 60px;
}

/* === Статичные страницы (rules / oferta) === */
.static-section {
    padding: 30px 0 100px;
    color: var(--text);
}

.static-content {
    max-width: 860px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 15px;
    color: var(--text);
}

.static-content p { margin-bottom: 14px; }
.static-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 14px;
    letter-spacing: -0.3px;
}
.static-content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; }
.static-content ol, .static-content ul {
    margin: 12px 0 16px 24px;
    padding-left: 0;
}
.static-content li { padding: 4px 0; }
.static-content strong { color: var(--text); }
.static-content a { color: var(--accent); }
.static-content a:hover { text-decoration: underline; }
.static-content br { content: ''; display: block; margin-top: 4px; }

.booking-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 700px) {
    .page-hero { padding: 120px 0 40px; }
    .page-hero--compact { padding: 88px 0 12px; }
    /* Мобильно: убираем общую рамку wrapper — иначе много вложенных границ */
    .booking-wrapper {
        border: none;
        background: transparent;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }
    .booking-section { padding: 40px 0 80px; }
    .booking-section--tight { padding: 10px 0 40px; }
}

/* ===========================================================
   Override стилей календаря под светлую тему сайта
   =========================================================== */

.booking-wrapper {
    color: var(--text);
}

.booking-wrapper h1,
.booking-wrapper h2,
.booking-wrapper h3,
.booking-wrapper h4,
.booking-wrapper h5,
.booking-wrapper h6,
.booking-wrapper label,
.booking-wrapper p {
    color: var(--text);
}

/* Формы */
.booking-wrapper .form-control,
.booking-wrapper input[type="text"],
.booking-wrapper input[type="email"],
.booking-wrapper input[type="tel"],
.booking-wrapper input[type="number"],
.booking-wrapper input[type="date"],
.booking-wrapper input[type="time"],
.booking-wrapper select,
.booking-wrapper textarea {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    padding: 12px 14px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.booking-wrapper select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a6a6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}
.booking-wrapper select::-ms-expand { display: none; }

.booking-wrapper .form-control:focus,
.booking-wrapper input:focus,
.booking-wrapper select:focus,
.booking-wrapper textarea:focus {
    background: #ffffff;
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.booking-wrapper input::placeholder,
.booking-wrapper textarea::placeholder {
    color: #9a9a9a;
}

/* Кнопки */
.booking-wrapper button,
.booking-wrapper .btn {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.25s ease;
}

.booking-wrapper .btn-primary,
.booking-wrapper button[type="submit"] {
    background: var(--accent);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 13px;
    cursor: pointer;
}

.booking-wrapper .btn-primary:hover,
.booking-wrapper button[type="submit"]:hover {
    background: #d18800;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(252, 159, 0, 0.25);
}

.booking-wrapper .btn-secondary,
.booking-wrapper .btn-default {
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.booking-wrapper .btn-secondary:hover,
.booking-wrapper .btn-default:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Сетка календаря */
.booking-wrapper table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    color: var(--text);
}

.booking-wrapper table th,
.booking-wrapper table td {
    border: 1px solid var(--border);
    padding: 8px;
    text-align: center;
    font-size: 13px;
}

.booking-wrapper table th {
    background: var(--bg-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}

/* Слоты */
.booking-wrapper .slot,
.booking-wrapper .calendar-cell {
    cursor: pointer;
    transition: background 0.2s ease;
}

.booking-wrapper .slot:hover {
    background: var(--accent-soft);
}

.booking-wrapper .slot.booked,
.booking-wrapper .slot-booked {
    background: rgba(220, 60, 60, 0.12);
    color: #b84545;
    cursor: not-allowed;
}

.booking-wrapper .slot.pre-booked,
.booking-wrapper .slot-pre {
    background: rgba(220, 160, 60, 0.15);
    color: #a87515;
}

.booking-wrapper .slot.selected,
.booking-wrapper .slot-selected {
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
}

.booking-wrapper .legend,
.booking-wrapper .calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-dim);
}

.booking-wrapper select option {
    background: #ffffff;
    color: var(--text);
}

.booking-wrapper input[type="checkbox"],
.booking-wrapper input[type="radio"] {
    accent-color: var(--accent);
}

/* Алерты */
.booking-wrapper .alert {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 16px;
    border: 1px solid;
}

.booking-wrapper .alert-success {
    background: rgba(60, 160, 90, 0.08);
    border-color: rgba(60, 160, 90, 0.3);
    color: #2f7c4f;
}

.booking-wrapper .alert-warning,
.booking-wrapper .alert-danger {
    background: rgba(220, 80, 80, 0.08);
    border-color: rgba(220, 80, 80, 0.3);
    color: #b84545;
}

.booking-wrapper a {
    color: var(--accent);
}

.booking-wrapper a:hover {
    text-decoration: underline;
}

.booking-wrapper .price,
.booking-wrapper .price-label {
    color: var(--accent);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   Страница «Правила оренди»
   ═══════════════════════════════════════════════════════════ */

/* Hero */
.rules-hero {
    padding: 130px 0 50px;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.rules-hero__eyebrow {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: 700;
}

.rules-hero__title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 14px;
}

.rules-hero__subtitle {
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

/* Двухколоночный layout: контент + sticky оглавление */
.rules-section {
    padding: 60px 0 100px;
}

.rules-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 50px;
    align-items: start;
}

.rules-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 40px 50px;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    font-size: 15px;
    line-height: 1.75;
}

/* Заголовок раздела (h2) — верхний регистр, без полосы (полоса идёт по телу) */
.rules-content h2 {
    margin: 40px 0 14px;
    padding-left: 21px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--text);
    scroll-margin-top: 100px;
}
.rules-content h2:first-child { margin-top: 0; }

/* Тело раздела: сплошная акцентная полоса слева вдоль всего содержимого */
.rules-section-body {
    border-left: 3px solid var(--accent);
    padding: 2px 0 2px 18px;
    margin: 0 0 8px;
}
.rules-section-body:last-child { margin-bottom: 0; }

/* Подзаголовок внутри раздела (h3) — например, назва залу */
.rules-content h3 {
    margin: 18px 0 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--text);
    scroll-margin-top: 100px;
}
.rules-section-body > h3:first-child { margin-top: 0; }

/* Текст раздела */
.rules-content p {
    margin: 0 0 14px;
}
.rules-content p:last-child { margin-bottom: 0; }

.rules-content strong { color: var(--text); font-weight: 700; }
.rules-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Списки — в стиле карточки залу (акцентная риска + розділювач) */
.rules-content ul,
.rules-content ol {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 4px;
}
.rules-content ul:last-child,
.rules-content ol:last-child { margin-bottom: 0; }
.rules-content ul li,
.rules-content ol li {
    position: relative;
    padding: 9px 0 9px 28px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.rules-content ul li:last-child,
.rules-content ol li:last-child { border-bottom: none; }

/* Маркер маркованого списку — акцентна риска (як на карточці залу) */
.rules-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 17px;
    width: 14px;
    height: 2px;
    background: var(--accent);
}

/* Нумерація для нумерованого списку */
.rules-content ol { counter-reset: rules-ol; }
.rules-content ol li::before {
    counter-increment: rules-ol;
    content: counter(rules-ol) '.';
    position: absolute;
    left: 0;
    top: 9px;
    min-width: 18px;
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
}

/* === Оглавление справа (sticky) === */
.rules-toc {
    position: sticky;
    top: 100px;
    align-self: start;
}

.rules-toc__inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
}

.rules-toc__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 16px;
}

.rules-toc__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 24px;
}

.rules-toc__list a {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-dim);
    border-radius: 4px;
    border-left: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.rules-toc__list a:hover {
    color: var(--text);
    background: var(--bg-soft);
}

.rules-toc__list a.is-active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
    background: var(--accent-soft);
}

.rules-toc__cta {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 12px;
}

/* === Адаптив === */
@media (max-width: 1000px) {
    .rules-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .rules-toc {
        position: static;
        order: -1;
    }
    .rules-toc__list { max-height: 250px; overflow-y: auto; }
}

@media (max-width: 700px) {
    .rules-hero { padding: 110px 0 36px; }
    .rules-section { padding: 28px 0 60px; }
    .rules-content { padding: 24px 22px; }
    .rules-content h2 { margin-top: 30px; font-size: 16px; }
}
