/* ===================================
   Zone Filter Styles
   =================================== */

.zone-filter-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    margin: 40px 0;
}

/* Zone Header */
.zone-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 32px;
}

.zone-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.zone-info {
    flex: 1;
}

.zone-code {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.zone-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 4px 0;
    line-height: 1.2;
}

.zone-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin: 4px 0;
    font-style: italic;
}

.zone-description {
    font-size: 15px;
    color: var(--text-color);
    margin: 8px 0 0;
}

.zone-stats {
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stations Grid */
.stations-section {
    margin-bottom: 40px;
}

.section-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle i {
    color: var(--primary-color);
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.no-stations {
    text-align: center;
    color: var(--text-light);
    padding: 40px;
    font-style: italic;
}

.station-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.station-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.station-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(227, 30, 36, 0.15);
    transform: translateY(-4px);
}

.station-card:hover::before {
    transform: scaleY(1);
}

.station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.station-code {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.station-type {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.station-type[data-type="departure"] {
    background: #e3f2fd;
    color: #1976d2;
}

.station-type[data-type="arrival"] {
    background: #fff3e0;
    color: #f57c00;
}

.station-type[data-type="destination"] {
    background: #f3e5f5;
    color: #7b1fa2;
}

.station-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 4px;
    display: block;
}

.station-name-en {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 8px;
}

.station-elevation {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.station-elevation i {
    color: var(--primary-color);
}

.station-description {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 12px;
}

.station-landmarks {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.landmarks-title {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.landmarks-title i {
    color: #FFD700;
}

.landmark-tag {
    font-size: 11px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-color);
    display: inline-block;
    margin: 4px 4px 0 0;
}

/* Routes Section */
.routes-section {
    margin: 40px 0;
}

.routes-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.routes-title i {
    color: var(--primary-color);
}

.no-routes {
    text-align: center;
    color: var(--text-light);
    padding: 40px;
    font-style: italic;
}

/* Route Groups */
/* Route Groups and Sections */
.route-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--primary-color);
    font-size: 24px;
}

/* Route Pair Styling */
.route-pair {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.route-pair:hover {
    box-shadow: 0 8px 24px rgba(227, 30, 36, 0.15);
    transform: translateY(-2px);
}

.route-direction {
    margin-bottom: 16px;
}

.route-direction:last-child {
    margin-bottom: 0;
}

.direction-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding: 10px 16px;
    border-radius: 8px;
}

.route-direction.outbound .direction-label {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

.route-direction.outbound .direction-label i {
    color: #1976d2;
    font-size: 18px;
}

.route-direction.return .direction-label {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #f57c00;
}

.route-direction.return .direction-label i {
    color: #f57c00;
    font-size: 18px;
}

.route-group {
    margin-bottom: 32px;
}

.route-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.route-group.upward .route-group-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

.route-group.upward .route-group-header i {
    color: #1976d2;
}

.route-group.downward .route-group-header {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #f57c00;
}

.route-group.downward .route-group-header i {
    color: #f57c00;
}

.route-group.internal .route-group-header {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #388e3c;
}

.route-group.internal .route-group-header i {
    color: #388e3c;
}

.route-count {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.8;
}

/* Route Cards */
.route-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.route-card:hover {
    box-shadow: 0 8px 24px rgba(227, 30, 36, 0.15);
    transform: translateX(4px);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.route-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
}

.route-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.route-badge.longest {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.route-path {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.route-station {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.route-station .station-code {
    font-size: 12px;
    padding: 4px 8px;
    margin: 0;
}

.route-station .station-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.route-arrow {
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.route-via {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.route-via i {
    color: var(--primary-color);
}

.via-station {
    color: var(--text-color);
    font-weight: 500;
}

.route-description {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 16px;
    padding: 12px;
    background: #f0f7ff;
    border-left: 3px solid #2196F3;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.route-description i {
    color: #2196F3;
    margin-top: 2px;
}

.route-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.route-info > span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-color);
}

.route-info i {
    color: var(--primary-color);
}

.route-destination {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-select-route {
    width: 100%;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-select-route:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-select-route:active {
    transform: translateY(0);
}

/* Zone Selector */
.zone-selector {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #e9ecef;
}

.zone-selector label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 16px;
}

.zone-selector label i {
    color: var(--primary-color);
}

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

.zone-btn {
    background: white;
    border: 2px solid;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.zone-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.zone-btn.active {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.zone-btn-code {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.zone-btn-name {
    font-size: 15px;
}

.zone-btn-count {
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .zone-filter-container {
        padding: 20px;
    }

    .zone-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .zone-title {
        font-size: 24px;
    }

    .stations-grid {
        grid-template-columns: 1fr;
    }

    .route-path {
        flex-direction: column;
        gap: 12px;
    }

    .route-arrow {
        transform: rotate(90deg);
    }

    .route-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .zone-buttons {
        grid-template-columns: 1fr;
    }
}
