* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f5f5f5;
  line-height: 1.6;
}
.error{
  width: 100%;
  text-align: center;
  padding: 20px;
  margin-bottom: 40px;
  background-color: #f75b5bd4;
  font-weight: bold;
  color: white;
  font-size: x-large;
  justify-content: center;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}
.success{
  width: 100%;
  text-align: center;
  padding: 20px;
  margin-bottom: 40px;
  background-color: #279137d4;
  font-weight: bold;
  color: white;
  font-size: x-large;
  justify-content: center;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}
header {
  background: no-repeat center center/cover;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  padding-top: 50px;
}

.price-slider-sp {
  padding: 0 !important;
}
a {
  text-decoration: none;
}
.language-switcher{
  display: inline;
  padding: 0px 12px;
  font-size: 12px;
}

.language-switcher a.active {
  font-weight: bold;
}
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #44a349;
  color: white;
  text-align: center;
  font-size: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0 0px;
}

nav {
  position: fixed;
  top: 25px;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: flex-start;
  padding: 10px 50px;
  color: white;
  z-index: 1000;
  align-items: center;
  gap: 28%;
  flex-wrap: nowrap;
}
nav a {
  color: white;
  text-decoration: none;
  padding: 5px 10px;
  font-size: 1.5rem;
}
nav .logo img {
  width: 80px;
  height: 45px;
}
.pagination .dots {
  padding: 8px 12px;
  color: #666;
}

nav .nav-links {
  display: flex;
  list-style: none;
}

nav .nav-links li {
  margin: 0 15px;
}

.media-icon a {
  margin: 0 4px;
  color: whitesmoke;
}
.auth-links a {
  color: white;
}

.hero h1 {
  margin: 20px 0;
  font-size: 2rem;
}

.hero p {
  margin-bottom: 20px;
}
.search-bar-cars,
.search-bar-estates {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  padding: 0;
  width: 97%;
  max-width: 100%;
  margin: auto;
  margin-top: 17px;
  min-height: 50px;
  height: auto;
  box-shadow: 0px 0px 32px 59px white;
  flex-wrap: nowrap;
  justify-content: center;
  outline: black solid 1px;
  border-radius: 10px;
  border: black solid 1px;
  margin-bottom: 40px;
}

.search-input {
  padding: 8px;

  border: 0px solid #ccc;
  height: 100%;
  width: 100%;
}
.search-button {
  padding: 9px 42px;
  background-color: #6fbe72;
  color: white;
  border: none;
  height: 100%;
  cursor: pointer;
  width: 100%;
}
.title-search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-bottom: #4caf50 solid 2px;
}
.search-button {
  border-radius: 5px;
  height: 100%;
  min-height: 50px;
}

.search-button:hover {
  background-color: #45a049;
}

.search-select {
  padding: 8px;
  border: 0px solid #ccc;
  height: 100%;
  background-color: #fff;
  width: 100% !important;
}

.icons {
  display: flex;
  justify-content: center;
  gap: 50px;
}
.main-search,
.main-about-us {
  margin-top: -46px;
  height: 550px;
  background-image: url(homepage-bg.png);
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.main-search,
.main-cars h1,
.main-about-us h1,
.main-estates h1 {
  color: white;
  font-size: 2.5rem;
}
.title-search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-bottom: #4caf50 solid 2px;
}
.icons-container {
  display: flex;
  margin-top: -50px;
  background-color: rgb(255, 255, 255);
  padding: 25px 95px 25px 67px;

  box-shadow: 0px -5px 21px 23px rgb(0 0 0 / 58%);
}
.view-more {
  font-size: large;
  padding: 20px;
  max-height: 20px;
  margin-top: 20px;
}
.view-more-link {
  color: black;
}
.view-more-link:hover {
  font-size: 19px;
}

.icon-box {
  text-align: center;
  margin: 10%;
}

.icon-box i {
  font-size: 2rem;
  margin-bottom: 10px;
}

.new-car,
.new-propertie {
  padding: 0 30%;
  margin: 40px;
}
.new-car h2,
.new-propertie h2 {
  border-bottom: 3px solid black;
}
.cars,
.properties,
.estates {
  text-align: center;
  padding: 20px;
  min-height: 760px;
}
.image-container {
  position: relative;
  width: 100%;
  min-height: 200px;
  overflow: hidden;
}
.image-slider {
  display: flex;
  transition: transform 0.3s ease-in-out;
}
.car-image,
.estate-image {
  width: 100%;
  flex-shrink: 0;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 10;
}

