/* ================================
   MODERNE WOHNUNGEN SEITE STYLES
   ================================ */

/* Horizontal Filters Bar */
.filters-bar-horizontal {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filters-bar-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-dropdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 180px;
}

.filter-dropdown-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-dropdown-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.filter-input-compact,
.filter-select-compact {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s;
  background: white;
}

.filter-input-compact {
  flex: 1;
  min-width: 0;
}

.filter-select-compact {
  width: 100%;
  cursor: pointer;
}

.filter-input-compact:focus,
.filter-select-compact:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(185, 157, 95, 0.1);
}

.filter-separator {
  color: var(--muted);
  font-weight: 600;
}

.reset-filters-btn-compact {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.reset-filters-btn-compact:hover {
  background: var(--brand);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(185, 157, 95, 0.2);
}

.reset-filters-btn-compact svg {
  flex-shrink: 0;
}

.listings-hero {
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  padding: 4rem 2rem 3rem;
  margin-bottom: 3rem;
  overflow: hidden;
}

.listings-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(185, 157, 95, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.listings-hero-content {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.listings-hero h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: center;
}

.listings-hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 2rem;
}

.listings-hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.listings-quick-search {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.quick-search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-search-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-search-select,
.quick-search-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  background: white;
}

.quick-search-select:focus,
.quick-search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(185, 157, 95, 0.1);
}

.quick-search-btn {
  background: var(--brand);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  align-self: flex-end;
}

.quick-search-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(185, 157, 95, 0.3);
}

.listings-main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.listings-count {
  font-size: 1.1rem;
  color: var(--foreground);
}

.listings-count-number {
  font-weight: 700;
  color: var(--brand);
}

.listings-view-toggle {
  display: flex;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem;
}

.view-toggle-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s;
  color: var(--muted);
}

.view-toggle-btn.active {
  background: var(--brand);
  color: white;
}


.listings-grid-container {
  min-height: 400px;
}

.listings-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.listing-card-modern {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.listing-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--brand);
}

.listing-image-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f0f0f0;
}

.listing-image-modern {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.listing-card-modern:hover .listing-image-modern {
  transform: scale(1.1);
}

.listing-badge-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.listing-badge-modern {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.badge-available {
  background: rgba(40, 167, 69, 0.95);
  color: white;
}

.badge-rented {
  background: rgba(220, 53, 69, 0.95);
  color: white;
}

.listing-favorite-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 2;
}

.listing-favorite-btn:hover {
  background: var(--brand);
  transform: scale(1.1);
}

.listing-favorite-btn svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
  transition: color 0.3s;
}

.listing-favorite-btn:hover svg {
  color: white;
}

.listing-content-modern {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.listing-title-modern {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-address-modern {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.listing-address-modern svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.listing-features-modern {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.listing-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.listing-feature svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.listing-price-modern {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand);
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.listing-price-modern .price-period {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.listings-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: var(--muted);
  font-size: 1rem;
}

.loading-spinner {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .listings-grid-modern {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .filters-bar-content {
    flex-direction: column;
    gap: 1rem;
  }

  .filter-dropdown {
    width: 100%;
    min-width: 0;
  }

  .reset-filters-btn-compact {
    width: 100%;
    justify-content: center;
  }

  .listings-hero {
    padding: 3rem 1.5rem 2rem;
  }

  .listings-hero h1 {
    font-size: 1.75rem;
  }

  .listings-hero-stats {
    gap: 2rem;
  }

  .hero-stat-number {
    font-size: 1.5rem;
  }

  .listings-quick-search {
    flex-direction: column;
    padding: 1.25rem;
  }

  .quick-search-btn {
    width: 100%;
    align-self: stretch;
  }

  .listings-main-container {
    padding: 0 1.5rem 3rem;
  }

  .listings-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .listings-grid-modern {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .listing-image-container {
    height: 200px;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

