* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  padding-top: 60px;
}

/* --- FIX FOR HORIZONTAL SCROLLBAR --- */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

html {
  scroll-behavior: smooth;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(34, 197, 94, 0.4);
}

nav {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 900;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Custom underline animation */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #a07e1a, #dbac27);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Button Animations */
.btn-primary,
.btn-secondary,
.btn-submit {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The Ripple Effect Circle */
.btn-primary::before,
.btn-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::before,
.btn-submit:hover::before {
  width: 400px;
  height: 400px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(160, 126, 26, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(160, 126, 26, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #a07e1a;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(255, 255, 255, 0.3);
}

/* --- BADGE ANIMATION (Pulse Effect) --- */
.badge-animated {
  animation: badge-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  backface-visibility: hidden; 
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* --- ROBUST FORM STYLES --- */
.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input {
  width: 100%;
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
  background-color: #fff;
}

.input-wrapper.error input {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.input-wrapper.success input {
  border-color: #22c55e !important;
  background-color: #f0fdf4;
}

.validation-icon {
  position: absolute;
  right: 16px;
  top: 24px;
  transform: translateY(-50%) scale(0);
  color: #ef4444;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10;
}

.input-wrapper.error .validation-icon {
  transform: translateY(-50%) scale(1);
}

.error-msg {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  font-weight: 600;
  margin-top: 4px;
  margin-left: 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin-top 0.3s ease;
}

.input-wrapper.error .error-msg {
  max-height: 24px;
  opacity: 1;
  margin-top: 6px;
}

/* Properties Section */
.property-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(160, 126, 26, 0.2);
}

.property-image {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover .property-image {
  transform: scale(1.15);
}

.property-info {
  transition: all 0.3s ease;
}

.property-card:hover .property-info {
  background: linear-gradient(135deg, rgba(160, 126, 26, 0.05) 0%, rgba(219, 172, 39, 0.05) 100%);
}

/* Animated Hamburger Icon */
.hamburger {
  width: 28px;
  height: 24px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: #1f2937;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 72px;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
}

.mobile-menu.active {
  max-height: calc(100vh - 72px);
  opacity: 1;
  visibility: visible;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Popup Modal Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 95%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 24px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.popup-modal::-webkit-scrollbar {
  width: 6px;
}
.popup-modal::-webkit-scrollbar-track {
  background: transparent;
}
.popup-modal::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 20px;
}

.popup-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.popup-close:hover {
  background: rgba(160, 126, 26, 0.1);
  transform: rotate(90deg);
}

.popup-close i {
  font-size: 20px;
  color: #374151;
}

/* Force the wrapping container to take full width */
.iti {
  width: 100%;
  display: block; 
}

/* Optional: Fix alignment if the input height looks off compared to other fields */
.iti__flag-container {
  border-radius: 0.75rem 0 0 0.75rem; /* Matches your rounded-xl (12px) */
}

/* Tailwind config */
@layer utilities {
  .bg-primary {
    background: linear-gradient(135deg, #a07e1a 0%, #dbac27 100%);
  }

  .text-primary {
    background: linear-gradient(135deg, #a07e1a 0%, #dbac27 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}
