@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Russo+One&display=swap');

:root {
    --bg: #eef3f7;
    --surface: #ffffff;
    --surface-alt: #f6f8fb;
    --text: #111827;
    --muted: #5b6472;
    --brand-red: #e01e2a;
    --brand-blue: #2b55c5;
    --brand-green: #1fa34a;
    --brand-yellow: #f3c400;
    --shadow: 0 24px 60px rgba(13, 26, 48, 0.16);
    --radius: 18px;
    --top-hero-image: url('/images/hero-bus.png?v=2');
    --header-height: 139px;
}

html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    color: var(--text);
    background: #edf2f8;
    line-height: 1.6;
    min-width: 983px;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0 0 12px;
}

img {
    max-width: 100%;
    display: block;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: rgba(8, 26, 62, 0.55);
    background-size: min(100vw, var(--hero-reference-width)) auto;
    background-repeat: no-repeat;
    background-position: center 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

body:not(.admin) .page:not(:has(.home-hero)) .site-header:not(.is-scrolled) {
    background-color: rgba(8, 26, 62, 0.55);
    background-image: none;
}

.site-header.is-scrolled {
    background-color: rgba(8, 26, 62, 0.97);
    background-image: none;
    box-shadow: 0 8px 24px rgba(8, 26, 62, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    row-gap: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Russo One', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 22px;
}

.brand.compact {
    font-size: 18px;
}

.brand-mark {
    color: var(--brand-red);
}

.brand-name {
    color: var(--brand-blue);
}

.site-nav {
    display: flex;
    gap: 18px;
    font-weight: 600;
    color: #f3f6fd;
    flex-wrap: wrap;
    font-size: 14px;
}

.site-nav-dropdown {
    position: relative;
}

.site-nav-dropdown__toggle {
    padding: 6px 2px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0 0 8px 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s ease;
}

.site-nav-dropdown__toggle:hover,
.site-nav-dropdown__toggle:focus-visible,
.site-nav-dropdown.is-open .site-nav-dropdown__toggle {
    border-color: #ffffff;
}

.site-nav-dropdown__toggle::after {
    content: '';
    border: 4px solid transparent;
    border-top-color: currentColor;
    margin-top: 3px;
}

.site-nav-dropdown__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 210px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #d8e2f2;
    box-shadow: 0 12px 28px rgba(18, 44, 88, 0.15);
    padding: 8px;
    z-index: 200;
    display: none;
    flex-direction: column;
    gap: 2px;
}

.site-nav-dropdown.is-open .site-nav-dropdown__menu {
    display: flex;
}

.site-nav-dropdown__menu a {
    color: #1f3b6d;
    padding: 10px 12px;
    border-radius: 8px;
    border-bottom: none;
}

.site-nav-dropdown__menu a:hover {
    background: #f4f7fc;
    border-color: transparent;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: block;
    height: 42px;
    width: auto;
    max-width: min(220px, 38vw);
    object-fit: contain;
    flex-shrink: 0;
    mix-blend-mode: lighten;
}

.header-actions form {
    display: inline-flex;
}

.site-main {
    flex: 1;
    padding-top: 0;
}

.hero {
    position: relative;
    background: var(--top-hero-image);
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center;
    color: #f8fafc;
}

.home-hero {
    width: min(1200px, 92%);
    margin: calc(-1 * var(--header-height)) auto 0;
    padding-top: var(--header-height);
    border-radius: 16px;
    overflow: hidden;
}

.home-hero .hero-inner {
    padding-top: 84px;
}

.home-hero-content h1 {
    max-width: 540px;
    margin-bottom: 26px;
}

.hero.slim {
    min-height: 280px;
}

.hero.auth-hero {
    min-height: 340px;
}

.hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--header-height);
    background: linear-gradient(
        180deg,
        rgba(8, 26, 62, 0.72) 0%,
        rgba(10, 44, 104, 0.7) 14%,
        rgba(12, 20, 36, 0.16) 100%
    );
}

.hero-inner {
    position: relative;
    padding: 48px 0 64px;
}

.hero-content {
    max-width: 780px;
}

