/* === Reset و قواعد عامة === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
  background-color: #faf9f6;
  color: #104012;
  line-height: 1.6;
  min-height: 100vh;
}

/* === هيدر عصري مع تأثير زجاجي وتجاوب عالي === */
.modern-navbar {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
  box-shadow: 0 4px 12px rgba(180, 166, 64, 0.05);
}

.modern-navbar .container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 2rem;
}

.logo img {
  height: 48px;
  max-width: 180px;
  filter: drop-shadow(0 2px 10px #fff5);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  background: none;
  transition: all .3s;
}
.nav-links li a {
  color: #104012;
  font-weight: 600;
  font-size: 1.13rem;
  border-radius: 7px;
  padding: .4rem 1rem;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.nav-links li a.active,
.nav-links li a:hover {
  color: #bb9306;
  background: #f8f4e1;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  margin-right: 1rem;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  border-radius: 2px;
  background: #104012;
  transition: all .3s;
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.main-btn {
  background: linear-gradient(90deg, #bb9306 40%, #e8d293 100%);
  color: #104012;
  border-radius: 8px;
  padding: .45rem 1.15rem;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 7px #fffa;
  border: none;
  text-decoration: none;
  transition: background .3s, color .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-btn:hover {
  background: linear-gradient(90deg, #bb9306 80%, #e8d293 100%);
  color: #fff;
}
.login-link {
  background: #104012;
  color: #fff;
  border-radius: 7px;
  padding: .4rem 1rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background .3s;
}
.login-link:hover {
  background: #bb9306;
  color: #104012;
}
.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f4e1;
  border-radius: 7px;
  padding: .33rem .85rem;
  font-size: 1rem;
  font-weight: bold;
  color: #104012;
}
.user-box .logout-link {
  color: #bb9306;
  margin-right: 5px;
  text-decoration: none;
  font-size: 1.1em;
}
.user-box .logout-link:hover {
  color: #c0392b;
}

/* === شريط البحث الرئيسي === */
.hero-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.5rem auto 1rem;
  max-width: 540px;
}
.hero-search h1 {
  font-size: 2.2rem;
  color: #104012;
  margin-bottom: 1.2rem;
  font-weight: 700;
}
.hero-search form {
  width: 100%;
  display: flex;
  gap: 0.7rem;
}
.hero-search input[type="text"] {
  flex: 1;
  padding: 15px 17px;
  font-size: 1.18rem;
  border: 2px solid #e6e2cf;
  border-radius: 8px;
  outline: none;
  background: #fffefc;
  transition: border-color 0.25s;
}
.hero-search input[type="text"]:focus {
  border-color: #bb9306;
}
.hero-search button {
  padding: 14px 22px;
  background: linear-gradient(90deg, #bb9306 60%, #e8d293 100%);
  color: #104012;
  font-size: 1.16rem;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.2s;
}
.hero-search button:hover {
  background: #104012;
  color: #fff;
}

/* === أقسام الموقع الحديثة === */
.categories-section {
  max-width: 1000px;
  margin: 2.5rem auto 3rem;
  padding: 0 1rem;
}
.categories-title {
  text-align: center;
  font-size: 1.8rem;
  color: #104012;
  font-weight: 700;
  margin-bottom: 1.4rem;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: 1.6rem;
}
.category-card {
  background: linear-gradient(135deg,#fffbe9 80%,#f6ecd3 100%);
  border-radius: 15px;
  padding: 1.8rem 1rem 1.2rem;
  text-align: center;
  color: #104012;
  font-size: 1.18rem;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 10px #ecd24d17;
  transition: transform 0.19s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 145px;
  cursor: pointer;
}
.category-card i {
  font-size: 2.7rem;
  margin-bottom: 0.8rem;
  color: #bb9306;
  transition: color 0.25s;
}
.category-card:hover {
  background: #fff9e0;
  color: #bb9306;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 22px #ecd24d26;
}
.category-card:hover i {
  color: #104012;
}

/* === بطاقات الإعلانات === */
.ads-grid {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 1.7rem;
}

.ad-card {
  background: #fff;
  border-radius: 13px;
  padding: 1.15rem 1rem 0.7rem;
  box-shadow: 0 2px 10px #e0c24c21;
  text-align: center;
  transition: transform .17s, box-shadow .16s;
}
.ad-card:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow: 0 8px 22px #ecd24d33;
}
.ad-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.7rem;
}
.ad-card h3 {
  margin: 0.3rem 0 0.5rem 0;
  color: #104012;
  font-size: 1.1rem;
  font-weight: 700;
}
.ad-card p {
  margin: 0.15rem 0;
  color: #666;
  font-size: 1.01rem;
}
.ad-card .details-btn {
  margin-top: .7rem;
  background: #104012;
  color: #fff;
  padding: 7px 19px;
  border-radius: 7px;
  font-size: 1rem;
  border: none;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background .22s;
}
.ad-card .details-btn:hover {
  background: #bb9306;
  color: #104012;
}

/* === فوتر بسيط === */
.site-footer {
  background: #f8f4e1;
  color: #104012;
  text-align: center;
  padding: 1.2rem 0 0.4rem;
  font-size: 1.03rem;
  border-top: 1.5px solid #eee1;
  margin-top: 3rem;
}

/* === Responsive Design === */
@media (max-width: 992px) {
  .modern-navbar .container {
    padding: .5rem 1rem;
  }
  .nav-links {
    gap: 1rem;
  }
}
@media (max-width: 768px) {
  .modern-navbar .container {
    flex-direction: row;
    align-items: center;
    padding: .6rem .4rem;
  }
  .logo img {
    height: 38px;
    max-width: 110px;
  }
  .hamburger {
    display: flex;
    margin-right: 0;
  }
  .nav-links {
    position: absolute;
    top: 62px;
    right: 0;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 8px 20px #0002;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    min-width: 160px;
    padding: 1.1rem 1.2rem;
    border-radius: 0 0 0 22px;
    opacity: 0;
    pointer-events: none;
    z-index: 1100;
    transition: all .22s;
  }
  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li {
    width: 100%;
    margin-bottom: 10px;
    text-align: right;
  }
  .nav-links li:last-child {
    margin-bottom: 0;
  }
  .nav-links li a {
    width: 100%;
    font-size: 1.08rem;
    padding: .5rem 0.5rem;
    border-radius: 7px;
  }
  .navbar-actions {
    gap: .4rem;
    font-size: .95rem;
    padding-left: 5px;
  }
  .user-box {
    padding: .33rem .65rem;
    font-size: .92rem;
  }
  .main-btn,
  .login-link {
    padding: .32rem .8rem;
    font-size: .97rem;
  }
  .ads-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  .categories-section {
    margin: 1.4rem auto 2rem;
  }
}
