:root {
    --brand: #814549;
    --brand-dark: #4e4451;
    --nav-from: #8f5a5c;
    --nav-to: #524451;
    --bg-soft: #f3f5f9;
    --text: #3f3742;
    --muted: #6b6570;
    --border: #e0e3ea;
    --white: #ffffff;
    --panel: #fbfcfe;
    --shadow: 0 8px 24px rgba(52, 40, 48, .08);
    --radius: 10px;
}

* { box-sizing: border-box; }

html {
    /* gutter always reserved — layout doesn't jump when scrollbar appears */
    scrollbar-gutter: stable;
    overflow-x: clip;
    scrollbar-width: thin;
    scrollbar-color: rgba(78, 68, 81, .42) transparent;
}

/* Thin overlay-like scrollbar (doesn't feel like a heavy rail) */
html::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
html::-webkit-scrollbar-track {
    background: transparent;
}
html::-webkit-scrollbar-thumb {
    background: rgba(78, 68, 81, .38);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 69, 73, .55);
    border: 3px solid transparent;
    background-clip: padding-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    color: var(--text);
    background: #e8eaef;
    overflow-x: clip;
    max-width: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Background continues under content, not cropped */
.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #e8eaef url("../img/bg.jpg") no-repeat center top;
    background-size: 100% auto;
    overflow-x: clip;
}

.wrap {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
    padding-bottom: 28px;
    max-width: 100%;
}
.site-shell > .wrap {
    flex: 1 0 auto;
    width: min(1180px, calc(100% - 24px));
}

.head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 16px 0 10px;
    flex-wrap: wrap;
}

.logo img {
    max-width: 290px;
    height: auto;
    display: block;
}

.contacts-card {
    text-align: right;
    background: rgba(255, 255, 255, .36);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(40, 30, 36, .06);
    padding: 10px 14px 12px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.tel {
    font-size: clamp(17px, 2.2vw, 22px);
    color: var(--brand);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
    white-space: nowrap;
}
.tel:hover {
    color: var(--brand-dark);
    text-decoration: none;
}
.cinfo {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    font-size: 15px;
    line-height: 1.35;
}
.cinfo-mail {
    color: #3a4a58;
    font-weight: 500;
    text-decoration: none;
    font-size: 15px;
}
.cinfo-mail:hover { color: var(--brand); }
.cinfo-hours {
    color: var(--muted);
    font-weight: 400;
    font-size: 15px;
}

.site-nav {
    margin-top: 12px;
    background: linear-gradient(to bottom, var(--nav-from), var(--nav-to));
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 40;
}
.site-nav .nav-list {
    margin: 0;
    padding: 6px 8px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    position: relative;
}
.site-nav .nav-list > li {
    position: static;
    display: flex;
    align-items: center;
}
.site-nav a,
.site-nav .nav-link {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    text-decoration: none;
    font-size: 15px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}
.site-nav a:hover,
.site-nav a.is-active,
.site-nav .nav-link:hover,
.site-nav .has-mega.is-open > .nav-link {
    background: rgba(255,255,255,.12);
    text-decoration: none;
}
.nav-ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: .95;
}
.mega-caret {
    font-size: .75em;
    opacity: .85;
    margin-left: 1px;
}