.hero-kicker {
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

h1,
h2,
h3 {
    font-family: 'Russo One', sans-serif;
    margin: 0 0 12px;
}

h1 {
    font-size: clamp(32px, 4vw, 48px);
}

h2 {
    font-size: 24px;
}

.content {
    padding: 28px 0 72px;
}

section {
    scroll-margin-top: 90px;
}

.muted {
    color: var(--muted);
}

.button {
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    background: #101827;
    color: #fff;
}

.button.large {
    padding: 14px 26px;
}

.button.primary {
    background: linear-gradient(135deg, #2b55c5, #1b3a86);
    box-shadow: 0 16px 30px rgba(27, 58, 134, 0.25);
}

.button.success {
    background: linear-gradient(135deg, #23b55a, #169045);
    box-shadow: 0 16px 30px rgba(22, 144, 69, 0.25);
}

.button.light {
    background: #f1f4f9;
    color: #1f2937;
}

.button.ghost {
    background: transparent;
    color: #1f2937;
    border: 1px solid rgba(31, 41, 55, 0.2);
}

.button:hover {
    transform: translateY(-1px);
}

/* Шапка: то же подчёркивание, что у «Пассажирам» (border-bottom + border-radius) */
.site-header .site-nav > a,
.site-header .site-nav-dropdown__toggle,
.site-header .header-actions > a,
.site-header .header-actions form > button {
    padding: 6px 2px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0 0 8px 8px;
    background: transparent;
    color: #f3f6fd;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: none;
    transform: none;
    transition: border-color 0.2s ease;
    appearance: none;
}

.site-header .site-nav > a:hover,
.site-header .site-nav > a:focus-visible,
.site-header .site-nav-dropdown__toggle:hover,
.site-header .site-nav-dropdown__toggle:focus-visible,
.site-header .site-nav-dropdown.is-open .site-nav-dropdown__toggle,
.site-header .header-actions > a:hover,
.site-header .header-actions > a:focus-visible,
.site-header .header-actions form > button:hover,
.site-header .header-actions form > button:focus-visible {
    border-color: #ffffff;
    text-decoration: none;
    background: transparent;
    transform: none;
    box-shadow: none;
}

.button:disabled,
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

label {
    font-weight: 600;
    color: #1f2937;
}

input,
select,
textarea {
    border: 1px solid #d6dde8;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    font: inherit;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(43, 85, 197, 0.15);
}

input[readonly] {
    background: #f8fafc;
    color: #1f2937;
}

input[type='checkbox'],
input[type='radio'] {
    width: auto;
    padding: 0;
    border: none;
    accent-color: var(--brand-blue);
}

button {
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    background: #111827;
    color: #fff;
}

button:hover {
    opacity: 0.95;
}

form {
    display: grid;
    gap: 12px;
}

table form {
    display: inline-flex;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

th,
td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

th {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f8fafc;
}

tr:last-child td {
    border-bottom: none;
}

.search-card {
    margin-top: 28px;
    background: var(--surface);
    border-radius: 20px;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 16px;
    box-shadow: var(--shadow);
    align-items: end;
}

.search-card.compact {
    grid-template-columns: repeat(3, 1fr) auto;
}

.search-field label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.search-field select,
.search-field input {
    border: 1px solid #d4dbe6;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    background: #fff;
}

.hero-tabs {
    display: inline-flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px;
}

.tab {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.tab.active {
    background: #fff;
    color: #1f2937;
}

.tab[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.info-card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
    margin-bottom: 24px;
}

.trip-list {
    display: grid;
    gap: 18px;
}

.trip-card {
    background: #eef5f2;
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid rgba(27, 77, 60, 0.15);
}

.trip-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.trip-route {
    font-weight: 700;
    font-size: 18px;
}

.trip-date {
    color: var(--muted);
    font-size: 14px;
}

.trip-card__body {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr 1fr;
    gap: 16px;
    align-items: center;
}

.trip-time__value {
    font-size: 22px;
    font-weight: 700;
}

.trip-time__label {
    color: var(--muted);
    font-size: 13px;
}

.trip-meta {
    color: #1f2937;
    font-weight: 600;
    display: grid;
    gap: 6px;
}

.trip-price {
    text-align: right;
}

.trip-price__value {
    font-size: 26px;
    font-weight: 800;
    background: #f4d313;
    color: #1f2937;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 10px;
}

.trip-price__note {
    font-size: 12px;
    color: var(--muted);
}

.seat-map {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed rgba(148, 163, 184, 0.5);
}

.seat-row {
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    gap: 12px;
    align-items: center;
}

.seat-row__side {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84px, 1fr);
    gap: 10px;
}

.seat-aisle {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.seat {
    border-radius: 14px;
    padding: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    text-align: center;
    font-weight: 600;
    color: #1f2937;
    min-height: 74px;
}

.seat-empty {
    background: transparent;
    border: 1px dashed rgba(148, 163, 184, 0.3);
}

.seat-selection {
    margin: 12px 0 16px;
    font-weight: 600;
}

.seat-btn {
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    color: #1f2937;
}

.seat-btn.free:hover {
    transform: translateY(-2px);
}

.seat-btn.selected {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(43, 85, 197, 0.2);
    transform: translateY(-2px);
}

.seat.mine {
    background: #e6efff;
    border-color: #b9ccff;
}

.seat.mine small {
    color: #1d4ed8;
}

.seat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.form-stack .button {
    width: 100%;
    justify-content: center;
}

.seat.free {
    background: #e9f8ef;
    border-color: #b9e8c7;
}

.seat.locked {
    background: #fff4de;
    border-color: #f8d59a;
}

.seat.sold {
    background: #fee2e2;
    border-color: #fecaca;
}

.seat small {
    display: block;
    color: var(--muted);
    font-weight: 500;
    margin-top: 4px;
}

.payment-form {
    margin-top: 16px;
}

.form-stack {
    display: grid;
    gap: 14px;
}

.admin-form,
.admin-filters {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: end;
    margin-bottom: 20px;
}

.admin-form label,
.admin-filters label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    color: #1f2937;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-filters input,
.admin-filters select {
    border: 1px solid #d6dde8;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.admin-form__actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-form__advanced {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.admin-form__advanced summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
}

.admin-trip-create {
    margin-bottom: 0;
}

.admin-nav-more {
    position: relative;
    display: inline-block;
}

.admin-nav-more summary {
    cursor: pointer;
    list-style: none;
    color: inherit;
    font-weight: 600;
}

.admin-nav-more summary::-webkit-details-marker {
    display: none;
}

.admin-nav-more__menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    min-width: 200px;
    margin-top: 8px;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 6px;
}

.admin-nav-more__menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
}

.admin-nav-more__menu a:hover {
    background: #f3f6fb;
}

.field {
    display: grid;
    gap: 6px;
    font-weight: 600;
    color: #1f2937;
}

.field-inline-checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
}

.field-inline-checkbox--start {
    align-items: flex-start;
}

.field-inline-checkbox input[type='checkbox'] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
}

.field-inline-checkbox--start input[type='checkbox'] {
    margin-top: 4px;
}

.field-inline-checkbox span {
    font-weight: 500;
    line-height: 1.45;
}

.legal-consent-text a {
    color: var(--brand-blue);
    text-decoration: underline;
}

.field-error {
    color: #b42318;
    font-size: 13px;
    font-weight: 500;
}

.field input,
.field select {
    border: 1px solid #d6dde8;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.trip-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.meta-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.meta-value {
    font-weight: 700;
    font-size: 18px;
}

.meta-list {
    display: grid;
    gap: 12px;
}

.meta-list span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.callout {
    display: grid;
    gap: 12px;
    align-items: start;
}

.ticket-list {
    display: grid;
    gap: 16px;
}

.ticket-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-id {
    font-weight: 700;
}

.ticket-route {
    color: var(--muted);
}

.ticket-meta {
    color: var(--muted);
    font-size: 14px;
}

.ticket-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    background: #e0ecff;
    color: #1e40af;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.meta-list code {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 13px;
    word-break: break-all;
}

