* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.4;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    background: #ffffff;
    border-bottom: 1px solid #e9eef3;
    padding: 5px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-link {
    display: inline-block;
    line-height: 0;
}

.logo-image {
    height: auto;
    width: auto;
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
}

.hero {
    margin: 0;
    text-align: center;
}

h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}

#bus-schedule-app {
    margin: 10px 0 32px;
    min-height: 400px;
}

.update-date {
    display: flex;
    justify-content: flex-start;
    margin: 12px 0 20px 0;
    color: #64748b;
    font-style: italic;
    font-size: 12px;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.images-gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.schedule-image {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.schedule-image:hover {
    transform: scale(1.02);
}

/* Верхний текстовый блок - желтое обрамление, минимальные отступы */
.text-block-top {
    margin: 4px 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    line-height: 1.4;
    font-size: 14px;
    color: #856404;
    display: block;           /* меняем на block */
    width: fit-content;      /* ← главное: ширина только под контент */
    max-width: 100%;         /* чтобы не вылезал за пределы на мобильных */
}

/* Нижний текстовый блок - прежние стили */
.text-block-bottom {
    margin: 20px 0;
    padding: 15px;
    background: #f1f5f9;
    border-radius: 12px;
    line-height: 1.5;
    display: none;
}

@media (max-width: 720px) {
    .container {
        padding: 0 18px;
    }
    h1 {
        font-size: 16px;
    }
    .logo-image {
        max-height: 52px;
    }
    .schedule-image {
        max-width: 250px;
    }
    .images-gallery {
        gap: 15px;
    }
    .text-block-top {
        padding: 6px 12px;
        font-size: 12px;
    }
}

.footer-note {
    margin: 48px auto 32px;
    text-align: center;
    font-size: 12px;
    color: #6c7a91;
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

.footer-note a {
    color: #6c7a91;
    text-decoration: underline;
}

.footer-note a:hover {
    color: #1e3a8a;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #ccc;
}

.source-info {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 16px;
    margin-bottom: 8px;
    font-style: italic;
}

.breadcrumb {
    margin: 15px 0;
    font-size: 14px;
    color: #64748b;
}

.breadcrumb a {
    color: #1e3a8a;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.routes-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    background: #f1f5f9;
    border-radius: 16px;
}

.routes-links a {
    color: #1e3a8a;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.routes-links a:hover {
    background: #e2e8f0;
    text-decoration: underline;
}

.route-section {
    margin: 30px 0;
}

.route-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    color: #0f172a;
}

.additional-info {
    margin: 30px 0;
    padding: 20px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .route-title {
        font-size: 20px;
    }
    .routes-links {
        gap: 8px;
    }
    .routes-links a {
        font-size: 12px;
    }
}

.breadcrumb {
    margin: 15px 0;
    font-size: 14px;
    color: #64748b;
}

.breadcrumb a {
    color: #1e3a8a;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.online-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-left: 4px solid #0284c7;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #0c4a6e;
}

.online-info a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
}

.online-info a:hover {
    text-decoration: underline;
}

.buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.online-btn {
    background: #1e3a8a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.online-btn:hover {
    background: #2563eb;
}


.online-tablo {
    text-align: center;
    margin: 20px 0;
}

.online-tablo iframe {
    width: 100%;
    max-width: 320px;
    height: 642px;
    border: none;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

.additional-text {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    line-height: 1.6;
    color: #334155;
}

.external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: #f1f5f9;
    border-radius: 12px;
}

.external-links a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
}

.external-links a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .online-info {
        padding: 15px;
        font-size: 14px;
    }
    .online-btn {
        padding: 10px 18px;
        font-size: 12px;
    }
    .online-tablo iframe {
        max-width: 100%;
        height: 500px;
    }
    .external-links {
        flex-direction: column;
        gap: 10px;
    }
}


.city-info {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.city-info h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #0f172a;
}

.city-info h3 {
    font-size: 20px;
    margin: 20px 0 12px 0;
    color: #0f172a;
}

.city-info p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #334155;
}

.city-info a {
    color: #1e3a8a;
    text-decoration: none;
}

.city-info a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .city-info {
        padding: 16px;
    }
    .city-info h2 {
        font-size: 20px;
    }
    .city-info h3 {
        font-size: 18px;
    }
}

.route-section {
    margin-bottom: 25px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 3px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(226, 232, 240);
    border-image: initial;
}