.left-arrow {
  left: 10px;
}

.right-arrow {
  right: 10px;
}
.camera-icon {
  position: relative;
  top: -188px;
  z-index: 1;
  right: -125px;
  font-size: 24px;
  color: #343434;
  cursor: pointer;
}

.camera-icon:hover {
  display: block;
  font-size: 22px;
}
.cars-container,
.properties-container,
.estates-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.car-card,
.propertie-card,
.estate-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 300px;
  width: 100%;
  height: 400px;
  overflow: hidden;
  gap: 16px;
}
.car-card:hover,
.propertie-card:hover,
.estate-card:hover {
  /* background-color: rgba(0, 0, 0, 0.1); */
  box-shadow: 9px 8px 8px 4px rgba(0, 0, 0, 0.1);
}

.car-card img,
.propertie-card img,
.estate-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.car-details p,
.propertie-detailas p,
.estate-details p {
  color: #555;
  font-size: 0.9rem;
  margin-top: auto;
}
.car-details h3,
.propertie-detailas h3,
.estate-details h3 {
  margin-bottom: 10px;
}
.seller-image {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50%;
}
.seller-details {
  display: flex;
  gap: 10px;
  padding: 10px;
  padding-top: 20px;
}
.seller-type {
  font-size: smaller;
  color: #44a349;
}

.main-cars,
.main-estates {
  margin-top: -46px;
  height: 300px;

  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.search-bar-cars .search-input,
.search-bar-cars .search-select {
  border-radius: 5px;
  height: 100%;
  min-height: 50px !important;
}
.search-bar-cars label {
  flex: 1 1 0%;
}

.sort-container {
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 14px;
  width: 97% !important;
  flex-direction: row-reverse;
}

.sort-select {
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 14px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  font-family: Arial, sans-serif;
}

.pagination {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
  gap: 8px;
}

.pagination-item {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 8px 0px;
  background-color: #fff;
  transition: background-color 0.3s, color 0.3s;
}

.pagination-link {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 12px;
}

.pagination-item.active {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}

.pagination-item.active .pagination-link {
  color: #fff;
}

.pagination-item.disabled {
  background-color: #f5f5f5;
  border-color: #ddd;
  color: #aaa;
  pointer-events: none;
}

.pagination-item:hover:not(.active):not(.disabled) {
  background-color: #f0f8ff;
  border-color: #007bff;
}

.pagination-item:hover .pagination-link {
  color: #007bff;
}
.main-about-us {
  background-image: url(about-header.png);
  height: 650px;
}

.about-section {
  padding: 40px 20px;
  background-color: #f9f9f9;
}

/* تنسيق المحتوى */
.about-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* الصورة */
.about-image {
  flex: 1 1 300px;
  max-width: 400px;
}

.about-img {
  width: 100%;
  height: 63vh;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* النص */
.about-text {
  flex: 2 1 300px;
  max-width: 600px;
  text-align: center;
}

.about-paragraph {
  margin: 15px 0;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.company-name {
  font-weight: bold;
  color: #007bff;
}

.fullscreen-gallery {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
}

.gallery-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slides {
  width: 90%;
  height: 80%;
  position: relative;
}

.gallery-slides img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  opacity: 0;
  transition: opacity 0.3s ease;
  object-fit: contain;
  width: 600px;
}

.gallery-slides img.active {
  opacity: 1;
  z-index: 1;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  cursor: pointer;
  padding: 20px;
  font-size: 24px;
  z-index: 2;
  transition: background-color 0.3s;
  border-radius: 5px;
}

.gallery-nav:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

.close-gallery {
  position: absolute;
  right: 25px;
  top: 15px;
  color: white;
  font-size: 35px;
  cursor: pointer;
  z-index: 2001;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background-color 0.3s;
}

.close-gallery:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.gallery-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 15px;
  border-radius: 15px;
}
.price-filter-toggle {
  position: relative;
  margin: 0 10px;
}

.price-toggle-btn {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  height: 100%;
  min-width: 200px;
  justify-content: center;
}

.price-toggle-btn.active {
  background-color: #f0f8ff;
  border-color: #4682b4;
}

.price-toggle-btn:hover {
  background-color: #f5f5f5;
  border-color: #4682b4;
}

.price-range-container {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  width: 300px;
  margin-top: 10px;
  display: none;
}

.price-range-container::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid white;
}