.qr-panel {
    margin-top: 20px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    text-align: center;
}

.qr-panel .qr-title {
    font-weight: 700;
    margin-bottom: 12px;
}

.qr-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.qr-code svg {
    width: 200px;
    height: 200px;
}

.qr-hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

.auth-card.highlight {
    border: 1px solid rgba(43, 85, 197, 0.2);
}

.auth-card.highlight.active {
    box-shadow: 0 22px 50px rgba(43, 85, 197, 0.18);
}

.auth-hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert.success {
    background: #e6f9ef;
    color: #14532d;
    border: 1px solid #b7f0cc;
}

.alert.error {
    background: #ffe7e7;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

.empty-state {
    text-align: center;
    padding: 40px;
    background: var(--surface);
    border-radius: var(--radius);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    margin-top: 8px;
}

.site-footer {
    background: #0a3f95;
    color: #dfe8ff;
    padding: 22px 0 18px;
    font-size: 13px;
}

.site-footer a {
    color: inherit;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
}

.footer-legal a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-copy {
    opacity: 0.9;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.social-link {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0.9;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.social-link svg {
    width: 22px;
    height: 22px;
    display: block;
}

.home-about {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 22px;
    margin-bottom: 28px;
}

.home-about__text,
.fleet-card,
.passenger-map,
.contacts-panel,
.home-partner {
    background: #f4f7fc;
    border-radius: 16px;
    border: 1px solid #d8e2f2;
    box-shadow: 0 10px 24px rgba(18, 44, 88, 0.08);
}

.home-about__text {
    padding: 24px;
}

.home-lead {
    font-weight: 700;
}

.home-about__more p {
    margin-bottom: 12px;
}

.home-about__more p:last-of-type {
    margin-bottom: 0;
}

.home-about__more .home-badges {
    margin-top: 16px;
}

.home-about__expand {
    margin-top: 16px;
}

.home-about.is-expanded .home-about__expand {
    display: none;
}

.home-badges {
    margin-top: 16px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-badge {
    padding: 10px 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #d8e2f2;
    font-weight: 600;
    font-size: 14px;
}

.home-about__image {
    min-height: clamp(220px, 30vw, 320px);
    border-radius: 16px;
    background:
        linear-gradient(160deg, rgba(7, 40, 96, 0.35), rgba(7, 40, 96, 0.1)),
        url('/images/about-team.png?v=2') center/cover no-repeat;
}

#buses {
    padding: 28px 24px 32px;
    border-radius: 16px;
    margin-bottom: 28px;
    background:
        linear-gradient(160deg, rgba(7, 40, 96, 0.35), rgba(7, 40, 96, 0.12)),
        url('/images/background-bus.png') center/cover no-repeat;
}

#buses h2 {
    color: #ffffff;
    margin-bottom: 18px;
}

.fleet-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 28px;
}

.fleet-card {
    padding: 14px;
}

.fleet-card__image {
    height: clamp(120px, 16vw, 170px);
    border-radius: 12px;
    margin-bottom: 12px;
    background:
        linear-gradient(160deg, rgba(7, 40, 96, 0.28), rgba(7, 40, 96, 0.05)),
        url('/images/about-team.png?v=2') center/cover no-repeat;
}

.fleet-card__image--bus1 {
    background:
        linear-gradient(160deg, rgba(7, 40, 96, 0.28), rgba(7, 40, 96, 0.05)),
        url('/images/bus1.jpg') center/cover no-repeat;
}

.fleet-card__image--bus2 {
    background:
        linear-gradient(160deg, rgba(7, 40, 96, 0.28), rgba(7, 40, 96, 0.05)),
        url('/images/bus2.jpg') center/cover no-repeat;
}

.fleet-card__image--bus3 {
    background:
        linear-gradient(160deg, rgba(7, 40, 96, 0.28), rgba(7, 40, 96, 0.05)),
        url('/images/bus3.jpg') center/cover no-repeat;
}

.fleet-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.fleet-card p {
    color: var(--muted);
    margin-bottom: 12px;
}

.fleet-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.fleet-modal[hidden] {
    display: none;
}

.fleet-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
}

