* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #ff6b35;
  --primary-dark: #e55a2a;
  --primary-light: #ffb366;
  --secondary-color: #0066cc;
  --accent-color: #ffd700;
  --text-primary: #1a1a1a;
  --text-dark: #111111;
  --text-secondary: #555555;
  --text-light: #999999;
  --bg-light: #f5f7fa;
  --bg-lighter: #fafbfc;
  --bg-white: #ffffff;
  --border-color: #e8ebf0;
  --border-light: #f0f3f8;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, "Noto Sans", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}


::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
  border: 2px solid var(--bg-light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}


.navbar {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-light);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.logo {
  height: 52px;
  width: auto;
  transition: var(--transition-fast);
}

.logo:hover {
  transform: scale(1.03);
}

.nav-links {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-left: auto;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  position: relative;
  padding: 8px 0;
  letter-spacing: 0.3px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 100%;
}


.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 1rem;
}

.hamburger {
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-content.nav-open .hamburger { background: transparent; }
.nav-content.nav-open .hamburger::before { transform: rotate(45deg) translate(5px, 5px); }
.nav-content.nav-open .hamburger::after { transform: rotate(-45deg) translate(5px, -5px); }

.profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  margin-left: 1rem;
}

.profile-icon:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav-links { 
    display: none; 
    position: absolute; 
    right: 0; 
    top: calc(100% - 1px); 
    background: var(--bg-white); 
    width: 100%; 
    flex-direction: column; 
    padding: 1.5rem 24px; 
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-light);
  }
  .nav-link { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
  .nav-link:last-child { border-bottom: none; }
  .nav-content { position: relative; }
  .nav-content.nav-open .nav-links { display: flex; }
  .profile-icon { margin-left: 0; }
}


.hero {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

#background-video {
  height: 100%;
  width: 100%;
  object-fit: cover;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  filter: brightness(1.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  opacity: 0.95;
}

.hero-content .btn {
  margin: 0 8px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.btn, button {
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-large { display: inline-block; width: 100%; padding: 0.9rem 1rem; border-radius: var(--radius-md); font-weight: 700; }
.btn-large + .btn-large { margin-top: 0.5rem; }

.btn-secondary:hover {
  background: var(--bg-white);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}


.search-form {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.search-form input,
.search-form select,
.search-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-fast);
  background: var(--bg-lighter);
}

.search-form input:focus,
.search-form select:focus,
.search-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


.property-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.property-image {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.property-card:hover .property-image img {
  transform: scale(1.08);
}

/* Mobile filter overlay */
.filters-overlay {
  display: block; /* present in DOM so transition works */
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 990;
  transition: opacity 0.2s ease-in-out;
  touch-action: none;
  overscroll-behavior: contain;
}
.filters-overlay.show { opacity: 1; pointer-events: all; }

.property-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary-color);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

.property-badge.verified {
  background: var(--success-color);
}

.property-badge.new {
  background: var(--accent-color);
  color: var(--text-primary);
}

.property-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.property-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.property-location {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.property-meta {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.property-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.property-meta-item strong {
  color: var(--text-primary);
}

.property-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-rating .stars {
  color: var(--accent-color);
  font-size: 0.9rem;
}

.property-rating .count {
  color: var(--text-light);
  font-size: 0.75rem;
}

.property-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.property-price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.property-price-unit {
  color: var(--text-light);
  font-size: 0.9rem;
}

.property-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
}

.property-footer .btn {
  flex: 1;
  padding: 10px;
}


.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

@media (max-width: 768px) {
  .properties-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
}


.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-about,
.section-properties,
.section-cities,
.section-contact {
  padding: 4rem 0;
}

.section-about {
  background: var(--bg-lighter);
}


.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.city-card {
  position: relative;
  height: 250px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.city-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}

.city-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.city-card:hover img {
  transform: scale(1.1);
  filter: brightness(0.8);
}

.city-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 2rem 1.5rem;
  z-index: 2;
}

.city-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.city-count {
  font-size: 0.9rem;
  opacity: 0.9;
}


.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-fast);
  background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.form-error {
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-top: 4px;
}


.alert-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 2px solid var(--success-color);
  color: var(--success-color);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fdf2f2 100%);
  border: 2px solid var(--danger-color);
  color: var(--danger-color);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef9e7 100%);
  border: 2px solid var(--warning-color);
  color: var(--warning-color);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  font-weight: 500;
}


.profile-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.profile-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-light);
}

.profile-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 1.5rem 0;
}

.wishlist-list,
.bookings-list {
  list-style: none;
}

.wishlist-list li,
.bookings-list > div {
  padding: 1.5rem;
  background: var(--bg-lighter);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.wishlist-list li:hover {
  background: var(--bg-light);
  box-shadow: var(--shadow-sm);
}


.booking-card {
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-lighter) 100%);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 1.5rem 0;
}

