/* ==========================================================================
   OnePayCab — Responsive grid + breakpoint behaviour
   Breakpoints: sm 576 · md 768 · lg 992 · xl 1200 · xxl 1400
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Responsive grid columns (mobile first)
   -------------------------------------------------------------------------- */

@media (min-width: 576px) {
  .col-sm-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-sm-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-sm-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-sm-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-sm-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-sm-12 { flex: 0 0 100%;     max-width: 100%; }
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
  .col-md-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-md-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-md-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-md-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-md-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-md-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-md-9  { flex: 0 0 75%;      max-width: 75%; }
  .col-md-12 { flex: 0 0 100%;     max-width: 100%; }
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .text-md-start { text-align: left; }
  .text-md-end { text-align: right; }
  .mt-md-0 { margin-top: 0 !important; }
}

@media (min-width: 992px) {
  .col-lg-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-lg-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-lg-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-lg-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-lg-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-lg-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-lg-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-lg-9  { flex: 0 0 75%;      max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-lg-12 { flex: 0 0 100%;     max-width: 100%; }
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-inline-block { display: inline-block !important; }
  .mt-lg-0 { margin-top: 0 !important; }
}

@media (min-width: 1200px) {
  .col-xl-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-xl-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-xl-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-xl-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-xl-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-xl-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-xl-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-xl-9  { flex: 0 0 75%;      max-width: 75%; }
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
  .d-xl-inline-block { display: inline-block !important; }
}

@media (min-width: 1400px) {
  .d-xxl-none { display: none !important; }
  .d-xxl-block { display: block !important; }
  .d-xxl-inline-block { display: inline-block !important; }
}

/* --------------------------------------------------------------------------
   2. Large desktop → laptop
   -------------------------------------------------------------------------- */

@media (max-width: 1399.98px) {
  .hero { min-height: 780px; padding-top: 250px; }
  .search-panel { top: -120px; margin-bottom: -92px; }
  .main-menu > li { padding-inline: 2px; }
  .main-menu > li > a { padding: 24px 11px; font-size: 15px; }
  .card-vehicle .card-info { padding: 34px 24px 26px; }
  .card-vehicle .card-rating { left: 24px; right: 24px; }
  .cta-strip { padding: 46px 36px; }
}

@media (max-width: 1199.98px) {
  .header-right { min-width: auto; }
  .header-logo { min-width: auto; }
  .main-menu > li > a { padding: 22px 8px; font-size: 14px; }
  .stat-item .stat-value { font-size: 42px; line-height: 52px; }
}

/* --------------------------------------------------------------------------
   3. Tablet — menu collapses into the drawer
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  .header-nav { display: none; }
  .burger-icon { display: block; }
  .header .top-bar .container-fluid { min-height: 38px; }
  .top-bar-note { display: none; }
  .main-header { min-height: 64px; }

  .hero {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 90px;
  }
  .hero h1 { max-width: none; }
  .hero-copy { margin-bottom: 36px; }
  .hero-vehicle-media img { max-height: 320px; object-fit: cover; }

  .page-hero { padding: 150px 0 56px; }

  .search-panel {
    top: -60px;
    margin-bottom: -40px;
    padding: 20px;
  }
  .search-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 0;
    padding: 12px 0;
  }
  .search-item { width: auto; padding: 12px 18px; }
  .search-item::before { display: none; }
  .search-item + .search-item { border-top: 1px solid var(--border-color); }
  .search-item:nth-child(even) { border-left: 1px solid var(--border-color); }
  .search-item:nth-child(1),
  .search-item:nth-child(2) { border-top: 0; }
  .search-item--submit {
    grid-column: 1 / -1;
    border-left: 0 !important;
  }

  .banner-split { flex-direction: column; align-items: stretch; padding: 32px 28px 0; }
  .banner-split .banner-info { padding-bottom: 24px; }

  .cta-strip { padding: 40px 28px; }

  .sticky-aside { position: static; }

  .footer { padding-top: 52px; }
  .footer-brand { margin-bottom: 34px; }
  .footer-top .row > [class^="col-"] { margin-bottom: 30px; }
  .footer-top .row > [class^="col-"]:last-child { margin-bottom: 0; }

  /* Admin: sidebar becomes an off-canvas drawer */
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-toggle { display: inline-grid; }
  .admin-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--t-base) ease;
    z-index: 35;
  }
  .admin-overlay.is-open { opacity: 1; visibility: visible; }
}

