/* Real Estate Modern UI - Custom CSS */

:root {
  /* Color scheme */
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --text-color: #333;
  --text-light: #7f8c8d;
  --white: #ffffff;
  --black: #000000;
  --shadow-color: rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 5px var(--shadow-color);
  --shadow-md: 0 4px 10px var(--shadow-color);
  --shadow-lg: 0 10px 25px var(--shadow-color);
  --shadow-inset: inset 0 2px 5px var(--shadow-color);
}

/* Global Styles */
body {
  font-family: var(--font-primary);
  color: var(--text-color);
  line-height: 1.6;
  background-color: #f9f9f9;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--primary-color);
}

/* Utility Classes */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Language switcher */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.language-btn {
  background-color: var(--white);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 50px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.language-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Property Card */
.property-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  margin-bottom: var(--spacing-lg);
  height: 100%;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.property-card__image-container {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.property-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.property-card:hover .property-card__image {
  transform: scale(1.05);
}

.property-card__badge {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  z-index: 10;
}

.property-card__favorite {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background-color: var(--white);
  color: var(--text-light);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  z-index: 10;
}

.property-card__favorite:hover {
  transform: scale(1.1);
}

.property-card__favorite.active {
  color: var(--accent-color);
}

.property-card__content {
  padding: var(--spacing-md);
}

.property-card__title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.property-card__location {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.property-card__location i {
  margin-right: 5px;
  color: var(--secondary-color);
}

.property-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: var(--spacing-sm);
}

.property-card__features {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
}

.property-card__feature {
  display: flex;
  align-items: center;
}

.property-card__feature i {
  margin-right: 5px;
  color: var(--primary-color);
}

.property-card__description {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.property-card__cta {
  display: flex;
  justify-content: space-between;
}

.property-card__btn {
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.property-card__btn--primary {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
}

.property-card__btn--primary:hover {
  background-color: var(--primary-color);
}

.property-card__btn--outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.property-card__btn--outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Carousel Controls */
.carousel-control-custom {
  width: 40px;
  height: 40px;
  background-color: var(--white);
  border-radius: 50%;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-control-custom:hover {
  opacity: 1;
}

.carousel-control-custom i {
  color: var(--primary-color);
}

.carousel-indicators-custom {
  bottom: -10px;
}

.carousel-indicators-custom li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 4px;
  background-color: var(--primary-color);
  opacity: 0.5;
}

.carousel-indicators-custom li.active {
  opacity: 1;
}

/* Property Detail Page */
.property-detail {
  animation: fadeIn var(--transition-normal);
}

.property-detail__gallery {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
}

.property-detail__gallery-image {
  height: 500px;
  object-fit: cover;
}

.property-detail__header {
  margin-bottom: var(--spacing-lg);
}

.property-detail__title {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.property-detail__location {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
}

.property-detail__location i {
  margin-right: 8px;
  color: var(--secondary-color);
}

.property-detail__price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: var(--spacing-md);
}

.property-detail__type {
  display: inline-block;
  padding: 5px 12px;
  background-color: var(--light-color);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
}

.property-detail__features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.property-detail__feature {
  display: flex;
  align-items: center;
}

.property-detail__feature i {
  width: 40px;
  height: 40px;
  background-color: var(--light-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: var(--primary-color);
}

.property-detail__section {
  margin-bottom: var(--spacing-lg);
}

.property-detail__section-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-bottom: 10px;
}

.property-detail__section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

.property-detail__description {
  color: var(--text-color);
  line-height: 1.8;
}

.property-detail__cta {
  position: sticky;
  bottom: 0;
  background-color: var(--white);
  padding: var(--spacing-md);
  box-shadow: 0 -5px 15px var(--shadow-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

/* Social Sharing */
.social-share {
  display: flex;
}

.social-share__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: var(--white);
  transition: all var(--transition-fast);
}

.social-share__btn:hover {
  transform: translateY(-3px);
}

.social-share__btn--facebook {
  background-color: #3b5998;
}

.social-share__btn--twitter {
  background-color: #1da1f2;
}

.social-share__btn--whatsapp {
  background-color: #25d366;
}

/* Filters */
.filters {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.filters__form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.filters__group {
  margin-bottom: var(--spacing-sm);
}

.filters__label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.9rem;
}

.filters__input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
}

.filters__select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232c3e50' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filters__btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.filters__btn:hover {
  background-color: var(--secondary-color);
}

/* Search Bar */
.search-bar {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

.search-bar__input {
  width: 100%;
  padding: 12px 20px;
  padding-left: 45px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-family: var(--font-primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.search-bar__input:focus {
  outline: none;
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.search-bar__icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* Book Appointment Modal */
.modal-book {
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-book .modal-content {
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-book .modal-header {
  border-bottom: none;
  padding: var(--spacing-md) var(--spacing-lg);
}

.modal-book .modal-title {
  font-weight: 600;
  color: var(--primary-color);
}

.modal-book .modal-body {
  padding: var(--spacing-md) var(--spacing-lg);
}

.modal-book .modal-footer {
  border-top: none;
  padding: var(--spacing-md) var(--spacing-lg);
}

.modal-book .form-group {
  margin-bottom: var(--spacing-md);
}

.modal-book .form-label {
  font-weight: 500;
  margin-bottom: 5px;
}

.modal-book .form-control {
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  border: 1px solid #ddd;
}

.modal-book .form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: none;
}

.modal-book .btn-book {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.modal-book .btn-book:hover {
  background-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
  .property-detail__gallery-image {
    height: 400px;
  }
  
  .property-detail__features {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .property-detail__gallery-image {
    height: 350px;
  }
  
  .property-detail__features {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .filters__form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .property-detail__gallery-image {
    height: 250px;
  }
  
  .property-detail__features {
    grid-template-columns: 1fr;
  }
  
  .property-detail__cta {
    flex-direction: column;
  }
  
  .property-detail__cta .btn {
    width: 100%;
    margin-bottom: var(--spacing-sm);
  }
  
  .social-share {
    justify-content: center;
    margin-top: var(--spacing-sm);
  }
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.skeleton-image {
  height: 220px;
  width: 100%;
}

.skeleton-content {
  padding: var(--spacing-md);
}

.skeleton-title {
  height: 24px;
  width: 80%;
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}

.skeleton-text:last-child {
  width: 60%;
}

/* Dark Theme (optional toggle functionality) */
.dark-theme {
  --primary-color: #375a7f;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #444;
  --dark-color: #222;
  --text-color: #ecf0f1;
  --text-light: #bdc3c7;
  --white: #2c3e50;
  --black: #ecf0f1;
  --shadow-color: rgba(0, 0, 0, 0.3);
  
  background-color: #222;
}

.dark-theme .card,
.dark-theme .modal-content,
.dark-theme .filters,
.dark-theme .search-bar__input {
  background-color: #333;
  color: var(--text-color);
}

.dark-theme .card-header,
.dark-theme .card-footer {
  background-color: #2c3e50;
}

.dark-theme .form-control {
  background-color: #444;
  border-color: #555;
  color: var(--text-color);
}

.dark-theme .breadcrumb {
  background-color: #333;
}

.dark-theme .breadcrumb-item a {
  color: var(--secondary-color);
}

.dark-theme .breadcrumb-item.active {
  color: var(--text-light);
}
