:root {
  --blue-900: #0b2e6b;
  --blue-700: #17469e;
  --blue-600: #1a56db;
  --blue-500: #3b7dff;
  --blue-100: #e8f0fe;
  --bg: #f4f7fd;
  --white: #ffffff;
  --text-dark: #16233f;
  --text-muted: #6b7690;
  --accent: #ff6600;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-card: 0 10px 30px rgba(23, 70, 158, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Prompt', -apple-system, 'Segoe UI', sans-serif;
  background: #dfe6f5;
  color: var(--text-dark);
}

/* Phone-frame wrapper so the "mobile app" reads clearly on any screen */
.app-frame {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 60px rgba(11, 46, 107, 0.25);
  overflow: hidden;
}

/* Topbar floats transparently over the hero image so the image can run
   full-bleed to the very top of the screen. Logo/icons carry their own
   opaque backing so they stay legible over any photo. */
.topbar {
  padding: 14px 20px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.topbar__logo {
  height: 30px;
  display: block;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(11, 46, 107, 0.15);
}

.topbar__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(11, 46, 107, 0.15);
  text-decoration: none;
}

/* Solid variant: for sub-pages with no hero image behind the topbar,
   so it sits in normal document flow as an ordinary white header bar. */
.topbar--solid {
  position: static;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(11, 46, 107, 0.06);
}

.topbar--solid .topbar__icon-btn {
  background: var(--blue-100);
  box-shadow: none;
}

.topbar__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.topbar__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: var(--white);
  font-size: 9px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* Main menu: custom slide-in drawer (no Bootstrap component dependency),
   positioned absolute within .app-frame so it is naturally clipped to the
   phone-frame width/height on both the desktop preview and a real phone. */
.app-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 46, 107, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 45;
}

.app-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.app-menu {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 78%;
  max-width: 300px;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 46;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(11, 46, 107, 0.2);
}

.app-menu.is-open {
  transform: translateX(0);
}

.app-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--blue-100);
}

.app-menu__logo {
  height: 26px;
}

.app-menu__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.app-menu__list {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.app-menu__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.app-menu__item i {
  font-size: 18px;
  color: var(--blue-600);
  width: 22px;
  text-align: center;
}

.app-menu__item:hover {
  background: var(--blue-100);
}

.app-menu__item--active {
  background: var(--blue-100);
  color: var(--blue-600);
  font-weight: 600;
}

/* Hero promo slider: blue background, continuous with .search-section below it.
   Top padding trimmed to 10px (just enough room for the carousel's shadow
   trick below to avoid clipping) - the topbar now floats over the image,
   so it reads as running almost full-bleed to the very top of the screen. */
.hero-slider {
  padding: 10px 16px 20px;
  background: linear-gradient(160deg, var(--blue-600) 0%, var(--blue-900) 100%);
}

.hero-slider .owl-stage-outer {
  /* padding + matching negative margin gives the card's box-shadow room to
     render without being clipped by Owl's overflow:hidden stage-outer */
  padding: 10px 6px;
  margin: -10px -6px;
}

.promo-slide {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.promo-slide__img {
  width: 100%;
  height: auto;
  display: block;
}

/* Dots float over the image's bottom-right corner instead of taking their
   own row below it - saves the vertical space that used to sit here. */
#promoCarousel {
  position: relative;
}

.hero-slider .owl-dots {
  position: absolute;
  bottom: 10px;
  right: 10px;
  margin-top: 0;
  padding: 4px 7px;
  background: rgba(11, 46, 107, 0.45);
  border-radius: 20px;
  line-height: 0;
  z-index: 5;
}

.hero-slider .owl-dot span {
  background: rgba(255, 255, 255, 0.5) !important;
  width: 6px !important;
  height: 6px !important;
  margin: 3px !important;
}

.hero-slider .owl-dot.active span {
  background: var(--white) !important;
  width: 16px !important;
  border-radius: 4px !important;
}

/* Search section: its own blue background, sized to the card in normal
   flow so the blue always fully covers the card with no seam. */
.search-section {
  padding: 4px 16px 20px;
  background: linear-gradient(160deg, var(--blue-600) 0%, var(--blue-900) 100%);
}

.search-card {
  position: relative;
  z-index: 10;
}

.search-card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  padding: 4px 4px 0;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-card__title i {
  color: var(--white);
}

/* --- busx-search-form widget overrides ---
   The widget's CSS uses fixed min-widths and 2-column grids (auto/50%)
   sized for a full-width desktop bar. Inside our ~450px mobile frame
   that overflows, so we force every row to stack full-width. */
#busx-search-form .container-search,
#busx-search-form .container-search * {
  box-sizing: border-box;
}

