* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #1d2430;
}

body {
    min-height: 100vh;
}

a {
    color: #0f5cc0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1380px, calc(100% - 28px));
    margin: 0 auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #dbe3ee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

.site-title {
    margin: 0;
    font-size: 1.45rem;
}

.site-subtitle {
    margin: 4px 0 0 0;
    color: #5d6b7e;
    font-size: 0.95rem;
}

.site-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.site-main {
    padding: 20px 0 28px 0;
}

.hero-compact {
    padding-bottom: 18px;
}

.top-stats {
    grid-template-columns: repeat(3, 1fr);
}

.stats-grid {
    display: grid;
    gap: 16px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #dde5ef;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 35, 60, 0.06);
    padding: 18px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f5cc0;
}

.stat-label {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.map-layout {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.sidebar-card,
.map-card,
.detail-panel {
    background: #ffffff;
    border: 1px solid #dde5ef;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 35, 60, 0.06);
}

.sidebar-card,
.map-card {
    padding: 18px;
}

.sidebar-card h2,
.map-card h2,
.results-box h3,
.detail-panel h3 {
    margin-top: 0;
}

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

.form-group {
    display: grid;
    gap: 6px;
}

.form-group label {
    font-size: 0.95rem;
    color: #334056;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cfd8e5;
    border-radius: 10px;
    background: #ffffff;
    color: #162130;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-primary,
.button-secondary,
.station-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.button-primary,
.station-action-button {
    background: #0f5cc0;
    color: #ffffff;
}

.button-secondary {
    background: #edf2f8;
    color: #1e2a39;
}

.button-primary:hover,
.button-secondary:hover,
.station-action-button:hover {
    opacity: 0.94;
    text-decoration: none;
}

.results-box {
    margin-top: 12px;
}

.station-list {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.station-list-item {
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    padding: 12px;
    background: #fafcff;
    cursor: pointer;
}

.station-list-item:hover {
    background: #f0f6ff;
}

.station-list-item h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
}

.station-list-item p {
    margin: 0 0 4px 0;
    color: #56657a;
    font-size: 0.92rem;
}

.map-toolbar {
    margin-bottom: 14px;
}

.map-toolbar p {
    margin: 4px 0 0 0;
    color: #5d6b7e;
}

#map {
    width: 100%;
    height: 620px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #dbe4ef;
}

.detail-panel {
    margin-top: 16px;
    padding: 16px;
}

.detail-grid {
    display: grid;
    gap: 10px;
}

.detail-block {
    padding: 12px;
    border: 1px solid #dde5ef;
    border-radius: 12px;
    background: #fafcff;
}

.detail-block h4 {
    margin: 0 0 8px 0;
}

.detail-prices {
    display: grid;
    gap: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e0e8f1;
    border-radius: 10px;
    background: #ffffff;
}

.price-low {
    color: #0d8a35;
    font-weight: 700;
}

.price-medium {
    color: #c57d00;
    font-weight: 700;
}

.price-high {
    color: #c93333;
    font-weight: 700;
}

.popup-card {
    min-width: 240px;
}

.popup-card h4 {
    margin: 0 0 8px 0;
}

.popup-card p {
    margin: 0 0 5px 0;
    font-size: 0.92rem;
}

.site-footer {
    padding: 24px 0 36px 0;
    text-align: center;
    color: #5e6a7d;
}

hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 18px 0;
}

@media (max-width: 1100px) {
    .map-layout {
        grid-template-columns: 1fr;
    }

    #map {
        height: 520px;
    }
}

@media (max-width: 640px) {
    .brand-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-stats {
        grid-template-columns: 1fr;
    }

    .container {
        width: min(100% - 16px, 1380px);
    }

    #map {
        height: 420px;
    }

    .sidebar-card,
    .map-card,
    .detail-panel {
        padding: 14px;
    }

    .button-row {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }
}
.route-summary-grid {
    display: grid;
    gap: 10px;
}

.route-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dde5ef;
    border-radius: 10px;
    background: #fafcff;
}

.route-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.route-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef4fb;
    color: #23415e;
    font-size: 0.9rem;
    margin-right: 8px;
    margin-bottom: 8px;
}

.recommendation-box {
    padding: 12px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fafcff;
    margin-bottom: 12px;
}

.recommendation-box h4 {
    margin: 0 0 8px 0;
}

.recommendation-box p {
    margin: 4px 0;
}
