/* Universal box-sizing for easier layout */
* {
  box-sizing: border-box;
}

body {
    background-color: white;
    font-family: "Plus Jakarta Sans", "Noto Sans", sans-serif;
    margin: 0;
    color: #111827;
  }
  
  /* Header */
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem; /* Adjusted padding for mobile */
  }
  .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .logo-icon {
    width: 1rem;
    height: 1rem;
    color: #111827;
  }
  .header-title {
    font-size: 1.125rem;
    font-weight: bold;
  }
  .header-right {
    display: flex;
    align-items: center;
    gap: 1rem; /* Adjusted gap for mobile */
  }
  .nav-links {
    display: none; /* Hide nav links by default on mobile */
  }

  .help-btn {
    display: none; /* Hide help button by default on mobile */
  }
  
  /* Media query for larger screens (e.g., tablets and desktops) */
  @media (min-width: 768px) {
    .header {
      padding: 0.75rem 2.5rem; /* Original padding for larger screens */
    }
    .header-right {
      gap: 2rem; /* Original gap for larger screens */
    }
    .nav-links {
      display: flex; /* Show nav links on larger screens */
    }
    .nav-links a {
      font-size: 0.875rem; /* Ensure original font size for desktop */
      font-weight: 500;
      padding: 0 0.5rem; /* Add slight padding for better spacing on desktop nav */
    }
    .help-btn {
      display: block; /* Show help button on larger screens */
    }
  }

  /* Hamburger menu icon - will need HTML changes too */
  .menu-icon {
    display: block; /* Show hamburger icon on mobile */
    cursor: pointer;
    z-index: 1000; /* Ensure it's above other content */
  }
  .menu-icon .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: #111827;
  }

  /* Overlay menu for mobile */
  .overlay-menu {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white overlay */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999; /* Below the menu icon */
  }
  .overlay-menu.show {
    display: flex;
  }
  .overlay-menu a {
    font-size: 1.5rem;
    padding: 1rem;
    color: #111827;
    text-decoration: none;
  }

  @media (min-width: 768px) {
    .menu-icon {
      display: none; /* Hide hamburger icon on larger screens */
    }
    .overlay-menu {
      display: none !important; /* Ensure menu is hidden on large screens */
    }
  }
  .search{
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    justify-content: center; /* keep the whole group centered on the page */
    flex-wrap: nowrap; /* keep all controls in one row */
  }
  .search .field{
    display: flex;
    flex-direction: column;
    flex: 1 1 320px;   /* two flexible selects */
    min-width: 240px;  /* avoid collapsing too small */
  }
  /* Ensure the Search button stays after both dropdowns on the right */
  .search #search{
    flex: 0 0 auto;
    order: 3;
    align-self: flex-end;
  }
  .select-label{
    color: white;
  }
  #search{
    height: 40px;
    padding: 0 16px;
    background-color: black;
    color: white;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    cursor: pointer;
  }
  .dropdown{
    padding: 12px; /* Increased padding for better touch target */
    width: 100%;
    margin-top: 4px;
  }

  /* Mobile specific styles for search section */
  @media (max-width: 767px) {
    .search {
      flex-direction: column; /* Stack elements vertically on mobile */
      align-items: stretch; /* Stretch items to full width */
      padding: 0 1rem; /* Add horizontal padding to prevent overflow */
    }
    .search .field {
      flex: 1 1 auto; /* Allow fields to grow and shrink, remove min-width restriction */
      width: 100%; /* Ensure full width */
      min-width: auto; /* Remove explicit min-width for mobile */
    }
    #search {
      display: block; /* Make search button full-width */
      width: 100%; /* Ensure full width */
      padding: 12px; /* Increased padding for better touch target */
      margin-top: 1rem; /* Add more space above button */
      height: auto; /* Allow height to adjust with padding */
    }
    .dropdown {
      background-color: white; /* Ensure white background on mobile */
      max-height: 40vh; /* Limit visible height on mobile */
      overflow-y: auto; /* Enable scrolling for long lists */
      -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
      padding: 12px; /* Ensure consistent padding */
    }
    .view-route-btn {
      display: block; /* Make view route button full-width */
      width: 100%;
      padding: 12px; /* Increased padding for better touch target */
      text-align: center;
    }
  }

  /* Hero Section */
  .hero {
    padding: 1.25rem 1rem; /* Adjusted padding for mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem; /* Adjusted gap for mobile */
    min-height: 300px; /* Adjusted min-height for mobile */
    border-radius: 0.5rem;
    background-size: cover;
    background-position: center;
  }
  .hero-text {
    text-align: center;
    color: white;
  }
  .hero-text h1 {
    font-size: 1.75rem; /* Adjusted font size for mobile */
    font-weight: 900;
    margin-bottom: 0.5rem;
  }
  .hero-text p {
    font-size: 0.875rem; /* Adjusted font size for mobile */
  }
  .search-box {
    display: flex;
    width: 100%;
    max-width: 480px;
    height: 3.5rem;
  }
  .search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-right: none;
    color: #6b7280;
  }
  .search-box input {
    flex: 1;
    padding: 0 1rem;
    border: 1px solid #d1d5db;
    border-left: none;
    font-size: 0.875rem;
  }
  .search-box button {
    padding: 0 1.25rem;
    background-color: #111827;
    color: white;
    font-weight: bold;
    border: none;
  }
  
  /* Popular Routes */
  .section-title {
    font-size: 1.25rem; /* Adjusted font size for mobile */
    margin: 1.5rem 0 0.5rem; /* Adjusted margins for mobile */
    padding: 0 1rem;
  }
  .routes-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Smaller minmax for mobile */
    gap: 0.5rem; /* Adjusted gap for mobile */
    padding: 0.75rem;
  }
  .route-card {
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
  }
  .route-location {
    font-size: 0.875rem;
    color: #6b7280;
  }
  
  /* Footer */
  .footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f9fafb;
    padding: 2.5rem 0;
    gap: 1.5rem;
  }
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }
  .footer-links a {
    color: #6b7280;
    padding: 8px 12px; /* Add padding for better touch target */
    border-radius: 4px;
  }
  .footer p {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
  }
  /* Search Result Container */
  .search-result-container{
    margin: 1rem;
    padding: 0.75rem; /* Adjusted padding for mobile */
  }