#busx-search-form .container-search .box-centent {
  padding: 16px 14px;
  background: linear-gradient(160deg, var(--blue-600) 0%, var(--blue-900) 100%);
  box-shadow: var(--shadow-card);
}

/* Each field becomes a white "pill" so text stays readable on the blue card */
#busx-search-form .card-origin,
#busx-search-form .card-destination,
#busx-search-form .card-date .card-departure,
#busx-search-form .card-date .card-return,
#busx-search-form .card-passengers-button .card-passenger {
  background: var(--white);
  border: none;
  box-shadow: 0 2px 6px rgba(11, 46, 107, 0.25);
}

#busx-search-form .form-search-trip,
#busx-search-form .card-date .group-date {
  grid-template-columns: 1fr !important;
  grid-gap: 10px !important;
}

#busx-search-form .card-origin,
#busx-search-form .card-destination,
#busx-search-form .card-date .card-departure,
#busx-search-form .card-date .card-return {
  min-width: 0 !important;
  width: 100% !important;
}

#busx-search-form .card-origin .box-detail,
#busx-search-form .card-destination .box-detail {
  width: 100% !important;
}

/* Generic section */
.section {
  padding: 22px 16px 4px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text-dark);
}

.section__more {
  font-size: 12px;
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 500;
}

/* Quick actions */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-dark);
}

.quick-action__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: var(--white);
  box-shadow: 0 6px 14px rgba(23, 70, 158, 0.18);
}

.quick-action__icon--1 { background: linear-gradient(135deg, #3b7dff, #1a56db); }
.quick-action__icon--2 { background: linear-gradient(135deg, #2fbfa0, #17796a); }
.quick-action__icon--3 { background: linear-gradient(135deg, #ff6b9d, #d6337c); }
.quick-action__icon--4 { background: linear-gradient(135deg, #8f6bff, #5a3fd6); }

.quick-action__label {
  font-size: 11px;
  font-weight: 500;
}

/* How to book steps */
.step-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(23, 70, 158, 0.08);
  text-align: center;
}

.step-card__imgwrap {
  position: relative;
  margin-bottom: 14px;
}

.step-card__img {
  width: auto;
  max-width: 65%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
  margin: 0 auto;
  background: var(--blue-100);
}

.step-card__num {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(23, 70, 158, 0.35);
}

.step-card__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--text-dark);
}

#stepCarousel .owl-dots {
  text-align: center;
  margin-top: 12px;
}

#stepCarousel .owl-dot span {
  background: var(--blue-100) !important;
  width: 6px !important;
  height: 6px !important;
  margin: 3px !important;
}

#stepCarousel .owl-dot.active span {
  background: var(--blue-600) !important;
  width: 16px !important;
  border-radius: 4px !important;
}

/* Routes carousel */
#routeCarousel .owl-stage {
  display: flex;
}

.route-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(23, 70, 158, 0.08);
  border-left: 4px solid var(--blue-500);
  height: 100%;
}

.route-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.route-card__arrow {
  color: var(--blue-500);
  font-size: 12px;
}

.route-card__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.route-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.route-card__price {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.route-card__btn {
  background: var(--blue-600);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
}

/* Bus company logo carousel */
#companyCarousel .owl-stage {
  display: flex;
  align-items: stretch;
}

.company-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 6px 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(23, 70, 158, 0.07);
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.company-card__logo {
  display: block;
  width: 100%;
  max-width: 72px;
  height: 46px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.company-card__logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-100);
  color: var(--blue-600);
  font-size: 18px;
}

.company-card__name {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Features */
.feature__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  border-radius: 16px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}

.feature__label {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Bottom nav */
.bottom-nav__spacer {
  height: 78px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  display: flex;
  justify-content: space-around;
  padding: 10px 6px 14px;
  box-shadow: 0 -4px 16px rgba(11, 46, 107, 0.08);
  z-index: 40;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
}

.bottom-nav__item i {
  font-size: 18px;
}

.bottom-nav__item--active {
  color: var(--blue-600);
  font-weight: 600;
}

/* How-to-book page */
.howto-intro {
  padding: 20px 20px 4px;
  text-align: center;
}

.howto-intro__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 6px;
}

.howto-intro__desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

.howto-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.howto-step {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 4px 14px rgba(23, 70, 158, 0.08);
  text-align: center;
}

.howto-step__imgwrap {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}

.howto-step__img {
  max-width: min(70%, 240px);
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
  background: var(--blue-100);
}

.howto-step__num {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(23, 70, 158, 0.35);
}

.howto-step__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--text-dark);
}

.howto-cta {
  padding: 26px 16px 4px;
  text-align: center;
}

.howto-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(23, 70, 158, 0.3);
}
