/* Property Details Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.property-details {
  background-color: white;
  border-radius: 12px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 24px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  animation: modal-fade-in 0.3s ease-out;
  margin: auto;
  z-index: 9;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: #fff;
  color: #e74c3c;
  transform: scale(1.1);
}

.details-header {
  margin-bottom: 20px;
  padding-right: 40px;
}

.details-header h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 8px;
}

.reference {
  color: #7f8c8d;
  font-size: 0.9rem;
  display: inline-block;
  padding: 4px 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.details-gallery {
  margin-bottom: 24px;
  position: relative;
}

.main-image {
  width: 100%;
  height: 450px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 5;
}

.carousel-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.carousel-button:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.1);
}

.carousel-button:focus {
  outline: none;
}

.carousel-counter {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 5;
}

.image-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f5f5f5;
}

.image-thumbnails::-webkit-scrollbar {
  height: 8px;
}

.image-thumbnails::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

.image-thumbnails::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}

.thumbnail {
  flex: 0 0 140px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s ease;
}

.thumbnail.active {
  border-color: #3498db;
}

.thumbnail:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #f0f0f0;
}

.details-price-location {
  margin-bottom: 24px;
}

.details-price {
  font-size: 2.2rem;
  font-weight: bold;
  color: #3498db;
  margin-bottom: 8px;
  line-height: 1.2;
}

.details-price span {
  font-size: 1.2rem;
  font-weight: normal;
  color: #555;
  margin-left: 5px;
}

.details-location {
  font-size: 1.2rem;
  color: #7f8c8d;
}

.details-status {
  display: inline-block;
  margin-right: 15px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  background-color: #3498db;
}

.details-status.for-sale {
  background-color: #2ecc71;
}

.details-status.for-rent-short {
  background-color: #e74c3c;
}

.details-status.for-rent-long {
  background-color: #f39c12;
}

.details-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.feature-card {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 16px 20px;
  flex: 1 0 120px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feature-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 5px;
}

.feature-label {
  font-size: 0.9rem;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.details-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.amenity {
  background-color: #f8f9fa;
  color: #555;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #eee;
}

.amenity.has-feature {
  background-color: #e3f2fd;
  color: #1976d2;
  border-color: #bbdefb;
}

.amenity-divider {
  width: 100%;
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 5px;
  color: #555;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  font-size: 1.1rem;
}

.amenity-category {
  width: 100%;
  font-size: 0.95rem;
  margin-top: 12px;
  margin-bottom: 8px;
  color: #666;
  font-weight: 600;
}

.details-description {
  margin-bottom: 24px;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.details-description h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.details-description p {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
}

.details-map {
  margin-bottom: 24px;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  background-color: #f5f5f5;
  position: relative;
}

.details-section {
  margin-bottom: 24px;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.details-section h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.details-footer {
  color: #7f8c8d;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
}

.details-contact {
  margin-top: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
}

.details-contact h3 {
  font-size: 1.3rem;
  color: var(--property-primary-color, #2c3e50);
  margin-bottom: 15px;
}

.contact-button {
  display: inline-block;
  background-color: var(--property-button-color, #3498db);
  color: var(--property-button-text-color, white);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s;
}

.contact-button:hover {
  background-color: var(--property-button-hover-color, #2980b9);
}

.download-pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #e74c3c;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.download-pdf-button:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.download-pdf-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.download-pdf-button::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
  vertical-align: middle;
}

/* Contact Form Overlay */
.contact-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.contact-form-container {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: form-fade-in 0.3s ease-out;
}

@keyframes form-fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-form-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #777;
  transition: color 0.2s ease;
}

.close-form-button:hover {
  color: #333;
}

.contact-form-title {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--property-primary-color, #3498db);
  font-size: 1.4rem;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.contact-property-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #555;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--property-primary-color, #3498db);
  outline: none;
}

.form-group input[readonly] {
  background-color: #f8f9fa;
  font-weight: bold;
  color: #555;
}

.form-actions {
  text-align: center;
  margin-top: 24px;
}

.contact-submit-button {
  background-color: var(--property-button-color, #3498db);
  color: var(--property-button-text-color, white);
  border: none;
  padding: 10px 25px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-submit-button:hover {
  background-color: var(--property-button-hover-color, #2980b9);
}

.contact-submit-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.contact-form-success {
  padding: 15px;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  color: #155724;
  margin-bottom: 20px;
  text-align: center;
}

.contact-form-error {
  padding: 15px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
  margin-bottom: 20px;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-image {
    height: 300px;
  }
  
  .details-header h2 {
    font-size: 1.5rem;
  }
  
  .details-price {
    font-size: 1.7rem;
  }

  .feature-card {
    flex: 1 0 calc(50% - 10px);
  }
  
  .carousel-button {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .contact-form-container {
    width: 95%;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .property-details {
    padding: 15px;
    width: 95%;
  }
  
  .main-image {
    height: 220px;
  }
  
  .details-header h2 {
    font-size: 1.3rem;
  }
  
  .carousel-button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .carousel-counter {
    font-size: 10px;
    padding: 4px 8px;
  }
  
  .contact-form-container {
    padding: 15px;
  }
}
