/* assets/home.css */
/* Global Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
}
header {
  background-color: #001d3d;
  color: white;
  padding: 20px;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img {
  height: 50px;
}
.menu ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.menu ul li {
  margin-left: 20px;
}
.menu ul li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
}
main {
  overflow-x: hidden;
}
footer {
  background-color: #001d3d;
  color: white;
  text-align: center;
  padding: 20px;
}

/* Hero Section & Flight Search Form */
.hero-section {
  position: relative;
  height: 100vh; /* Full viewport height */
  background: no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Move content to the top */
  padding: 20px;
  padding-top: 40px; /* Adjust top padding as needed */
}
.form-container {
  /* Change to column layout so headings come first */
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 1000px;
  margin: 20px auto 0; /* Reduced top margin for a higher placement */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  color: #fff;
  animation: glowing 2s infinite alternate;
}

/* New styles for heading and subheading placed above the search form */
.form-heading {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  color: #fff;
}
.form-subheading {
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  color: #fff;
}

@keyframes glowing {
  0% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }
  50% { box-shadow: 0 0 20px rgba(0, 123, 255, 1); }
  100% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }
}
.top-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  color: #fff;
  flex-wrap: wrap;
}
.trip-type label,
.direct-flights label {
  font-size: 14px;
  margin: 5px;
}
.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}
.search-box input,
.search-box select,
.search-box button {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  max-width: 180px;
  transition: border-color 0.3s, box-shadow 0.3s;
  animation: glowingInput 2s infinite alternate;
}
.search-box input,
.search-box select {
  background: #fff;
  color: #333;
}
.search-box button {
  background-color: #007bff;
  color: white;
  cursor: pointer;
  border: 1px solid #007bff;
  animation: none;
}
.search-box button:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}
@keyframes glowingInput {
  0% { border-color: #ccc; box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }
  100% { border-color: #007bff; box-shadow: 0 0 15px rgba(0, 123, 255, 1); }
}
.suggestions-box {
  position: absolute;
  background-color: #fff;
  border: 1px solid #ccc;
  z-index: 10;
  max-height: 150px;
  overflow-y: auto;
  width: calc(100% - 20px);
  color: #333;
  display: none;
}
.suggestions-box div {
  padding: 10px;
  cursor: pointer;
}
.suggestions-box div:hover {
  background-color: #f0f0f0;
}

/* Loader Styles */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,29,61,0.95), rgba(29,45,68,0.95));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.loader-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.loader-animation {
  text-align: center;
  color: #fff;
  font-family: 'Courier New', monospace;
}
.spinner {
  border: 8px solid rgba(255,255,255,0.2);
  border-top: 8px solid #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
  box-shadow: 0 0 15px rgba(255,255,255,0.3);
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loader-message {
  margin-top: 20px;
  font-size: 1.2rem;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* Popular Destinations Section */
.popular-section {
  background-color: #fff;
  padding: 40px 20px;
  text-align: center;
}
.popular-section h2 {
  margin-bottom: 20px;
  color: #001d3d;
}
.popular-locations-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.popular-destination {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s;
  text-align: center;
  width: 100%;
}
.popular-destination:hover {
  transform: translateY(-5px);
}
.popular-destination img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
  /* Hint browser for optimized rendering */
  will-change: opacity, transform;
}
.popular-destination .destination-name {
  margin-top: 10px;
  font-weight: bold;
  font-size: 16px;
  color: #333;
}

/* Map Search Section (Explore Worldwide) */
.map-search-section {
  background-color: #fff;
  padding: 40px 20px;
  text-align: center;
}
.map-search-section h2 {
  margin-bottom: 20px;
  color: #001d3d;
}
.map-container {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.map-list {
  width: 300px;
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
  max-height: 600px;
}
.map-list h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  color: #001d3d;
}
.map-item {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}
.map-item:hover {
  background-color: #f5f5f5;
}
.map-area {
  flex-grow: 1;
  height: 600px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 992px) {
  /* Adjust popular destinations grid */
  .popular-locations-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  /* Header adjustments */
  .header-top {
    flex-direction: column;
    align-items: center;
  }
  .menu ul {
    flex-direction: column;
    align-items: center;
  }
  .menu ul li {
    margin-left: 0;
    margin-bottom: 10px;
  }
  /* Hero Section remains full screen */
  .hero-section {
    height: 100vh;
  }
  /* Map container stacking */
  .map-container {
    flex-direction: column;
  }
  .map-list {
    width: 100%;
    margin-bottom: 20px;
  }
  .map-area {
    height: 400px;
  }
  /* Adjust popular destinations grid */
  .popular-locations-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  /* Further adjustments for very small screens */
  .hero-section {
    height: 100vh;
  }
  .form-container {
    padding: 20px;
  }
  .search-box input,
  .search-box select,
  .search-box button {
    max-width: 100%;
  }
  .popular-locations-container {
    grid-template-columns: 1fr;
  }
}