.fleet-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(80vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: var(--radius);
    padding: 24px 28px 28px;
    box-shadow: var(--shadow);
    color: var(--text);
}

.fleet-modal__dialog h3 {
    margin: 0 0 14px;
    padding-right: 36px;
    font-size: 20px;
}

.fleet-modal__body p {
    margin: 0 0 12px;
    color: #1f2937;
    font-weight: 500;
}

.fleet-modal__body p:last-child {
    margin-bottom: 0;
}

.fleet-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fleet-modal__close:hover {
    background: #e2e8f0;
}

.passenger-block {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

#contacts {
    scroll-margin-top: 96px;
}

.home-lower {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    grid-template-areas:
        "partner map"
        "partner contacts";
}

.home-lower--no-ad {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "map contacts";
}

.home-lower .passenger-map {
    grid-area: map;
}

.home-lower .home-partner {
    grid-area: partner;
}

.home-lower .contacts-panel {
    grid-area: contacts;
}

.passenger-map__embed {
    border-radius: 16px;
    overflow: hidden;
    min-height: 180px;
    height: 100%;
}

.passenger-map__embed iframe {
    display: block;
    width: 100%;
    min-height: 180px;
    height: 100%;
    border: 0;
}

.passenger-map {
    min-height: 160px;
    padding: 18px;
    background:
        linear-gradient(0deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
        repeating-linear-gradient(
            45deg,
            #d7e5fb,
            #d7e5fb 14px,
            #e7f0ff 14px,
            #e7f0ff 28px
        );
}

.passenger-map__pin {
    display: inline-block;
    background: #ffffff;
    border-radius: 999px;
    padding: 10px 16px;
    border: 1px solid #d8e2f2;
    font-weight: 700;
    font-size: 13px;
    color: #1f3b6d;
}

.home-bottom {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
}

.home-bottom--single {
    grid-template-columns: 1fr;
}

.home-partner {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.home-partner__link {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 0;
    line-height: 0;
}

.home-partner__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    background: #ffffff;
}

.admin-ad-thumb {
    display: block;
    max-width: 120px;
    max-height: 72px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #d8e2f2;
}

.contacts-panel {
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 32px;
}

.contacts-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    line-height: 1.25;
}