.price-range-slider {
  position: relative;
  width: 100%;
  height: 40px;
  margin: 20px 0;
}

.price-range-slider input[type="range"] {
  -webkit-appearance: none;
  position: absolute;
  width: 100%;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  pointer-events: none;
  outline: none;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4682b4;
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  top: -3px;
  z-index: 1;
}

.price-range-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4682b4;
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.price-inputs {
  text-align: center;
  margin-top: 20px;
  font-size: 16px;
  color: #333;
  font-weight: 500;
}
#price-range-min{
  left: -10px;
}

.container-search-bar-estates {
  box-shadow: 0px 0px 32px 66px white;
  width: 100%;
  background-color: white;
}
.search-bar-estates-sp {
  width: 90%;
  max-width: 90%;
}
.title-section {
  text-align: center;
  margin: 75px;
}

.dots-container {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #333;
}

.dots-container.overflow {
  overflow-x: auto;
  white-space: nowrap;
}

.sidebar-toggle {
  display: none; /* Hide the toggle button by default */
  background-color: #333;
  color: white;
  border: none;
  cursor: pointer;
  padding: 10px;

}
.sidebar {
  display: none; /* Hide the sidebar by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background-color: #333;
  color: white;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.sidebar-links {
  list-style-type: none;
  padding: 0;
}
.sidebar-links li {
  margin: 20px 0;
}
.sidebar-links a {
  color: white;
  text-decoration: none;
}
.sidebar-close {
  background-color: #333;
  color: white;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  top: 10px;
  right: 10px;
}
footer {
    background-color: #000;
    color: #fff;
    padding: 20px 0;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    max-width: 200px;
    margin: 10px;
}

.footer-section h4 {
    margin-bottom: 10px;
}

.footer-section ul {
    list-style-type: none;
    padding: 0;
}
.phone-bar{
  position: absolute;
  top: 60px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  padding: 0px 10px;
}
.logo-phone{
  width: 73px;
  height: 40px;
  
  
  display: none;
}
.footer-section ul li {
    margin: 5px 0;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

.social-media {
    display: flex;
    gap: 10px;
}

.so-link{
    color: #aaa;
}
.logo-im{
    width: 90px;
    height: 50px;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
}


@media (max-width: 768px) {
  .success,.error{
    margin-top: 110px !important;
  }
  .logo-phone{
    
    display: block;
  }
  .nav-links {
    display: none; /* Hide the top navigation links on small screens */
  }
  .sidebar-toggle {
    display: block; /* Show the toggle button on small screens */
  }
  .sidebar.show {
    display: block; /* Show the sidebar when the 'show' class is added */
  }
  .header.hide {
    display: none; /* Hide the header when 'hide' class is added */
  }
  /* Add this to your existing CSS */

  .header {
    display: none; /* Hide the header when 'hide' class is added */
  }

  .price-toggle-btn {
    min-width: 150px;
    font-size: 14px;
  }

  .price-range-container {
    width: 280px;
    padding: 15px;
  }
  .gallery-nav {
    padding: 15px;
    font-size: 20px;
  }

  .gallery-slides img {
    max-width: 75%;
    max-height: 95%;
  }
  .new-car,
  .new-propertie {
    padding: 0 0;
    margin: 40px;
  }
  .main-search h3,
  .main-about-us h3 {
    font-size: 1.5rem;
  }

  nav {
    flex-direction: column;
    text-align: center;
  }

  .cars-container,
  .properties-container {
    flex-direction: column;
  }

  .car-card,
  .propertie-card {
    height: auto;
  }
  .search-bar {
    width: 350px;
  }
  .search-bar-cars,
  .search-bar-estates {
    flex-wrap: wrap;
    height: auto;
    justify-content: flex-start;
  }
  .search-input,
  .search-select,
  .search-button {
    width: 85px !important;
  }

  .search-bar-cars > * {
    width: 100%;
    flex: 1 1 20%;
    margin: 5px;
  }
  .search-bar-estates > * {
    width: 100%;
    flex: 1 1 25%;
    margin: 5px;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: center;
  }

  .about-paragraph {
    font-size: 14px;
  }
}
