/*
Name: Aashis rawal
Student ID: 11211
University ID: 24071214
*/

*{
  box-sizing: border-box;
}

/* Page base */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f2f4f7;
  padding: 120px 20px 30px;
}

/* Page title */
h1 {
  text-align: center;
  margin: 0 0 20px;
}

/* Filter row */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
}

/* Filter inputs */
.filters select,
.filters input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 14px;
}

/* Apply button */
.apply-btn {
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  background: #0077cc;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.apply-btn:hover {
  background: #005fa3;
}

/* Empty message */
.empty-text {
  text-align: center;
  width: 100%;
  color: #555;
  font-weight: 600;
}

/* Grid layout */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

/* Hotel card */
.hotel-card {
  position: relative;
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: flex-end;
}

/* Card overlay */
.hotel-card .overlay {
  width: 100%;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.1));
  color: white;
}

/* Card title */
.hotel-card h3 {
  margin: 0 0 6px;
}

/* Price text */
.price {
  font-weight: 800;
}

/* Rating stars */
.rating {
  color: gold;
  margin: 6px 0;
}

/* Action button */
.book-btn {
  display: block;
  text-align: center;
  background: #0077cc;
  color: white;
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.book-btn:hover {
  background: #005fa3;
}

.hotel-card[data-city="aberdeen"] {
  background-image: url("/static/images/aberdeen.jpg");
}

.hotel-card[data-city="belfast"] {
  background-image: url("/static/images/belfast.jpg");
}

/* Birmingham image */
.hotel-card[data-city="birmingham"] {
  background-image: url("/static/images/birmingham.jpg");
}

.hotel-card[data-city="bristol"] {
  background-image: url("/static/images/bristol.jpg");
}

.hotel-card[data-city="cardiff"] {
  background-image: url("/static/images/cardiff.jpg");
}

.hotel-card[data-city="edinburgh"] {
  background-image: url("/static/images/edinburgh.jpg");
}

.hotel-card[data-city="glasgow"] {
  background-image: url("/static/images/glasgow.jpg");
}

.hotel-card[data-city="london"] {
  background-image: url("/static/images/london.jpg");
}

.hotel-card[data-city="manchester"] {
  background-image: url("/static/images/manchester.jpg");
}

.hotel-card[data-city="new-castle"] {
  background-image: url("/static/images/new-castle.jpg");
}

.hotel-card[data-city="norwich"] {
  background-image: url("/static/images/norwich.jpg");
}

.hotel-card[data-city="nottingham"] {
  background-image: url("/static/images/nottingham.jpg");
}

.hotel-card[data-city="oxford"] {
  background-image: url("/static/images/oxford.jpg");
}

.hotel-card[data-city="plymouth"] {
  background-image: url("/static/images/plymouth.jpg");
}

.hotel-card[data-city="swansea"] {
  background-image: url("/static/images/swansea.jpg");
}

.hotel-card[data-city="bournemouth"] {
  background-image: url("/static/images/bournemouth.jpg");
}

.hotel-card[data-city="kent"] {
  background-image: url("/static/images/kent.jpg");
}

/* 
   MOBILE RESPONSIVE
*/
@media (max-width: 768px){

  body{
    padding: 100px 12px 20px;
  }

  h1{
    font-size: 22px;
  }

  .filters{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filters select,
  .filters input{
    width: 100%;
    font-size: 16px; /* stops iPhone zoom */
  }

  .apply-btn{
    width: 100%;
    padding: 12px;
    font-size: 16px;
  }

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

  .hotel-card{
    height: 240px;
  }

  .hotel-card .overlay{
    padding: 12px;
  }

  .book-btn{
    padding: 12px;
    font-size: 16px;
  }
}