.contacts-item__icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 63, 149, 0.08);
    color: #0a3f95;
}

.contacts-item__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.contacts-item__label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.contacts-item__value {
    font-weight: 800;
    color: #1f3b6d;
}

.contacts-item__value a {
    color: inherit;
}

.contacts-item__value a:hover {
    color: var(--brand-blue);
}

.passenger-info-hero {
    background-image: url('/images/background-bus.png');
}

.passenger-info-page {
    margin-top: -8px;
}

.passenger-info-card {
    background: var(--surface-alt);
    border-radius: 16px;
    padding: 28px 32px 32px;
    border: 1px solid #d8e2f2;
}

.passenger-info-card h2 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 10px;
    color: #1f3b6d;
}

.passenger-info-card h2:first-child {
    margin-top: 0;
}

.passenger-info-lead {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
}

.passenger-info-list {
    margin: 0 0 12px;
    padding-left: 22px;
}

.passenger-info-list li {
    margin-bottom: 8px;
}

.passenger-info-note {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #d8e2f2;
    font-weight: 600;
}

.passenger-info-block + .passenger-info-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #d8e2f2;
}

.passenger-info-stops {
    margin: 0;
    padding-left: 22px;
}

.passenger-info-stops li {
    margin-bottom: 10px;
}

.passenger-info-stops__name {
    font-weight: 700;
}

.passenger-info-stops__km {
    display: block;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.passenger-info-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

.passenger-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.passenger-info-table th,
.passenger-info-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #d8e2f2;
}

.passenger-info-table th {
    background: #ffffff;
    font-weight: 700;
    color: #1f3b6d;
}

.passenger-info-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.65);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.search-card,
.info-card,
.trip-card,
.ticket-card,
.auth-card {
    animation: rise 0.6s ease-out both;
}

.info-grid .info-card:nth-child(2) {
    animation-delay: 0.08s;
}

.info-grid .info-card:nth-child(3) {
    animation-delay: 0.16s;
}

.trip-list .trip-card:nth-child(2),
.ticket-list .ticket-card:nth-child(2) {
    animation-delay: 0.08s;
}

.trip-list .trip-card:nth-child(3),
.ticket-list .ticket-card:nth-child(3) {
    animation-delay: 0.16s;
}

.auth-grid .auth-card:nth-child(2) {
    animation-delay: 0.12s;
}

form.is-loading .spinner {
    display: inline-block;
}

form.is-loading .button span:first-child {
    opacity: 0.7;
}

.admin .site-header {
    background: rgba(15, 23, 42, 0.95);
}

.admin .site-nav,
.admin .brand-name,
.admin .brand-mark {
    color: #e2e8f0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .home-lower {
        grid-template-columns: 1fr;
        grid-template-areas:
            "partner"
            "map"
            "contacts";
    }

    .home-lower--no-ad {
        grid-template-areas:
            "map"
            "contacts";
    }

    .contacts-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 0px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .site-nav {
        order: 3;
        width: 100%;
    }

    .search-card,
    .search-card.compact {
        grid-template-columns: 1fr;
    }

    .trip-card__body {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .trip-price {
        text-align: left;
    }

    .info-grid,
    .grid-2,
    .footer-mini,
    .auth-grid,
    .trip-summary,
    .home-about,
    .fleet-grid,
    .passenger-block,
    .home-bottom,
    .home-lower {
        grid-template-columns: 1fr;
        grid-template-areas:
            "map"
            "partner"
            "contacts";
    }

    .home-lower--no-ad {
        grid-template-areas:
            "map"
            "contacts";
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .seat-row {
        grid-template-columns: 1fr 40px 1fr;
    }

    .seat-row__side {
        grid-auto-columns: minmax(70px, 1fr);
    }
}

@media (max-width: 0px) {
    .hero-inner {
        padding: 36px 0 48px;
    }

    .ticket-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .seat-row {
        grid-template-columns: 1fr;
    }

    .seat-aisle {
        display: none;
    }
}