/* Админка — спокойная шестерёнка */
.site-nav .nav-admin {
    position: relative;
}
.site-nav .nav-admin > .nav-admin-btn {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    margin: 0;
    padding: 9px 11px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
    gap: 0;
}
.site-nav .nav-admin > .nav-admin-btn:hover,
.site-nav .nav-admin.is-open > .nav-admin-btn,
.site-nav .nav-admin:hover > .nav-admin-btn {
    background: rgba(255, 255, 255, .26);
    color: #fff;
}
.site-nav .nav-admin .nav-ico-gear {
    width: 18px;
    height: 18px;
    opacity: 1;
}
.site-nav .nav-list > li.has-dropdown {
    position: relative;
}
.admin-dropdown.mega-panel {
    left: auto;
    right: 0;
    width: max-content;
    min-width: 240px;
    top: calc(100% + 4px);
}
.admin-dropdown-inner {
    padding: 8px !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.admin-dropdown-inner a {
    color: var(--text) !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: transparent !important;
}
.admin-dropdown-inner a:hover {
    background: var(--azb-brand-soft, #f4eef0) !important;
    color: var(--brand) !important;
    text-decoration: none !important;
}
.admin-dropdown-accent {
    background: #f7f1f2 !important;
    color: var(--brand) !important;
    margin-bottom: 4px;
}

/* Cities mega menu — compact, rounded, over content */
.mega-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 50;
}
.site-nav .has-mega:hover > .mega-panel,
.site-nav .has-mega:focus-within > .mega-panel,
.site-nav .has-mega.is-open > .mega-panel {
    display: block;
}
.mega-inner {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(40, 30, 36, .14);
    padding: 12px 14px 14px;
}
.mega-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eceef3;
}
.mega-head strong {
    color: var(--brand);
    font-size: 13px;
}
.mega-head a {
    color: var(--muted) !important;
    font-size: 12px !important;
    padding: 0 !important;
    background: transparent !important;
}
.mega-head a:hover {
    color: var(--brand) !important;
}
.mega-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px 10px;
}
.mega-grid a {
    color: var(--text) !important;
    padding: 5px 6px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    background: transparent !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}
.mega-grid a > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mega-grid a:hover {
    background: #f4eef0 !important;
    color: var(--brand) !important;
    text-decoration: none;
}
.mega-empty {
    color: var(--muted);
    font-size: 13px;
    grid-column: 1 / -1;
}

.nav-toggle {
    display: none;
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 26px;
    padding: 12px;
    cursor: pointer;
}

