/* ============================================================
   دليل تطوان - التصميم الاحترافي
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary:       #1262aa;
  --primary-light: #1976d2;
  --primary-dark:  #0a2055;
  --red:           #c0392b;
  --gold:          #d4ac0d;
  --gold-light:    #f0c43f;
  --bg:            #f0f4f9;
  --card-bg:       #ffffff;
  --text:          #1a2740;
  --text-light:    #6c757d;
  --border:        #dce6f0;
  --shadow:        0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover:  0 8px 30px rgba(0,0,0,0.15);
  --radius:        14px;
  --radius-sm:     8px;
}

/* =================== إعادة تعيين ===================  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =================== شريط العلوي ===================  */
.top-bar {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  font-size: 12.5px;
  padding: 6px 0;
  border-bottom: 2px solid var(--gold);
}
.top-bar-inner {
  max-width: 1300px; margin: 0 auto;
  padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px;
}
.top-bar a { color: var(--gold-light); }
.top-bar i { margin-left: 5px; }

/* =================== الرأس ===================  */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: sticky; top: 0; z-index: 1000;
}
.header-inner {
  max-width: 1300px; margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
  height: 92px;
}

.logo {
  display: flex; align-items: center; gap: 14px;
  color: white; font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px; white-space: nowrap;
}
.logo-icon {
  width: 46px; height: 46px;
  background: var(--gold);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--primary);
  flex-shrink: 0;
}
.logo-sub { font-size: 11px; font-weight: 400; opacity: 0.8; display: block; }

/* SVG logo in header */
.logo-icon-svg { width: 46px; height: 46px; flex-shrink: 0; }

.header-search {
  flex: 1;
  display: flex;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 30px;
  overflow: hidden;
  max-width: 480px;
}
.header-search input {
  flex: 1; border: none; background: transparent;
  color: white; padding: 10px 18px;
  font-family: 'Cairo', sans-serif; font-size: 14px;
  outline: none;
}
.header-search input::placeholder { color: rgba(255,255,255,0.6); }
.header-search button {
  background: var(--gold); border: none;
  color: var(--primary); padding: 10px 18px;
  cursor: pointer; font-size: 15px;
  transition: background 0.2s;
}
.header-search button:hover { background: var(--gold-light); }

/* =================== التنقل ===================  */
.nav-toggle {
  display: none;
  background: none; border: none; color: white;
  font-size: 22px; cursor: pointer; padding: 6px;
}
.nav-menu {
  display: flex; align-items: center; gap: 4px;
  margin-right: auto;
}
.nav-menu a {
  color: rgba(255,255,255,0.95);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px; font-weight: 800;
  transition: all 0.2s;
  white-space: nowrap;
  border: 2px solid var(--gold);
}
.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(212,172,13,0.18);
  color: white;
  border-color: var(--gold-light);
}

/* =================== قسم البطل ===================  */
.hero {
  background: linear-gradient(135deg, #1262aa 0%, #0a2055 40%, #0d1b3e 100%);
  padding: 70px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; position: relative;
  display: flex; align-items: center; gap: 40px;
  flex-wrap: wrap; justify-content: center;
}
.city-logo-wrap {
  flex-shrink: 0;
  width: clamp(260px, 42%, 480px);
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.5));
  animation: floatLogo 4s ease-in-out infinite;
}
.city-logo-svg { width: 100%; height: auto; display: block; border-radius: 14px; }
@keyframes floatLogo {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.hero-text-block { flex: 1; min-width: 260px; text-align: right; }
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--primary);
  font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 20px;
  margin-bottom: 16px; letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 50px);
  font-weight: 900;
  color: white;
  margin-bottom: 14px;
  line-height: 1.2;
}
.hero h1 span { color: var(--gold-light); }
.hero p {
  font-size: 17px; color: rgba(255,255,255,0.8);
  margin-bottom: 36px; max-width: 600px;
}

