/**
 * Mobile Responsive Styles for Home Page Only
 * Desktop layout remains unchanged - these styles only apply below 1024px
 * Breakpoints: Mobile (360px-480px), Tablet (600px-1024px)
 */

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* ============================================
   MOBILE BREAKPOINT: 360px - 767px
   ============================================ */
@media screen and (max-width: 767px) {
  /* Header Navigation - Mobile */
  header > div {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Logo - Original sizing preserved */
  header img[alt="Asia By Locals"],
  header img[alt*="AsiaByLocals"] {
    height: 3.75rem !important; /* 60px */
    width: auto;
  }

  /* Hide desktop nav links on mobile */
  header nav.hidden.lg\:flex {
    display: none !important;
  }

  /* Action buttons - Better spacing on mobile */
  header > div > div:last-child {
    gap: 0.5rem !important;
  }

  /* Hide text labels on mobile icons */
  header span.hidden.lg\:block {
    display: none !important;
  }

  /* Hero Section - Mobile */
  section:has(.hero-overlay) {
    height: 60vh !important;
    min-height: 500px;
  }

  /* Hero Title - Smaller font on mobile */
  h1.text-4xl,
  h1.text-6xl {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
    padding: 0 1rem;
  }

  /* Search Bar Container - Horizontal layout on all screens */
  .bg-white.p-2.rounded-full.shadow-2xl,
  .bg-white.p-1.rounded-full.shadow-2xl {
    padding: 0.5rem !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    margin: 0 0.5rem;
  }

  .bg-white.p-2.rounded-full.shadow-2xl > div,
  .bg-white.p-1.rounded-full.shadow-2xl > div {
    width: auto !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
  }

  .bg-white.p-2.rounded-full.shadow-2xl > button,
  .bg-white.p-1.rounded-full.shadow-2xl > button {
    width: auto !important;
    flex-shrink: 0 !important;
    min-width: 85px !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    font-size: 1rem !important;
  }

  /* Search input - Full width */
  input[type="text"][placeholder*="Search"] {
    font-size: 1rem !important;
    padding: 0.75rem !important;
  }

  /* Search suggestions dropdown - Full width */
  .absolute.top-full.left-0.right-0.mt-2.bg-white {
    left: 0.5rem !important;
    right: 0.5rem !important;
    margin-top: 0.5rem !important;
  }

  /* Section Headings - Smaller on mobile */
  h2.text-2xl,
  h2.text-\[28px\] {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Cities Scroll Section - Mobile adjustments */
  section.max-w-\[1200px\] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Hide scroll arrows on mobile - Show only on tablet and above */
  button.absolute.left-0.top-\[40\%\],
  button.absolute.right-0.top-\[40\%\] {
    display: none !important;
  }

  button.absolute.left-0.top-\[40\%\] {
    left: 0.25rem !important;
  }

  button.absolute.right-0.top-\[40\%\] {
    right: 0.25rem !important;
  }

  /* Cities scroll container - Remove padding on mobile since arrows are hidden */
  .relative.overflow-hidden.px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* City cards - Optimized size for mobile (170px shows ~1.8 cards, perfect scrollability indication) */
  .flex-shrink-0.w-\[170px\] {
    width: 10.625rem !important;
    min-width: 10.625rem;
  }

  /* City card images - Maintain aspect ratio */
  .aspect-\[4\/5\] {
    aspect-ratio: 4/5;
  }

  /* City card text - Readable on mobile */
  .text-white.font-black.text-lg {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
  }

  .text-white\/95.text-xs {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }

  /* Attractions Section - Mobile */
  .flex.gap-4.overflow-x-auto.no-scrollbar {
    gap: 0.75rem !important;
    padding-bottom: 0.5rem;
  }

  /* Attraction cards - Smaller width on mobile */
  .flex-shrink-0.w-72,
  .flex-shrink-0.w-\[380px\] {
    width: 16rem !important;
    min-width: 16rem;
  }

  /* Attraction card text - Smaller font */
  .text-white.font-black.text-xl {
    font-size: 1.125rem !important;
  }

  /* Exploration Footer - Mobile */
  section.max-w-\[1200px\].mx-auto.px-6.py-12 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Tab navigation - Horizontal scroll on mobile */
  .flex.gap-8.border-b.border-gray-100 {
    gap: 1rem !important;
    padding-bottom: 0.5rem;
  }

  .flex.gap-8.border-b.border-gray-100 button {
    font-size: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    white-space: nowrap;
  }

  /* Exploration grid - 2 columns on mobile */
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem 0.75rem !important;
  }

  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-6 span {
    font-size: 0.75rem !important;
  }

  /* Trust Bar Section - Mobile */
  section.bg-gray-50 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  section.bg-gray-50 h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }

  section.bg-gray-50 p {
    font-size: 0.875rem !important;
    margin-bottom: 2rem !important;
  }

  /* Trust cards - Stack on mobile */
  .grid.md\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Footer - Mobile */
  footer.bg-\[#001A33\] {
    padding-top: 3rem !important;
    padding-bottom: 2rem !important;
  }

  footer .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Footer logo - Smaller */
  footer img[alt*="AsiaByLocals"] {
    height: 3rem !important;
  }

  /* Footer text - Smaller */
  footer p,
  footer li {
    font-size: 0.75rem !important;
  }

  /* Footer copyright - Stack on mobile */
  footer .flex.flex-col.md\:flex-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  /* Payment icons - Smaller on mobile */
  footer .flex.gap-4.items-center {
    flex-wrap: wrap;
    gap: 0.5rem !important;
  }

  footer .bg-white\/10 {
    padding: 0.375rem !important;
    font-size: 0.625rem !important;
  }
}

