body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff;
  padding-top: 0;
}

/* RESPONSIVE HEADER STYLES */
.header-gradient {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: none;
  min-height: 80px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1050;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.header-gradient .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  width: 100%;
  max-width: 100%;
}

/* RESPONSIVE NAVBAR STYLES WITH FORCED RIGHT ALIGNMENT */
.navbar {
  width: 100%;
  padding: 0;
  min-height: 80px;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.navbar-brand {
  display: flex;
  align-items: center;
  color: #000 !important;
  font-weight: 700;
  font-size: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  gap: 12px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
  flex-shrink: 0;
  order: 1 !important;
}

.navbar-brand:hover {
  color: #000 !important;
}

.brand-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #000;
  letter-spacing: -0.5px;
  text-shadow: 2px 2px 4px rgba(255, 215, 0, 0.3);
}

.brand-text .stay {
  color: #000;
}

.brand-text .finder {
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-brand img {
  max-height: 45px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: none;
  border: none;
  background: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

/* FORCE RIGHT ALIGNMENT FOR NAVIGATION */
.navbar-toggler {
  border: none;
  padding: 4px 8px;
  background: transparent;
  box-shadow: none;
  order: 3 !important;
  margin-left: auto !important;
}

.navbar-toggler:focus {
  box-shadow: none;
  border: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%280, 0, 0, 0.7%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  width: 24px;
  height: 24px;
}

/* BRUTE FORCE RIGHT ALIGNMENT FOR NAVIGATION MENU */
.navbar-collapse {
  flex-grow: 0 !important;
  order: 2 !important;
  margin-left: auto !important;
  width: auto !important;
  justify-content: flex-end !important;
}

.navbar-nav {
  align-items: center !important;
  gap: 10px !important;
  flex-direction: row !important;
  margin-left: auto !important;
  justify-content: flex-end !important;
  width: auto !important;
}

/* DESKTOP NAVIGATION FORCED RIGHT ALIGNMENT */
@media (min-width: 992px) {
  .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 15px !important;
    width: auto !important;
  }

  .navbar-collapse {
    display: flex !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    width: auto !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .nav-item {
    margin: 0 !important;
  }
}

.nav-link {
  color: #666 !important;
  font-weight: 500;
  padding: 8px 16px !important;
  border-radius: 20px;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover {
  color: #ffd700 !important;
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-1px);
}

.btn-register {
  background: #ffd700 !important;
  color: #000 !important;
  border: none;
  padding: 8px 25px;
  border-radius: 25px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-register:hover {
  background: #ffa500 !important;
  color: #000 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

/* HERO SECTION */
.hero-section {
  background: url("img/background.png");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  min-height: 80vh;
  position: relative;
  overflow: hidden;
  background-color: #ffd700;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 80px;
}

.hero-pattern {
  position: absolute;
  right: 0;
  top: 0;
  width: 60%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}

.location-pin {
  display: none;
}

.main-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.search-btn {
  background: #ffd700;
  color: #000;
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: #ffa500;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.description-text {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.cta-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 2rem;
}

/* MAP SECTION */
.map-section {
  background: #f8f9fa;
  padding: 60px 0;
}

#mainMap {
  height: 500px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 3px solid #ffd700;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* FIXED: Mobile-responsive popup styles */
.custom-popup {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.popup-header {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: white;
  padding: 12px;
  margin: -10px -10px 12px -10px;
  border-radius: 8px 8px 0 0;
  font-weight: bold;
  font-size: 14px;
}

.popup-content {
  font-size: 12px;
}

.popup-content img {
  width: 100%;
  height: 80px !important;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 2px solid #ddd;
}

.popup-price {
  background: linear-gradient(135deg, #ff8c00, #ff6347);
  color: white;
  padding: 6px 10px;
  border-radius: 15px;
  font-weight: bold;
  display: inline-block;
  margin: 8px 0;
  font-size: 12px;
}

.popup-distance {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: bold;
  display: inline-block;
  margin: 4px 0;
  font-size: 10px;
}

/* Custom Leaflet popup container for mobile */
.leaflet-popup-content-wrapper {
  max-width: 280px !important;
  padding: 10px !important;
}

.leaflet-popup-content {
  margin: 10px !important;
  max-width: 260px !important;
}

/* Mobile specific popup adjustments */
@media (max-width: 768px) {
  .leaflet-popup-content-wrapper {
    max-width: 240px !important;
    padding: 8px !important;
  }

  .leaflet-popup-content {
    margin: 8px !important;
    max-width: 220px !important;
    font-size: 11px !important;
  }

  .popup-header {
    padding: 10px;
    font-size: 13px;
    margin: -8px -8px 10px -8px;
  }

  .popup-content img {
    height: 70px !important;
    margin-bottom: 6px;
  }

  .popup-price {
    padding: 5px 8px;
    font-size: 11px;
    margin: 6px 0;
  }

  .btn-custom {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 576px) {
  .leaflet-popup-content-wrapper {
    max-width: 200px !important;
    padding: 6px !important;
  }

  .leaflet-popup-content {
    margin: 6px !important;
    max-width: 185px !important;
    font-size: 10px !important;
  }

  .popup-header {
    padding: 8px;
    font-size: 12px;
    margin: -6px -6px 8px -6px;
  }

  .popup-content img {
    height: 60px !important;
    margin-bottom: 5px;
  }

  .popup-price {
    padding: 4px 6px;
    font-size: 10px;
    margin: 5px 0;
  }

  .btn-custom {
    padding: 5px 8px !important;
    font-size: 10px !important;
  }
}

/* LOCATION RESULTS SECTION STYLES */
.location-results-section {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-top: 30px;
  display: none;
}

.location-results-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #ffd700;
  flex-wrap: wrap;
}

.location-results-header h3 {
  color: #000;
  font-weight: 700;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.location-badge {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.nearby-houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.nearby-house-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background: #fff;
  cursor: pointer;
}

.nearby-house-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.nearby-card-image {
  height: 150px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.nearby-price-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffd700;
  color: #000;
  padding: 6px 12px;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.8rem;
}

.nearby-distance-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.house-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background: #fff;
}

.house-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.price-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ffd700;
  color: #000;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
}

.contact-info a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 500;
}

.contact-info a:hover {
  color: #ffa500;
}

.features-section {
  background: #ffd700;
  padding: 60px 0;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px 20px;
  border-radius: 15px;
  text-align: center;
  height: 100%;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: #fff;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.university-marker {
  background: #ff8c00;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #ff6347;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  font-weight: bold;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.house-marker {
  background: #ffd700;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid #ffa500;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.house-marker.highlighted {
  background: #ff8c00 !important;
  border-color: #ff6347 !important;
  animation: pulse 2s infinite;
}

.house-marker.dimmed {
  opacity: 0.3;
  background: #95a5a6 !important;
  border-color: #7f8c8d !important;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.grid-overlay-polygon {
  fill: rgba(255, 215, 0, 0.15);
  stroke: #ffd700;
  stroke-width: 3;
  stroke-dasharray: 10, 5;
}

.grid-line {
  stroke: rgba(255, 165, 0, 0.4);
  stroke-width: 1;
  stroke-dasharray: 5, 5;
}

.area-label {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: center;
  white-space: nowrap;
}

/* Location Button Styles */
.location-button {
  position: absolute;
  top: 80px;
  left: 10px;
  z-index: 1000;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.location-button:hover {
  background: #f4f4f4;
}

.location-button.active {
  background: #4285f4;
  color: white;
}

.location-button i {
  font-size: 18px;
  color: #666;
}

.location-button.active i {
  color: white;
}

/* Location Control Button Styles */
.location-control-btn {
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  width: 100%;
}

.location-control-btn:hover {
  background: #f4f4f4;
  border-color: #4a90e2;
}

.location-control-btn.active {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.location-control-btn.active:hover {
  background: #357abd;
}

.location-control-btn i {
  font-size: 14px;
}

.location-control-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.user-location-dot {
  width: 10px;
  height: 10px;
  background: #4a90e2;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(74, 144, 226, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

@keyframes locationPulse {
  0% {
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(74, 144, 226, 1), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

.user-location-dot {
  animation: locationPulse 2s ease-in-out infinite;
}

.leaflet-interactive.location-accuracy {
  fill: rgba(74, 144, 226, 0.05);
  stroke: rgba(74, 144, 226, 0.2);
  stroke-width: 1;
  stroke-dasharray: 5, 5;
}

/* Route Info Box Styles */
.route-info-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 0;
  min-width: 280px;
  max-width: 320px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  border: 2px solid #4a90e2;
  overflow: hidden;
}

.route-info-header {
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.route-info-header strong {
  flex: 1;
  font-weight: 600;
}

.route-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.route-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.route-info-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 13px;
}

.route-info-item i {
  color: #4a90e2;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.route-info-item span {
  color: #333;
  flex: 1;
}

.route-info-footer {
  background: #e7f3ff;
  padding: 10px 15px;
  border-top: 1px solid #d0e7ff;
  font-size: 11px;
  color: #4a90e2;
  text-align: center;
}

.btn-custom {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
}

.btn-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
  color: white;
}

.btn-secondary-custom {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
}

.btn-secondary-custom:hover {
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  color: #000;
}

.route-info-box .text-white {
  color: #ffffff !important;
}

.route-info-box .text-dark {
  color: #000000 !important;
}

.destination-marker {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* TABLET RESPONSIVE STYLES (768px - 1199px) */
@media (max-width: 1199px) {
  .header-gradient {
    min-height: 75px;
  }

  .navbar-brand img {
    max-height: 40px;
  }

  .brand-text {
    font-size: 1.6rem;
  }

  .main-title {
    font-size: 3rem;
  }
}

/* TABLET RESPONSIVE STYLES (768px - 991px) */
@media (max-width: 991px) {
  .header-gradient {
    min-height: 70px;
  }

  .navbar-collapse {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 0 15px 15px !important;
    padding: 20px !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .navbar-nav {
    flex-direction: column !important;
    width: 100% !important;
    gap: 15px !important;
    align-items: flex-end !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
  }

  .nav-item {
    width: 100% !important;
    text-align: right !important;
  }

  .nav-link {
    text-align: right !important;
    padding: 12px 20px !important;
    width: 100% !important;
    border-radius: 25px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid transparent;
    display: block !important;
  }

  .nav-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
  }

  .btn-register {
    text-align: right !important;
    padding: 12px 25px;
    width: 100% !important;
    margin: 10px 0 0 0 !important;
    display: block !important;
  }

  .main-title {
    font-size: 2.8rem;
  }

  .hero-pattern {
    width: 80%;
  }

  #mainMap {
    height: 450px;
  }

  .nearby-houses-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .feature-icon {
    font-size: 2.5rem;
  }

  .hero-section {
    margin-top: 70px;
  }
}

/* MOBILE RESPONSIVE STYLES (768px and below) */
@media (max-width: 768px) {
  body {
    padding-top: 0;
  }

  .header-gradient {
    min-height: 65px;
    padding: 0 10px;
  }

  .header-gradient .container {
    padding: 0 5px;
  }

  .navbar-brand img {
    max-height: 35px;
  }

  .brand-text {
    font-size: 1.4rem;
  }

  .navbar-toggler {
    padding: 6px 10px;
  }

  .main-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .hero-section {
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    margin-top: 65px;
    padding: 40px 0;
  }

  .hero-pattern {
    width: 100%;
  }

  .description-text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .cta-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .search-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }

  #mainMap {
    height: 400px;
  }

  .nearby-houses-grid {
    grid-template-columns: 1fr;
  }

  .location-results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .location-results-header h3 {
    font-size: 1.2rem;
    min-width: auto;
  }

  .map-section {
    padding: 40px 0;
  }

  .features-section {
    padding: 40px 0;
  }

  .feature-card {
    padding: 30px 15px;
  }

  .contact-info {
    padding: 12px;
  }

  .price-badge {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .route-info-box {
    min-width: 240px;
    max-width: 280px;
  }

  .route-info-header {
    padding: 10px 12px;
    font-size: 13px;
  }

  .route-info-content {
    padding: 12px;
    gap: 8px;
  }

  .route-info-item {
    padding: 6px;
    font-size: 12px;
  }

  .route-info-item i {
    font-size: 14px;
  }

  .route-info-footer {
    padding: 8px 12px;
    font-size: 10px;
  }

  .location-control-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .location-control-btn i {
    font-size: 12px;
  }
}

/* SMALL MOBILE RESPONSIVE STYLES (576px and below) */
@media (max-width: 576px) {
  .header-gradient {
    min-height: 60px;
    padding: 0 8px;
  }

  .navbar-brand img {
    max-height: 30px;
  }

  .brand-text {
    font-size: 1.2rem;
  }

  .navbar-collapse {
    padding: 15px !important;
  }

  .nav-link {
    padding: 10px 15px !important;
    font-size: 0.9rem;
  }

  .btn-register {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .main-title {
    font-size: 2rem;
    line-height: 1.1;
  }

  .hero-section {
    min-height: 50vh;
    margin-top: 60px;
    padding: 30px 0;
  }

  .description-text {
    font-size: 0.95rem;
  }

  .cta-text {
    font-size: 1rem;
  }

  .search-btn {
    width: 100%;
    margin-bottom: 1rem;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  #mainMap {
    height: 350px;
    border-radius: 10px;
  }

  .location-results-section {
    padding: 20px 15px;
  }

  .location-results-header h3 {
    font-size: 1.1rem;
  }

  .location-badge {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .nearby-card-image {
    height: 120px;
  }

  .feature-icon {
    font-size: 2rem;
  }

  .feature-card {
    padding: 25px 15px;
  }

  .card-image {
    height: 160px;
  }

  .house-card .card-body {
    padding: 15px;
  }

  .contact-info {
    padding: 10px;
    font-size: 0.9rem;
  }

  .map-section {
    padding: 30px 0;
  }

  .features-section {
    padding: 30px 0;
  }

  .route-info-box {
    min-width: 200px;
    max-width: 240px;
  }

  .route-info-header {
    padding: 8px 10px;
    font-size: 12px;
  }

  .route-info-content {
    padding: 10px;
  }

  .route-info-item {
    padding: 5px;
    font-size: 11px;
  }

  .location-control-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* EXTRA SMALL MOBILE RESPONSIVE STYLES (400px and below) */
@media (max-width: 400px) {
  .header-gradient {
    min-height: 55px;
    padding: 0 5px;
  }

  .navbar-brand img {
    max-height: 28px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .main-title {
    font-size: 1.8rem;
  }

  .hero-section {
    min-height: 45vh;
    padding: 25px 0;
  }

  .search-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  #mainMap {
    height: 300px;
    border-radius: 8px;
  }

  .nearby-card-image {
    height: 100px;
  }

  .card-image {
    height: 140px;
  }

  .feature-icon {
    font-size: 1.8rem;
  }
}

/* LANDSCAPE ORIENTATION FIXES */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: 70vh;
  }

  .main-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }

  .description-text,
  .cta-text {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
}

/* HIGH DPI DISPLAY OPTIMIZATIONS */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navbar-brand img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}