/* Reset some basic styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
        direction: rtl;
}
 h2 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
}
 h1 {
  font-size: 36px;
  color: #333;
}
/* Navigation Bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #333;
  color: #fff;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.logo {
  font-size: 24px;
}
.logo img {
  max-width: 8vw;
}
.hamburger-menu {
  font-size: 30px;
  cursor: pointer;
}

.menu {
  display: none; /* Hidden by default */
  flex-direction: column;
  text-align: right;
  position: absolute;
  top: 50px;
  right: 20px;
  background-color: #333;
  padding: 10px;
  border-radius: 8px;
}

.menu.show {
  display: flex; /* Show menu when the "show" class is added */
}

/* Hero Section */
.hero {
  background-color: #f0f0f0;
  padding: 100px 20px;
  text-align: center;
  margin-top: 60px; /* Adjusted for fixed navbar */
}


/* Ads Grid Section */
.ads-grid {
  padding: 20px;
  margin-top: 20px;
    margin-bottom: 40px;
}

.grid {
  display: flex; /* Use flexbox instead of grid */
  flex-wrap: wrap; /* Allow items to wrap onto the next line */
  gap: 20px; /* Add space between items */
}

.ad {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, max-height 0.5s ease; /* Smooth transition for hover and expand effects */
  cursor: pointer; /* Indicate that the ad is clickable */
  position: relative; /* Position relative to avoid expanding the entire row */
  flex: 1 1 calc(33.33% - 20px); /* Adjusts for 3 items per row, change this value if needed */
  max-width: calc(33.33% - 20px); /* Maximum width for each item, adjust if needed */
  align-self: flex-start; /* Allows each item to have an independent height */
}

.ad[aria-expanded="true"] {
  z-index: 10; /* Bring the expanded item to the front */
}

.ad:hover {
  transform: scale(1.05);
}
.ad img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}
.ad-details {
  display: none; /* Hidden by default */
  overflow: hidden;
  transition: max-height 0.5s ease; /* Smooth transition for expand/collapse */
}

.ad[aria-expanded="true"] .ad-details {
    display: block;
}

.ad-details h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 5px;
}

.ad-details p {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.icon {
    margin-right: 5px; /* Adds space between the icon and text */
    font-size: 1.2em; /* Adjust icon size */
}

.label {
    font-weight: bold;
    margin-right: 5px; /* Adds space between the label and value */
}

.value {
    color: #333; /* Style for the actual values */
}

.ad-actions button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.ad-actions button:hover {
  background-color: #555;
}
.ad-actions .phone {
  background-color: #329e41;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

/* Footer */
.footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  bottom: 0;
  width: 100%;
}

@media (max-width: 768px) {
    .logo img {
      max-width: 20vw;
    }
  .ad {
    flex: 1 1 calc(50% - 20px); /* Two items per row on smaller screens */
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .ad {
   /* flex: 1 1 100%; /* One item per row on mobile screens */
    max-width: 100%;
  }
}