/* ============================================
   TABLET BREAKPOINT: 768px - 1023px
   ============================================ */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  /* Show scroll arrows on tablet and above */
  button.absolute.left-0.top-\[40\%\],
  button.absolute.right-0.top-\[40\%\] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
    padding: 0.5rem !important;
    z-index: 20 !important;
    background-color: white !important;
    border-radius: 9999px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  }

  /* Header - Tablet adjustments */
  header > div {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Logo - Tablet sizing (original preserved) */
  header img[alt*="AsiaByLocals"] {
    height: 4.375rem !important; /* 70px */
  }

  /* Hero Section - Tablet */
  section:has(.hero-overlay) {
    height: 70vh !important;
    min-height: 600px;
  }

  /* Hero Title - Tablet size */
  h1.text-4xl,
  h1.text-6xl {
    font-size: 2.5rem !important;
    margin-bottom: 2rem !important;
  }

  /* Search Bar - Tablet */
  .bg-white.p-2.rounded-full.shadow-2xl {
    padding: 0.5rem !important;
  }

  /* Section Headings - Tablet */
  h2.text-2xl,
  h2.text-\[28px\] {
    font-size: 1.75rem !important;
  }

  /* Cities Section - Tablet */
  section.max-w-\[1200px\] {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  /* City cards - Tablet size */
  .flex-shrink-0.w-\[200px\] {
    width: 12.5rem !important;
    min-width: 12.5rem;
  }

  /* Attractions - Tablet */
  .flex-shrink-0.w-72,
  .flex-shrink-0.w-\[380px\] {
    width: 20rem !important;
    min-width: 20rem;
  }

  /* Exploration Footer - Tablet */
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  /* Trust Bar - Tablet */
  .grid.md\:grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2rem !important;
  }

  /* Footer - Tablet */
  footer .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ============================================
   PREVENT HORIZONTAL SCROLLING
   ============================================ */
@media screen and (max-width: 1023px) {
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  /* Ensure all containers respect viewport width */
  .max-w-\[1200px\] {
    max-width: 100% !important;
    width: 100%;
  }

  /* Prevent any element from causing overflow */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Images - Responsive */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* ============================================
   MOBILE-SPECIFIC UTILITIES (360px - 480px)
   ============================================ */
@media screen and (max-width: 480px) {
  /* Extra small mobile adjustments */
  h1.text-4xl,
  h1.text-6xl {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  .bg-white.p-2.rounded-full.shadow-2xl {
    border-radius: 1rem !important;
  }

  /* Smaller padding on very small screens */
  section.max-w-\[1200px\] {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* City cards - Even smaller on very small mobile */
  .flex-shrink-0.w-40,
  .flex-shrink-0.w-\[200px\] {
    width: 7rem !important;
  }

  /* Attraction cards - Smaller */
  .flex-shrink-0.w-72,
  .flex-shrink-0.w-\[380px\] {
    width: 14rem !important;
    min-width: 14rem;
  }
}