.booking-card.confirmed {
  border-left: 6px solid var(--success-color);
}

.booking-card.cancelled {
  border-left: 6px solid var(--danger-color);
}

.booking-status-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.booking-status-badge.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.booking-status-badge.cancelled {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}


.review-item {
  background: var(--bg-lighter);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-color);
  margin-bottom: 1.5rem;
  transition: var(--transition-fast);
}

.review-item:hover {
  box-shadow: var(--shadow-sm);
}

.review-author {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.review-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

.review-rating {
  color: var(--accent-color);
  font-size: 1rem;
  margin: 0.5rem 0;
}

.review-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.75rem;
}


.footer {
  background: linear-gradient(135deg, var(--text-primary) 0%, #2a2a2a 100%);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}


.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex-gap-1 { display: flex; gap: 0.5rem; }
.flex-gap-2 { display: flex; gap: 1rem; }

.opacity-75 { opacity: 0.75; }
.opacity-50 { opacity: 0.5; }


.properties-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
  min-width: 0;
}

.filters-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  height: fit-content;
  position: sticky;
  top: 90px;
  z-index: 995;
  min-width: 0;
}

.filters-sidebar h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
}

.filter-group {
  margin-bottom: 1.75rem;
}

.filter-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.filter-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-lighter);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
  cursor: pointer;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-group input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 0.75rem;
}

.filter-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.filter-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: none;
}

#priceDisplay {
  display: block;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.75rem;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.filter-group .btn-primary {
  width: 100%;
  margin-top: 1rem;
}

.properties-main {
  flex: 1;
  min-width: 0;
}

.properties-header {
  margin-bottom: 2rem;
}

.properties-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.properties-header p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  min-width: 0;
}

.property-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  height: 100%;
  min-width: 0;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.property-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-light), var(--bg-lighter));
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

/* Prevent global overflow issues caused by large images */
img { max-width: 100%; height: auto; }

.property-card:hover .property-image img {
  transform: scale(1.08);
}

.property-type {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.property-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}

.property-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.location {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location::before {
  content: "📍";
  font-size: 1rem;
}

.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.amenity-tag {
  display: inline-block;
  background: var(--bg-lighter);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  border: 1px solid var(--border-light);
}

.property-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.property-footer .price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
}

.property-footer .price::after {
  content: "/mo";
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 0.25rem;
}

.property-footer .rating {
  font-size: 1rem;
  color: var(--accent-color);
  font-weight: 600;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}


.list-property-container {
  max-width: 700px;
  margin: 3rem auto;
  padding: 0;
}

.list-property-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.list-property-card h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 1rem;
}

.form-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  border-left: 4px solid var(--danger-color);
  color: #991b1b;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-lighter);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
  font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-group input[type="file"] {
  padding: 0.75rem;
  border: 2px dashed var(--primary-color);
  border-radius: var(--radius-md);
  background: var(--bg-lighter);
  cursor: pointer;
  transition: var(--transition-fast);
}

.form-group input[type="file"]:hover {
  background: var(--bg-light);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}

.form-actions .btn-primary {
  flex: 0 0 auto;
  padding: 0.875rem 2rem;
}
/* ========= AUTH FORM (LOGIN / REGISTER) ========= */
.auth-card {
  max-width: 520px;
  margin: 2rem auto;
  background: var(--bg-white);
  padding: 2rem 2.25rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}
.auth-card .auth-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.auth-card .auth-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}
.auth-card .auth-header p {
  color: var(--text-secondary);
  margin: 0;
}
.input-container { margin-bottom: 1rem; }
.input-field {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  background: var(--bg-lighter);
}
.input-field:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.06); }
.input-label { display:block; margin-bottom: 6px; font-weight: 600; color: var(--text-primary); }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.remember { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); }
.password-toggle { cursor: pointer; color: var(--primary-color); font-weight: 700; font-size: 0.9rem; }
.helper-text { font-size: 0.85rem; color: var(--text-light); margin-top: 0.45rem; }
.auth-links { text-align: center; margin-top: 1rem; color: var(--text-secondary); font-size: 0.95rem; }
.auth-links a { color: var(--primary-color); text-decoration: none; font-weight:600; }
.input-error { color: var(--danger-color); font-size: 0.85rem; margin-top: 0.5rem; }
.btn-full { width: 100%; padding: 12px 16px; }

@media (max-width: 480px) {
  .auth-card { padding: 1.25rem; margin: 1rem; }
}

.form-actions a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.form-actions a:hover {
  color: var(--primary-color);
}


