body {
  font-family: "Plus Jakarta Sans", sans-serif !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  flex: 1;
  padding-bottom: 70px;
}

/* navbar section - Desktop */

.navbar {
  height: 5rem;
  text-align: center !important;
  background-color: #ffffff;
}

.trip-tide-brand {
  display: flex;
  align-items: center;
  margin: 0rem 1rem 0rem 1.5rem;
}

.hgi-tsunami {
  font-size: 2.5rem;
  color: #0077cc;
}

.text-container {
  display: flex;
  flex-wrap: wrap;
  width: 2rem;
  margin-bottom: 8px;
}

.text-container a {
  text-decoration: none;
  height: 18px;
}

.logo-text {
  font-size: 1rem;
  font-weight: 600;
  color: #0077cc;
  font-family: "Segoe UI", sans-serif;
}

.nav-link {
  color: #000 !important;
  font-size: large !important;
}

.nav-ri {
  width: 22rem;
  display: flex;
  justify-content: space-between;
}

.nav-ex {
  padding: 0.5rem 1rem 0.5rem 1rem !important;
  border-radius: 20px !important;
}

.nav-ex:hover,
.nav-add:hover {
  background-color: #e0e0e063;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.nav-add {
  font-size: 15px !important;
  padding: 0.5rem 1rem 0.5rem 1rem !important;
  border-radius: 20px !important;
}

.nav-add i {
  color: #0077cc;
  margin-left: 5px;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Plain text link */
.nav-link-auth {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  padding: 6px 4px;
  transition: color 0.2s ease;
}

.nav-link-auth:hover {
  color: #000;
}

/* Primary action */
.nav-link-auth.primary {
  background-color: #111;
  color: #fff;
  padding: 7px 16px;
  border-radius: 6px;
}

.nav-link-auth.primary:hover {
  background-color: #000;
}

/* search bar */
.search-btn {
  height: 42px;
  width: 42px;
  padding: 0;
  background-color: #0077ccb9 !important;
  border: 2px solid #0077cc !important;
  border-radius: 50% !important;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
}

.search-btn i {
  font-size: 16px;
  color: #ffffff;
  padding-right: 15px;
}

.search-btn:hover {
  background-color: #0077cc !important;
  box-shadow: 0 6px 14px rgba(0, 119, 204, 0.35);
  transform: translateY(-1px);
}

.search-btn:active {
  transform: scale(0.95);
  box-shadow: 0 3px 6px rgba(0, 119, 204, 0.25);
}

.search-inp {
  border-radius: 20px !important;
  padding: 0.5rem 4rem 0.5rem 2rem !important;
  border: 2px solid #0077cc !important;
  font-size: 1rem !important;
  outline: none;
}

.search-inp:hover {
  border-color: #0056b3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.search-form {
  display: flex;
  align-items: center; /* 🔥 fixes vertical alignment */
  gap: 8px;
  /* margin-left: 2rem; */
}

.search-inp {
  height: 42px; /* match button height */
  line-height: 42px;
}

/* Footer */
.f-info-links a {
  text-decoration: none;
  color: #222222;
  margin-right: 1rem;
}

.f-info-links a:hover {
  text-decoration: underline;
}

.f-info-links,
.f-info-socials,
.f-info-brand {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.f-info-socials i {
  margin-right: 1rem;
  font-size: 1.5rem;
}

.f-info {
  text-align: center;
  height: 7rem;
  background-color: #ebebeb;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: space-evenly;
}
/* ================= FILTER PANEL ================= */

#filterPanel .card-body {
  padding: 1.2rem;
}

/* Filter item */
.filter {
  text-align: center;
  opacity: 0.7;
  transition: transform 0.3s ease;
  min-width: 90px; /* IMPORTANT: prevents vertical stacking */
}

.filter p {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  white-space: nowrap;
}

.filter:hover {
  opacity: 1;
  transform: scale(1.1);
  cursor: pointer;
}

/* ================= DESKTOP ================= */

@media (min-width: 992px) {
  #filterPanel {
    margin-top: 1rem;
  }

  #filterPanel .d-flex {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 2rem; /* ✅ SPACING FIX */
  }
}

/* ================= MOBILE & TABLET ================= */

@media (max-width: 768px) {
  #filterPanel .card-body {
    padding: 1rem;
  }

  #filterPanel .d-flex {
    display: flex !important;
    flex-direction: row; /* FORCE HORIZONTAL */
    flex-wrap: wrap; /* 2 rows */
    justify-content: space-between;
    gap: 1.5rem 0;
  }

  .filter {
    flex: 0 0 48%; /* ✅ 2 items per row */
    margin: 0;
  }

  .filter i {
    font-size: 1.4rem;
  }

  .filter p {
    font-size: 0.85rem;
  }
}

/* ================= MINI DESKTOP ================= */

@media (min-width: 769px) and (max-width: 1100px) {
  #filterPanel .d-flex {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
}

/* cards */
.card {
  border: none !important;
  margin-bottom: 2rem;
}

.card-img-top {
  border-radius: 1rem !important;
  width: 100% !important;
  object-fit: cover !important;
}

.card-body {
  padding: 0 !important;
}

.listing-link {
  text-decoration: none;
}

.card-img-overlay:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border-color: #000;
  border-radius: 1rem;
}

