/* =====================================================
   SASTITAXI.COM — Mobile & Responsive Design System
   100% Pixel-Perfect Across All Mobile & Tablet Screens
   ===================================================== */

/* ── 1. Low-Height & Standard Desktop Tweaks (max-height: 800px) ── */
@media (max-height: 800px) {
  .hero-section {
    padding-top: 85px;
    padding-bottom: 40px;
    min-height: auto;
  }
  .hero-content {
    margin-bottom: 14px;
  }
  .hero-title {
    font-size: 2.6rem;
    margin-bottom: 8px;
  }
  .hero-tagline-script {
    font-size: 1.8rem;
    margin-bottom: 2px;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
}

/* ── 2. Large Tablet / Laptop Breakpoint (max-width: 1200px) ── */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .booking-form-grid {
    grid-template-columns: 1.8fr 38px 1.8fr 1.5fr 1.4fr 1.2fr auto;
    gap: 10px;
  }
  .features-grid-wrapper {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .destinations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ── 3. Tablet Breakpoint (max-width: 992px) ── */
@media (max-width: 992px) {
  .fixed-header {
    background: var(--color-dark-navy);
    padding: 10px 0;
  }

  /* Mobile Navbar Collapse Glassmorphic Card Container */
  .navbar-collapse {
    background: rgba(11, 19, 41, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px;
    margin-top: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }

  .navbar-nav {
    gap: 4px;
    margin-bottom: 12px !important;
  }

  .nav-link-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px !important;
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 10px;
    transition: all 0.2s ease;
  }

  /* Disable Desktop Underline on Mobile (Fixes Long Yellow Line Bug) */
  .nav-link-custom.active::after {
    display: none !important;
  }

  /* Mobile Active & Hover State */
  .nav-link-custom:hover,
  .nav-link-custom.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(245, 197, 24, 0.25) 100%);
    color: #ffd700 !important;
    border-left: 3.5px solid #ffd700;
  }

  /* Services Submenu Inset on Mobile */
  .services-dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    margin-top: 6px !important;
    padding: 6px !important;
  }

  .service-menu-item.dropdown-item {
    padding: 8px 10px;
  }

  .service-item-title {
    font-size: 0.82rem;
  }

  .service-item-desc {
    font-size: 0.7rem;
  }

  /* User Profile Dropdown Container on Mobile */
  .user-header-dropdown {
    width: 100%;
    margin-left: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    margin-top: 8px;
  }

  .user-dropdown-btn {
    width: 100%;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 12px;
  }

  .user-btn-name {
    max-width: none;
    font-size: 0.9rem;
  }

  .user-dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100% !important;
    margin-top: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  }

  /* Login Button Full Width on Mobile */
  .btn-login-outline {
    width: 100%;
    justify-content: center;
    height: 46px;
    background: linear-gradient(135deg, #ffd700 0%, #f5c518 100%);
    color: #061329 !important;
    border: none;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 6px 18px rgba(245, 197, 24, 0.35);
  }

  .hero-section {
    padding-top: 105px;
    padding-bottom: 50px;
    min-height: auto;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .hero-tagline-script {
    font-size: 1.8rem;
  }
  .booking-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .btn-swap-locations {
    display: none;
  }
  .btn-book-cta {
    grid-column: span 2;
    justify-content: center;
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    font-size: 1.05rem;
  }
  .stats-capsule-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 24px 20px;
  }
  .features-grid-wrapper {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .destinations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .app-banner-bar {
    max-height: none;
    padding: 24px 0;
  }
  .phone-mockup-wrapper {
    margin-top: 20px;
    margin-bottom: 0;
  }
}

/* ── 4. Smartphone Breakpoint (max-width: 768px) ── */
@media (max-width: 768px) {
  body {
    padding-bottom: 68px !important;
  }

  .hero-section {
    padding-top: 125px; /* Clear space below fixed navbar */
    padding-bottom: 40px;
  }

  /* Constrain booking card width on mobile so it is sleek & not overly wide */
  .booking-widget-container {
    width: 95%;
    max-width: 440px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .hero-tagline-script {
    font-size: 1.5rem;
    margin-bottom: 2px;
  }
  .hero-subtitle {
    font-size: 0.88rem;
    line-height: 1.4;
    margin-bottom: 18px;
  }

  .booking-tabs-row {
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 6px 8px 0;
    border-radius: 16px 16px 0 0;
  }

  .booking-tab-btn {
    padding: 8px 12px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .booking-card-box {
    padding: 18px 16px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 18px 45px rgba(6, 19, 41, 0.25);
    background: #ffffff;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    overflow: visible !important;
  }

  /* Guests Input Group & Executive Popover Mobile Fixes */
  #guestsInputGroup {
    position: relative !important;
    z-index: 500 !important;
  }

  .guests-popover-card {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    width: 320px !important;
    max-width: calc(100vw - 32px) !important;
    z-index: 99999 !important;
    box-shadow: 0 20px 60px rgba(6, 19, 41, 0.4) !important;
    border: 1.5px solid #f5c518 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  /* Smart Compact 2-Column Mobile Form Grid */
  .booking-form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Full width fields on Mobile */
  #packageInputGroup,
  #fromInputGroup,
  #toInputGroup {
    grid-column: span 2 !important;
    width: 100% !important;
  }

  /* Half width fields side-by-side on Mobile */
  #dateInputGroup,
  #guestsInputGroup,
  #passengersInputGroup {
    grid-column: span 1 !important;
    width: 100% !important;
  }

  /* Position Floating Swap / Swipe Button ONLY when NOT d-none */
  .btn-swap-locations {
    grid-column: span 2;
    justify-self: end;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1.5px solid #2563eb;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -12px;
    margin-bottom: -30px;
    margin-right: 16px;
    position: relative;
    z-index: 25;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease;
  }

  /* Ensure d-none ALWAYS hides elements */
  .btn-swap-locations.d-none,
  .booking-input-group.d-none,
  .d-none {
    display: none !important;
  }

  .btn-swap-locations:active,
  .btn-swap-locations:hover {
    background: #2563eb;
    color: #ffffff;
    transform: rotate(180deg);
  }

  /* EST FARE Horizontal Summary Strip */
  .fare-estimate-box {
    grid-column: span 2 !important;
    margin: 2px 0 0;
    padding: 8px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .fare-estimate-box label {
    margin-bottom: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
  }

  .fare-val-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .fare-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #10b981;
  }

  /* BOOK NOW CTA Button (Full Width, No Overlap) */
  .btn-book-cta {
    grid-column: span 2 !important;
    width: 100% !important;
    height: 48px !important;
    margin-top: 6px !important;
    padding: 0 16px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #ffd700 0%, #f5c518 100%) !important;
    box-shadow: 0 6px 18px rgba(245, 197, 24, 0.4) !important;
    border: none !important;
    box-sizing: border-box !important;
    cursor: pointer;
  }

  .btn-book-cta:active {
    transform: scale(0.98);
  }

  /* Compact Touch Heights & Inputs (16px prevents iOS Safari auto-zoom) */
  .input-icon-field input,
  .input-icon-field select,
  .guests-custom-field .guests-display-box {
    padding: 8px 10px 8px 36px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    height: 46px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .guests-custom-field .guests-display-box {
    padding-right: 28px !important;
  }

  .input-icon-field i {
    font-size: 0.9rem;
    left: 12px;
  }

  .booking-input-group label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* Location Autocomplete Mobile Touch Enhancements */
  .location-autocomplete-dropdown {
    max-height: 240px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(6, 19, 41, 0.22);
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .location-autocomplete-dropdown .autocomplete-item {
    padding: 12px 14px;
    font-size: 0.9rem;
    min-height: 46px;
    display: flex;
    align-items: center;
  }

  .trust-badges-strip {
    gap: 12px 20px;
    justify-content: center;
    margin-top: 20px;
  }
  .trust-badge-item {
    font-size: 0.8rem;
  }
  .features-grid-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .destinations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .destinations-header-row .btn-outline-green {
    position: static;
    transform: none;
    margin-top: 12px;
    display: inline-block;
  }
  .stats-capsule-container {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-radius: 16px;
    padding: 20px 16px;
  }
  .header-support {
    display: none;
  }
  .app-banner-text-block {
    text-align: center;
    margin-bottom: 16px;
  }
  .app-store-badges {
    justify-content: center;
    width: 100%;
  }
  .phone-mockup-wrapper {
    display: none; /* Hide phone mockup on narrow mobile to keep banner clean */
  }
  .footer-bottom-socket {
    flex-direction: column;
    text-align: center;
  }
  .footer-trust-items {
    justify-content: center;
  }
  .footer-payment-wrap {
    justify-content: center;
  }
}

/* ── 5. Small Smartphone Breakpoint (max-width: 480px) ── */
@media (max-width: 480px) {
  .logo-brand-text {
    font-size: 1.1rem;
  }
  .logo-badge {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .hero-tagline-script {
    font-size: 1.45rem;
  }
  .features-grid-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .destinations-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stats-capsule-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .app-store-badges {
    flex-direction: column;
    width: 100%;
  }
  .store-btn {
    width: 100%;
    justify-content: center;
  }
  .footer-dark {
    padding-top: 45px;
    padding-bottom: 20px;
  }
}

/* ── 6. Extra Small Smartphone Breakpoint (max-width: 360px) ── */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.5rem;
  }
  .booking-tab-btn {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
  .features-grid-wrapper {
    grid-template-columns: 1fr;
  }
}
