/* Holy Rentals Jerusalem - Main Stylesheet */

:root {
  --primary-color: #3498db;
  --secondary-color: #e74c3c;
  --accent-color: #f1c40f;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --dark-bg: #2c3e50;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.search-bar {
  flex-grow: 1;
  margin: 0 20px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 30px;
  font-size: 1rem;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-bar button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background: #2980b9;
}

.user-menu {
  display: flex;
  align-items: center;
}

.user-menu button {
  background: transparent;
  border: none;
  margin-left: 15px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-color);
  transition: var(--transition);
}

.user-menu button:hover {
  color: var(--primary-color);
}

.user-menu .host-btn {
  background: var(--primary-color);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
}

.user-menu .host-btn:hover {
  background: #2980b9;
}

/* Filters Section */
.filters {
  display: flex;
  overflow-x: auto;
  padding: 15px 0;
  gap: 15px;
  background-color: white;
  border-bottom: 1px solid #eee;
}

.filter-btn {
  background: transparent;
  border: 1px solid #ddd;
  padding: 8px 15px;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--light-bg);
  border-color: var(--primary-color);
}

.filter-btn.active {
  color: var(--primary-color);
  font-weight: 500;
}

/* Property Listings */
.listings {
  padding: 30px 0;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.property-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.property-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

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

.property-image .favorite {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.property-image .favorite:hover {
  background: white;
  color: var(--secondary-color);
}

.property-details {
  padding: 15px;
}

.property-type {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.property-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.property-location {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.property-features {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

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

.property-price span {
  font-weight: 400;
  font-size: 0.9rem;
  color: #777;
}

/* Map Section */
.map-section {
  margin-top: 30px;
  height: 500px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container {
  width: 100%;
  height: 100%;
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: white;
  padding: 40px 0;
  margin-top: 50px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-column h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

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

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #ddd;
  transition: var(--transition);
}

.footer-column ul li a:hover {
  color: white;
}

.copyright {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #aaa;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .logo {
    margin-bottom: 15px;
  }
  
  .search-bar {
    margin: 15px 0;
  }
  
  .user-menu {
    justify-content: flex-end;
    margin-top: 15px;
  }
  
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 480px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
  
  .filters {
    padding: 10px 0;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

/* Property Detail Page */
.property-detail {
  padding: 30px 0;
}

.property-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 300px 300px;
  gap: 10px;
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.gallery-main {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.property-header-left h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.property-header-right {
  text-align: right;
}

.property-header-right .price {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary-color);
}

.property-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.property-description {
  line-height: 1.8;
}

.property-description h2 {
  margin-bottom: 15px;
}

.property-description p {
  margin-bottom: 20px;
}

.property-amenities {
  margin-top: 30px;
}

.property-amenities h2 {
  margin-bottom: 15px;
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.amenity-item {
  display: flex;
  align-items: center;
}

.amenity-item i {
  margin-right: 10px;
  color: var(--primary-color);
}

.booking-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}

.booking-price {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.booking-price span {
  font-size: 1rem;
  font-weight: 400;
  color: #777;
}

.booking-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.booking-form input, .booking-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.booking-form button {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.booking-form button:hover {
  background: #2980b9;
}

.booking-total {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.booking-total .total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.booking-total .total {
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 1.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-footer button {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-footer .btn-primary {
  background: var(--primary-color);
  color: white;
}

.modal-footer .btn-secondary {
  background: #eee;
  color: var(--text-color);
}

.modal-footer button:hover {
  opacity: 0.9;
}