/* transport.css */
/* Стили для страницы транспорта */
.transport-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Герой секция транспорта */
.transport-hero {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    margin-bottom: 2rem;
    color: var(--text-white);
    text-align: center;
}

.transport-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.transport-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Поисковая секция */
.search-section {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-bottom: 1rem;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 20px;
    color: var(--text-white);
    font-size: 1rem;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, var(--russian-blue) 0%, var(--russian-red) 100%);
    border: none;
    padding: 0 20px;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--russian-red) 0%, var(--russian-blue) 100%);
}

.search-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, var(--russian-blue) 0%, var(--russian-red) 100%);
    transform: translateY(-2px);
}

/* Кнопка сообщить об ошибке (СКРЫТА ТЕПЕРЬ) */
.report-error-section {
    display: none; /* Скрываем оригинальную кнопку */
}

.report-error-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.report-error-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252 0%, #d63031 100%);
}

.report-error-btn:active {
    transform: translateY(0);
}

.error-icon {
    font-size: 1.2rem;
}

.error-text {
    font-size: 0.95rem;
}

/* Все маршруты */
.all-routes {
    margin-bottom: 3rem;
}

.all-routes h2 {
    color: var(--text-white);
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
}

.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    align-items: stretch;
}

.route-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    height: 100%;
}

.route-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.route-number {
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* Цвета для номеров маршрутов */
.route-number.city {
    background: #27ae60;
}

.route-number.suburban {
    background: #3498db;
}

.route-number.intercity_bus {
    background: #e67e22;
}

.route-number.intercity_rail {
    background: #9b59b6;
}

.route-status {
    background: #27ae60;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.route-name {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.route-schedule-info {
    margin-bottom: 1rem;
}

.schedule-item {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
}

.schedule-label {
    color: var(--russian-blue);
    font-weight: 600;
    min-width: 120px;
    font-size: 0.9rem;
}

.schedule-value {
    color: #555;
    flex: 1;
    font-size: 0.9rem;
}

.route-stops-preview {
    margin-bottom: 1rem;
    min-height: 60px;
}

.stops-label {
    color: var(--russian-blue);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.stops-list {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

/* Кнопка подробного расписания */
.route-details-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--russian-blue) 0%, var(--russian-red) 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    margin-top: auto;
    flex-shrink: 0;
}

.route-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, var(--russian-blue) 0%, var(--russian-red) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-modal:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    color: var(--text-primary);
}

/* Стили для формы сообщения об ошибке */
.error-report-modal .modal-content {
    max-width: 500px;
}

.error-report-body {
    padding: 0;
}

.error-report-body form {
    padding: 2rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f8f9fa;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #3498db;
    background-color: white;
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
}

.submit-btn,
.cancel-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-message {
    animation: slideInRight 0.3s ease;
}

.success-message.enhanced {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-left: 4px solid #2ecc71;
}

.error-message.enhanced {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-left: 4px solid #c0392b;
}

/* Индикатор загрузки */
.loading-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

/* Сообщения о загрузке и ошибках */
.loading-message, .no-routes-message, .no-contacts-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error-message {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

/* Стили для модального окна с деталями маршрута */
.route-info-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.route-info-section h3 {
    color: var(--russian-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.route-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.route-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #bbdefb;
}

.route-type.city { background: #e8f5e8; color: #2e7d32; border-color: #c8e6c9; }
.route-type.suburban { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
.route-type.intercity_bus { background: #fff3e0; color: #ef6c00; border-color: #ffe0b2; }
.route-type.intercity_rail { background: #f3e5f5; color: #7b1fa2; border-color: #e1bee7; }

.route-status.current {
    background: #4caf50;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Секция ближайшего рейса */
.next-trip-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.next-trip-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.next-trip-time {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

/* Секция остановок с временем */
.stops-section {
    margin-bottom: 2rem;
}

.stops-section h4 {
    color: var(--russian-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stops-list.with-times {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.stop-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.stop-item:last-child {
    border-bottom: none;
}

.stop-item:hover {
    background-color: #e9ecef;
    border-radius: 6px;
}

.stop-number {
    color: #6c757d;
    font-weight: bold;
    min-width: 30px;
    font-size: 0.9rem;
}

.stop-name {
    flex: 1;
    color: #495057;
    font-weight: 500;
}

.stop-time {
    color: var(--russian-blue);
    font-weight: bold;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
    min-width: 50px;
    text-align: center;
}

/* Сетка расписания */
.schedule-section {
    margin-bottom: 2rem;
}

.schedule-section h4 {
    color: var(--russian-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.schedule-grid .schedule-item {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--russian-blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schedule-grid .schedule-label {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 5px;
    min-width: auto;
}

.schedule-grid .schedule-value {
    color: #495057;
    font-weight: 600;
    font-size: 1rem;
}

/* Секция примечаний */
.notes-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.notes-section h4 {
    color: #856404;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.notes-section p {
    color: #856404;
    margin: 0;
    line-height: 1.5;
}

/* Стили для скроллбара */
.stops-list.with-times::-webkit-scrollbar {
    width: 6px;
}

.stops-list.with-times::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.stops-list.with-times::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.stops-list.with-times::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Скрываем старые кнопки фильтрации */
.search-filters {
    display: none !important;
}

/* Сообщение "нет результатов" */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    color: var(--text-white);
}

.no-results-content .no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-results-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.no-results-content p {
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.5;
}

/* Индикатор завтрашнего рейса */
.next-trip-time::after {
    content: attr(data-tomorrow);
    font-size: 0.8rem;
    opacity: 0.9;
    display: block;
    margin-top: 5px;
}

/* Подсветка текущей остановки */
.stop-item.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
}

.stop-item.current .stop-number,
.stop-item.current .stop-name,
.stop-item.current .stop-time {
    color: white;
}

.stop-item.current .stop-time {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .transport-page {
        padding: 0 10px;
    }
    
    .transport-hero {
        padding: 2rem 1rem;
    }
    
    .transport-hero h1 {
        font-size: 2rem;
    }
    
    .routes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .report-error-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .error-text {
        font-size: 0.85rem;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .error-report-body form {
        padding: 1.5rem;
    }
    
    .route-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 1rem;
    }
    
    .next-trip-time {
        font-size: 1.5rem;
    }
    
    .stop-item {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stop-number {
        min-width: auto;
    }
    
    .stop-time {
        align-self: flex-end;
    }
    
    .stops-list.with-times {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .transport-hero h1 {
        font-size: 1.8rem;
    }
    
    .route-card {
        padding: 1rem;
        min-height: 300px;
    }
    
    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .schedule-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .report-error-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .error-report-body form {
        padding: 1rem;
    }
    
    .route-details-btn {
        min-height: 40px;
        padding: 10px;
    }
    
    .next-trip-section {
        padding: 1rem;
    }
    
    .schedule-grid .schedule-item {
        padding: 12px;
    }
    
    .notes-section {
        padding: 1rem;
    }
}