.container {
    margin-top: 14px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.content {
    background: linear-gradient(#fff, var(--bg-soft) 48px);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    padding: 22px;
}
.layout-single {
    grid-template-columns: 1fr;
}

.left, .right { min-width: 0; }

.section-title-spaced {
    margin-top: 28px;
}

.city-section {
    margin-bottom: 8px;
}
.city-section-programs {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85em;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f4eef0;
    color: var(--brand);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    flex-shrink: 0;
}
.count-badge-sm {
    min-width: 1.55em;
    padding: 2px 8px;
    font-size: 13px;
    background: #efe6e8;
}
.mega-grid a:hover .count-badge-sm {
    background: #fff;
}

.schedule-more,
.tiles-more {
    display: block;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    border: 0;
    border-top: 1px solid var(--border);
    background: #fafbfd;
    color: var(--brand);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background .15s ease;
}
.schedule-more:hover,
.tiles-more:hover {
    background: #f4eef0;
}
.tiles-more {
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.home-section-tours {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

/* Filters */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.filters-label {
    font-weight: 700;
    color: var(--brand);
    margin-right: 4px;
}
.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.25;
    transition: .15s ease;
}
.chip.is-active,
.chip:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-decoration: none;
}
.chip-static {
    background: #f4eef0;
    border-color: #e4d5d8;
    color: var(--brand);
    cursor: default;
}
.chip-static:hover {
    background: #f4eef0;
    border-color: #e4d5d8;
    color: var(--brand);
}
.transport-filters {
    margin-top: -8px;
}

.section-title {
    margin: 0 0 12px;
    font-size: 22px;
    color: var(--brand);
    font-weight: 700;
}

/* Schedule */
.schedule-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-add-bar {
    display: grid;
    grid-template-columns: 150px minmax(200px, 1.8fr) 90px 120px auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    background: #f7f1f2;
    border-bottom: 1px solid #eadfe1;
}
.admin-add-bar-compact {
    grid-template-columns: 160px 100px 130px auto;
}
.admin-add-bar label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: 4px;
}
.admin-add-bar input,
.admin-add-bar select,
.tour-combobox-input,
table.table input[type="date"],
table.table input[type="number"],
table.table input[type="text"],
table.table input[type="search"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d5c8cb;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
    box-sizing: border-box;
}
.input-date {
    min-height: 38px;
}

/* Кастомный календарь выбора даты (стиль сайта) */
.date-picker {
    position: relative;
}
.date-picker-trigger {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d5c8cb;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    text-align: left;
}
.date-picker-trigger:hover,
.date-picker.is-open .date-picker-trigger {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(129, 69, 73, .12);
}
.date-picker-trigger svg {
    color: var(--brand);
    flex-shrink: 0;
}
.date-picker-popover {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 60;
    width: min(292px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(40, 30, 36, .16);
    padding: 12px;
}
.date-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.date-picker-head strong {
    color: var(--brand);
    font-size: 15px;
}
.date-picker-nav {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f4eef0;
    color: var(--brand);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.date-picker-nav:hover {
    background: var(--brand);
    color: #fff;
}
.date-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.date-picker-day {
    aspect-ratio: 1;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.date-picker-day:hover {
    background: #f4eef0;
    color: var(--brand);
}
.date-picker-day.is-out {
    color: #b7b2b8;
}
.date-picker-day.is-today {
    box-shadow: inset 0 0 0 1px var(--brand);
}
.date-picker-day.is-selected {
    background: var(--brand);
    color: #fff;
}
.date-picker-day.is-selected:hover {
    background: var(--brand-dark);
    color: #fff;
}

/* Searchable tour select */
.tour-combobox {
    position: relative;
}
.tour-combobox-input {
    width: 100%;
}
.tour-combobox-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(40, 30, 36, .14);
    padding: 4px;
}
.tour-combobox-option {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.tour-combobox-option:hover,
.tour-combobox-option.is-active {
    background: #f4eef0;
    color: var(--brand);
}
.tour-combobox-empty {
    padding: 10px;
    color: var(--muted);
    font-size: 13px;
}

.table-scroll { overflow-x: auto; }

table.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    min-width: 620px;
}
table.table thead .header th {
    background: #f6f7fa;
    color: var(--brand-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    background: #fff;
}
table.table tbody tr:hover td { background: #fafbfd; }
table.table td a:not(.icon-btn) {
    color: var(--brand);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
table.table td a.icon-btn {
    color: #fff;
    font-weight: 400;
    display: inline-flex;
    overflow: visible;
}
table.table .col-date { width: 120px; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.table .col-hours { width: 120px; color: var(--muted); white-space: nowrap; }
table.table .col-price {
    width: 110px;
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
table.table .col-actions {
    width: 108px;
    white-space: nowrap;
    vertical-align: middle;
}
table.table .col-actions .actions {
    display: inline-flex;
    width: 100%;
    justify-content: flex-end;
}
table.table.table-no-tour { min-width: 420px; }
table.table .empty {
    text-align: center;
    color: var(--muted);
    padding: 28px 12px;
}

.button {
    color: #fff;
    background: var(--brand-dark);
    padding: 9px 14px;
    border-radius: 6px;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
}
.button:hover { opacity: .92; text-decoration: none; color: #fff; }
.button-sm { padding: 6px 10px; font-size: 13px; }
.button-muted { background: #8a8790; }
.actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
.actions form {
    display: inline-flex;
    margin: 0;
}
.icon-btn {
    border: 0;
    background: var(--brand-dark);
    color: #fff !important;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
    flex-shrink: 0;
    line-height: 0;
    box-sizing: border-box;
}
.icon-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #fff;
    fill: currentColor;
}
.icon-btn:hover {
    background: var(--brand);
    color: #fff !important;
    text-decoration: none;
    opacity: 1;
}

/* Sidebar tours — full-width photo cards */
.side-tours {
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    top: 12px;
}
.side-tours h2 {
    margin: 0 0 12px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .04em;
    color: var(--brand);
}
.side-tours-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.side-tours-list > li {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eceef3;
}
.side-tours-list > li:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}
.side-tour {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}
.side-tour:hover { text-decoration: none; }
.side-tour-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: #c9ccd4;
}
.side-tour-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.side-tour-badge,
.tour-tile-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.96);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    z-index: 1;
}
.side-tour-cities,
.tour-tile-cities {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-wrap: wrap-reverse; /* сначала нижний ряд, лишние — выше */
    align-content: flex-start;
    gap: 6px;
    padding: 28px 10px 10px;
    background: linear-gradient(transparent, rgba(28, 18, 22, .78));
}
.side-tour-cities span,
.tour-tile-cities span {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.96);
    color: var(--brand-dark);
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
}
.side-tour-title {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.side-tour:hover .side-tour-title { color: var(--brand); }
.muted {
    color: var(--muted);
    font-size: 13px;
    list-style: none;
}

/* Tour tiles — equal image height, cities on photo */
.tour-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 8px;
    align-items: stretch;
}
.tour-tile {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    transition: transform .15s ease, box-shadow .15s ease;
    height: 100%;
}
.tour-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(40, 30, 36, .12);
    text-decoration: none;
}
.tour-tile-media {
    position: relative;
    display: block;
    width: 100%;
    height: 230px;
    flex-shrink: 0;
    background: #c9ccd4;
}
.tour-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tour-tile-title {
    padding: 12px 14px 14px;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
}
.tour-tile:hover .tour-tile-title { color: var(--brand); }

/* Cities directory — compact 4 columns */
.cities-directory {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.cities-directory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cities-directory-item:hover {
    border-color: #d5b8bc;
    box-shadow: 0 4px 14px rgba(40, 30, 36, .08);
    text-decoration: none;
}
.cities-directory-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cities-directory-item:hover .cities-directory-name { color: var(--brand); }
.cities-directory-item .count-badge {
    background: #f4eef0;
}

/* City page */
.city-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}
.city-head h1 {
    margin: 0;
    font-size: clamp(20px, 2.4vw, 28px);
    color: var(--brand);
    line-height: 1.25;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.city-intro {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    max-width: 52em;
}

/* Tour page */
.tour-page, .static-page { position: relative; }
.tour-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}
.tour-head h1 {
    margin: 0;
    font-size: clamp(20px, 2.4vw, 28px);
    color: var(--brand);
    line-height: 1.25;
    font-weight: 700;
}
.edit-pencil {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-dark);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    text-decoration: none;
}
.edit-pencil:hover { opacity: .92; color: #fff; text-decoration: none; }

.city-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tour-hero {
    margin: 0 0 18px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #dfe2e8;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.tour-hero img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
}
.tour-excerpt {
    font-size: 17px;
    line-height: 1.55;
    margin: 0 0 18px;
    color: var(--text);
}

.tour-schedule {
    margin: 0 0 24px;
}
.tour-schedule h2 {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--brand);
}

.tour-body {
    line-height: 1.7;
    font-size: 16px;
    color: var(--text);
}
.tour-body h2,
.tour-body h3 {
    color: var(--brand);
    margin: 1.4em 0 .6em;
}
.tour-body p { margin: 0 0 1em; }
.tour-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}
.tour-body a { word-break: break-word; }

.flash {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
    border-radius: 8px;
}

/* Site footer */
.site-footer {
    margin-top: auto;
    background: linear-gradient(180deg, #5a4a55 0%, #3f3542 100%);
    color: rgba(255, 255, 255, .82);
    padding: 36px 0 22px;
}
.footer-wrap {
    padding-bottom: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
}
.footer-col h3 {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    font-weight: 700;
}
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-col a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
}
.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-logo {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
}
.footer-brand p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .7);
    max-width: 32em;
}
.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}
.footer-contacts a {
    color: #fff;
    font-weight: 500;
}
.footer-contacts span {
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
    margin-top: 4px;
}
.footer-bottom {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: space-between;
    align-items: baseline;
}
.footer-copy {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .88);
}
.footer-note {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
    max-width: 36em;
}

