/* Mobile overrides loaded after Tailwind to ensure specificity */

/* Prevent horizontal scroll on all mobile screens */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  *, *:before, *:after {
    box-sizing: border-box !important;
  }
  
  /* Ensure containers don't exceed viewport */
  .container, .nav-container, .header-container {
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Stack tracking form on small screens */
@media (max-width: 768px) {
  .tracking-form .flex,
  .tracking-form > .flex,
  .tracking-container .flex {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .tracking-form label,
  .tracking-container label {
    display: block !important;
    white-space: normal !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
    max-width: 100% !important;
  }

  #trackingInput,
  .tracking-form input[type="text"] {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    height: 44px !important;
    padding-right: 12px !important;
  }

  .btn-track {
    width: 100% !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 44px !important;
    margin-top: 6px !important;
  }
}

/* Smaller font scale for small screens */
@media (max-width: 768px) {
  body { font-size: 14px !important; line-height: 1.6 !important; }
  h1 { font-size: 20px !important; line-height: 1.3 !important; }
  h2 { font-size: 18px !important; line-height: 1.3 !important; }
  h3 { font-size: 16px !important; line-height: 1.3 !important; }
  .header .headline h1 { font-size: 22px !important; line-height: 1.2 !important; }
  .section-subtitle { font-size: 14px !important; }
  
  /* Better spacing for sections */
  section { padding: 40px 16px !important; }
  .py-12 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .py-20 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

@media (max-width: 480px) {
  body { font-size: 13px !important; }
  h1 { font-size: 18px !important; }
  h2 { font-size: 16px !important; }
  h3 { font-size: 15px !important; }
  .header .headline h1 { font-size: 20px !important; }
  
  /* Compact spacing for very small screens */
  section { padding: 32px 12px !important; }
}

/* Ensure reservasi section has centered white card with teal gutters on small screens */
@media (max-width: 768px) {
  /* Revert to compact gutters, center the card, and avoid floating buttons covering the card */
  .contact-section { position: relative; padding: 40px 12px !important; }

  /* Keep narrow gutters to avoid covering content */
  .contact-section .container { 
    padding-left: 12px !important; 
    padding-right: 12px !important;
    max-width: 100% !important;
  }

  /* Stack contact text and form vertically on mobile */
  .contact-section .contact-content { 
    max-width: 100% !important; 
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  .contact-section .contact-text,
  .contact-section .contact-form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  /* Form styling for mobile */
  .contact-section .contact-form {
    padding: 20px 16px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(2,6,23,0.08) !important;
  }
  
  /* Form header */
  .form-header-modern h3 {
    font-size: 18px !important;
  }
  
  .form-header-modern p {
    font-size: 13px !important;
  }
  
  /* Form sections */
  .form-section {
    margin-bottom: 20px !important;
  }
  
  .section-label {
    font-size: 14px !important;
    margin-bottom: 12px !important;
  }
  
  /* Form rows stack on mobile */
  .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .input-group {
    width: 100% !important;
  }
  
  /* Input fields proper sizing */
  .reservation-form input[type="text"],
  .reservation-form input[type="tel"],
  .reservation-form input[type="date"],
  .reservation-form input[type="time"],
  .reservation-form select,
  .reservation-form textarea {
    width: 100% !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
  }
  
  .reservation-form textarea {
    min-height: 80px !important;
  }
  
  /* Submit button */
  .btn-pickup {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  /* WhatsApp floating button - positioned on left bottom */
  .whatsapp-float {
    position: fixed !important;
    left: 12px !important;
    right: auto !important;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    z-index: 1200 !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  
  .whatsapp-float a {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 28px !important;
    text-decoration: none !important;
    color: #fff !important;
    line-height: 1 !important;
  }
  
  .whatsapp-float a i {
    display: block !important;
    line-height: 1 !important;
    transform: none !important;
  }
  
  .whatsapp-float span {
    display: none !important;
  }
  /* Chat toggle placed above the back-to-top on the right */
  .chat-toggle {
    position: fixed !important;
    right: 16px !important;
    left: auto !important;
    bottom: 120px !important;
    width: 56px !important;
    height: 56px !important;
    z-index: 1220 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  }
  
  /* Back-to-top placed below the chat toggle on the right */
  .back-to-top {
    position: fixed !important;
    right: 16px !important;
    left: auto !important;
    bottom: 50px !important;
    width: 48px !important;
    height: 48px !important;
    z-index: 1210 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
  }
  
  .back-to-top i {
    display: block !important;
    line-height: 1 !important;
    font-size: 18px !important;
    transform: none !important;
  }

  /* Ensure the live chat widget (and its interactive children) sit above floating buttons
     on small screens so internal controls are clickable. Inline styles in `index.html`
     use very large z-index values, so we use !important here to override them. */
  .live-chat-widget {
    z-index: 99999 !important;
    pointer-events: auto !important;
    position: fixed !important;
  }

  /* Make sure all interactive elements inside the chat widget accept pointer events */
  .live-chat-widget * {
    pointer-events: auto !important;
  }
  
  .live-chat-widget .chat-messages {
    pointer-events: auto !important;
    z-index: 100000 !important;
  }
  
  /* Chat quick options buttons - ensure they're clickable */
  .quick-options {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 12px !important;
    pointer-events: auto !important;
    z-index: 100001 !important;
    position: relative !important;
  }
  
  .quick-option {
    padding: 10px 16px !important;
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    position: relative !important;
    z-index: 100002 !important;
    display: inline-block !important;
  }
  
  .quick-option:active {
    transform: scale(0.95) !important;
    background: #e5e7eb !important;
  }
  
  .quick-option:hover {
    background: #e5e7eb !important;
    border-color: #13c3c9 !important;
  }
}
  
  /* Mobile menu toggle button */
  @media (max-width:768px){
    .mobile-menu-toggle {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      width: 56px !important;
      height: 56px !important;
      background: transparent !important;
      border: none !important;
      border-radius: 0 !important;
      color: #4a5568 !important;
      font-size: 24px !important;
      cursor: pointer !important;
      transition: all 0.3s !important;
      z-index: 50001 !important;
      position: relative !important;
      margin-left: auto !important;
      padding: 8px !important;
      -webkit-touch-callout: none !important;
      -webkit-user-select: none !important;
    }
    
    .mobile-menu-toggle:hover {
      color: #13c3c9 !important;
    }
    
    .mobile-menu-toggle i {
      display: block !important;
    }
    
    /* Hide desktop menu on mobile */
    .nav-container .menu {
      display: none !important;
    }
  }
  
  @media (min-width:769px){
    .mobile-menu-toggle {
      display: none !important;
    }
    
    #mobileUserProfileNav {
      display: none !important;
    }
  }
  
  /* Mobile Profile Button in Navbar */
  @media (max-width:768px){
    .mobile-menu-toggle {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      width: 40px !important;
      height: 40px !important;
      background: none !important;
      border: none !important;
      color: #333 !important;
      font-size: 20px !important;
      cursor: pointer !important;
      padding: 0 !important;
      margin: 0 !important;
    }

    #mobileUserProfileNav {
      display: none !important;
      position: relative !important;
      margin-top: 0 !important;
    }
    
    #mobileUserProfileNav.show {
      display: block !important;
    }
    
    #mobileProfileBtn {
      padding: 8px 12px !important;
      height: auto !important;
      min-height: 36px !important;
      border-radius: 6px !important;
      background: linear-gradient(135deg, #0ea5a4 0%, #13c3c9 100%) !important;
      color: white !important;
      font-size: 12px !important;
      font-weight: 600 !important;
      border: none !important;
      cursor: pointer !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 6px !important;
      box-shadow: 0 2px 8px rgba(14, 165, 164, 0.3) !important;
      transition: all 0.2s !important;
      white-space: nowrap !important;
    }

    #mobileProfileBtn:hover {
      background: linear-gradient(135deg, #0a9195 0%, #0fa6ad 100%) !important;
      box-shadow: 0 4px 12px rgba(14, 165, 164, 0.4) !important;
      transform: translateY(-2px) !important;
    }

    #mobileProfileInitial {
      font-size: 14px !important;
      font-weight: bold !important;
      min-width: 18px !important;
      text-align: center !important;
    }

    #mobileProfileName {
      font-size: 11px !important;
      font-weight: 600 !important;
    }

    #mobileProfileBtn i {
      font-size: 10px !important;
      margin-left: 2px !important;
    }
    
    #mobileProfileDropdown {
      position: fixed !important;
      top: 70px !important;
      right: 8px !important;
      left: auto !important;
      width: 260px !important;
      background: white !important;
      border-radius: 12px !important;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
      z-index: 9999 !important;
      overflow: hidden !important;
      border: 1px solid #e5e7eb !important;
    }
    
    #mobileProfileDropdown > div {
      display: flex !important;
      flex-direction: column !important;
    }
    
    #mobileProfileDropdown .px-3 {
      padding: 14px 16px !important;
      background: linear-gradient(135deg, #0ea5a4 0%, #13c3c9 100%) !important;
      color: white !important;
      border-bottom: none !important;
    }
    
    #mobileProfileDropdown .px-3 p {
      color: white !important;
      margin: 0 !important;
      padding: 0 !important;
    }
    
    #mobileProfileDropdown .px-3 .text-sm {
      font-weight: 600 !important;
      font-size: 13px !important;
      line-height: 1.3 !important;
    }
    
    #mobileProfileDropdown .px-3 .text-xs {
      font-size: 12px !important;
      opacity: 0.9 !important;
      margin-top: 4px !important;
    }
    
    #mobileProfileDropdown .py-2 {
      padding: 6px 0 !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 0 !important;
    }
    
    #mobileProfileDropdown a,
    #mobileProfileDropdown button {
      padding: 12px 16px !important;
      font-size: 14px !important;
      border: none !important;
      background: transparent !important;
      text-align: left !important;
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
      width: 100% !important;
      color: #333 !important;
      transition: all 0.2s !important;
      border-bottom: 1px solid #f3f4f6 !important;
      box-sizing: border-box !important;
    }
    
    #mobileProfileDropdown a:last-child,
    #mobileProfileDropdown button:last-child {
      border-bottom: none !important;
    }
    
    #mobileProfileDropdown a:hover,
    #mobileProfileDropdown button:hover {
      background: #f9fafb !important;
    }
    
    #mobileProfileDropdown a i,
    #mobileProfileDropdown button i {
      font-size: 15px !important;
      color: #13c3c9 !important;
      width: 18px !important;
      text-align: center !important;
    }
    
    #mobileProfileLogoutBtn {
      color: #dc2626 !important;
    }
    
    #mobileProfileLogoutBtn i {
      color: #dc2626 !important;
    }
    
    #mobileProfileLogoutBtn:hover {
      background: #fee2e2 !important;
    }

    #mobileProfileDropdown.hidden {
      display: none !important;
    }
  }
  
  /* Mobile menu panel (not fullscreen) */
  @media (max-width:768px){
    .menu { 
      display: none !important;
      position: fixed !important; 
      top: 70px !important; 
      left: 0 !important;
      right: 0 !important;
      width: 100% !important;
      height: auto !important;
      background: #ffffff !important; 
      flex-direction: column !important; 
      justify-content: flex-start !important;
      padding: 12px 16px !important; 
      margin: 0 !important; 
      z-index: 49999 !important; 
      overflow: visible !important;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
      max-height: calc(100vh - 70px) !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
    }
    
    .menu.open { 
      display: flex !important;
    }
    
    /* Show Login on mobile */
    .mobile-only-link { display: none !important; }
    
    /* Menu items - panel style */
    .menu > a, .menu > .menu-link { 
      padding: 8px 0 !important; 
      display: flex !important; 
      align-items: center !important; 
      justify-content: flex-start !important; 
      width: 100% !important; 
      font-size: 18px !important; 
      font-weight: 500 !important; 
      color: #4a5568 !important; 
      text-decoration: none !important; 
      border: none !important; 
      background: transparent !important; 
      border-bottom: 1px solid #f0f0f0 !important;
      transition: all 0.2s !important;
      line-height: 1.4 !important;
      min-height: 40px !important;
    }
    
    .menu > a:hover, .menu > .menu-link:hover {
      color: #13c3c9 !important;
      background: #f8fffe !important;
    }
    
    .menu > a::after, .menu > .menu-link::after { display:none !important; }
    
    .menu-item { 
      width:100% !important; 
      position: relative !important;
    }
    
    /* Menu item dropdown link */
    .menu.open .menu-item.dropdown > .menu-link {
      padding: 8px 0 !important; 
      display: flex !important; 
      align-items: center !important; 
      justify-content: space-between !important; 
      width: 100% !important; 
      font-size: 18px !important; 
      font-weight: 500 !important; 
      color: #4a5568 !important; 
      text-decoration: none !important;
      line-height: 1.4 !important;
      min-height: 40px !important;
      border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .menu.open .menu-item.dropdown > .menu-link:hover {
      color: #13c3c9 !important;
    }
    
    .menu.open .menu-item.dropdown > .menu-link i.fa-caret-down {
      display: inline-block !important;
      color: #13c3c9 !important;
      font-size: 16px !important;
      transition: transform 0.3s !important;
    }
    
    .menu.open .menu-item.dropdown.open > .menu-link i.fa-caret-down {
      transform: rotate(180deg) !important;
    }
    
    /* Dropdown submenu in mobile */
    .menu.open .menu-item.dropdown .dropdown-menu {
      position: static !important;
      display: none !important;
      background: #f7fafc !important;
      box-shadow: none !important;
      border-radius: 0 !important;
      padding: 0 !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
    }
    
    .menu.open .menu-item.dropdown.open .dropdown-menu {
      display: block !important;
    }
    
    .menu.open .menu-item.dropdown .dropdown-menu a {
      padding: 6px 20px !important;
      color: #4a5568 !important;
      font-size: 17px !important;
      font-weight: 500 !important;
      display: block !important;
      min-height: 40px !important;
      display: flex !important;
      align-items: center !important;
      border-bottom: 1px solid #e0e7ff !important;
    }
    
    .menu.open .menu-item.dropdown .dropdown-menu a:last-child {
      border-bottom: none !important;
    }
    
    /* Section headers in menu */
    .menu.open > .menu-section-header {
      font-size: 16px !important;
      font-weight: 700 !important;
      color: #4a5568 !important;
      padding: 8px 0 6px 0 !important;
      margin: 0 !important;
      text-transform: none !important;
    }
    
    .menu.open > .menu-section-header:first-of-type {
      padding-top: 0 !important;
    }
    
    
    /* Login at bottom - panel style */
    .menu.open .mobile-only-link { 
      display: flex !important; 
      padding: 12px 0 !important; 
      margin-top: 12px !important;
      padding-top: 12px !important;
      border-top: 2px solid #e0e7ff !important;
      gap: 8px !important; 
      font-size: 16px !important; 
      font-weight: 600 !important; 
      color: #13c3c9 !important;
      align-items: center !important;
      border: none !important;
      background: transparent !important;
      text-decoration: none !important;
      transition: all 0.2s !important;
    }
    
    .menu.open .mobile-only-link:hover {
      color: #0a989c !important;
      transform: translateX(4px) !important;
    }
    
    .menu.open .mobile-only-link i {
      font-size: 16px !important;
      color: #13c3c9 !important;
      margin-left: auto !important;
    }
    
    .menu.open .mobile-only-link:hover i {
      color: #0a989c !important;
    }
  }
  
  @media (min-width:769px){
    .mobile-only-link { display:none !important; }
  }
  
  /* Hide desktop navigation buttons on mobile */
  @media (max-width: 768px) {
    .nav-actions {
      display: none !important;
    }
  }
  
  /* Show navigation actions on desktop */
  @media (min-width: 769px) {
    .nav-actions {
      display: flex !important;
    }
  }

/* Mobile Button Improvements - Minimum tap target 44x44px */
@media (max-width: 768px) {
  button, .btn, a.btn, input[type="submit"], input[type="button"] {
    min-height: 44px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }
  
  .btn-primary, .btn-secondary, .btn-outline {
    min-height: 44px !important;
    padding: 12px 24px !important;
  }
  
  /* Form inputs proper sizing */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    min-height: 44px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    width: 100% !important;
  }
  
  textarea {
    min-height: 100px !important;
  }
}

