/*
 * Custom styles for the classifieds website.
 *
 * This file contains minimal CSS rules to personalise the look
 * and feel of the site. Bootstrap provides the majority of the
 * layout and component styling. Adjust variables here to match
 * your brand colours and spacing.
 */

/* Primary brand colour (orange) used for buttons and links */
:root {
    --bs-primary: #f68b1e;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Logo styling to ensure it fits nicely in the navbar */
.navbar-brand img {
    height: 40px;
}

/* Category cards on the homepage */
.category-card {
    transition: transform 0.2s ease-in-out;
}

.category-card:hover {
    transform: scale(1.05);
}

/* Footer styling */
footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
}/* أساسي */
.qm-body {
    background-color: #f5f6fa;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.qm-header .nav-link {
    font-size: 0.95rem;
    color: #4b5563;
}

.qm-header .nav-link.active,
.qm-header .nav-link:hover {
    color: #111827;
}

/* الهيرو */
.hero-section {
    background: linear-gradient(135deg, #ff8b1a, #ffb347);
    color: #fff;
    border-radius: 24px;
    padding: 2.2rem 2rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset-inline-end: -90px;
    top: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 18px solid rgba(255, 255, 255, 0.22);
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.hero-subtitle {
    opacity: 0.95;
    font-size: 0.95rem;
}

/* الإحصائيات تحت الهيرو */
.hero-stats {
    color: #fff;
}

.hero-stat-item {
    min-width: 120px;
}

.hero-stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* موبايل */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.6rem 1.4rem;
        border-radius: 18px;
        margin-top: 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-stats {
        gap: 1rem;
    }
}


/* كروت الإعلانات */
.ad-card {
    border-radius: 1.5rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    background-color: #fff;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.ad-card-img {
    height: 190px;
    object-fit: cover;
    background-color: #e5e7eb;
}

.ad-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-size: 0.7rem;
}