.legal-page .tour-body {
    max-width: 52em;
}
.legal-page .tour-body h2 {
    margin-top: 1.4em;
    font-size: 1.15em;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

@media (max-width: 1100px) {
    .mega-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .tour-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tour-tile-media { height: 200px; }
    .cities-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; }
    .side-tours { position: static; }
    .contacts-card {
        text-align: left;
        width: 100%;
        align-items: flex-start;
    }
    .cinfo { align-items: flex-start; }
    .admin-add-bar,
    .admin-add-bar-compact { grid-template-columns: 1fr 1fr; }
    .mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cities-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Календарь туров */
.calendar-lead {
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 52rem;
}
.tour-calendar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
    min-height: 560px;
}
.tour-calendar-board,
.tour-calendar-side {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    min-height: 560px;
}
.tour-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.tour-calendar-month {
    margin: 0;
    font-size: 1.2rem;
    color: var(--brand);
    text-align: center;
}
.tour-calendar-nav {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f4eef0;
    color: var(--brand);
    font-size: 1.4rem;
    text-decoration: none;
    font-weight: 700;
}
.tour-calendar-nav:hover {
    background: var(--brand);
    color: #fff;
    text-decoration: none;
}
.tour-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.tour-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
}
.tour-calendar-day {
    min-height: 0;
    height: 100%;
    border-radius: 12px;
    border: 1px solid transparent;
    background: #f7f8fb;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    padding: 4px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
a.tour-calendar-day:hover {
    background: #f4eef0;
    border-color: #e4d4d6;
    text-decoration: none;
}
.tour-calendar-day.is-out {
    opacity: .4;
}
.tour-calendar-day.is-empty {
    cursor: default;
}
.tour-calendar-day.has-trips {
    background: #fff;
    border-color: #eadfe1;
}
/* Сегодня — спокойный бордовый, не самый яркий */
.tour-calendar-day.is-today {
    background: #b07a7e;
    border-color: #b07a7e;
    color: #fff;
}
.tour-calendar-day.is-today .tour-calendar-dot {
    background: rgba(255, 255, 255, .28);
    color: #fff;
}
.tour-calendar-day.is-selected,
a.tour-calendar-day.is-selected:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.tour-calendar-day.is-selected .tour-calendar-dot {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}
.tour-calendar-num {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}
.tour-calendar-dot {
    min-width: 1.35rem;
    height: 1.2rem;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tour-calendar-side-title {
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e8ee;
    font-size: 1.2rem;
    color: var(--brand);
    flex-shrink: 0;
}
.calendar-trip-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.calendar-trip-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #eceef3;
    text-decoration: none;
    color: inherit;
}
.calendar-trip-card:last-child {
    border-bottom: 0;
}
.calendar-trip-card:hover {
    text-decoration: none;
}
.calendar-trip-card:hover .calendar-trip-title {
    color: var(--brand-dark);
}
.calendar-trip-thumb {
    width: 88px;
    height: 66px;
    border-radius: 8px;
    overflow: hidden;
    background: #eceef3;
    flex-shrink: 0;
}
.calendar-trip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.calendar-trip-body {
    min-width: 0;
}
.calendar-trip-title {
    font-weight: 700;
    color: var(--brand);
    line-height: 1.3;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.calendar-trip-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}
.calendar-trip-meta strong {
    color: var(--text);
    font-size: 15px;
}
.calendar-trip-cities {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.calendar-empty {
    margin: 8px 0 0;
    color: var(--muted);
}

@media (max-width: 960px) {
    .tour-calendar {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .tour-calendar-board,
    .tour-calendar-side {
        min-height: 0;
    }
    .tour-calendar-board {
        min-height: 420px;
    }
    .tour-calendar-side {
        max-height: 480px;
    }
}

@media (max-width: 720px) {
    .site-shell {
        background-size: 160% auto;
        background-position: center top;
    }
    .nav-toggle { display: block; }
    .site-nav .nav-list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0 0 8px;
    }
    .site-nav .nav-list.is-open { display: flex; }
    .site-nav a,
    .site-nav .nav-link {
        padding: 12px 16px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,.12);
        width: 100%;
        text-align: left;
    }
    .site-nav .nav-admin > .nav-admin-btn {
        margin: 4px 12px;
        border-radius: 8px;
        border-bottom: 0;
        justify-content: center;
        width: calc(100% - 24px);
    }
    .site-nav a,
    .site-nav .nav-link {
        justify-content: flex-start;
    }
    .mega-panel {
        position: static;
        top: auto;
        display: none;
        margin: 0 8px 8px;
    }
    .admin-dropdown.mega-panel {
        right: auto;
        width: auto;
        min-width: 0;
    }
    .site-nav .has-mega:hover > .mega-panel {
        display: none;
    }
    .site-nav .has-mega.is-open > .mega-panel {
        display: block;
    }
    .tour-calendar-day {
        min-height: 52px;
    }
    .mega-inner {
        border-radius: 10px;
        box-shadow: none;
        padding: 10px 12px 12px;
    }
    .mega-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1px 8px;
    }
    .logo img { max-width: 230px; }
    .layout { padding: 14px; }
    .contacts-card { padding: 10px 14px; }
    .tour-tiles,
    .cities-directory { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
}