.hero-search {
  display: flex;
  max-width: 600px;
  background: white;
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  overflow: hidden;
}
.hero-search input {
  flex: 1; border: none; outline: none;
  padding: 16px 24px;
  font-family: 'Cairo', sans-serif; font-size: 16px;
  color: #1a2740 !important;
  background: #ffffff !important;
  caret-color: #1262aa;
}
.hero-search input::placeholder { color: #7a90a8 !important; }
.hero-search button {
  background: var(--gold); border: none;
  color: var(--primary); padding: 16px 28px;
  font-family: 'Cairo', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.hero-search button:hover { background: var(--gold-light); }

/* =================== إحصاءات ===================  */
.stats-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.stats-inner {
  max-width: 1300px; margin: 0 auto;
  padding: 20px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat-item {
  text-align: center; padding: 10px;
  border-right: 1px solid var(--border);
}
.stat-item:first-child { border-right: none; }
.stat-number { font-size: 28px; font-weight: 900; color: var(--primary); }
.stat-label  { font-size: 13px; color: var(--text-light); }
.stat-icon   { font-size: 20px; color: var(--gold); margin-bottom: 4px; }

/* =================== منطقة المحتوى الرئيسية ===================  */
.page-container {
  max-width: 1300px; margin: 0 auto;
  padding: 30px 20px;
}

.page-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 10px;
}
.page-title { font-size: 24px; font-weight: 800; color: var(--primary); }

/* =================== مسار التنقل ===================  */
#breadcrumb {
  display: none;
  align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-light);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
#breadcrumb a { color: var(--primary); font-weight: 600; }
#breadcrumb a:hover { text-decoration: underline; }
.bc-sep { font-size: 12px; color: var(--text-light); transform: rotate(180deg); }

/* =================== بحث الفئة ===================  */
#category-search {
  display: none;
  margin-bottom: 24px;
}
.cat-search-box {
  display: flex;
  background: white;
  border: 2px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  max-width: 500px;
  transition: border-color 0.2s;
}
.cat-search-box:focus-within { border-color: var(--primary); }
.cat-search-box input {
  flex: 1; border: none; outline: none;
  padding: 12px 20px;
  font-family: 'Cairo', sans-serif; font-size: 14px;
}
.cat-search-box i {
  padding: 12px 18px; color: var(--text-light);
}