@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .section-about, .section-properties, .section-cities, .section-contact { padding: 3rem 0; }
  .section-header h2 { font-size: 2rem; }
  
  .properties-container {
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
  }
  
  .filters-sidebar {
    padding: 1.5rem;
    box-sizing: border-box; /* ensure padding doesn't add width */
  }
  /* On small screens, when open, fix the sidebar as an overlay */
  .filters-sidebar.open {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: 90px;
    z-index: 999;
    max-height: calc(100vh - 120px);
    overflow: auto;
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    max-width: calc(100% - 2rem);
  }
  
  .list-property-card {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .hero { height: 450px; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-content p { font-size: 1.1rem; }
  
  .properties-grid {
    grid-template-columns: 1fr;
  }
  
  .cities-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .search-form {
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .profile-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero { height: 350px; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content p { font-size: 1rem; }
  
  .section-header h2 { font-size: 1.6rem; }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .properties-grid { gap: 1rem; }
}

/* ============= RESPONSIVE: Small screens improved behavior ============= */
@media (max-width: 768px) {
  /* Stack filters on top of properties */
  .properties-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0;
  }
  .filters-sidebar {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    top: 0;
    box-shadow: none;
    border-left: none;
    border-right: none;
    border-radius: var(--radius-md);
    transition: max-height 0.25s ease-in-out, opacity 0.25s ease-in-out;
    overflow: hidden;
    overflow-x: hidden; /* prevent horizontal scroll */
    max-height: 0;
    opacity: 0;
    transform: translateY(-12px);
    transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out, max-height 0.25s ease-in-out;
  }
  /* When open (toggled via JS), show filters */
  .filters-sidebar.open {
    position: fixed;
    left: 1rem;
    right: 1rem;
    max-height: 1200px; /* large enough */
    opacity: 1;
    overflow: auto;
    overflow-x: hidden;
    z-index: 999;
    box-sizing: border-box;
    max-width: calc(100% - 2rem);
    transform: translateY(0);
  }

/* Prevent body scroll when overlay is shown */
body.no-scroll { overflow: hidden; }
  .filters-toggle-btn {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
  }
  .properties-header { margin: 1rem 0; }
  .property-image { height: 200px; }
  .properties-grid { gap: 1rem; }
  .property-card { padding: 0; }
  .property-info { padding: 1rem; }
}

/* Make sure content inside the filters sidebar doesn't exceed the container */
.filters-sidebar * { max-width: 100%; box-sizing: border-box; }
.filters-sidebar select, .filters-sidebar input, .filters-sidebar textarea, .filters-sidebar form button { width: 100%; max-width: 100%; }
.filters-sidebar label { word-break: break-word; }
/* Keep header buttons compact */
.filters-sidebar .btn-outline { width: auto; }

@media (max-width: 480px) {
  .property-image { height: 160px; }
  .list-property-card {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; gap: 0.5rem; }
  .form-actions .btn-primary { width: 100%; }
  .btn-large { width: 100%; }
}

/* ============= Property Detail styles ============= */
.property-detail {
  display: grid;
  gap: 2rem;
  padding: 2rem 0;
}
.property-hero {
  display: block;
}
.image-gallery {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}
.image-gallery .main-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.thumbnail-images {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}
.thumbnail-images .thumbnail {
  width: 84px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
}
.thumbnail-images .thumbnail:hover { border-color: rgba(0,0,0,0.1); }

.image-preview img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border-light); display: inline-block; }

.property-content {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
}
.property-left { min-width: 0; }
.property-right { align-self: start; }
.property-header h1 { font-size: 1.7rem; margin-bottom: 0.25rem; }
.location { margin-bottom: 0.75rem; color: var(--text-secondary); }
.details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.amenities-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.amenity-badge { background: var(--bg-lighter); color: var(--text-secondary); padding: 0.4rem 0.8rem; border-radius: var(--radius-full); border: 1px solid var(--border-light); }

.booking-card { position: sticky; top: 90px; }

@media (max-width: 1024px) {
  .image-gallery .main-image { height: 360px; }
  .property-content { grid-template-columns: 1fr 320px; }
}

@media (max-width: 768px) {
  .image-gallery .main-image { height: 320px; }
  .property-content { grid-template-columns: 1fr; }
  .property-right { order: 2; position: relative; top: 0; }
  .booking-card { position: relative; top: 0; margin-top: 1rem; }
  .thumbnail-images { gap: 0.4rem; }
  .thumbnail-images .thumbnail { width: 64px; height: 48px; }
}

@media (max-width: 480px) {
  .image-gallery .main-image { height: 240px; }
  .thumbnail-images .thumbnail { width: 56px; height: 40px; }
  .property-header h1 { font-size: 1.4rem; }
  .details-grid { grid-template-columns: 1fr; }
}

