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

/* Body */
body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background-color: #222;
  direction: ltr;
}

/* Logo */
.logo {
  height: 60px;
  border-radius: 5px;
}

/* Navigation */
.nav {
  display: flex;
  gap: 3rem;
}

.nav a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
}

/* Main content */
.content {
  padding: 2rem;
}

/* 📱 Mobile */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    flex-direction: column;
    align-items: center;
  }
}
/* Hero Section ********************************************************************************************/
.hero {
  position: relative;
  background-image: url("./assets/hero.jpg"); /* your image */
  background-color: black;
  background-size: cover;
  background-position: center;
  padding: 4rem 1rem;
  min-height: 70%;
  
}
.hero::after {
  content: "";
  position: absolute;
  width:100%;
  height:100%;
  inset: 0;
  background: rgba(0, 0, 0, 0.452);
}

/* Content box */
.hero-content {
  max-width: 80%;
  margin: auto;
  background: rgba(255, 255, 255, 0.438);
  padding: 2rem;
  border-radius: 10px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Search */
.search-input {
  padding: 0.8rem;
  font-size: 1rem;
  width: 100%;
  border-radius: 5px;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Dropdowns */
.filters select {
  flex: 1;
  min-width: 150px;
  padding: 0.7rem;
  border-radius: 5px;
}

/* Range */
.range-box {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.range-inputs {
  display: flex;
  gap: 1rem;
}

.range-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* Button */
.filter-btn {
  padding: 0.8rem 1.2rem;
  background: #222;
  color: white;
  border: none;
  cursor: pointer;
  flex: 1;
}

/* 📱 Mobile */
@media (max-width: 600px) {
  .filters {
    flex-direction: column;
  }
}

/* Ads Section **************************************************************************/
.ads {
  padding: 2rem 1rem;
  flex:1;
}

.ads-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: auto;
}

/* Ad Card *************************************************************************************************/
.ad-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  flex: 1 1 calc(25% - 1rem);
  max-width: 24%;
}

.ad-card a{
  position: absolute;
  width:100%;
  height: 100%;
  border:1px solid rgb(161, 161, 161);
  border-radius: 10px;
}

/* Image */
.ad-image {
  width: 100%;
  height: 180px; /* ~half of card */
  overflow: hidden;
}

.ad-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* always centered */
}

/* Info */
.ad-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* Title */
.ad-info h3 {
  font-size: 1.1rem;
  line-height: 1.3;
}

/* Features */
.ad-features {
  list-style: none;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0;
}

/* Price */
.ad-price {
  font-size: 1.1rem;
  margin-top: auto;
}

.ad-price strong {
  color: #222;
}
@media (max-width: 900px) {
  .ad-card {
    flex: 1 1 calc(50% - 1rem);
    max-width: 49%;
  }
}

@media (max-width: 600px) {
  .ad-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .ad-features {
    flex-direction: column;
    gap: 0.3rem;
  }
}