/* Estilos específicos para la vista de propiedades */
.properties-section {
  padding: 10px 0;
  background-color: var(--background-color);
}

.property-card {
  background: var(--surface-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.property-image {
  position: relative;
  height: 250px;
  overflow: hidden;
  flex-shrink: 0;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.property-status {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.property-status.vendida {
  background: #dc3545;
}

.property-status.disponible {
  background: #28a745;
}

.property-gallery-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.property-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.property-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--heading-color);
}

.property-info {
  margin-bottom: 20px;
  flex-shrink: 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #666;
  font-size: 0.9rem;
}

.info-item i {
  color: var(--accent-color);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.property-footer {
  border-top: 1px solid #eee;
  padding-top: 15px;
  text-align: right;
  margin-top: auto;
}

.property-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
}

.btn-view-property {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-view-property:hover {
  background: color-mix(in srgb, var(--accent-color), #000 15%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.category-section {
  margin-bottom: 60px;
}

.category-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.category-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.category-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.category-subtitle {
  color: #6c757d;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.category-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  color: var(--accent-color);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.categories-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.category-section {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.category-section[style*="display: none"] {
  opacity: 0;
}

.page-header {
  background: linear-gradient(
    135deg,
    var(--accent-color) 0%,
    color-mix(in srgb, var(--accent-color), #000 20%) 100%
  );
  color: white;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="50" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="30" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>')
    repeat;
  opacity: 0.3;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: white;
  position: relative;
  z-index: 2;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

/* Filtros dinámicos */
.filters-container {
  background: white;
  padding: 20px 0;
  margin-bottom: 30px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s;
}

.filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 5px;
}

.filter-btn {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color);
  color: white;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 20px 0;
}

@media (max-width: 991.98px) {
  .page-header h1 {
    font-size: 2.5rem;
  }

  .category-title {
    font-size: 2rem;
  }

  .property-card {
    margin-bottom: 30px;
  }

  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767.98px) {
  .page-header {
    padding: 60px 0;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .category-title {
    font-size: 1.8rem;
  }

  .property-content {
    padding: 20px;
  }

  .filters-section {
    padding: 10px 0 5px 0;
    border-radius: 0;
    margin-bottom: 15px;
  }

  .filters-scroll {
    gap: 8px;
    padding: 0 2px;
  }

  .filter-btn {
    font-size: 0.95rem;
    padding: 8px 14px;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.property-card {
  animation: fadeInUp 0.6s ease forwards;
}

.property-card:nth-child(2) {
  animation-delay: 0.1s;
}

.property-card:nth-child(3) {
  animation-delay: 0.2s;
}

.property-card:nth-child(4) {
  animation-delay: 0.3s;
}

/* Estado de carga */
.filters-loading {
  opacity: 0.6;
  pointer-events: none;
}

.filters-loading .filter-btn {
  background: #f8f9fa;
  color: #adb5bd;
  border-color: #e9ecef;
}

/* Mejoras adicionales para accesibilidad */
.filter-btn:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .filter-btn {
    transition: none;
  }
}

/* Estilos para el buscador avanzado */
.advanced-search {
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  padding-left: 45px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(95, 134, 151, 0.1);
  background: white;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1.2rem;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.search-results.active {
  display: block;
  animation: fadeInDown 0.3s ease;
}

.search-result-item {
  padding: 12px 20px;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f8f9fa;
}

.search-result-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.search-result-content {
  flex: 1;
}

.search-result-title {
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 3px;
}

.search-result-category {
  font-size: 0.85rem;
  color: #6c757d;
}

.no-results-found {
  padding: 20px;
  text-align: center;
  color: #6c757d;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767.98px) {
  .advanced-search {
    padding: 15px;
  }
  
  .search-input {
    font-size: 0.95rem;
    padding: 10px 15px;
    padding-left: 40px;
  }
  
  .search-icon {
    font-size: 1.1rem;
  }
  
  .search-result-item {
    padding: 10px 15px;
  }
  
  .search-result-image {
    width: 40px;
    height: 40px;
  }
}