/* Mobile Header Improvements */
@media (max-width: 768px) {
  .header {
    padding: 48px 16px !important;
  }
  
  .header-container {
    flex-direction: column !important;
    text-align: center !important;
    gap: 24px !important;
  }
  
  .headline {
    max-width: 100% !important;
  }
  
  /* Hide header action buttons only on mobile */
  .header-actions {
    display: none !important;
  }
  
  .highlight-boxes {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .highlight-box {
    width: 100% !important;
    padding: 12px 16px !important;
  }
}

/* Mobile Grid Layouts */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .quick-grid {
    grid-template-columns: 1fr !important;
  }
  
  .quick-card {
    padding: 16px !important;
  }
}

/* Mobile Form Containers */
@media (max-width: 768px) {
  .contact-form, .reservation-form {
    padding: 20px !important;
    border-radius: 12px !important;
  }
  
  .form-group {
    margin-bottom: 16px !important;
  }
  
  label {
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block !important;
  }
}

/* Mobile Images and Media */
@media (max-width: 768px) {
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .main-illustration img,
  .delivery-image img,
  .payment-logo img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
  
  /* Make logo perfectly circular on mobile with bigger text zoom */
  .illustration {
    position: relative !important;
    width: 300px !important;
    height: 300px !important;
    flex-shrink: 0 !important;
    margin: 0 auto !important;
  }
  
  .main-illustration {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--gradient-primary) !important;
  }
  
  .main-illustration img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  
  /* Keep floating elements (baju, sabun, mobil) visible */
  .floating-element {
    position: absolute !important;
    z-index: 10 !important;
  }
}

