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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9fafb;
}

/* ---------------------- Header ---------------------- */
header {
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #2563eb;
}

nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #2563eb;
}

/* ---------------------- Hero Section ---------------------- */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
  text-align: center;
  padding: 5rem 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* ---------------------- Apartments Section ---------------------- */
.apartments-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #1f2937;
}

.apartments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.apartment-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s;
}

.apartment-card:hover {
  transform: translateY(-5px);
}

/* ---------------------- Image Slider ---------------------- */
.slider-container {
  position: relative;
  height: 250px;
  background: #e5e7eb;
  overflow: hidden;
}

.slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  transition: opacity 0.3s ease-in-out;
}

.slider-image.active {
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 0.8rem;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.7);
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

.slider-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
}

.indicator.active {
  background: white;
}

/* ---------------------- Card Content ---------------------- */
.card-content {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.apartment-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #1f2937;
}

.apartment-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #2563eb;
}

.apartment-description {
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
}

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

.feature-tag {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.book-btn {
  width: 100%;
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.book-btn:hover {
  background: #1d4ed8;
}

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

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Total amount */
#totalAmount {
  font-weight: bold;
  font-size: 1.1rem;
  color: #1f2937;
  margin-bottom: 1rem;
}

/* Modal buttons */
.modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn {
  flex: 1;
  padding: 0.7rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-cancel {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-cancel:hover {
  background: #f9fafb;
}

.btn-submit {
  background: #2563eb;
  color: white;
}

.btn-submit:hover {
  background: #1d4ed8;
}

/* Payment section */
#paymentSection h4 {
  margin-bottom: 0.5rem;
  color: #1f2937;
}

#paymentSection p {
  margin: 0.3rem 0;
  font-weight: 500;
}

/* ---------------------- Contact Section ---------------------- */
.contact-section {
  background: #1f2937;
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ---------------------- Footer ---------------------- */
footer {
  background: #111827;
  color: #9ca3af;
  text-align: center;
  padding: 1.5rem;
}

/* ---------------------- Responsive ---------------------- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

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

  nav {
    display: none;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .slider-container {
    height: 200px;
  }
}