:root {
  --bg: #f4f7fb;
  --bg-accent: #eef4ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-muted: #f8fbff;
  --text: #0f172a;
  --muted: #5f6b85;
  --line: rgba(132, 146, 177, 0.2);
  --primary: #1d4ed8;
  --primary-strong: #1e40af;
  --primary-soft: rgba(29, 78, 216, 0.12);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 60px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.14);
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.busgo-body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.14), transparent 28%),
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

body.busgo-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
}

.app-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(29, 78, 216, 0.08), transparent 22%),
    radial-gradient(circle at 85% 0%, rgba(56, 189, 248, 0.1), transparent 26%);
  pointer-events: none;
}

.busgo-container {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(24px);
  background: rgba(248, 251, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
}

.header-inner,
.site-nav,
.hero-stats,
.hero-callouts,
.section-head,
.results-header,
.trip-times,
.trip-path,
.trip-tags,
.trip-side,
.ticket-grid,
.footer-grid,
.busgo-confirmation-head {
  display: flex;
  gap: var(--space-2);
}

.header-inner {
  min-height: 92px;
  justify-content: space-between;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.32);
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 1.05rem;
}

.brand-copy small {
  color: var(--muted);
}

.site-nav {
  align-items: center;
}

.site-nav a,
.header-chip {
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.header-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  color: var(--primary-strong);
}

.hero-banner,
.inner-hero {
  padding: 56px 0 24px;
}

.hero-layout,
.route-cards,
.offer-cards,
.feature-grid,
.search-layout,
.seat-layout-page,
.checkout-layout,
.two-col-grid,
.busgo-confirmation-grid {
  display: grid;
  gap: var(--space-3);
}

.hero-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: center;
}

.hero-panel,
.surface-card,
.booking-widget,
.route-card,
.offer-card,
.feature-card,
.panel-card,
.trip-result-card,
.site-footer {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
}

.hero-panel,
.booking-widget,
.panel-card,
.surface-card,
.site-footer {
  padding: var(--space-4);
}

.compact-panel {
  padding-block: var(--space-4);
}

.hero-text h1,
.inner-hero h1,
.hero-panel h1 {
  margin: 16px 0;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.hero-text p,
.hero-panel p,
.section-note,
.feature-card p,
.offer-card p,
.busgo-checkout-head p,
.stage-header p,
.results-header p {
  color: var(--muted);
  margin: 0;
}

.section-chip,
.widget-badge,
.footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.section-chip {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.widget-badge,
.footer-badge {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

.hero-stats,
.hero-callouts {
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.hero-stats div {
  min-width: 132px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.hero-stats strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.hero-callouts span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.widget-heading {
  margin-bottom: var(--space-3);
}

.widget-heading h2,
.section-head h2,
.panel-title h2,
.results-header h2,
.sidebar-header h2,
.stage-header h2,
.summary-shell-head h2,
.busgo-checkout-head h2 {
  margin: 10px 0 0;
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 1.15;
}

.booking-form,
.search-inline-form,
.filter-form {
  display: grid;
  gap: var(--space-2);
}

.booking-form {
  gap: 18px;
}

.field-shell {
  display: grid;
  gap: 8px;
}

.field-shell span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

select,
input,
textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
  transition: 180ms ease;
}

textarea {
  padding-top: 14px;
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.busgo-btn {
  border: 0;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, background 180ms ease;
}

.busgo-btn:hover {
  transform: translateY(-1px);
}

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

.busgo-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8 48%, #1e3a8a);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.busgo-btn-secondary {
  color: var(--primary-strong);
  background: rgba(37, 99, 235, 0.08);
}

.full-width {
  width: 100%;
}

.section-block {
  padding: 24px 0 48px;
}

.section-surface {
  position: relative;
}

.section-head {
  justify-content: space-between;
  align-items: end;
  margin-bottom: var(--space-3);
}

.section-note {
  max-width: 380px;
}

.route-cards,
.offer-cards,
.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-card,
.offer-card,
.feature-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.route-card:hover,
.offer-card:hover,
.feature-card:hover,
.trip-result-card:hover,
.surface-card:hover,
.panel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.route-meta {
  font-size: 0.9rem;
  color: var(--primary-strong);
  font-weight: 800;
}

.route-card strong {
  font-size: 1.5rem;
  line-height: 1.3;
}

.route-card strong small {
  font-size: 0.9rem;
  color: var(--muted);
  margin-inline: 6px;
}

.route-card em {
  margin-top: auto;
  color: var(--muted);
  font-style: normal;
}

.offer-tag {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary-strong);
  font-weight: 800;
}

.search-head,
.results-header {
  align-items: end;
}

.search-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.search-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 108px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.panel-title span {
  color: var(--muted);
  font-weight: 700;
}

.filter-form {
  gap: var(--space-3);
}

.results-panel-grid {
  display: grid;
  gap: 18px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(248, 250, 255, 0.88));
  border: 1px solid var(--line);
  color: var(--muted);
}

.trip-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 24px;
}

.trip-main {
  display: grid;
  gap: 14px;
}

.trip-times {
  justify-content: space-between;
  align-items: center;
}

.trip-times small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.trip-times strong {
  font-size: 1.3rem;
}

.trip-path {
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  color: var(--muted);
  font-weight: 700;
}

.trip-path b {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.8), transparent);
}

.trip-tags {
  flex-wrap: wrap;
}

.trip-tags span,
.busgo-seat-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.trip-side {
  flex-direction: column;
  align-items: flex-end;
  min-width: 190px;
}