/* =================== مجموعات الفئات ===================  */
.cat-group { margin-bottom: 40px; }
.group-title {
  font-size: 20px; font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--gold);
  display: flex; align-items: center; gap: 10px;
}
.group-title i { color: var(--gold); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.cat-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  border-right: 4px solid var(--cat-color, var(--primary));
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 100%;
  background: var(--cat-color, var(--primary));
  opacity: 0.05;
  transition: width 0.3s ease;
}
.cat-card:hover::before { width: 100%; }
.cat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.cat-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.cat-info { flex: 1; min-width: 0; }
.cat-info h3 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cat-info p  { font-size: 12px; color: var(--text-light); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count   { font-size: 11px; font-weight: 700; color: var(--cat-color, var(--primary)); background: rgba(0,0,0,0.06); padding: 2px 8px; border-radius: 10px; }
.cat-arrow   { color: var(--text-light); font-size: 12px; flex-shrink: 0; }

/* =================== بطاقة الإدراج ===================  */
.listing-header {
  background: white;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px;
  box-shadow: var(--shadow);
}
.listing-header-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 26px;
  flex-shrink: 0;
}
.listing-header h2 { font-size: 22px; font-weight: 800; color: var(--primary); }
.listing-count     { font-size: 14px; color: var(--text-light); }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.listing-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  border-top: 3px solid var(--cat-color, var(--primary));
}
.listing-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-header {
  padding: 14px 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
.card-number {
  font-size: 12px; font-weight: 700;
  color: var(--text-light);
  background: rgba(0,0,0,0.06);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.card-icon { font-size: 22px; }
.card-badge {
  font-size: 12px; font-weight: 600;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  display: flex; align-items: center; gap: 6px;
}

.card-body { padding: 12px 16px 16px; }

.card-title {
  font-size: 16px; font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-address {
  font-size: 13px; color: var(--text-light);
  margin-bottom: 10px;
  display: flex; align-items: flex-start; gap: 6px;
}
.card-address i { color: var(--red); margin-top: 2px; flex-shrink: 0; }

.card-rating {
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.stars i { color: var(--gold); font-size: 13px; }
.card-rating span { font-size: 13px; color: var(--text-light); font-weight: 600; }

/* Card photo */
.card-photo-wrap { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.card-photo { width: 100%; height: 150px; object-fit: cover; display: block; transition: transform .3s; }
.listing-card:hover .card-photo { transform: scale(1.04); }
.card-photo-count {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  backdrop-filter: blur(4px);
}
.card-video-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #e53935; background: #ffeaea;
  padding: 4px 10px; border-radius: 8px;
}
.card-video-link i { font-size: 13px; }

.card-extras {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.card-extras span {
  font-size: 12px; color: var(--text-light);
  background: var(--bg);
  padding: 4px 10px; border-radius: 8px;
  display: flex; align-items: center; gap: 5px;
}
.card-extras i { color: var(--primary); }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-phone {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary); color: white;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: background 0.2s;
  flex: 1; text-align: center; justify-content: center;
}
.card-phone:hover { background: var(--primary-light); }
.card-phone i { font-size: 12px; }
.no-phone { font-size: 13px; color: var(--text-light); }

.card-map-btn {
  background: var(--gold); color: var(--primary);
  border: none; padding: 9px 14px;
  border-radius: 8px; cursor: pointer;
  font-size: 14px; transition: all 0.2s;
  flex-shrink: 0;
}
.card-map-btn:hover { background: var(--gold-light); transform: scale(1.05); }

/* =================== لا توجد نتائج ===================  */
.no-results {
  text-align: center; padding: 60px 20px;
  color: var(--text-light); grid-column: 1 / -1;
}
.no-results i  { font-size: 48px; margin-bottom: 16px; opacity: 0.4; display: block; }
.no-results p  { font-size: 16px; }

/* =================== نتائج البحث ===================  */
.search-results-header {
  margin-bottom: 24px; grid-column: 1 / -1;
}
.search-results-header h2 {
  font-size: 22px; font-weight: 800; color: var(--primary);
  margin-bottom: 4px;
}
.search-results-header p { color: var(--text-light); }

/* =================== الأنيميشن ===================  */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeInUp 0.4s ease both;
}

/* =================== زر العودة للأعلى ===================  */
#back-to-top {
  position: fixed; bottom: 24px; left: 24px;
  width: 46px; height: 46px;
  background: var(--primary); color: white;
  border: none; border-radius: 50%;
  font-size: 18px; cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: all 0.3s;
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { background: var(--primary-light); transform: translateY(-2px); }

/* =================== الذيل ===================  */
footer {
  background: linear-gradient(135deg, #0a2055 0%, #0d1b3e 100%);
  color: rgba(255,255,255,0.85);
  padding: 50px 20px 30px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  margin-bottom: 36px;
}
.footer-brand .logo { color: white; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; opacity: 0.75; }
.footer-col h3 {
  color: var(--gold-light); font-size: 16px; font-weight: 700;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col li a {
  font-size: 14px; color: rgba(255,255,255,0.7);
  display: flex; align-items: center; gap: 8px;
  transition: color 0.2s;
}
.footer-col li a:hover { color: var(--gold-light); }
.footer-col li a i { width: 16px; }
.footer-contact p {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}
.footer-contact i { color: var(--gold); width: 16px; }

.footer-bottom {
  max-width: 1300px; margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: var(--gold-light); }

/* =================== شريط التنقل العلوي للجوال ===================  */
.mobile-nav-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 6px 0;
}
.mobile-nav-bar nav {
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px; cursor: pointer;
  background: none; border: none;
  color: var(--text-light); font-family: 'Cairo', sans-serif;
  font-size: 10px;
  transition: color 0.2s;
}
.mobile-nav-btn i    { font-size: 18px; }
.mobile-nav-btn:hover { color: var(--primary); }

/* =================== الشريط العلوي - تحديث ===================  */
.top-bar-inner {
  max-width: 1300px; margin: 0 auto;
  padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px;
}
.top-bar-left {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}

/* =================== مبدّل اللغة =================== */
.lang-switcher {
  display: flex; align-items: center; gap: 3px;
}
.lang-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  line-height: 1.6;
}
.lang-btn:hover {
  background: rgba(255,255,255,0.22);
  color: white;
  transform: translateY(-1px);
}
.lang-btn.active {
  background: var(--gold);
  color: var(--primary);
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(212,172,13,0.4);
}

/* =================== رأس: اسم الموقع =================== */
.logo-title {
  display: block;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
}
.logo-dove {
  font-size: 18px;
  vertical-align: middle;
  animation: doveFly 3s ease-in-out infinite;
}
@keyframes doveFly {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30%       { transform: translateY(-3px) rotate(-5deg); }
  60%       { transform: translateY(-1px) rotate(3deg); }
}

/* =================== حمامة البطل =================== */
.hero-dove-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  animation: doveFloat 4s ease-in-out infinite;
}
.hero-dove-svg {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4));
}
@keyframes doveFloat {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  25%       { transform: translateY(-8px) translateX(4px); }
  50%       { transform: translateY(-4px) translateX(-2px); }
  75%       { transform: translateY(-10px) translateX(3px); }
}
@media (max-width: 600px) {
  .hero-dove-svg { width: 160px; }
}

