/* static/css/style.css - Современные стили транспортного хаба */
:root {
  --primary: #1b6ca8;
  --primary-hover: #145380;
  --accent: #0a9396;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--primary-hover);
}

.hub-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.hub-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hub-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.hub-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
.hub-logo-icon {
  font-size: 24px;
}
.hub-nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
  font-weight: 600;
}
.hub-nav a {
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.hub-nav a:hover, .hub-nav a.active {
  background: var(--border-color);
  color: var(--primary);
}

/* Breadcrumbs */
.hub-breadcrumbs {
  padding: 14px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.hub-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 8px;
}
.hub-breadcrumbs li::after {
  content: "›";
  margin-left: 8px;
}
.hub-breadcrumbs li:last-child::after {
  content: "";
}

/* Hero / Header Section */
.hub-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  padding: 36px 0;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}
.hub-hero h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}
.hub-hero p {
  font-size: 16px;
  opacity: 0.92;
  max-width: 800px;
}
.hub-search-box {
  margin-top: 20px;
  max-width: 600px;
}
.hub-search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-md);
  outline: none;
}

/* Badges */
.hub-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}
.badge-bus { background: #2a9d8f; }
.badge-intercity { background: #d97706; }
.badge-tram { background: #e76f51; }
.badge-trolleybus { background: #457b9d; }
.badge-suburban { background: #3a86ff; }
.badge-train, .badge-trains { background: #8338ec; }
.badge-plane { background: #0077b6; }

/* Filter Bar */
.hub-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.hub-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}
.hub-filter-btn:hover, .hub-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Live Timer Card */
.live-timer-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-weight: 600;
}
.live-timer-clock {
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  color: #047857;
}

/* Practical Info Card */
.hub-facts-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.fact-item {
  display: flex;
  flex-direction: column;
}
.fact-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}
.fact-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
}

/* Schedule Table */
.hub-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.hub-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hub-table-header h2 {
  font-size: 18px;
  font-weight: 700;
}
.hub-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.hub-table th {
  background: #f8fafc;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}
.hub-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
}
.hub-table tr:hover td {
  background: #f1f5f9;
}
.time-col {
  font-weight: 800;
  font-size: 17px;
  color: var(--primary);
}

/* Grid for catalogs */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}
.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.hub-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}
.hub-card-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* Timeline */
.hub-timeline {
  list-style: none;
  padding: 10px 0 20px 20px;
  position: relative;
}
.hub-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 27px;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
  padding: 8px 0 8px 30px;
}
.timeline-dot {
  position: absolute;
  left: 4px;
  top: 14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-item.first .timeline-dot, .timeline-item.last .timeline-dot {
  width: 12px;
  height: 12px;
  left: 2.5px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.timeline-name {
  font-size: 15px;
  font-weight: 600;
}
.timeline-name a {
  color: var(--text-main);
}
.timeline-name a:hover {
  color: var(--primary);
}
.timeline-time {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Floating Return Button */
.return-trip-sticky {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}
.return-btn-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.return-btn-cta:hover {
  background: var(--primary-hover);
}

/* Evening End Banner */
.evening-banner {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
}

/* Footer */
.hub-footer {
  margin-top: auto;
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 24px;
  font-size: 14px;
}
.hub-footer a {
  color: #cbd5e1;
}
.hub-footer a:hover {
  color: #ffffff;
}
.hub-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
.hub-footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 14px;
}
.hub-footer-col ul {
  list-style: none;
}
.hub-footer-col li {
  margin-bottom: 8px;
}
.hub-footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hub-header-inner {
    height: 56px;
  }
  .hub-nav {
    display: none; /* simple mobile */
  }
  .hub-hero {
    padding: 24px 16px;
  }
  .hub-hero h1 {
    font-size: 22px;
  }
  .return-trip-sticky {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    text-align: center;
  }
  .return-btn-cta {
    justify-content: center;
  }
}

/* Авиавиджеты Travelpayouts */
.avia-widget-card,
.avia-popular-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.avia-widget-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.avia-widget-icon {
  font-size: 24px;
  line-height: 1;
}

.avia-widget-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}

.avia-widget-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.avia-widget-container {
  min-height: 120px;
  width: 100%;
  overflow-x: auto;
}

.ad-erid-label {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 10px;
  text-align: right;
  line-height: 1.3;
}

.avia-procedures-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

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

.avia-proc-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px;
  border-left: 3px solid var(--primary);
}

.avia-proc-title {
  font-weight: 700;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 4px;
}

.avia-proc-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.avia-faq-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.avia-faq-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 12px 0;
}

.avia-faq-item:last-child {
  border-bottom: none;
}

.avia-faq-q {
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
}

.avia-faq-a {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .avia-widget-card,
  .avia-popular-card,
  .avia-procedures-card,
  .avia-faq-card {
    padding: 14px;
    margin: 16px 0;
  }
  .avia-widget-title {
    font-size: 1rem;
  }
  .avia-proc-grid {
    grid-template-columns: 1fr;
  }
}