.trip-price {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.seat-layout-page,
.checkout-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.seat-sidebar,
.checkout-summary-shell {
  position: sticky;
  top: 108px;
}

.sidebar-header,
.summary-shell-head,
.stage-header,
.busgo-checkout-head {
  margin-bottom: var(--space-3);
}

.busgo-seat-meta,
.busgo-seat-stats,
.busgo-summary-list {
  display: grid;
  gap: 12px;
}

.busgo-seat-meta div,
.busgo-seat-stats div,
.busgo-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.busgo-seat-meta strong,
.busgo-seat-stats strong,
.busgo-summary-row strong {
  font-weight: 800;
}

.busgo-seat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.seat-badge,
.seat-swatch {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  display: inline-block;
}

.seat-badge.available,
.seat-swatch.available,
.seat-btn.available,
.busgo-seat-btn.available {
  background: rgba(16, 185, 129, 0.18);
}

.seat-badge.selected,
.seat-swatch.selected,
.seat-btn.selected,
.busgo-seat-btn.selected {
  background: rgba(29, 78, 216, 0.16);
}

.seat-badge.booked,
.seat-swatch.booked,
.seat-btn.booked,
.seat-btn.reserved,
.busgo-seat-btn.booked,
.busgo-seat-btn.reserved {
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
}

.busgo-seat-field,
.busgo-field {
  margin-top: var(--space-3);
}

.busgo-seat-message,
.busgo-checkout-message {
  min-height: 24px;
  margin: 12px 0 18px;
  color: var(--primary-strong);
  font-weight: 700;
}

.seat-stage-shell,
.busgo-checkout-card,
.busgo-confirmation-card {
  min-height: 100%;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.busgo-seat-canvas {
  min-height: 420px;
}

.busgo-seat-layout,
.bus-shell {
  position: relative;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246, 250, 255, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.busgo-seat-driver,
.driver-badge {
  width: 88px;
  margin-inline-start: auto;
  margin-bottom: 20px;
  padding: 10px 14px;
  text-align: center;
  border-radius: 16px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary-strong);
  font-weight: 800;
}

.busgo-seat-grid,
.seat-grid {
  display: grid;
  gap: 14px;
}

.busgo-seat-row {
  display: grid;
  grid-template-columns: repeat(5, 56px);
  justify-content: center;
  gap: 14px;
}

.seat-row {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.busgo-seat-btn,
.busgo-seat-gap,
.seat-btn,
.seat-gap {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.busgo-seat-btn,
.seat-btn {
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.busgo-seat-btn:hover:not(:disabled),
.seat-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.busgo-seat-btn.selected,
.seat-btn.selected {
  border-color: rgba(29, 78, 216, 0.36);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.busgo-seat-gap,
.seat-gap {
  display: inline-block;
}

.checkout-form-card,
.checkout-summary-card {
  display: block;
}

.busgo-checkout-head h2,
.summary-shell-head h2,
.sidebar-header h2 {
  margin-bottom: 8px;
}

.busgo-summary-row.total {
  font-weight: 800;
  font-size: 1.06rem;
}

.confirmation-screen {
  max-width: 980px;
  margin: 0 auto;
}

.confirmation-hero {
  text-align: center;
}

.busgo-confirmation-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.busgo-confirmation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.busgo-ticket-box {
  padding: 20px;
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.busgo-ticket-box small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.busgo-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.card,
.widefat {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.widefat th,
.widefat td {
  padding: 16px;
}

.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 16px auto 24px;
}

.footer-grid {
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
}

.footer-brand,
.footer-column {
  display: grid;
  gap: 12px;
  max-width: 280px;
}

.footer-brand h3,
.footer-column h4 {
  margin: 0;
}

.footer-column a,
.footer-column span,
.footer-column small,
.footer-brand p {
  color: var(--muted);
}

.footer-column a:hover {
  color: var(--text);
}

.prose-card {
  padding: var(--space-4);
}

@media print {
  .site-header,
  .site-footer {
    display: none !important;
  }

  .busgo-confirmation-card {
    box-shadow: none !important;
    border: 0 !important;
  }
}

@media (max-width: 1080px) {
  .hero-layout,
  .route-cards,
  .offer-cards,
  .feature-grid,
  .search-layout,
  .seat-layout-page,
  .checkout-layout,
  .busgo-confirmation-grid {
    grid-template-columns: 1fr;
  }

  .search-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .seat-sidebar,
  .checkout-summary-shell,
  .filter-panel {
    position: static;
  }

  .trip-result-card {
    grid-template-columns: 1fr;
  }

  .trip-side {
    align-items: stretch;
  }

  .busgo-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner,
  .site-nav,
  .hero-stats,
  .hero-callouts,
  .section-head,
  .search-head,
  .results-header,
  .trip-times,
  .trip-side,
  .footer-grid,
  .busgo-confirmation-head {
    flex-direction: column;
    align-items: stretch;
  }

  .search-toolbar {
    grid-template-columns: 1fr;
  }

  .trip-path {
    min-width: 0;
  }

  .busgo-seat-row {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 10px;
  }

  .busgo-seat-btn,
  .busgo-seat-gap,
  .seat-btn,
  .seat-gap {
    width: 100%;
    min-width: 44px;
    height: 48px;
  }

  .hero-banner,
  .inner-hero {
    padding-top: 36px;
  }

  .hero-panel,
  .booking-widget,
  .panel-card,
  .surface-card,
  .site-footer {
    padding: var(--space-3);
  }
}
