/* responsive.css */


/* Hide hamburger button by default on large screens */
.hamburger {
  display: none;
}

.main-nav {
  display: flex;
  flex-direction: row;
  gap: 25px;
}



/* ==== Small Screens (e.g. phones, max-width: 768px) ==== */
@media (max-width: 768px) {
  /* Place all hamburger-related CSS here */

  .main-nav {
    display: none;
    flex-direction: column;
    background-color: white;
    position: absolute;
    top: 70px; /* adjust to match header height */
    right: 0;
    width: 100%;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
  }

  .main-nav.active {
    display: flex;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    font-size: 28px;
    color: #333;
    background: none;
    border: none;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 15px;
    align-items: center; /* Center items horizontally */
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .main-nav li {
    width: 100%;
    text-align: center; /* Ensure link inside is centered */
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 10px 0;
  }

  .top-header {
    justify-content: space-between;
  }

  .hero-overlay h2 {
    font-size: 1.3rem;
  }

  .hero-overlay p {
    font-size: 0.9rem;
  }

  .search-box {
    padding: 15px;
  }

  #search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  #search-form .input-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #search-form input[type="date"],
  #search-form input[type="number"] {
    flex: 1 1 30%;
    min-width: 0;
    font-size: 14px;
    padding: 8px;
  }

  #search-form .btn {
    align-self: center;
    font-size: 16px;
    padding: 10px 20px;
  }

  #checkin,
  #checkout {
    font-size: 16px;
  }

  .form-field {
      display: flex;
      align-items: center;
      gap: 10px; /* space between label and input */
  }

  .form-field label {
    font-size: 16px;
    color: #999; /* match your input border color */
    min-width: 100px; /* fixed width for labels */
    text-align: left; /* align label text to left */
  }

  .form-field input {
    font-size: 16px; /* prevents zoom on iOS */
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    padding: 5px 10px;
    box-sizing: border-box;
  }

  .map-container {
    height: 500px;
  }

}



/* Tablet and small desktops (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  /* Header navigation becomes vertical and centered */
  .main-nav ul {
    flex-direction: column;
    gap: 15px;
    margin-right: 0;
    align-items: center;
  }

  /* Villas section: villa cards stack with smaller max-width */
  .villa-cards {
    flex-direction: column;
    align-items: center;
  }

  .villa-card {
    max-width: 90%;
    margin: 15px 0;
  }

  /* Search box fields stack vertically */
  .search-box {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .search-box input,
  .search-box button {
    min-width: 100%;
    flex-grow: unset;
  }
}



/* Large desktops (769px ) */
@media (min-width: 769px) {
  /* Villas section: villa cards in two columns */
  .villa-cards {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .villa-card {
    max-width: 45%;
    margin: 10px 0;
  }

  /* Search box fields inline with smaller widths */
  #search-form {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: nowrap;
    justify-content: center; /* Center in the container */
    padding: 20px;
  }

  .form-field {
    display: flex;
    flex-direction: column;
    width: auto;
  }

  .form-field input {
    width: 150px;
    height: 28px; /* Match Search button height */
    font-size: 16px;
    border: 1px solid #ccc;
    padding: 5px 10px;
  }

  .form-field label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #ccc; /* Same as border color */
  }

  .btn {
    height: 40px;
    padding: 0 20px;
    font-size: 16px;
    margin-top: auto;
  }

}