/* Mobile Tables */
@media (max-width: 768px) {
  table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }
  
  table thead {
    display: none !important;
  }
  
  table, table tbody, table tr, table td {
    display: block !important;
    width: 100% !important;
  }
  
  table tr {
    margin-bottom: 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 12px !important;
  }
  
  table td {
    text-align: left !important;
    padding: 8px !important;
    border: none !important;
  }
  
  table td:before {
    content: attr(data-label) !important;
    font-weight: 600 !important;
    display: inline-block !important;
    margin-right: 8px !important;
  }
}

/* Mobile Cards and Containers */
@media (max-width: 768px) {
  .card, .service-card, .blog-card, .faq-item {
    margin-bottom: 16px !important;
    padding: 16px !important;
  }
  
  .blog-grid, .service-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Mobile Text Alignment */
@media (max-width: 768px) {
  .page-hero, .hero-section {
    text-align: center !important;
    padding: 48px 16px !important;
  }
  
  .page-hero h1 {
    font-size: 24px !important;
  }
  
  .page-hero p {
    font-size: 16px !important;
  }
}

/* Mobile Tracking Steps */
@media (max-width: 768px) {
  /* Hide horizontal line on mobile */
  .tracking-steps::before {
    display: none !important;
  }
  
  /* Container untuk vertical layout */
  .tracking-steps {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    position: relative;
    align-items: stretch !important;
  }
  
  /* Garis vertikal di tengah - centered dengan icon */
  .tracking-steps::after {
    content: '';
    position: absolute;
    left: 29px;
    top: 50px;
    bottom: 0;
    width: 2px;
    background: #13c3c9;
    z-index: 1;
  }
  
  .tracking-steps .step {
    flex: none !important;
    display: flex !important;
    flex-direction: row !important;
    text-align: left !important;
    gap: 20px !important;
    align-items: flex-start !important;
    padding: 20px 0 !important;
    position: relative;
    z-index: 2;
    min-height: 80px !important;
  }
  
  .tracking-steps .step:last-child {
    padding-bottom: 0 !important;
  }
  
  .tracking-steps .step-icon {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    font-size: 24px !important;
    border-width: 3px !important;
    flex-shrink: 0;
    background: white !important;
    border-color: #13c3c9 !important;
    margin-top: 0 !important;
  }
  
  .tracking-steps .step.active .step-icon {
    background: #13c3c9 !important;
    color: white !important;
    border-color: #13c3c9 !important;
  }
  
  .tracking-steps .step span {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin-top: 8px !important;
    display: block !important;
    line-height: 1.4 !important;
  }
  
  .tracking-result {
    font-size: 13px !important;
  }
}

/* Mobile Footer */
@media (max-width: 768px) {
  .footer {
    padding: 32px 16px !important;
  }
  
  .footer-content {
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  .footer-column {
    width: 100% !important;
    text-align: center !important;
  }
  
  .footer h3 {
    font-size: 16px !important;
  }
}

/* Mobile Payment Methods */
@media (max-width: 768px) {
  .payment-methods-2row {
    gap: 20px !important;
    padding: 15px 5px !important;
  }
  
  .payment-row {
    flex-wrap: wrap !important;
    gap: 15px 10px !important;
    justify-content: center !important;
    padding: 10px 5px !important;
  }
  
  .payment-item {
    padding: 10px 8px !important;
    width: calc(33.333% - 10px) !important;
    min-width: 90px !important;
    max-width: 110px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  }
  
  .payment-logo {
    width: 100% !important;
    height: 55px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
  }
  
  .payment-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    max-width: 100% !important;
    max-height: 100% !important;
  }
}

/* Mobile Chat Widget Specific Fixes */
@media (max-width: 768px) {
  .live-chat-widget {
    right: 8px !important;
    left: 8px !important;
    bottom: calc(150px + env(safe-area-inset-bottom)) !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: 60vh !important;
    border-radius: 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  
  .chat-header {
    padding: 12px 16px !important;
  }
  
  .chat-messages {
    max-height: 40vh !important;
    padding: 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  
  .chat-input {
    padding: 12px !important;
  }
  
  .chat-input input {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }
  
  .chat-input button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
  }
  
  .chat-input button i {
    display: block !important;
    line-height: 1 !important;
    font-size: 18px !important;
    transform: none !important;
  }
  
  .message {
    margin-bottom: 12px !important;
    max-width: 85% !important;
  }
  
  .message-content {
    padding: 10px 14px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  
  /* Ensure message content doesn't overflow */
  .message-content * {
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
}

/* Additional Mobile Fixes for Better Touch Experience */
@media (max-width: 768px) {
  /* Ensure all clickable elements are touch-friendly */
  a, button, .btn, [role="button"] {
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
  }
  
  /* Prevent accidental zooming on input focus (iOS Safari) */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }
  
  /* Smooth scrolling for mobile */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* ===== MOBILE ANIMATIONS ===== */
  /* Optimize animations for smooth 60fps performance on mobile */
  
  /* Enable GPU acceleration for all animated elements */
  .quick-card,
  .layanan-item,
  .why-card,
  .blog-card,
  .testimoni-card,
  .payment-item,
  .floating-element,
  .header,
  button,
  a {
    will-change: auto;
  }

  /* Disable floating animations on mobile to save performance */
  .floating-element {
    animation: none !important;
    opacity: 0,7;
    transform: none !important;
  }

  /* Optimize animation timing - use will-change only for animated items */
  .quick-card,
  .layanan-item,
  .why-card,
  .blog-card,
  .testimoni-card,
  .payment-item {
    animation-duration: 0.5s !important;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    backface-visibility: hidden;
    perspective: 1000px;
  }

  /* Keep button hover animations but use transform3d for better performance */
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-track:hover,
  .btn-order:hover,
  .btn-hubungi:hover {
    transform: translate3d(0, -2px, 0) !important;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  /* Card hover animations - reduced on mobile with GPU acceleration */
  .quick-card:hover,
  .layanan-item:hover,
  .why-card:hover,
  .blog-card:hover {
    transform: translate3d(0, -4px, 0) !important;
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  /* Optimize pulse animation on mobile - reduce opacity changes */
  .quick-card .card-icon,
  .rating i,
  .stat-number {
    animation-duration: 2.5s !important;
    animation-timing-function: ease-in-out !important;
  }

  /* Chat toggle and notification - smooth pulse */
  .chat-toggle {
    animation: none !important;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  .chat-toggle:hover {
    transform: scale3d(1.08, 1.08, 1) !important;
  }

  .notification-badge {
    animation: bounce 1.5s ease-in-out infinite !important;
  }

  /* Reduce glow effect on mobile */
  .highlight-box:hover {
    box-shadow: 0 6px 15px rgba(19, 195, 201, 0.15) !important;
    transition: box-shadow 0.2s ease-out !important;
  }

  /* Menu link hover - subtle on mobile */
  .menu-link:hover {
    transform: none !important;
    color: var(--primary-color) !important;
    transition: color 0.2s ease-out !important;
  }

  /* Footer links - subtle animation */
  .footer-links a:hover {
    transform: translate3d(2px, 0, 0) !important;
    transition: transform 0.2s ease-out !important;
  }

  /* Smooth transitions for touch devices */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Section animations - reduce stagger delays on mobile */
  section h2 {
    animation-delay: 0s !important;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  .section-subtitle {
    animation-delay: 0.05s !important;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  /* Header animation - optimized for mobile */
  .header {
    animation: fadeInDown 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  .header h1 {
    animation-delay: 0.05s !important;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  .header .subtitle {
    animation-delay: 0.1s !important;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  .header .illustration {
    animation-delay: 0.1s !important;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  /* Back to top button - remove pulse, keep simple hover */
  .back-to-top {
    animation: none !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  .back-to-top:hover {
    transform: scale3d(1.08, 1.08, 1) !important;
    box-shadow: 0 6px 15px rgba(19, 195, 201, 0.3) !important;
  }

  /* Reduce animation stagger delays for faster load feel */
  .quick-card:nth-child(1) { animation-delay: 0.05s !important; }
  .quick-card:nth-child(2) { animation-delay: 0.1s !important; }
  .quick-card:nth-child(3) { animation-delay: 0.15s !important; }
  .quick-card:nth-child(4) { animation-delay: 0.2s !important; }
  .quick-card:nth-child(5) { animation-delay: 0.25s !important; }
  .quick-card:nth-child(6) { animation-delay: 0.3s !important; }

  .layanan-item:nth-child(1) { animation-delay: 0.05s !important; }
  .layanan-item:nth-child(2) { animation-delay: 0.1s !important; }
  .layanan-item:nth-child(3) { animation-delay: 0.15s !important; }
  .layanan-item:nth-child(4) { animation-delay: 0.2s !important; }

  /* Disable expensive animations on small devices */
  @media (max-width: 480px) {
    .quick-card,
    .layanan-item,
    .why-card,
    .blog-card,
    .testimoni-card,
    .payment-item {
      animation-duration: 0.35s !important;
      animation-delay: 0s !important;
    }

    /* Simpler entry animations for very small screens */
    .quick-card:nth-child(1),
    .quick-card:nth-child(2),
    .quick-card:nth-child(3),
    .quick-card:nth-child(4),
    .quick-card:nth-child(5),
    .quick-card:nth-child(6) {
      animation-delay: 0s !important;
    }

    /* No complex transforms on very small screens */
    .why-card:hover,
    .blog-card:hover {
      transform: none !important;
    }

    .card-icon {
      animation: none !important;
      opacity: 1 !important;
    }

    /* Minimal button feedback */
    .btn-primary:active,
    .btn-secondary:active,
    .btn-track:active {
      transform: scale3d(0.98, 0.98, 1) !important;
    }
  }
}

/* Extra optimization for very small screens */
@media (max-width: 480px) {
  /* Disable some animations on very small screens */
  .bounce,
  .float,
  .pulse {
    animation: none !important;
  }

  /* Minimal hover effects */
  button:hover,
  a:hover {
    opacity: 0.8;
  }

  /* Quick cards - simplified */
  .quick-card {
    animation: fadeInUp 0.4s ease-out !important;
  }

  /* Form focus animation - minimal */
  input:focus, 
  select:focus, 
  textarea:focus {
    transform: none !important;
    box-shadow: 0 0 0 2px rgba(19, 195, 201, 0.08) !important;
  }

  /* Reduce staggered delays on very small devices */
  .quick-card:nth-child(1) { animation-delay: 0s !important; }
  .quick-card:nth-child(2) { animation-delay: 0.05s !important; }
  .quick-card:nth-child(3) { animation-delay: 0.1s !important; }
  .quick-card:nth-child(4) { animation-delay: 0.15s !important; }
  .quick-card:nth-child(5) { animation-delay: 0.2s !important; }
  .quick-card:nth-child(6) { animation-delay: 0.25s !important; }

  /* Simplify payment item animation */
  .payment-item {
    animation: scaleIn 0.3s ease-out !important;
  }

  .payment-item:nth-child(1) { animation-delay: 0s !important; }
  .payment-item:nth-child(2) { animation-delay: 0.05s !important; }
  .payment-item:nth-child(3) { animation-delay: 0.1s !important; }
  .payment-item:nth-child(4) { animation-delay: 0.15s !important; }
  .payment-item:nth-child(5) { animation-delay: 0.2s !important; }
  .payment-item:nth-child(6) { animation-delay: 0.25s !important; }
}

/* ===== MOBILE FORM FIXES ===== */
@media (max-width: 768px) {
  /* Reservation form mobile layout */
  .contact-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    align-items: stretch !important;
  }

  .contact-text {
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  .contact-text h2 {
    font-size: 28px !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    color: white !important;
  }

  .contact-text p {
    font-size: 15px !important;
    text-align: center !important;
    margin-bottom: 25px !important;
    color: rgba(255,255,255,0.9) !important;
  }

  .contact-info {
    gap: 15px !important;
    margin-bottom: 30px !important;
  }

  .contact-item {
    gap: 12px !important;
    align-items: flex-start !important;
  }

  .contact-item i {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  .btn-hubungi {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
  }

  /* Reservation form mobile */
  .contact-form {
    background: white !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
    width: 100% !important;
  }

  .form-header-modern {
    margin-bottom: 25px !important;
    padding-bottom: 20px !important;
  }

  .form-icon-header {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 15px !important;
  }

  .form-icon-header i {
    font-size: 28px !important;
  }

  .form-header-modern h3 {
    font-size: 22px !important;
    margin-bottom: 8px !important;
  }

  .form-header-modern p {
    font-size: 13px !important;
  }

  /* Form sections */
  .form-section {
    background: #f9fafb !important;
    padding: 18px !important;
    border-radius: 10px !important;
    margin-bottom: 16px !important;
    border: 1px solid #e5e7eb !important;
  }

  .section-label {
    gap: 8px !important;
    font-size: 14px !important;
    margin-bottom: 16px !important;
    padding-bottom: 10px !important;
  }

  .section-label i {
    font-size: 16px !important;
  }

  /* Form rows - stack on mobile */
  .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
  }

  .input-group {
    width: 100% !important;
    flex: 1 !important;
  }

  .input-group label {
    font-weight: 600 !important;
    margin-bottom: 7px !important;
    color: #333 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important; /* Increased gap between icon and text */
  }

  .input-group label i {
    font-size: 13px !important;
    min-width: 16px !important;
    flex-shrink: 0 !important; /* Prevent icon from squishing */
  }

  .input-group input,
  .input-group select,
  .input-group textarea {
    padding: 12px 14px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: 'Montserrat', sans-serif !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .input-group input:focus,
  .input-group select:focus,
  .input-group textarea:focus {
    outline: none !important;
    border-color: #13c3c9 !important;
    box-shadow: 0 0 0 3px rgba(19,195,201,0.08) !important;
  }

  .input-group textarea {
    min-height: 90px !important;
    resize: vertical !important;
  }

  /* Form actions */
  .form-actions {
    margin-top: 25px !important;
    text-align: center !important;
  }

  .btn-pickup {
    width: 100% !important;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
  }

  .btn-pickup i {
    font-size: 18px !important;
  }

  .form-footer-note {
    margin-top: 12px !important;
    font-size: 12px !important;
    margin-bottom: 30px !important;
    padding-bottom: 20px !important;
  }

  /* Additional spacing to prevent overlap with floating WhatsApp button */
  .contact-form {
    margin-bottom: 40px !important;
  }

  /* WhatsApp floating button - reposition lower to avoid overlap */
  .whatsapp-float {
    bottom: calc(40px + env(safe-area-inset-bottom)) !important;
  }

  /* Chat toggle and back-to-top - ensure proper vertical stacking */
  .chat-toggle {
    bottom: calc(130px + env(safe-area-inset-bottom)) !important;
  }

  .back-to-top {
    bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }
}

/* Extra small screens - additional optimization */
@media (max-width: 480px) {
  .contact-section {
    padding: 40px 0 !important;
  }

  .contact-text h2 {
    font-size: 24px !important;
  }

  .contact-text p {
    font-size: 14px !important;
    margin-bottom: 20px !important;
  }

  .contact-form {
    padding: 16px !important;
    border-radius: 12px !important;
  }

  .form-section {
    padding: 16px !important;
    margin-bottom: 14px !important;
  }

  .input-group input,
  .input-group select,
  .input-group textarea {
    font-size: 16px !important; /* Prevent zoom on iOS */
    min-height: 44px !important; /* Touch-friendly */
  }

  .btn-pickup {
    min-height: 44px !important; /* Touch-friendly button */
  }

  /* Section label with icon - increase gap to prevent collision */
  .section-label {
    gap: 16px !important; /* Increased gap from 10px to 16px */
    margin-bottom: 20px !important;
  }

  .section-label i {
    font-size: 16px !important;
    min-width: 18px !important;
    flex-shrink: 0 !important;
  }
}
