body {
  font-family: "Segoe UI", sans-serif;
  background: #f7f8fa;
  margin: 0;
  color: #333;
  font-size: 16px;
}

header {
  background: linear-gradient(90deg, #00aaff, #0077cc);
  color: white;
  text-align: center;
  padding: 30px 10px;
  border-bottom: 4px solid #005fa3;
}

header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  letter-spacing: 1px;
}

header p {
  margin-top: 8px;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
}

.search {
  background: white;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search input, .search select {
  padding: 10px;
  margin: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: clamp(150px, 20vw, 180px);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.search button {
  padding: 10px 15px;
  background: #0077cc;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.search button:hover {
  background: #005fa3;
}

.list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 30px;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.media-container {
  position: relative;
}

.image-gallery {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.image-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-gallery img.active {
  opacity: 1;
}

.prev-btn, .next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 50%;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.prev-btn:hover, .next-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.room-summary {
  padding: 15px;
  text-align: center;
}

.room-summary h3 {
  margin: 0 0 10px 0;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: #0077cc;
}

.room-summary .price {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #e74c3c;
  margin: 5px 0;
}

.room-summary .click-hint {
  font-size: clamp(0.8rem, 2vw, 0.85rem);
  color: #666;
  margin: 5px 0 0 0;
  font-style: italic;
}

.room-details {
  padding: 20px;
  border-top: 1px solid #eee;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.details-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.detail-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.detail-image:hover {
  transform: scale(1.05);
}

.details-info {
  margin-bottom: 20px;
}

.details-info p {
  margin: 8px 0;
  font-size: clamp(0.9rem, 2.5vw, 0.95rem);
  line-height: 1.5;
}

.contact-section {
  background: linear-gradient(135deg, #0077cc 0%, #005fa3 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,119,204,0.3);
}

.contact-section h4 {
  margin: 0 0 10px 0;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: bold;
}

.phone-number {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: bold;
  margin: 10px 0;
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.contact-note {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin: 10px 0 0 0;
  opacity: 0.9;
}

.card.expanded {
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.card {
  cursor: pointer;
}

.noresult {
  text-align: center;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #666;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: white;
  border-radius: 15px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideIn 0.3s ease-out;
  padding: 20px;
  box-sizing: border-box;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: #ff4757;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255,71,87,0.3);
}

.modal-close:hover {
  background: #ff3742;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255,71,87,0.4);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

footer {
  text-align: center;
  background: #0077cc;
  color: white;
  padding: 15px;
  margin-top: 30px;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  header {
    padding: 20px 10px;
  }

  .search {
    padding: 10px;
  }

  .search input, .search select {
    width: 100%;
    margin: 5px 0;
  }

  .search button {
    width: 100%;
    margin-top: 10px;
  }

  .list {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }

  .card {
    border-radius: 8px;
  }

  .room-summary {
    padding: 10px;
  }

  .room-details {
    padding: 15px;
  }

  .details-images {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
  }

  .detail-image {
    height: 100px;
  }

  .contact-section {
    padding: 15px;
  }

  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    padding: 15px;
  }

  .modal-close {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12px;
  }

  header {
    padding: 15px 5px;
  }

  .search {
    padding: 8px;
  }

  .list {
    padding: 10px;
  }

  .room-summary {
    padding: 8px;
  }

  .room-details {
    padding: 10px;
  }

  .details-images {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 5px;
  }

  .detail-image {
    height: 80px;
  }

  .contact-section {
    padding: 10px;
  }

  .modal-content {
    max-width: 98vw;
    max-height: 98vh;
    padding: 10px;
  }

  .modal-close {
    width: 30px;
    height: 30px;
    font-size: 18px;
    top: 10px;
    right: 10px;
  }
}