/* =================== قسم الفئات — قائمة نظيفة كالصورة =================== */
.cat-section {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* رأس المجموعة — بسيط وأنيق */
.cat-section-header {
  background: var(--primary);
  color: white;
  padding: 11px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid var(--gold);
  cursor: default;
}
.cat-section-header i {
  color: var(--gold-light);
  font-size: 16px;
  flex-shrink: 0;
}
.cat-section-header span:first-of-type {
  flex: 1;
  font-size: 14.5px; font-weight: 700;
  letter-spacing: 0.2px;
}
.cat-section-badge {
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.18);
  padding: 2px 9px; border-radius: 10px;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
}

/* القائمة — عمود واحد (مثل الصورة) */
.cat-list {
  display: flex;
  flex-direction: column;
}

/* العنصر الواحد */
.cat-list-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease, padding-right 0.15s ease;
  position: relative;
  background: white;
}
.cat-list-item:last-child { border-bottom: none; }

.cat-list-item:hover {
  background: #eef4fb;
  padding-right: 22px;
}

/* أيقونة ملونة دائرية */
.cat-list-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.20);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cat-list-item:hover .cat-list-icon {
  transform: scale(1.1);
  box-shadow: 0 5px 14px rgba(0,0,0,0.28);
}

/* اسم الفئة */
.cat-list-name {
  flex: 1;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
}
.cat-list-item:hover .cat-list-name {
  color: var(--primary);
}

/* عدد الإدراجات */
.cat-list-count {
  font-size: 11.5px; font-weight: 700;
  color: white;
  background: var(--primary);
  padding: 3px 9px; border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 28px;
  text-align: center;
}

/* سهم التنقل */
.cat-list-arrow {
  color: var(--text-light);
  font-size: 11px;
  flex-shrink: 0;
  margin-right: 2px;
  transition: transform 0.15s, color 0.15s;
}
.cat-list-item:hover .cat-list-arrow {
  transform: translateX(-4px);
  color: var(--primary);
}