/* فلاتر اليسار في صفحات التصنيفات */
.filter-box {
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* تفاصيل الإعلان */
.ad-detail-box {
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}

.ad-gallery {
    border-radius: 1.25rem;
    background: #f3f4f6;
    overflow: hidden;
}

/* روابط خفيفة */
a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
/* ألوان الهوية */
:root {
    --qm-orange: #fca311;
    --qm-blue:   #14213d;
}

/* Topbar */
.topbar {
    background: var(--qm-blue);
}

/* الشعار في الهيدر */
.main-logo {
    height: 72px;
    max-height: 80px;
}

/* Navbar عام */
.main-navbar .nav-link {
    color: #333;
    font-weight: 500;
    padding-inline: 0.9rem;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus,
.main-navbar .nav-link.active {
    color: var(--qm-orange);
}

/* زر أضف إعلانك */
.btn-add-ad {
    background-color: var(--qm-orange);
    border-color: var(--qm-orange);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
}

.btn-add-ad:hover {
    background-color: #ffb63d;
    border-color: #ffb63d;
    color: #fff;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 0.75rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.dropdown-item:hover {
    background-color: rgba(252,163,17,0.1);
    color: #000;
}

/* الهيدر ثابت أعلى الصفحة مثل السوق المفتوح */
.main-navbar.sticky-top {
    top: 0;
    z-index: 1030;
}
.main-navbar .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0 !important;
    margin: 0 !important;
}

.main-logo {
    height: 65px;   /* جرّب 70 لو عايزه أكبر */
    object-fit: contain;
}
.navbar-brand img {
    height: 75px;         /* لو عايز تكبره خليه 75 */
    object-fit: contain;
}

.navbar-brand {
    display: flex !important;
    align-items: center !important;
}
.nav-link, .dropdown-toggle {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    font-size: 17px;
    font-weight: 600;
}
/* Dropdown التصنيفات في الهيدر */
.navbar .dropdown-menu {
    display: none;
    margin-top: 0.4rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    border: none;
    min-width: 14rem;
}

/* لما نفعّل show من الجافاسكريبت أو من الهوفر */
.navbar .dropdown-menu.show {
    display: block;
}

/* على الشاشات الكبيرة يفتح بالـ hover تلقائياً */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
    }
}
.ad-card {
    border-radius: 1rem;
    border: none;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ad-image-wrapper {
    height: 210px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ad-category-badge {
    position: absolute;
    top: .7rem;
    inset-inline-start: .7rem;
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: .2rem .7rem;
    font-size: .75rem;
    border-radius: 1rem;
}

.ad-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    min-height: 2.8em;
}
.site-footer {
    background: #0f172a;
    color: #e5e7eb;
}

.site-footer h5,
.site-footer h6 {
    color: #ffffff;
}

.footer-link {
    color: #e5e7eb;
    text-decoration: none;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
}
.home-banner{
  width: 100%;
  height: 170px;           /* قريب من ارتفاع كروت الإعلانات */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
  background: #fff;
}

.home-banner img{
  width: 100%;
  height: 100%;
  object-fit: cover;       /* مهم: يملأ المساحة بدون ما يبقى في فراغات */
  display: block;
}
/* =========================
   HEADER PATCH (Scoped)
   ========================= */

/* خلي كل الكلام في التوب بار أبيض مهما حصل */
.topbar,
.topbar * {
  color: #fff !important;
}

.topbar a {
  color: #fff !important;
  text-decoration: none !important;
}

.topbar a:hover {
  text-decoration: none !important;
  opacity: .95;
}

/* النص اليدوي */
.topbar-text{
  font-family: "Aref Ruqaa Ink", serif !important;
  color:#fff !important;
  font-size: 18px;
}

/* زر اللغة + اتصل بنا نفس المقاس */
.topbar .mini-btn{
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* امنع زر اللغة يبقى أعرض من اللازم */
.topbar .dropdown-toggle{
  width: auto !important;
}

/* أزرار + (إعلاناتك/موقعك/متجرك) */
.topbar-pill{
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.35);
}

/* ===== الهيدر الرئيسي: اللوجو في النص + أيقونات يمين ===== */
.main-header { background:#fff; }
.main-header .iconbtn{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid #eee;
  background: #fff;
}
.main-header .iconbtn:hover{ background:#f7f7f7; }

/* بادجز شيك */
.badge-dot{
  position:absolute;
  top:-6px;
  right:-6px;
  background:#ff2d2d;
  color:#fff !important;
  border-radius:999px;
  font-size:11px;
  padding:2px 6px;
  border:2px solid #fff;
  min-width:20px;
  text-align:center;
}

/* ===== موبايل: خلي الهيدر شكله زي تطبيق ===== */
@media (max-width: 991.98px){
  .topbar .topbar-inner{
    justify-content:center !important;
    gap:10px;
  }

  /* خلي (اتصل بنا + اللغة) سطر، والنص + الأزرار تحتهم بشكل مرتب */
  .topbar-actions{
    order: 1;
    width: 100%;
    justify-content: center;
  }
  .topbar-text{
    order: 2;
    width: 100%;
    text-align: center;
    font-size: 17px;
  }
  .topbar-cta{
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  /* الأيقونات تبقى شريط قابل للسحب */
  .iconbar{
    width:100%;
    justify-content:center;
    overflow-x:auto;
    padding-bottom:6px;
    gap:10px;
  }
  .iconbar::-webkit-scrollbar{ height:6px; }
  .iconbar::-webkit-scrollbar-thumb{ background:#ddd; border-radius:99px; }
}
/* =========================
   FOOTER (Scoped)
   ========================= */
.site-footer-new{
  background:#0f172a;
  color:#e5e7eb;
}
.site-footer-new h5,
.site-footer-new h6{ color:#fff; }

.site-footer-new .footer-link{
  color:#cbd5e1;
  text-decoration:none;
  display:inline-block;
  padding:6px 0;
}
.site-footer-new .footer-link:hover{
  color:#fff;
  text-decoration:underline;
}

.site-footer-new .footer-social{
  width:42px;height:42px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
  text-decoration:none;
}
.site-footer-new .footer-social:hover{
  background:rgba(255,255,255,.10);
}

.site-footer-new .footer-hr{
  border-color: rgba(255,255,255,.12);
}
.topbar-text, .topbar-text * { color:#fff !important; }
.topbar .topbar-pill, .topbar .topbar-pill * { color:#fff !important; }
