/* Request a meal */

/* Section Base */
.restaurants-section {
  padding-top: 18.8em;
  padding-bottom: 3em;
  margin-top: -7em;
  text-align: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-image: url('src/images/wholepagebg.png');
  background-size: cover;
  background-repeat: no-repeat;
}

.restaurants-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5em; /* padding for smaller screens */
}

/* Badge */
.section-badge {
  display: inline-block;
  background: #d62828;
  color: #fff;
  font-weight: 600;
  font-size: 0.9em;
  padding: 10px 20px;
  border-radius: 20px;
  margin-bottom: 1em;
  animation: fadeInDown 1s ease forwards;
}

/* Title */
.section-title {
  font-size: 65px;
  font-weight: 700;
  margin-bottom: 0.5em;
  color: #111827;
  line-height: 1.3;
  animation: fadeInUp 1s ease forwards;
}

.section-title .highlight {
  color: #ef4444;
}

.section-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: #4a5565;
  margin-bottom: 2rem;
  font-weight: 300;
}

/* Search Bar */
.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 50px;
  overflow: hidden;
  padding: 0em 1em;
  padding-right: 12px;
  margin-top: 3em;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1em;
  padding: 13px;
  min-width: 0; /* prevents overflow */
}

.search-bar button {
  background: none;
  border: none;
  cursor: pointer;
}

.search-bar button img {
  width: 30px;
  height: 30px;
}

/* Restaurant Cards Grid */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card */
.restaurant-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: left;
  transform: translateY(30px);
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.restaurant-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-content {
  padding: 1em;
}

.card-content img {
  width: 35%;
  height: 15px;
}

.card-content h3 {
  font-size: 17px;
  font-weight: bold;
  margin: 9px 0;
  color: #1e2939;
}

.card-footer {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-direction: column;
}

.rating {
  padding-bottom: 1em;
  font-size: 0.95em;
  color: #f59e0b;
}

.menu-btn {
  display: inline-block;
  align-items: center;
  padding: 0.4em 1em;
  background: linear-gradient(to right, #0e9f6e, #28a745);
  color: #fff;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s ease;
  text-align: center;
}

.menu-btn:hover {
  opacity: 0.85;
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Delay animations for cards */
.restaurant-card:nth-child(1) { animation-delay: 0.2s; }
.restaurant-card:nth-child(2) { animation-delay: 0.4s; }
.restaurant-card:nth-child(3) { animation-delay: 0.6s; }
.restaurant-card:nth-child(4) { animation-delay: 0.8s; }
.restaurant-card:nth-child(5) { animation-delay: 1s; }

/* ================= RESPONSIVE ================= */

/* Tablet (<=992px) */
@media (max-width: 992px) {
  .section-title {
    font-size: 45px;
  }

  .section-subtitle {
    font-size: 12px !important;
  }

  .restaurants-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (<=600px) */
@media (max-width: 600px) {
  .restaurants-section {
    padding-top: 12em;
    padding-bottom: 2em;
  }

  .section-title {
    font-size: 32px;
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 1.5em;
  }

  .search-bar {
    flex-direction: row;
    border-radius: 15px;
    padding: 0.5em;
  }

  .search-bar input {
    width: 100%;
    margin-bottom: 0.5em;
    font-size: 12px;
    padding: 12px;
  }

  .search-bar button img {
    width: 24px;
    height: 24px;
  }

  .restaurants-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .restaurant-card img {
    height: 13px;
  }

  .card-content h3 {
    font-size: 16px;
  }

  .menu-btn {
    font-size: 0.85em;
    padding: 0.5em 1em;
  }
  .mainres img{
    width: 100%;
    height: 200px;
    object-fit: cover;

  }
  .restaurants-container {
padding-top: 5em;
}
}