/* =================== استجابة للشاشات — الجوال =================== */
@media (max-width: 900px) {
  /* إخفاء عناصر الحاسوب */
  .nav-toggle       { display: none !important; }
  .nav-menu         { display: none !important; }
  .desktop-only-btn { display: none !important; }
  .header-search    { display: none; }

  /* إظهار عناصر الجوال */
  .mobile-nav-bar   { display: block; }
  .mobile-wa-btn    { display: flex; }

  /* تخطيط الهيدر — صفّان على الجوال */
  header { position: sticky; }
  .header-inner {
    height: auto;
    padding: 8px 12px 6px;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  /* الصف الأول: لوغو + اسم */
  .logo { flex: 0 0 100%; gap: 10px; order: 1; }
  .logo .logo-text-wrap { flex: 1; }
  .logo-title { display: block !important; font-size: 24px; font-weight: 900; text-align: center; }
  .logo-icon-img { width: 56px !important; height: 56px !important; border-radius: 12px !important; flex: none !important; }

  /* الصف الثاني: زر كل الفئات + واتساب جنبه */
  .header-action-group { order: 2; flex: 1 1 auto; min-width: 0; }
  .mobile-wa-btn { order: 3; flex: 0 0 auto; }
  .mobile-wa-btn span { display: none; }
  .all-cats-dropdown   { width: 100%; }
  .all-cats-btn        { width: 100%; justify-content: center; padding: 10px 8px; font-size: 14px; gap: 6px; font-weight: 700; }
  .all-cats-arrow      { display: none; }

  /* بقية التعديلات */
  body { padding-bottom: 68px; }
  #back-to-top { bottom: 82px; }
  .cat-list-item { padding: 12px 14px; }
  .cat-list-name { font-size: 14px; }
}

@media (max-width: 500px) {
  .cat-list-name { font-size: 13px; }
}

/* =================== الصفحة الرئيسية — إخفاء الفراغ =================== */
body.at-home .page-container {
  display: none;
}
body.at-home footer {
  margin-top: 0;
  padding-top: 24px;
}

@media (max-width: 600px) {
  .hero { padding: 50px 16px 40px; }
  .hero-inner { flex-direction: column; gap: 24px; }
  .city-logo-wrap { width: clamp(220px, 80%, 360px); }
  .hero-text-block { text-align: center; }
  .hero h1 { font-size: 26px; }
  .hero p  { font-size: 14px; }
  .hero-search { border-radius: 12px; flex-direction: column; }
  .hero-search input { text-align: center; }
  .hero-search button { border-radius: 0 0 10px 10px; }

  .cat-grid { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 0; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .logo span.logo-sub { display: none; }
}

/* =================== الوضع الليلي (اختياري) ===================  */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0f1a14;
    --card-bg: #1a2a20;
    --text:    #e8f0eb;
    --text-light: #9ab09f;
    --border:  #2a3d30;
  }
  .cat-card, .listing-card, .listing-header, .stats-bar { background: var(--card-bg); }
  .cat-search-box, .cat-search-box input { background: var(--card-bg); color: var(--text); }
  body { background: var(--bg); }
  .mobile-nav-bar { background: var(--card-bg); border-color: var(--border); }
  .mobile-nav-btn { color: var(--text-light); }
}

/* =================== طباعة ===================  */
@media print {
  header, footer, #back-to-top, .mobile-nav-bar,
  .hero-search, .card-footer { display: none !important; }
  body { background: white; color: black; }
}

/* =================== صورة باب العقلة الحقيقية =================== */
.gate-photo-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.55);
  border: 3px solid rgba(212,172,13,0.85);
  animation: floatLogo 4s ease-in-out infinite;
}

.gate-photo {
  width: 100%;
  height: clamp(280px, 40vw, 460px);
  object-fit: cover;
  display: block;
  background: #0a2055;
}

/* =================== Slideshow =================== */
.hero-slideshow {
  position: relative;
  width: 100%;
  height: clamp(280px, 40vw, 460px);
  overflow: hidden;
}
.slide-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.slide-img.active {
  opacity: 1;
}
.slideshow-dots {
  position: absolute;
  bottom: 12px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 10;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}
.dot.active {
  background: var(--gold);
}

/* =================== لوغو الصورة =================== */
.logo-icon-img {
  width: 80px; height: 80px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.gate-photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.78));
  color: #f0c43f;
  font-size: 13px;
  font-weight: 700;
  padding: 28px 16px 12px;
  text-align: center;
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0.5px;
}

/* =================== أقسام الصفحة الرئيسية =================== */
.home-section {
  margin-bottom: 34px;
}

.home-section-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #d4ac0d;
}

.home-section-hdr i {
  color: #d4ac0d;
  font-size: 22px;
}

.home-section-hdr h2 {
  font-size: 22px;
  font-weight: 800;
  color: #1262aa;
  margin: 0;
}

/* =================== تاريخ تطوان =================== */
.history-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #dce6f0;
  border-right: 5px solid #1262aa;
}

.history-body {
  padding: 26px 28px;
}

.history-intro {
  font-size: 15px;
  line-height: 2;
  color: #1a2740;
  margin-bottom: 24px;
}

.history-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.hfact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #f0f4f9;
  border-radius: 10px;
  padding: 16px 10px;
  gap: 4px;
}

.hfact i {
  color: #d4ac0d;
  font-size: 22px;
  margin-bottom: 6px;
}