.hide{
    display: none;
  }
  .page-heading h1 {
    font-size: 1.375rem; /* Adjusted font size for mobile */
  }
  .page-heading p {
    font-size: 0.8rem; /* Adjusted font size for mobile */
  }
  .results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .result-card {
    flex-direction: column; /* Stack elements vertically on mobile */
    gap: 0.75rem; /* Adjusted gap for mobile */
    padding: 0.75rem; /* Adjusted padding for mobile */
  }
  .result-info h3 {
    font-weight: bold;
  }
  .result-info-p {
    font-size: 0.875rem;
    color: #6b7280;
  }
  .view-route-btn {
    display: inline-block;
    background-color: #f3f4f6;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 0.25rem 1rem;
    margin-top: 0.5rem;
  }
  .result-image {
    height: 120px; /* Fixed height for image placeholder on mobile */
    width: 100%; /* Full width for image placeholder on mobile */
  }
  #result-card-2{
    display: none;
  }
  
  @media (min-width: 768px) {
    .section-title {
      font-size: 1.375rem; /* Original font size for larger screens */
      margin: 2rem 0 0.75rem; /* Original margins for larger screens */
    }
    .routes-grid {
      grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); /* Original minmax for larger screens */
      gap: 0.75rem; /* Original gap for larger screens */
      padding: 1rem;
    }
    .search-result-container{
      margin: 1rem;
      padding: 1rem;
    }
    .page-heading h1 {
      font-size: 1.5rem; /* Original font size for larger screens */
    }
    .page-heading p {
      font-size: 0.875rem; /* Original font size for larger screens */
    }
    .result-card {
      flex-direction: row; /* Horizontal layout on larger screens */
      gap: 1rem;
      padding: 1rem;
    }
    .result-image {
      height: auto; /* Auto height on larger screens */
      width: auto; /* Auto width on larger screens */
      flex: 1; /* Original flex for larger screens */
    }
  }
  .abc{
    color: black;
  }
  