/* --------------------------------------------------------------------------
   4. Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  .container { padding-inline: 16px; }
  .container-fluid { padding-inline: 16px; }

  .header .top-bar .top-bar-info { gap: 16px; font-size: 13px; }
  .header .top-bar .top-bar-info .email-head { display: none; }
  .header-logo img { height: 30px; }
  .search-top { flex-direction: column; align-items: flex-start; }
  .search-help { width: 100%; }

  .hero { padding-top: 44px; padding-bottom: 76px; }
  .list-ticks li { width: 100%; margin-bottom: 12px; }
  .hero-vehicle-info { padding: 18px 20px 20px; }
  .hero-vehicle-price .amount { font-size: 28px; line-height: 32px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-stat { padding: 11px 8px; }
  .hero-stat strong { font-size: var(--fs-sm); line-height: 20px; }
  .hero-stat span { font-size: 10px; line-height: 14px; }

  .search-fields { grid-template-columns: 1fr; }
  .search-item:nth-child(even) { border-left: 0; }
  .search-item:nth-child(2) { border-top: 1px solid var(--border-color); }

  .section-head { margin-bottom: 28px; }
  .card-vehicle .card-info { padding: 32px 20px 24px; }
  .card-vehicle .card-rating { left: 20px; right: 20px; }
  .card-specs li { width: 50%; font-size: 14px; }

  .booking-panel { padding: 22px 18px; }
  .fare-card .fare-body { padding: 18px; }
  .fare-card .fare-head { padding: 16px 18px; }

  .vehicle-option { flex-wrap: wrap; }
  .vehicle-option img { width: 92px; height: 62px; }
  .vehicle-option .vo-price { text-align: left; width: 100%; }

  .flow-steps { gap: 10px 0; }
  .flow-steps li { min-width: 130px; flex: 1 1 45%; }
  .flow-steps li::after { display: none; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .back-to-top { right: 16px; bottom: 16px; }
  .whatsapp-float { right: 16px; bottom: 70px; }

  .admin-content { padding: 16px; }
  .admin-topbar { padding: 12px 16px; }
  .auth-card { padding: 26px 20px; }
  .cta-strip { padding: 32px 20px; }
  .toast-stack { right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 575.98px) {
  .hero { padding-top: 40px; }
  .hero-actions .btn { width: 100%; }
  .hero-vehicle-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-vehicle-price { text-align: left; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { display: flex; align-items: baseline; justify-content: space-between; text-align: left; gap: 12px; }
  .btn-lg { padding: 14px 24px; }
  .search-panel { top: -40px; margin-bottom: -24px; padding: 16px; }
  .stat-item .stat-value { font-size: 34px; line-height: 44px; }
  .card-testimonial { padding: 22px; }
  .accordion-trigger { padding: 16px 18px; font-size: 16px; }
  .accordion-panel .accordion-body { padding: 0 18px 18px; }
  .section-head--center { text-align: left; }
  .trip-tabs { width: 100%; }
  .trip-tab { flex: 1 1 0; text-align: center; padding: 9px 12px; }
  .search-top { gap: 12px; }
  .search-help { font-size: 13px; }
}

/* Very small phones (320px) — keep everything inside the viewport */
@media (max-width: 359.98px) {
  .container,
  .container-fluid { padding-inline: 12px; }
  .header-logo img { height: 28px; }
  .card-specs li { width: 100%; }
  .btn { padding: 11px 18px; }
}

/* --------------------------------------------------------------------------
   5. Print
   -------------------------------------------------------------------------- */

@media print {
  .header,
  .footer,
  .back-to-top,
  .whatsapp-float,
  .mobile-drawer,
  .drawer-overlay,
  .page-fade { display: none !important; }
  body { color: #000; }
  .booking-panel,
  .fare-card { border-color: #999; break-inside: avoid; }
}