.hfact span {
  font-size: 11.5px;
  color: #6c757d;
  font-weight: 500;
}

.hfact strong {
  font-size: 14.5px;
  font-weight: 800;
  color: #1262aa;
}

/* =================== أرقام الطوارئ =================== */
.emergency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.emg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.emg-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.emg-icon {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: white;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.22);
}

.emg-num {
  font-size: 26px; font-weight: 900;
  color: white;
  margin-bottom: 6px;
  line-height: 1;
}

.emg-label {
  font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.emg-samu    { background: linear-gradient(135deg, #e53935, #b71c1c); }
.emg-police  { background: linear-gradient(135deg, #1565c0, #0d47a1); }
.emg-gend    { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
.emg-civil   { background: linear-gradient(135deg, #f57c00, #e65100); }
.emg-hospital{ background: linear-gradient(135deg, #00838f, #004d56); }

.emg-note {
  font-size: 13px;
  color: #6c757d;
  text-align: center;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.emg-note i { color: #1262aa; }

/* =================== زر استكشاف الفئات =================== */
.home-explore-cta {
  text-align: center;
  margin: 10px 0 30px;
}

.explore-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1262aa;
  color: white;
  border: none;
  padding: 14px 34px;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(18,98,170,0.3);
}

.explore-all-btn:hover {
  background: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 7px 22px rgba(18,98,170,0.45);
}

.explore-all-btn i { font-size: 17px; }

@media (max-width: 600px) {
  .history-body { padding: 18px; }
  .history-facts { grid-template-columns: repeat(2, 1fr); }
  .emergency-grid { grid-template-columns: repeat(2, 1fr); }
  .emg-num { font-size: 22px; }
  .home-section-hdr h2 { font-size: 18px; }
}

/* =================== زر كل الفئات — القائمة المنسدلة =================== */
.all-cats-dropdown {
  position: relative;
  flex-shrink: 0;
}

.all-cats-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--gold);
  color: var(--primary-dark);
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(212,172,13,0.35);
}

.all-cats-btn:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(212,172,13,0.5);
}

.all-cats-btn.active {
  background: var(--gold-light);
  box-shadow: 0 5px 15px rgba(212,172,13,0.5);
}

.all-cats-arrow {
  font-size: 11px;
  transition: transform 0.25s ease;
}

.all-cats-btn.active .all-cats-arrow {
  transform: rotate(180deg);
}

/* لوحة الفئات المنسدلة */
.cats-menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  min-width: 720px;
  background: #ffffff !important;   /* دائماً أبيض بغض النظر عن وضع النظام */
  color: #1a2740 !important;
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
  z-index: 3000;
  padding: 22px;
  animation: fadeInDown 0.2s ease both;
  max-height: 82vh;
  overflow-y: auto;
}

.cats-menu-panel.open {
  display: block;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* رأس اللوحة */
.cats-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gold);
}

.cats-menu-title {
  font-size: 16px;
  font-weight: 800;
  color: #1262aa;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cats-menu-title i { color: #d4ac0d; }

.cats-menu-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  color: var(--text-light);
  font-size: 13px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.15s;
}

.cats-menu-close:hover {
  background: var(--bg);
  color: var(--primary);
}

/* صف أرقام الطوارئ في قائمة الفئات */
.cats-menu-emergency-row {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cats-menu-emg-btn {
  width: 100%;
  background: #fff5f5;
  color: #c62828 !important;
  border: 1.5px solid #e53935 !important;
  border-radius: 9px;
  padding: 10px 14px;
  justify-content: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.2s;
}
.cats-menu-emg-btn:hover { background: #ffebee; }
.cats-menu-emg-btn i { color: #e53935; font-size: 15px; }

/* شبكة المجموعات */
.cats-menu-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cats-menu-group { }

.cats-menu-group-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #1262aa;           /* أزرق ثابت دائماً */
  padding: 5px 8px;
  margin-bottom: 6px;
  border-bottom: 2px solid #d4ac0d;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.cats-menu-group-title i {
  color: var(--gold);
  font-size: 12px;
  width: 14px;
  text-align: center;
}

.cats-menu-group-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cats-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  color: #1a2740;       /* لون ثابت دائماً داكن — لا يتأثر بالوضع الليلي للنظام */
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: right;
  transition: all 0.15s;
  width: 100%;
}

.cats-menu-item i {
  color: var(--cat-color, var(--primary));
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 12px;
}

.cats-menu-item span {
  flex: 1;
  text-align: right;
}

.cats-menu-item:hover {
  background: #eef4fb;
  color: #1262aa;
  padding-right: 14px;
}

/* =================== تعديلات الاستجابة للفئات =================== */
@media (max-width: 1100px) {
  .cats-menu-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .all-cats-btn { padding: 9px 11px; }

  .cats-menu-panel {
    min-width: calc(100vw - 30px);
    left: auto;
    right: -10px;
  }

  .cats-menu-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 500px) {
  .cats-menu-inner {
    grid-template-columns: 1fr;
  }
  .cats-menu-panel {
    padding: 16px;
  }
}

/* =================== مجموعة أزرار الهيدر =================== */
.header-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}


/* =================== زر "أضف نشاطك" في Hero =================== */
.hero-add-btn-wrap {
  margin-top: 18px;
}
.add-business-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: 2px solid var(--gold);
  padding: 12px 30px;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}
.add-business-btn:hover {
  background: var(--gold);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,172,13,0.4);
}
.add-business-btn i { font-size: 18px; }

/* =================== مودال أضف نشاطك =================== */
.add-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.add-modal-overlay.open {
  display: flex;
}
.add-modal {
  background: white;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.add-modal-close {
  position: absolute;
  top: 14px; left: 16px;
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: #999; transition: color 0.2s;
}
.add-modal-close:hover { color: var(--primary); }
.add-modal-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px; color: var(--gold);
}
.add-modal h2 {
  font-size: 22px; font-weight: 800;
  color: var(--primary); margin-bottom: 12px;
}
.add-modal p {
  font-size: 14px; color: #555;
  line-height: 1.7; margin-bottom: 24px;
}
.add-modal-steps {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 20px;
}
.add-modal-step {
  display: flex; align-items: center; gap: 12px;
  background: #f0f4f9; border-radius: 12px;
  padding: 12px 18px; font-size: 14px;
  text-align: right;
}
.add-modal-step i {
  font-size: 20px; color: var(--primary);
  flex-shrink: 0;
}
.add-modal-step a { color: var(--primary); font-weight: 700; }
.add-modal-note {
  font-size: 12.5px; color: #888;
  margin-top: 8px; margin-bottom: 0;
}
.add-modal-note i { color: var(--gold); margin-left: 4px; }

/* =================== نموذج أضف نشاطك =================== */
.add-modal-form {
  max-width: 520px;
  text-align: right;
  padding: 32px 30px 24px;
}
.add-modal-form h2 { font-size: 19px; }
.add-modal-form > p { margin-bottom: 18px; font-size: 13.5px; }

.add-form-group {
  margin-bottom: 14px;
  text-align: right;
}
.add-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.add-input-wrap {
  position: relative;
}
.add-input-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #aab4c4;
  font-size: 15px;
  pointer-events: none;
}
.add-form-group input {
  width: 100%;
  padding: 11px 38px 11px 14px;
  border: 2px solid #dde4ee;
  border-radius: 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  color: #222;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: #fafbfd;
}
.add-form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18,98,170,0.1);
  background: #fff;
}
.add-form-group input.field-error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.1);
}
.add-form-error {
  display: block;
  font-size: 11.5px;
  color: #e53e3e;
  margin-top: 4px;
  min-height: 16px;
}
.add-form-submit {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.add-form-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.add-success-icon {
  font-size: 64px;
  color: #38a169;
  margin: 6px 0 18px;
  animation: bounceIn 0.5s ease;
}
@keyframes bounceIn {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}
#add-success-state h3 {
  font-size: 20px;
  font-weight: 800;
  color: #38a169;
  margin-bottom: 10px;
}
#add-success-state p {
  font-size: 14px;
  color: #555;
  margin-bottom: 0;
}