/* new listing form */

.row h2 {
  margin: 1rem;
  color: #3b82f6;
  text-align: center;
}

.form-input {
  border: 2px solid #222 !important;
  padding: 10px !important;
  font-size: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 16px !important;
}

.form-button {
  background-color: #3b82f6;
  color: white;
  border: 2px solid #000;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  margin-bottom: 20px;
}

.form-button:hover {
  transform: scale(1.05);
}

/* show list */

.form-btns {
  display: flex;
  justify-content: space-evenly;
  margin-top: 2rem;
}
.card {
  border-radius: 14px;
}

.review-scroll-box {
  max-height: 320px;
  overflow-y: auto;
}

.review-scroll-box::-webkit-scrollbar {
  width: 6px;
}

.review-scroll-box::-webkit-scrollbar-thumb {
  background-color: #cfcfcf;
  border-radius: 10px;
}

#map {
  height: 400px;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
}

@media (max-width: 768px) {
  #map {
    height: 280px;
  }
}

/* mobile css */

/* MOBILE + TABLET + MINI DESKTOP TAB BAR */
@media (max-width: 1050px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
  }

  .bottom-nav .nav-item {
    text-decoration: none;
    color: #444;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .bottom-nav .nav-item i {
    font-size: 22px;
    color: #444;
  }

  .bottom-nav .nav-item:hover,
  .bottom-nav .nav-item.active {
    color: #000;
  }

  .bottom-nav .nav-item:hover i,
  .bottom-nav .nav-item.active i {
    color: #000;
  }

  .bottom-nav button.nav-item {
    border: none;
    background: transparent;
    box-shadow: none;
  }

  #filterPanel {
    position: relative;
    z-index: 1101;
  }
}

/* HIDE TAB BAR ON LARGE DESKTOP */
@media (min-width: 1051px) {
  .bottom-nav {
    display: none !important;
  }
}

.profile-wrapper {
  position: relative;
}

/* remove button default styles */
.profile-btn {
  background: none;
  border: none;
  padding: 0;
  color: #444;
}

/* popup box */
.profile-popup {
  position: absolute;
  bottom: 75px; /* above bottom nav */
  right: 0;
  width: 150px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2000;
}

.profile-popup a {
  padding: 12px 14px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.profile-popup a:hover {
  background: #f5f5f5;
}

/* show popup */
.profile-wrapper.active .profile-popup {
  display: flex;
}

/* Tablet / small desktop Nav bar  */
@media (max-width: 1050px) and (min-width: 769px) {
  .desktop-only {
    display: none !important;
  }

  .navbar {
    height: auto;
    padding: 0.6rem 0.8rem;
  }

  .navbar-inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .trip-tide-brand {
    flex-shrink: 0;
  }

  .search-wrapper {
    flex: 1;
    min-width: 0;
    margin-left: auto;
  }

  .search-form {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .search-inp {
    flex: 1;
    min-width: 180px;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 999px;
  }

  .search-btn {
    height: 40px;
    width: 40px;
    flex-shrink: 0;
  }
}

/* Mobile Nav bar */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .navbar {
    height: auto;
    padding: 0.6rem 0.8rem;
  }

  .navbar-inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .trip-tide-brand {
    flex-shrink: 0;
  }

  .search-wrapper {
    flex: 1;
    min-width: 0;
    margin-left: auto;
  }

  .search-form {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .search-inp {
    flex: 1;
    min-width: 180px;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 999px;
  }

  .search-btn {
    height: 40px;
    width: 40px;
    flex-shrink: 0;
  }
}

/* ================= FILTERS WRAPPER ================= */
.filters-wrapper {
  position: relative;
}

/* ================= DESKTOP ONLY ================= */
@media (min-width: 1051px) {
  .filters-popup {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);

    width: 420px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);

    padding: 0.6rem 0.8rem;
    display: none;
    z-index: 1000;
  }

  .filters-wrapper.active .filters-popup {
    display: block;
  }
}

/* ================= MOBILE / TABLET / MINI DESKTOP ================= */
@media (max-width: 1050px) {
  .filters-popup {
    position: fixed;
    bottom: 72px; /* bottom nav height */
    left: 0;
    right: 0;

    width: 100vw;
    max-width: 100vw;

    /* 🔴 CRITICAL FIX */
    transform: none !important;

    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);

    padding: 0.6rem 0.8rem;
    display: none;
    z-index: 1100;
  }

  .filters-wrapper.active .filters-popup {
    display: block;
  }
}

/* ================= FILTER ROW ================= */
.filters-grid {
  display: flex;
  align-items: center;
  gap: 1.4rem;

  overflow-x: auto;
  overflow-y: hidden;

  padding: 0.4rem 0.6rem;

  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filters-grid::-webkit-scrollbar {
  display: none;
}

/* ================= FILTER ITEM ================= */
.filters-popup .filter {
  flex: 0 0 auto;
  width: 72px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  opacity: 0.85;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.filters-popup .filter i {
  font-size: 22px;
  line-height: 1;
}

.filters-popup .filter p {
  font-size: 11px;
  margin-top: 4px;
  white-space: nowrap;
}

/* Hover */
.filters-popup .filter:hover {
  opacity: 1;
  transform: scale(1.1);
}