/* =================== تحسين Hero بعد حذف الـ Slideshow =================== */
.hero-text-block {
  text-align: center !important;
  max-width: 750px;
  margin: 0 auto;
}
.hero p { margin: 0 auto 30px; }
.hero-search { margin: 0 auto; }


/* =================== مبدّل اللغة + واتساب في الهيدر =================== */
.header-lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  flex-shrink: 0;
}
.header-wa-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: white;
  border-radius: 8px;
  padding: 5px 11px;
  font-family: 'Cairo', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
  margin-left: 4px;
}
.header-wa-inline:hover { background: #1da851; }
.header-wa-inline i { font-size: 15px; }
@media (max-width: 900px) {
  .header-lang-switcher { display: none; }
}

/* =================== فوتر مبسّط =================== */
.footer-inner-simple {
  grid-template-columns: 1fr 1fr !important;
  align-items: start;
}
.footer-brand-large .logo.footer-logo-big {
  gap: 14px;
  margin-bottom: 16px;
}
.footer-brand-title {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: white;
  line-height: 1.1;
}
.footer-brand-large .logo-icon {
  width: 58px;
  height: 58px;
  font-size: 28px;
  border-radius: 14px;
}
@media (max-width: 700px) {
  .footer-inner-simple {
    grid-template-columns: 1fr !important;
  }
}

/* ====================================================
   زر واتساب الجوال
   القاعدة الأساسية أولاً (مخفي) ثم media query (ظاهر)
   ==================================================== */

.mobile-wa-btn {
  display: none;          /* مخفي على الحاسوب */
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #fff;
  border-radius: 9px;
  padding: 8px 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,211,102,0.4);
  transition: background 0.2s;
}
.mobile-wa-btn i { font-size: 16px; }
.mobile-wa-btn:hover { background: #1da851; color: #fff; }

/* ← هذا media query يجب أن يكون بعد القاعدة الأساسية ليأخذ الأولوية */
@media (max-width: 900px) {
  .mobile-wa-btn { display: flex !important; }
}

/* =================== هواتف (480px) =================== */
@media (max-width: 480px) {
  .header-inner { padding: 6px 10px 5px; gap: 5px; }
  .logo-icon-img { width: 50px !important; height: 50px !important; }
  .logo-title { font-size: 21px; }
  .all-cats-btn { font-size: 13px; padding: 8px 6px; }
  .mobile-wa-btn { padding: 8px 12px; font-size: 14px; }

  /* Hero */
  .hero { padding: 24px 12px 20px; }
  .hero h1 { font-size: 22px; }
  .hero p { display: none; }
  .footer-brand-large { display: none !important; }
  .hero-search { flex-direction: column; border-radius: 10px; }
  .hero-search input { padding: 14px 16px; font-size: 14px; }
  .hero-search button { padding: 12px 20px; border-radius: 0 0 8px 8px; justify-content: center; }
  .add-business-btn { padding: 10px 22px; font-size: 14px; }

  /* أرقام الطوارئ */
  .emergency-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .emg-card { padding: 12px 8px 10px; border-radius: 10px; }
  .emg-icon { width: 38px; height: 38px; font-size: 16px; margin-bottom: 6px; }
  .emg-num { font-size: 17px; }
  .emg-label { font-size: 11px; }
  .home-section-hdr h2 { font-size: 17px; }

  /* البطاقات */
  .listings-grid { grid-template-columns: 1fr; }
  .listing-header { padding: 12px 14px; gap: 10px; }
  .listing-header-icon { width: 44px; height: 44px; font-size: 18px; }
  .listing-header h2 { font-size: 17px; }
  .card-body { padding: 10px 12px 12px; }
  .card-title { font-size: 15px; }
  .page-container { padding: 14px 10px; }
  .mobile-nav-btn { font-size: 9px; padding: 5px 2px; }
  .mobile-nav-btn i { font-size: 17px; }
}

/* =================== هواتف صغيرة (360px) =================== */
@media (max-width: 360px) {
  .header-inner { gap: 5px; padding: 0 8px; }
  .logo-icon-img { width: 38px; height: 38px; }
  .logo-title { font-size: 12px; }
  .all-cats-btn { padding: 6px 8px; font-size: 11px; }
  .mobile-wa-btn { padding: 7px 8px; }
  .hero h1 { font-size: 20px; }
}
