/* =====================================================
   Agarly - اجرلي | Main Stylesheet
   Color palette inspired by logo (neon blue + dark navy)
===================================================== */

:root {
  --primary: #00B6FF;
  --primary-dark: #0095D9;
  --accent: #33CCFF;
  --secondary: #0A1F44;
  --secondary-dark: #06143A;
  --bg: #F4F8FC;
  --bg-light: #FFFFFF;
  --bg-soft: #EAF4FB;
  --text: #1A2238;
  --text-muted: #6B7A99;
  --border: #DDE6F0;
  --success: #16A34A;
  --warn: #F59E0B;
  --danger: #DC2626;
  --shadow: 0 4px 20px rgba(10, 31, 68, 0.08);
  --shadow-md: 0 8px 30px rgba(10, 31, 68, 0.12);
  --shadow-neon: 0 0 20px rgba(0, 182, 255, 0.35);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --transition: 0.25s ease;
  --header-h: 64px;
}

/* =====================================================
   Reset & Base
===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body[dir="ltr"] { font-family: 'Inter', system-ui, sans-serif; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* =====================================================
   Buttons
===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
  transition: var(--transition); cursor: pointer; border: 1px solid transparent;
  white-space: nowrap; text-align: center;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: var(--shadow-neon); }
.btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 0 28px rgba(0,182,255,0.55); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-dark); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* =====================================================
   Header
===================================================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(10,31,68,0.07);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 12px;
}
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo img { height: 40px; width: auto; }
.main-nav ul { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  display: inline-block; padding: 8px 13px; border-radius: 8px;
  color: var(--text); font-weight: 500; font-size: 14px;
}
.main-nav a:hover, .main-nav a.active { background: var(--bg-soft); color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-switch {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; color: var(--text); font-weight: 600;
}
.lang-switch:hover { background: var(--bg-soft); color: var(--primary); }

/* Hamburger Button */
.menu-toggle {
  display: none;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1.5px solid var(--border); background: #fff;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px; cursor: pointer;
  transition: var(--transition); flex-shrink: 0;
}
.menu-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--secondary); border-radius: 2px;
  transition: var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================
   Hero
===================================================== */
.hero {
  position: relative;
  background: url('../img/hero-bg.jpg') no-repeat center center / cover;
  min-height: 600px;
  color: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(6,20,58,0.55) 0%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
}
/* On desktop: hide the extra phone (hero-bg.jpg already contains the phone+hand) */
.hero-inner {
  position: relative; z-index: 3; width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.hero-phone-wrap { display: none; } /* hidden on desktop */
.hero-content {
  flex: 1; max-width: 780px; text-align: center;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-phone-img {
  width: 240px; max-width: 60vw;
  display: block;
  filter: drop-shadow(0 16px 32px rgba(0,0,0,0.5));
}
.hero-mobile-img { display: none; }
.hero h1 { font-size: 42px; line-height: 1.2; margin-bottom: 16px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.hero p { font-size: 17px; opacity: 0.9; margin-bottom: 28px; }

/* ===== Hero animations (used mainly on mobile) ===== */
@keyframes heroPhoneEntrance {
  0%   { opacity: 0; transform: translateY(40px) rotate(-8deg) scale(0.85); }
  60%  { opacity: 1; transform: translateY(-8px) rotate(2deg) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes heroPhoneFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  25%     { transform: translateY(-10px) rotate(-1.2deg); }
  50%     { transform: translateY(-16px) rotate(0deg); }
  75%     { transform: translateY(-10px) rotate(1.2deg); }
}
@keyframes heroPhoneShake {
  0%,100% { transform: translateY(0) rotate(0); }
  20%     { transform: translateY(-12px) rotate(-6deg) scale(0.97); }
  40%     { transform: translateY(0)     rotate(5deg)  scale(1.02); }
  60%     { transform: translateY(-6px)  rotate(-3deg) scale(1); }
  80%     { transform: translateY(0)     rotate(2deg)  scale(1); }
}
@keyframes heroFadeUp {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroHalo {
  0%,100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50%     { opacity: 0.85; transform: translate(-50%, -50%) scale(1.15); }
}
@keyframes heroBgShift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
@keyframes heroBlob {
  0%,100% { transform: translate(0,0) scale(1); opacity: 0.5; }
  33%     { transform: translate(-30px, 20px) scale(1.15); opacity: 0.7; }
  66%     { transform: translate(20px, -30px) scale(0.9); opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-phone-img, .hero, .hero::before, .hero::after,
  .hero-content, .hero h1, .hero p, .search-bar, .hero-phone-wrap::before {
    animation: none !important;
  }
}

/* =====================================================
   Search Bar (Hero)
===================================================== */
.search-bar {
  background: rgba(255,255,255,0.97);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  /* Desktop: 5 عناصر في صف، السعر تحتهم */
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.3);
  align-items: center;
}
.search-bar .search-select {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}
.search-bar .search-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,182,255,0.12);
}
/* السعر يمتد على كل العرض */
.search-bar .price-range-container {
  grid-column: 1 / -1;
}
/* أزرار البحث تمتد على كل العرض */
.search-bar .search-buttons-wrapper {
  grid-column: 1 / -1;
}


/* =====================================================
   Sections
===================================================== */
section { padding: 56px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-size: 24px; color: var(--secondary); font-weight: 800; }
.section-head a { font-weight: 600; font-size: 14px; }

/* =====================================================
   Cards (Listings)
===================================================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: var(--transition); position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--secondary-dark); }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; background: var(--secondary-dark); }
.card:hover .card-img img { transform: scale(1.05); }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,182,255,0.4);
}
[dir="rtl"] .card-badge { left: auto; right: 10px; }
.card-tag {
  position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.95);
  color: var(--secondary); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
[dir="rtl"] .card-tag { right: auto; left: 10px; }
.card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.card-price { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.card-title { font-size: 15px; color: var(--secondary); font-weight: 700; margin-bottom: 5px; line-height: 1.4; }
.card-title a { color: inherit; }
.card-title a:hover { color: var(--primary); }
.card-loc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.card-meta {
  display: flex; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted); margin-top: auto; flex-wrap: wrap;
}
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* =====================================================
   Cities grid
===================================================== */
.cities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.city-card {
  background: #fff; padding: 20px 16px; border-radius: var(--radius); text-align: center;
  box-shadow: var(--shadow); border: 1px solid transparent; transition: var(--transition);
}
.city-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.city-card .icon {
  width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 22px;
}
.city-card h4 { color: var(--secondary); font-size: 15px; }
.city-card .count { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* =====================================================
   Why Agarly
===================================================== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature { background: #fff; padding: 28px 22px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.feature .ico {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px;
  box-shadow: var(--shadow-neon);
}
.feature h3 { color: var(--secondary); margin-bottom: 8px; font-size: 17px; }
.feature p { color: var(--text-muted); font-size: 14px; }

/* =====================================================
   Footer
===================================================== */
.site-footer { background: var(--secondary); color: #C5D2EA; padding: 50px 0 20px; margin-top: 60px; }
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 15px; }
.site-footer a { color: #C5D2EA; }
.site-footer a:hover { color: var(--primary); }
.site-footer ul li { margin-bottom: 8px; font-size: 14px; }
.site-footer .brand img { height: 46px; margin-bottom: 12px; }
.site-footer .brand p { font-size: 13px; opacity: 0.85; line-height: 1.7; }
.site-footer .social { display: flex; gap: 10px; margin-top: 14px; }
.site-footer .social a {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.site-footer .social a:hover { background: var(--primary); }
.site-footer .social .fab { color: #fff; font-size: 17px; }
.site-footer .social .fa-whatsapp { color: #25D366; }
.social-text-links a { display: flex; align-items: center; gap: 10px; color: #C5D2EA; font-size: 14px; }
.social-text-links a:hover { color: #fff; }
.social-text-links i { width: 18px; text-align: center; }
.copy { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; text-align: center; font-size: 13px; }

/* =====================================================
   Forms / Auth
===================================================== */
.auth-page {
  min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #EAF4FB 0%, #F4F8FC 100%);
}
.auth-card {
  background: #fff; border-radius: 20px; padding: 36px 32px; width: 100%; max-width: 460px;
  box-shadow: 0 20px 60px rgba(10,31,68,0.1);
}
.auth-card h2 { text-align: center; color: var(--secondary); margin-bottom: 6px; font-size: 24px; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 22px; font-size: 14px; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--secondary); font-size: 13px; }
.form-control, .form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 10px;
  outline: none; transition: var(--transition); background: #fff; color: var(--text);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-control:focus, .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,182,255,0.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-picker label {
  border: 1.5px solid var(--border); padding: 12px 8px; border-radius: 10px;
  text-align: center; cursor: pointer; font-size: 13px; transition: var(--transition);
}
.role-picker input { display: none; }
.role-picker label:has(input:checked) { border-color: var(--primary); background: var(--bg-soft); color: var(--primary); }

/* Flash */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.flash-success { background: #E6F8EE; color: #146C3A; border: 1px solid #BCE5C7; }
.flash-error { background: #FDECEC; color: #B71C1C; border: 1px solid #F4C7C7; }
.flash-info { background: #E6F4FB; color: #0C4A6E; border: 1px solid #B6E0F5; }
.flash-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

/* =====================================================
   Listings page (filters + results)
===================================================== */
.listings-page { padding: 24px 0 60px; }
.layout-2col { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: flex-start; }
.filters {
  background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  position: sticky; top: calc(var(--header-h) + 16px);
  z-index: 100;
}
.filters h3 { font-size: 16px; color: var(--secondary); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.filters .form-group { margin-bottom: 12px; }

/* Filter toggle button (mobile & desktop) */
.filter-toggle-btn {
  display: flex; width: 100%; margin: 30px auto !important;
  background: #00b6ff !important; 
  background-color: #00b6ff !important;
  color: #fff !important; border-radius: 12px; padding: 16px 20px;
  font-size: 18px; font-weight: 700; align-items: center; justify-content: center;
  gap: 10px; border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,182,255,0.3);
  transition: transform 0.2s, background 0.2s;
  -webkit-appearance: none !important;
}
.filter-toggle-btn:hover {
  background: #0095d1 !important;
  transform: translateY(-2px);
}
.filter-toggle-btn .arrow { transition: transform .25s; }
.filter-toggle-btn.open .arrow { transform: rotate(180deg); }

.results-head {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.results-head .count { font-weight: 600; color: var(--secondary); font-size: 14px; }

/* Pagination */
.pagination ul { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a {
  display: inline-block; min-width: 38px; padding: 7px 10px; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-weight: 600; font-size: 14px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active a { background: var(--primary); border-color: var(--primary); color: #fff; }

/* =====================================================
   Listing detail
===================================================== */
.listing-hero { padding: 24px 0; }
.listing-gallery { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* Main Image Slider */
.gallery-main-wrapper { position: relative; aspect-ratio: 16/9; background: var(--bg-soft); overflow: hidden; }
.gallery-main-slider { position: relative; width: 100%; height: 100%; display: flex; }
.gallery-slide { position: absolute; width: 100%; height: 100%; opacity: 0; transition: opacity 0.4s ease; }
.gallery-slide.active { opacity: 1; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Navigation Buttons */
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background: rgba(255,255,255,0.85); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--secondary); cursor: pointer; z-index: 10; transition: var(--transition); }
.gallery-nav:hover { background: rgba(255,255,255,1); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

/* Thumbnail Carousel */
.gallery-thumbs-wrapper { background: #f9fafb; padding: 12px; border-top: 1px solid var(--border); }
.gallery-thumbs-carousel { overflow-x: auto; scroll-behavior: smooth; }
.gallery-thumbs-carousel::-webkit-scrollbar { height: 4px; }
.gallery-thumbs-carousel::-webkit-scrollbar-track { background: transparent; }
.gallery-thumbs-carousel::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }
.gallery-thumbs-track { display: flex; gap: 8px; }
.gallery-thumb { width: 80px; height: 60px; flex-shrink: 0; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: 0.6; transition: var(--transition); border: 2px solid transparent; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active { opacity: 1; border-color: var(--primary); box-shadow: 0 0 8px rgba(0,182,255,0.3); }

/* Responsive */
@media (max-width: 768px) {
  .gallery-nav { width: 36px; height: 36px; font-size: 16px; }
  .gallery-prev { left: 8px; }
  .gallery-next { right: 8px; }
  .gallery-thumb { width: 70px; height: 52px; }
}

/* RTL Support */
[dir="rtl"] .gallery-prev { left: auto; right: 12px; }
[dir="rtl"] .gallery-next { left: 12px; right: auto; }
[dir="rtl"] .gallery-thumbs-carousel { direction: rtl; }
[dir="rtl"] @media (max-width: 768px) {
  .gallery-prev { left: auto; right: 8px; }
  .gallery-next { left: 8px; right: auto; }
}

.listing-info { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-top: 16px; }
.listing-info h1 { color: var(--secondary); font-size: 22px; margin-bottom: 8px; line-height: 1.3; }
.listing-info .price-row { font-size: 24px; color: var(--primary); font-weight: 800; margin: 10px 0; }
.listing-info .meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.listing-info .meta-row .pill {
  background: var(--bg-soft); color: var(--secondary); padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

.contact-card {
  background: linear-gradient(135deg, #06143A 0%, #0A1F44 100%);
  color: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-md);
}
.contact-card h3 { font-size: 17px; margin-bottom: 12px; }
.contact-card .phone { font-size: 20px; font-weight: 800; color: var(--primary); margin: 8px 0; letter-spacing: 1px; }
.contact-card .hidden-phone { font-size: 17px; opacity: .8; letter-spacing: 4px; }
.contact-card .btn { width: 100%; }
.contact-numbers { display: grid; grid-template-columns: 1fr 1fr; margin: 10px 0 16px; }
.contact-number {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 0; padding: 4px 10px; color: #fff;
}
.contact-number:hover { color: #fff; }
.contact-number:first-child { padding-inline-start: 0; }
.contact-number:last-child { padding-inline-end: 0; }
.contact-number + .contact-number { border-inline-start: 1px solid rgba(255,255,255,0.18); }
.contact-number-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-number-text small { font-size: 13px; color: #C9D6EE; }
.contact-number-text strong {
  font-size: clamp(15px, 4vw, 18px); font-weight: 800; color: var(--primary);
  letter-spacing: .5px; white-space: nowrap; align-self: flex-start;
}
.contact-number-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; transition: transform .2s ease;
}
.contact-number:hover .contact-number-icon { transform: scale(1.08); }
.contact-number-icon--phone { background: rgba(0,182,255,0.18); color: var(--primary); }
.contact-number-icon--whatsapp { background: #25D366; color: #fff; font-size: 22px; }

.layout-detail { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }

/* =====================================================
   Tables (Dashboard)
===================================================== */
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; min-width: 600px; }
table.data th, table.data td { padding: 11px 13px; border-bottom: 1px solid var(--border); text-align: start; font-size: 14px; }
table.data th { background: var(--bg-soft); color: var(--secondary); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #FAFCFE; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #E6F8EE; color: #146C3A; }
.badge-rejected { background: #FDECEC; color: #B71C1C; }
.badge-active { background: #E6F8EE; color: #146C3A; }
.badge-expired { background: #FDECEC; color: #B71C1C; }
.badge-featured { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.badge-vip { background: #0A1F44; color: #FFD700; }

/* =====================================================
   Dashboard layout
===================================================== */
.dash-wrap { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - var(--header-h)); }
.dash-sidebar { background: var(--secondary); color: #fff; padding: 20px 0; }
.dash-sidebar .logo { padding: 0 18px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 10px; }
.dash-sidebar .logo img { height: 38px; }

/* زر أضف إعلان بارز في السايدبار */
.sidebar-add-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin: 10px 16px 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: 10px;
  text-decoration: none; transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0,182,255,0.35);
}
.sidebar-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,182,255,0.5);
  color: #fff;
}

/* شريط سعر واحد */
.price-slider-single {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin: 10px 0 4px;
}
.price-slider-single::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,182,255,0.4);
  border: 2px solid #fff;
}
.price-slider-single::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,182,255,0.4);
  border: 2px solid #fff;
  border: none;
}
.dash-sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: #C5D2EA;
  transition: var(--transition); border-left: 3px solid transparent; font-size: 14px;
}
[dir="rtl"] .dash-sidebar nav a { border-left: 0; border-right: 3px solid transparent; }
.dash-sidebar nav a:hover, .dash-sidebar nav a.active {
  background: rgba(255,255,255,0.07); color: #fff; border-color: var(--primary);
}
.dash-content { padding: 24px; background: var(--bg); overflow-x: hidden; }
.dash-content h1 { color: var(--secondary); font-size: 20px; margin-bottom: 16px; }

/* Mobile sidebar toggle */
.dash-sidebar-toggle {
  display: none; width: 100%; background: var(--secondary); color: #fff;
  padding: 12px 18px; font-size: 15px; font-weight: 600; align-items: center;
  justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--secondary); }
.stat-card .lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-card .icn {
  position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
[dir="rtl"] .stat-card .icn { right: auto; left: 16px; }

/* =====================================================
   Plans pricing
===================================================== */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.plan-card {
  background: #fff; border-radius: var(--radius); padding: 28px 22px; box-shadow: var(--shadow);
  border: 2px solid transparent; transition: var(--transition); position: relative;
}
.plan-card:hover { transform: translateY(-4px); }
.plan-card.popular { border-color: var(--primary); box-shadow: var(--shadow-md); }
.plan-card.popular::before {
  content: 'الأكثر طلباً'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.plan-card h3 { color: var(--secondary); font-size: 19px; margin-bottom: 6px; }
.plan-card .price { font-size: 34px; color: var(--primary); font-weight: 800; margin: 12px 0; }
.plan-card .price small { font-size: 13px; color: var(--text-muted); }
.plan-card ul { margin: 16px 0; }
.plan-card ul li { padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.plan-card ul li:last-child { border-bottom: 0; }
.plan-card .btn { width: 100%; margin-top: 8px; }

/* =====================================================
   Bulk bar (admin listings)
===================================================== */
.bulk-bar {
  display: none; align-items: center; gap: 12px;
  background: var(--secondary); color: #fff; padding: 10px 16px;
  border-radius: 10px; margin-bottom: 14px; font-size: 14px; flex-wrap: wrap;
}
.bulk-bar.active { display: flex; }
.bulk-count { font-weight: 700; color: var(--primary); }
.cb-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
tr.selected-row { background: rgba(0,182,255,0.08) !important; }

/* =====================================================
   Utilities
===================================================== */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}
.text-center{text-align:center}.text-muted{color:var(--text-muted)}
.flex{display:flex}.flex-between{display:flex;justify-content:space-between;align-items:center}.gap-1{gap:8px}.gap-2{gap:16px}
.muted{color:var(--text-muted);font-size:13px}

/* =====================================================
   RESPONSIVE - Tablet (max 1024px)
===================================================== */
@media (max-width: 1024px) {
  .layout-2col { grid-template-columns: 240px 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .dash-wrap { grid-template-columns: 200px 1fr; }
}

/* =====================================================
   RESPONSIVE - Tablet (max 900px)
===================================================== */
@media (max-width: 900px) {
  .layout-2col { grid-template-columns: 1fr; }
  .layout-detail { grid-template-columns: 1fr; }
  .filters { position: static; }

  /* Dashboard sidebar becomes top bar */
  .dash-wrap { grid-template-columns: 1fr; }
  .dash-sidebar-toggle { display: flex; }
  .dash-sidebar { padding: 0; }
  .dash-sidebar .logo { display: none; }
  .dash-sidebar nav { display: none; flex-direction: column; padding: 8px 0; }
  .dash-sidebar nav.open { display: flex; }
  .dash-sidebar nav a { padding: 11px 18px; border-left: 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  [dir="rtl"] .dash-sidebar nav a { border-right: 0; }
  .dash-sidebar nav a:hover, .dash-sidebar nav a.active { border-color: transparent; background: rgba(255,255,255,0.1); }
  .dash-content { padding: 16px; }
}

/* =====================================================
   RESPONSIVE - Mobile (max 768px)
===================================================== */
@media (max-width: 768px) {
  :root { --header-h: 64px; }

  /* ===== Header (Mobile) - FORCE VISIBILITY ===== */
  .site-header {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    background: #0A1F44 !important;
    border-bottom: 2px solid #00B6FF;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    min-height: var(--header-h);
  }
  .site-header .container {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    height: var(--header-h);
    flex-wrap: nowrap;
  }
  .site-logo {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
    padding: 4px 10px;
    border-radius: 8px;
  }
  .site-logo img {
    height: 34px !important;
    width: auto !important;
    display: block !important;
  }
  /* Mobile nav: hidden by default, shown via hamburger */
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 16px 20px;
    box-shadow: 0 8px 30px rgba(10,31,68,0.20);
    transform: translateY(-120%);
    transition: transform .3s ease;
    z-index: 999;
    border-bottom: 2px solid var(--primary);
    visibility: hidden;
  }
  .main-nav.open {
    transform: translateY(0);
    visibility: visible;
  }
  .main-nav ul { flex-direction: column; gap: 4px; align-items: stretch; }
  .main-nav a {
    display: block; padding: 12px 14px; border-radius: 10px;
    font-size: 15px; font-weight: 600;
    color: var(--secondary) !important;
  }
  .main-nav a:hover, .main-nav a.active {
    background: var(--bg-soft);
    color: var(--primary) !important;
  }
  /* Header actions on dark background */
  .header-actions {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  /* .header-actions .btn-ghost { display: none; } */
  .header-actions .btn { padding: 7px 11px; font-size: 12px; }
  .header-actions .lang-switch {
    padding: 7px 10px;
    font-size: 12px;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
  }
  .header-actions .lang-switch:hover {
    background: #fff;
    color: var(--secondary) !important;
  }
  /* Hamburger - white bars on dark header */
  .menu-toggle {
    display: inline-flex !important;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255,255,255,0.5);
    background: transparent;
    flex-shrink: 0;
  }
  .menu-toggle span { background: #fff; }

  /* Hero on mobile: animated dark gradient + interactive phone PNG */
  .hero {
    background: linear-gradient(135deg, #06143A 0%, #0A1F44 45%, #1a2f5c 100%) !important;
    background-size: 200% 200%;
    animation: heroBgShift 14s ease infinite;
    min-height: auto;
    padding: 60px 0 50px;
    position: relative;
  }
  /* Floating glow particles in background */
  .hero::before, .hero::after {
    content: '';
    position: absolute; pointer-events: none;
    border-radius: 50%; filter: blur(60px); opacity: 0.5;
    animation: heroBlob 12s ease-in-out infinite;
  }
  .hero::before {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(0,182,255,0.55), transparent 70%);
    top: 10%; right: -60px;
  }
  .hero::after {
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,107,53,0.35), transparent 70%);
    bottom: 10%; left: -50px;
    animation-delay: -6s;
  }
  .hero-overlay { display: none; }
  .hero-inner {
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px;
    position: relative; z-index: 3;
  }
  .hero-phone-wrap {
    display: flex !important;
    justify-content: center;
    margin-top: 6px;
    position: relative;
    /* Halo glow behind phone */
  }
  .hero-phone-wrap::before {
    content: '';
    position: absolute; top: 50%; left: 50%;
    width: 280px; height: 280px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0,182,255,0.35) 0%, transparent 65%);
    filter: blur(20px); z-index: 0;
    animation: heroHalo 4s ease-in-out infinite;
  }
  .hero-content {
    text-align: center !important;
    max-width: 100%;
    animation: heroFadeUp 1s cubic-bezier(.22,1,.36,1) .2s both;
  }
  .hero-phone-img {
    width: 220px; max-width: 60vw;
    position: relative; z-index: 2;
    transform-origin: bottom center;
    cursor: pointer;
    transition: transform .35s cubic-bezier(.22,1,.36,1), filter .35s ease;
    filter: drop-shadow(0 18px 30px rgba(0,182,255,0.35));
    animation:
      heroPhoneEntrance 1.2s cubic-bezier(.22,1,.36,1) both,
      heroPhoneFloat 5s ease-in-out 1.2s infinite;
  }
  .hero-phone-img:hover {
    transform: rotate(-3deg) scale(1.04) translateY(-6px);
    filter: drop-shadow(0 22px 40px rgba(0,182,255,0.6));
  }
  .hero-phone-img:active {
    animation: heroPhoneShake .55s ease-in-out;
  }
  .hero h1 {
    font-size: 26px; line-height: 1.3;
    background: linear-gradient(135deg, #fff 0%, #00B6FF 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroFadeUp .9s cubic-bezier(.22,1,.36,1) .35s both;
  }
  .hero p  {
    font-size: 15px; margin-bottom: 20px;
    animation: heroFadeUp .9s cubic-bezier(.22,1,.36,1) .5s both;
  }
  .search-bar { animation: heroFadeUp .9s cubic-bezier(.22,1,.36,1) .65s both; }
  .search-bar {
    /* موبايل: عمودين للأول، باقي كل عنصر في سطر */
    grid-template-columns: 1fr 1fr;
    padding: 12px; gap: 10px;
  }
  /* نوع العقار ونوع الوحدة: كل واحد في نص العرض (عمودين) */
  .search-bar .search-select:nth-child(1),
  .search-bar .search-select:nth-child(2) {
    grid-column: span 1;
  }
  /* المحافظة والمدينة: كل واحدة في نص العرض */
  .search-bar .search-select:nth-child(3),
  .search-bar .search-select:nth-child(4) {
    grid-column: span 1;
  }
  /* الغرض: سطر كامل */
  .search-bar .search-select:nth-child(5) {
    grid-column: 1 / -1;
  }
  .search-bar .btn { width: 100%; padding: 13px; }

  /* Sections */
  section { padding: 40px 0; }
  .section-head h2 { font-size: 20px; }

  /* Cards */
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px; }
  .card-price { font-size: 16px; }
  .card-title { font-size: 13px; }
  .card-meta { gap: 8px; font-size: 11px; }

  /* Cities */
  .cities-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .city-card { padding: 14px 10px; }
  .city-card .icon { width: 42px; height: 42px; font-size: 18px; }
  .city-card h4 { font-size: 13px; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature { padding: 22px 18px; }

  /* Footer */
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 36px 0 16px; margin-top: 40px; }

  /* Auth */
  .auth-card { padding: 28px 20px; }
  .auth-card h2 { font-size: 21px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .role-picker { grid-template-columns: 1fr; }

  /* Listings page filters */
  .filter-toggle-btn { 
    margin: 40px auto 20px !important;
    padding: 18px 20px !important;
    font-size: 18px !important;
  }
  .home-search-btn {
    margin-top: 45px !important;
    margin-bottom: 25px !important;
  }
  .filters { 
    display: none; 
    margin-bottom: 0; 
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    border-radius: 0;
    overflow-y: auto;
    padding: 20px;
  }
  .filters.open { 
    display: block; 
  }
  .filters form {
    padding-bottom: 40px;
  }
  .filters .close-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .filters .close-filters h3 { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
  .filters .close-btn {
    font-size: 24px;
    color: var(--text-muted);
  }

  /* Listing detail */
  .listing-info h1 { font-size: 18px; }
  .listing-info .price-row { font-size: 20px; }
  .listing-gallery .thumbs img { width: 64px; height: 48px; }

  /* Dashboard */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .num { font-size: 22px; }
  .stat-card .icn { width: 36px; height: 36px; font-size: 15px; top: 12px; right: 12px; }

  /* Plans */
  .plans-grid { grid-template-columns: 1fr; }

  /* Tables */
  .table-wrap { border-radius: 10px; }
  table.data th, table.data td { padding: 9px 10px; font-size: 12px; }

  /* Bulk bar */
  .bulk-bar { font-size: 13px; gap: 8px; }
}

/* =====================================================
   RESPONSIVE - Small Mobile (max 480px)
===================================================== */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }
  .cards-grid { grid-template-columns: 1fr; }
  .cities-grid { grid-template-columns: repeat(2, 1fr); }
  .header-actions .lang-switch { padding: 6px 10px; font-size: 12px; }
  .stats-grid { grid-template-columns: 1fr; }
  .btn { font-size: 14px; }
  .btn-sm { font-size: 12px; padding: 6px 11px; }
  .auth-card { padding: 22px 16px; border-radius: 16px; }
  .dash-content { padding: 12px; }
  .dash-content h1 { font-size: 18px; }
}

/* Desktop: show filter title, keep toggle button visible if needed */
@media (min-width: 769px) {
  .filter-toggle-btn { 
    display: flex !important; 
    max-width: 400px !important;
    margin: 40px auto !important;
    background: #00b6ff !important;
    background-color: #00b6ff !important;
  }
  .desktop-filter-title { display: block !important; }
  .filters { display: block !important; }
}


/* =====================================================
   Banner Slider (Dubizzle-style)
===================================================== */
.banner-section {
  padding: 36px 0 8px;
}
.banner-slider {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #f4f6fb;
  box-shadow: 0 8px 30px rgba(10,31,68,0.10);
  aspect-ratio: 3 / 1;
  max-height: 380px;
}
.banner-track {
  display: flex;
  width: 100%; height: 100%;
  transition: transform .65s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}
.banner-slide {
  flex: 0 0 100%;
  width: 100%; height: 100%;
}
.banner-slide a, .banner-slide img {
  display: block; width: 100%; height: 100%;
}
.banner-slide img {
  object-fit: cover;
  user-select: none;
}

/* Arrows */
.banner-arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--secondary, #0A1F44);
  font-size: 26px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background .2s;
  z-index: 3;
  line-height: 1;
}
.banner-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}
.banner-prev { left: 14px; }
.banner-next { right: 14px; }
[dir="rtl"] .banner-prev { left: auto; right: 14px; }
[dir="rtl"] .banner-next { right: auto; left: 14px; }

/* Dots */
.banner-dots {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  z-index: 3;
}
.banner-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(255,255,255,0.9);
  cursor: pointer;
  padding: 0;
  transition: width .25s ease, background .25s;
}
.banner-dot.active {
  background: #00B6FF;
  width: 26px; border-radius: 5px;
  border-color: #00B6FF;
}

/* Mobile */
@media (max-width: 768px) {
  .banner-section { padding: 22px 0 6px; }
  .banner-slider {
    border-radius: 12px;
    aspect-ratio: 2 / 1;
  }
  .banner-arrow {
    width: 36px; height: 36px; font-size: 22px;
  }
  .banner-prev { left: 8px; }
  .banner-next { right: 8px; }
  [dir="rtl"] .banner-prev { right: 8px; }
  [dir="rtl"] .banner-next { left: 8px; }
  .banner-dots { bottom: 8px; }
  .banner-dot { width: 8px; height: 8px; }
  .banner-dot.active { width: 22px; }
}


/* =====================================================
   Mobile Layout Toggle (1 vs 2 cards per row)
   ───────────────────────────────────────────────────── */

/* Floating toggle button — visible on both desktop & mobile */
.layout-toggle-btn {
  display: inline-flex;
  position: fixed;
  bottom: 78px;
  inset-inline-start: 14px;
  z-index: 998;
  background: #fff;
  color: var(--secondary, #0A1F44);
  border: 1px solid rgba(10,31,68,0.12);
  border-radius: 999px;
  padding: 9px 16px 9px 12px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  box-shadow: 0 8px 22px rgba(10,31,68,0.22);
  cursor: pointer;
  align-items: center; gap: 7px;
  transition: transform .2s ease, box-shadow .2s, background .2s;
}
.layout-toggle-btn svg { display: block; }
.layout-toggle-btn span { line-height: 1; }
.layout-toggle-btn:hover {
  transform: translateY(-2px);
  background: var(--primary, #00B6FF); color: #fff;
}

/* Apply layout override on ALL screens (desktop + mobile) */
body[data-mobile-cols="2"] .cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 14px;
}
body[data-mobile-cols="1"] .cards-grid {
  grid-template-columns: 1fr !important;
  gap: 18px;
  max-width: 760px;
  margin-inline: auto;
}
body[data-mobile-cols="1"] .card-img { aspect-ratio: 16/9; }

@media (max-width: 768px) {
  /* 2 cards per row (Dubizzle style) — DEFAULT */
  body[data-mobile-cols="2"] .cards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  body[data-mobile-cols="2"] .card-body  { padding: 10px; }
  body[data-mobile-cols="2"] .card-title { font-size: 13px; line-height: 1.35; }
  body[data-mobile-cols="2"] .card-price { font-size: 15px; }
  body[data-mobile-cols="2"] .card-meta  { gap: 6px; font-size: 11px; }
  body[data-mobile-cols="2"] .card-img   { aspect-ratio: 4/3; }

  /* 1 card per row (full-width / immersive) */
  body[data-mobile-cols="1"] .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  body[data-mobile-cols="1"] .card-body  { padding: 14px; }
  body[data-mobile-cols="1"] .card-title { font-size: 16px; }
  body[data-mobile-cols="1"] .card-price { font-size: 19px; }
  body[data-mobile-cols="1"] .card-meta  { gap: 12px; font-size: 13px; }
  body[data-mobile-cols="1"] .card-img   { aspect-ratio: 16/9; }
}

/* Smooth transition between layouts */
.cards-grid, .card, .card-body, .card-img {
  transition: grid-template-columns .35s ease, padding .25s ease, font-size .25s ease;
}

/* Hide inside the mobile-preview iframe (avoid duplicate buttons) */
.in-preview .layout-toggle-btn { display: none !important; }


/* =====================================================
   Hero House Parallax (mobile) + Phone glow halo
   ───────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }

.hero-house-bg{
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0; /* hidden on desktop by default */
  transform: scale(1.08);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
  z-index: 1;
}
.hero-house-veil{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,31,68,0.15) 0%, rgba(10,31,68,0.55) 55%, rgba(10,31,68,0.85) 100%);
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
  z-index: 2;
}
.hero-overlay { z-index: 3; }
.hero-inner   { position: relative; z-index: 4; }

/* Glowing halo behind the phone */
.hero-phone-glow{
  position: absolute;
  inset: 50% auto auto 50%;
  width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(0,182,255,0.55) 0%, rgba(0,182,255,0.18) 35%, rgba(0,182,255,0) 70%);
  filter: blur(18px);
  animation: heroGlowPulse 3.6s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}
.hero-phone-wrap { position: relative; }
.hero-phone-img  { position: relative; z-index: 1; }

@keyframes heroGlowPulse{
  0%,100% { opacity: .65; transform: translate(-50%,-50%) scale(1);     }
  50%     { opacity: 1;   transform: translate(-50%,-50%) scale(1.08);  }
}

/* On mobile: show the house background behind the phone with parallax */
@media (max-width: 768px){
  .hero-house-bg {
    opacity: var(--house-opacity, 0.55);
    transform: translateY(var(--house-y, 0)) scale(1.06);
  }
  .hero-house-veil { opacity: 1; }

  /* Make the dark gradient on hero a bit thinner so the house shows */
  .hero { background: linear-gradient(135deg, #061029 0%, #0A1F44 60%, #0d2756 100%) !important; }
  .hero-phone-wrap::after{ /* soft shadow under phone */
    content: ""; position: absolute;
    bottom: -10px; left: 10%; right: 10%;
    height: 18px; border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 70%);
    filter: blur(2px);
    z-index: 0;
  }
}

@media (prefers-reduced-motion: reduce){
  .hero-phone-glow { animation: none; }
  .hero-house-bg   { transition: none; }
}


/* =====================================================
   Splash Intro Animation (Agarly logo + name + flash)
   ───────────────────────────────────────────────────── */
.agarly-splash{
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0a2456 0%, #061029 60%, #02060e 100%);
  overflow: hidden;
  animation: splashFadeOut .6s ease-in 1.4s forwards;
  /* Don't block taps on header / hamburger while it's fading */
  pointer-events: none;
}
.agarly-splash::before, .agarly-splash::after{
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(0,182,255,0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(51,204,255,0.14) 0%, transparent 45%);
  animation: splashBgDrift 8s linear infinite alternate;
}
.agarly-splash::after{ animation-duration: 12s; opacity: .6; }

.splash-stage{
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}

/* --- Logo with blue fire glow --- */
.splash-logo-wrap{
  position: relative;
  width: 110px; height: 110px;
  display: grid; place-items: center;
  animation: splashLogoIn 1.2s cubic-bezier(.2,.9,.3,1.4) both;
}
.splash-logo{
  width: 84px; height: 84px;
  object-fit: contain;
  position: relative; z-index: 3;
  filter: drop-shadow(0 0 12px rgba(0,182,255,0.85))
          drop-shadow(0 0 24px rgba(0,182,255,0.55));
  animation: splashLogoFloat 2.6s ease-in-out infinite alternate;
}
.splash-fire-ring{
  position: absolute; inset: -8px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg,
      rgba(0,182,255,0) 0deg,
      rgba(0,182,255,0.95) 60deg,
      rgba(51,204,255,0.9) 140deg,
      rgba(0,229,255,0.95) 220deg,
      rgba(0,182,255,0) 360deg);
  filter: blur(8px);
  opacity: .9;
  animation: splashRingSpin 2.2s linear infinite;
  z-index: 1;
}
.splash-fire-ring::after{
  content:""; position: absolute; inset: 8px;
  border-radius: 50%;
  background: rgba(6,16,41,0.85);
  filter: blur(6px);
}

/* Sparks orbiting the logo */
.splash-spark{
  position: absolute; width: 8px; height: 8px;
  border-radius: 50%;
  background: #33CCFF;
  box-shadow: 0 0 10px #33CCFF, 0 0 20px #00B6FF;
  z-index: 2;
}
.splash-spark-1{ top: -4px; left: 50%; animation: splashOrbit 3s linear infinite; }
.splash-spark-2{ top: 50%; right: -4px; animation: splashOrbit 3s linear infinite -1s; }
.splash-spark-3{ bottom: -4px; left: 30%; animation: splashOrbit 3s linear infinite -2s; opacity:.7; }

/* --- Agarly text with neon flash --- */
.splash-text-wrap{
  position: relative;
  margin-top: 6px;
  animation: splashTextIn 1.0s cubic-bezier(.2,.9,.3,1.4) .35s both;
}
.splash-text{
  font-family: 'Inter','Cairo',sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 8vw, 64px);
  letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #cfeeff 50%, #00B6FF 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(0,182,255,0.45);
  position: relative; z-index: 2;
}
.splash-flash{
  position: absolute;
  inset-inline-start: -20%;
  top: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  filter: blur(2px);
  animation: splashFlashSweep 1.2s ease-out .6s 1 forwards;
  z-index: 3;
  pointer-events: none;
}
.splash-tagline{
  margin-top: 6px;
  color: #cfeeff;
  font-family: 'Inter','Cairo',sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0,182,255,0.55);
  opacity: 0;
  animation: splashTagIn .5s ease-out .9s forwards;
}

/* Keyframes */
@keyframes splashLogoIn{
  0%   { opacity: 0; transform: scale(.4) rotate(-15deg); }
  60%  { opacity: 1; transform: scale(1.18) rotate(8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes splashLogoFloat{
  0%   { transform: translateY(0)    scale(1);    }
  100% { transform: translateY(-6px) scale(1.04); }
}
@keyframes splashRingSpin{
  from { transform: rotate(0); }   to { transform: rotate(360deg); }
}
@keyframes splashOrbit{
  0%   { transform: rotate(0deg) translate(58px) rotate(0deg); }
  100% { transform: rotate(360deg) translate(58px) rotate(-360deg); }
}
@keyframes splashTextIn{
  0%   { opacity: 0; transform: scale(.55) translateY(20px); filter: blur(8px); }
  60%  { opacity: 1; transform: scale(1.1) translateY(-2px);  filter: blur(0); }
  100% { opacity: 1; transform: scale(1)   translateY(0);     filter: blur(0); }
}
@keyframes splashFlashSweep{
  0%   { left: -30%; opacity: 0; }
  20%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}
@keyframes splashTagIn{
  to { opacity: 1; }
}
@keyframes splashFadeOut{
  0%   { opacity: 1; transform: scale(1);   visibility: visible; }
  100% { opacity: 0; transform: scale(1.06); visibility: hidden; }
}
@keyframes splashBgDrift{
  0%   { transform: translate(0,0); }
  100% { transform: translate(40px,-30px); }
}

/* Hide splash entirely when finished (after the fade-out keyframe) */
.agarly-splash.splash-done{ display: none !important; }
[dir="rtl"] .splash-flash{ inset-inline-start: auto; right: -20%; animation-name: splashFlashSweepRTL; }
@keyframes splashFlashSweepRTL{
  0%   { right: -30%; opacity: 0; }
  20%  { opacity: 1; }
  100% { right: 130%; opacity: 0; }
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce){
  .agarly-splash{ animation: splashFadeOut .3s linear .8s forwards; }
  .splash-logo, .splash-fire-ring, .splash-spark, .splash-flash{ animation: none !important; }
}


/* =====================================================
   Price Range Slider (Dynamic)
===================================================== */
.price-range-container {
  grid-column: 1 / -1;
  background: rgba(0, 182, 255, 0.08);
  padding: 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 182, 255, 0.2);
  overflow: visible;
  box-sizing: border-box;
  width: 100%;
}
.price-range-container label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 8px;
}
.price-slider-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  overflow: visible;
}
.price-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  box-sizing: border-box;
}
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0, 182, 255, 0.4);
  border: 2px solid #fff;
}
.price-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0, 182, 255, 0.4);
  border: 2px solid #fff;
}
.price-sliders-track {
  position: relative;
  height: 44px;
  margin-bottom: 12px;
  overflow: visible;
}
.price-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0, 182, 255, 0.1);
  padding: 12px;
  border-radius: 8px;
}
.price-input {
  width: 100px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  outline: none;
  transition: var(--transition);
  min-width: 90px;
}
.price-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 182, 255, 0.12);
}
.price-input::placeholder {
  color: var(--text-muted);
}

/* =====================================================
   Mobile Logo Sizing
===================================================== */
.site-logo-mobile {
  height: auto;
  width: auto;
  max-height: 50px;
}
@media (max-width: 768px) {
  .site-logo-mobile {
    max-height: 60px;
    height: auto;
  }
  .price-display {
    flex-wrap: wrap;
  }
  .price-input {
    width: 90px;
    min-width: 80px;
    font-size: 12px;
    padding: 6px 8px;
  }
}

/* =====================================================
   Sticky Search Bar (Mobile)
===================================================== */
.sticky-search-bar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 150;
  box-shadow: 0 2px 12px rgba(10, 31, 68, 0.08);
  display: none;
}
@media (max-width: 768px) {
  .sticky-search-bar {
    display: block;
  }
}
.sticky-search-bar input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.sticky-search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 182, 255, 0.12);
}


/* =====================================================
   Search Buttons Wrapper (Desktop & Mobile)
===================================================== */
.search-buttons-wrapper {
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
  flex-wrap: wrap;
}
.search-buttons-wrapper .btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
}
.btn-advanced-search {
  background: linear-gradient(135deg, var(--accent), var(--primary)) !important;
  color: #fff !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 20px rgba(0, 182, 255, 0.3);
  transition: var(--transition);
  border: none;
}
.btn-advanced-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 182, 255, 0.5);
  color: #fff !important;
}

@media (max-width: 768px) {
  .search-buttons-wrapper {
    gap: 8px;
  }
  .search-buttons-wrapper .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}


/* =====================================================
   Login Button Display (All Devices)
===================================================== */
.btn-login-mobile {
  display: inline-flex !important;
  margin-right: 8px;
}

/* =====================================================
   Property Type Dropdown Styling
===================================================== */
.property-type-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300B6FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
  cursor: pointer;
}

.property-type-select option {
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
}

.property-type-select option:hover {
  background: var(--bg-soft);
}

@media (max-width: 768px) {
  .property-type-select {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* =====================================================
   New Plans Design (Modification #1)
===================================================== */
.plans-wrapper { padding: 20px 0 60px; }
.plans-header { text-align: center; margin-bottom: 40px; }
.plans-header h2 { font-size: 32px; color: var(--secondary); font-weight: 800; margin-bottom: 10px; }
.plans-header p { color: var(--text-muted); font-size: 16px; }

.plans-container {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.plan-card-new {
  background: #fff;
  border-radius: 20px;
  padding: 30px 24px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan-card-new:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,182,255,0.1);
}

.plan-card-new.popular {
  border-color: var(--primary);
}

.plan-card-new .badge-popular {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,182,255,0.3);
}

.plan-card-new .plan-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-soft);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: var(--primary);
}

.plan-card-new h3 {
  font-size: 22px;
  color: var(--secondary);
  font-weight: 800;
  margin-bottom: 8px;
}

.plan-card-new .plan-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 42px;
}

.plan-card-new .plan-price {
  margin-bottom: 25px;
}

.plan-card-new .plan-price .amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
}

.plan-card-new .plan-price .currency {
  font-size: 16px;
  color: var(--text-muted);
  margin-left: 4px;
}

.plan-card-new .plan-features {
  margin-bottom: 30px;
  flex-grow: 1;
}

.plan-card-new .plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text);
}

.plan-card-new .plan-features li i {
  color: #F59E0B;
  font-size: 14px;
}

.plan-card-new .plan-features li.check i {
  color: var(--success);
}

.plan-card-new .btn-subscribe {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Distinction Section */
.distinction-section {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1070px;
  margin: 0 auto;
  border: 1px solid var(--border);
}

.distinction-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.distinction-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.distinction-text h4 {
  font-size: 20px;
  color: var(--secondary);
  font-weight: 800;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.distinction-text h4 i {
  color: #F59E0B;
  font-size: 18px;
}

.distinction-text p {
  color: var(--text-muted);
  font-size: 14px;
}

.distinction-info {
  display: flex;
  align-items: center;
  gap: 30px;
}

.distinction-price {
  text-align: center;
}

.distinction-price .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.distinction-price .lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.distinction-duration {
  text-align: center;
  padding: 0 30px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.distinction-duration .val {
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
  display: block;
}

.distinction-duration .lbl {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .distinction-section {
    flex-direction: column;
    text-align: center;
  }
  .distinction-content {
    flex-direction: column;
  }
  .distinction-info {
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }
  .distinction-duration {
    border: 0;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
}

/* =====================================================
   Hero Add Listing Button (Modification #5)
   مثبت داخل الهيرو في أعلى اليمين، بنفس نمط زر الهيرو
===================================================== */
.hero-add-listing-btn {
  position: absolute;
  top: 24px;
  right: max(16px, calc((100% - 1240px) / 2 + 16px));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  box-shadow: var(--shadow-neon);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: var(--transition);
}

.hero-add-listing-btn:hover {
  transform: translateY(-2px);
  color: #fff !important;
  box-shadow: 0 0 28px rgba(0,182,255,0.55);
}

.hero-add-listing-btn i {
  font-size: 14px;
}

@media (max-width: 768px) {
  .hero-add-listing-btn {
    top: 44px;
    right: 16px;
    min-height: 48px;
    padding: 11px 20px;
    border-radius: 11px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .hero-add-listing-btn {
    top: 44px;
    right: 14px;
    min-height: 46px;
    padding: 10px 17px;
    font-size: 14px;
  }
}


/* =====================================================
   Notifications - Updated to match Agarly Design
===================================================== */
.notification-wrap { 
  position: relative; 
  display: flex !important; 
  align-items: center; 
  flex-shrink: 0;
}

.notification-bell {
  position: relative; 
  width: 42px; 
  height: 42px; 
  border: 1.5px solid var(--border);
  border-radius: 12px; 
  color: var(--secondary) !important; 
  display: inline-flex !important;
  align-items: center; 
  justify-content: center; 
  font-size: 20px; 
  transition: all 0.3s ease; 
  background: #fff;
  cursor: pointer;
  z-index: 10;
}

.notification-bell:hover, .notification-wrap.is-open .notification-bell {
  color: var(--primary) !important; 
  background: var(--bg-soft); 
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 182, 255, 0.15);
}

.notification-count {
  position: absolute; 
  top: -6px; 
  right: -6px; 
  min-width: 20px; 
  height: 20px;
  padding: 0 4px; 
  border-radius: 50%; 
  background: #EF4444 !important; 
  color: #fff !important;
  font: 700 11px/18px 'Cairo', sans-serif; 
  text-align: center; 
  border: 2px solid #fff;
  display: flex !important; 
  align-items: center; 
  justify-content: center;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
  z-index: 11;
}

.notification-dropdown {
  position: absolute; 
  top: calc(100% + 15px); 
  right: 0; 
  width: 400px; 
  max-width: calc(100vw - 30px); 
  background: #fff; 
  border: 1px solid var(--border); 
  border-radius: 18px; 
  box-shadow: 0 20px 50px rgba(10, 31, 68, 0.2); 
  overflow: hidden; 
  opacity: 0; 
  visibility: hidden; 
  transform: translateY(-10px); 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
  z-index: 300;
}

body[dir="rtl"] .notification-dropdown { right: auto; left: 0; }

.notification-wrap.is-open .notification-dropdown { 
  opacity: 1; 
  visibility: visible; 
  transform: translateY(0); 
}

/* Arrow indicator */
.notification-dropdown::before {
  content: ''; 
  position: absolute; 
  top: -8px; 
  right: 12px; 
  width: 16px; 
  height: 16px;
  background: #fff; 
  border-left: 1px solid var(--border); 
  border-top: 1px solid var(--border);
  transform: rotate(45deg); 
  z-index: 1;
}
body[dir="rtl"] .notification-dropdown::before { right: auto; left: 12px; }

.notification-dropdown-head {
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 18px 20px; 
  border-bottom: 1px solid var(--border); 
  background: #fff;
  position: relative; 
  z-index: 2;
}

.notification-dropdown-head strong { font-size: 17px; color: var(--secondary); font-weight: 800; }
.notification-dropdown-head a { color: var(--primary); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 5px; }

.notification-dropdown-list { max-height: 480px; overflow-y: auto; padding: 12px; background: #fff; }

.notification-item {
  position: relative; 
  display: flex; 
  align-items: flex-start; 
  gap: 12px; 
  padding: 14px;
  border-radius: 14px; 
  transition: var(--transition); 
  border: 1px solid #F1F5F9;
  margin-bottom: 10px; 
  background: #fff; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.notification-item:hover { background: #F8FAFC; border-color: var(--primary); transform: translateY(-2px); }
.notification-item.is-unread { background: rgba(0, 182, 255, 0.03); border-color: rgba(0, 182, 255, 0.1); }

.notification-thumb {
  flex: 0 0 70px; 
  width: 70px; 
  height: 60px; 
  border-radius: 10px; 
  object-fit: cover;
  background: #f1f5f9; 
  border: 1px solid #e2e8f0;
}

.notification-item-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.notification-item-title { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  color: var(--secondary); 
  font-size: 14px; 
  font-weight: 700; 
  line-height: 1.4; 
}
.notification-status-icon { font-size: 14px; }
.notification-status-icon.success { color: var(--success); }
.notification-status-icon.danger { color: var(--danger); }

.notification-item-body { 
  color: var(--primary); 
  font-size: 13px; 
  font-weight: 600; 
  text-decoration: none; 
  display: block;
}

.notification-item-info {
  display: flex; 
  align-items: center; 
  gap: 10px; 
  color: var(--text-muted);
  font-size: 11px; 
  margin-top: 2px;
}
.notification-item-info span { display: flex; align-items: center; gap: 4px; }

.notification-item-footer {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  margin-top: 10px; 
  width: 100%;
}

.notification-action-btn {
  padding: 6px 14px; 
  border: 1px solid var(--primary); 
  border-radius: 8px;
  color: var(--primary); 
  font-size: 12px; 
  font-weight: 700; 
  transition: var(--transition);
}
.notification-action-btn:hover { background: var(--primary); color: #fff; }

.notification-time-ago {
  display: flex; 
  align-items: center; 
  gap: 5px; 
  color: var(--text-muted); 
  font-size: 11px;
}
.notification-time-ago::before {
  content: ''; 
  width: 6px; 
  height: 6px; 
  background: var(--primary); 
  border-radius: 50%;
}

/* Enable Notifications Banner */
.notification-enable-banner {
  display: flex; 
  align-items: center; 
  gap: 12px; 
  padding: 15px 20px;
  background: #fff; 
  border-top: 1px solid var(--border);
}
.notification-enable-icon {
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  background: var(--bg-soft);
  color: var(--primary); 
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 18px;
}
.notification-enable-text strong { display: block; font-size: 13px; color: var(--secondary); }
.notification-enable-text span { font-size: 11px; color: var(--text-muted); }

/* Mobile Adjustments */
@media (max-width: 768px) {
  .header-actions .notification-wrap {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .header-actions .notification-bell {
    width: 44px; 
    height: 44px; 
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important; 
    color: #fff !important;
    display: inline-flex !important;
  }
  
  .header-actions .notification-count {
    border-color: #0A1F44; /* Match dark header background */
  }

  .notification-dropdown {
    position: fixed; 
    top: calc(var(--header-h) + 10px); 
    left: 12px; 
    right: 12px;
    width: auto; 
    max-width: none; 
    border-radius: 20px;
  }
  
  .notification-dropdown::before {
    right: 65px; 
  }
  body[dir="rtl"] .notification-dropdown::before { left: 65px; right: auto; }
  
  .notification-item { padding: 12px; }
  .notification-thumb { flex: 0 0 60px; width: 60px; height: 55px; }
}

/* Notifications Page Styles */
.notifications-page { padding: 40px 0 80px; }
.notifications-page-head { margin-bottom: 30px; }
.notifications-page-head h1 { font-size: 28px; color: var(--secondary); font-weight: 800; }

.notifications-list-full {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow);
  padding: 15px; border: 1px solid var(--border);
}

.notifications-list-full .notification-item {
  padding: 20px; margin-bottom: 15px; border-bottom: 1px solid #F1F5F9;
}
.notifications-list-full .notification-item:last-child { border-bottom: 0; }


/* My Viewings / Compensation — added without changing existing components */
.viewing-compensation-card {
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  padding:24px; margin:0 0 24px; border:1px solid #e5d8ff; border-radius:16px;
  background:linear-gradient(135deg,#fbf8ff 0%,#f5f0ff 100%); box-shadow:var(--shadow);
}
.viewing-compensation-card .comp-left { display:flex; align-items:center; gap:20px; min-width:0; }
.viewing-compensation-card .ticket-icon { flex:0 0 82px; width:82px; height:82px; border-radius:18px; display:flex; align-items:center; justify-content:center; background:#6e45e2; color:#fff; position:relative; }
.viewing-compensation-card .ticket-icon svg { width:44px; height:44px; }
.viewing-compensation-card .ticket-star { position:absolute; top:-12px; right:-8px; font-size:20px; }
.viewing-compensation-card .comp-info h3 { margin:0 0 8px; color:#5f2ab8; font-size:20px; }
.viewing-compensation-card .comp-info p { margin:0 0 14px; color:var(--text); }
.viewing-compensation-card .comp-right { flex:0 0 120px; text-align:center; padding:12px 18px; border-right:1px solid #dfd3f4; }
.viewing-compensation-card .comp-count { color:#5f2ab8; font-size:42px; font-weight:800; line-height:1; }
.viewing-compensation-card .comp-label { margin-top:6px; color:#5f2ab8; font-weight:700; }
.viewing-compensation-card .comp-status { display:inline-block; margin-top:8px; padding:4px 10px; border-radius:999px; color:#5f2ab8; background:#eadfff; font-size:12px; }
.viewing-tabs { display:flex; gap:10px; border-bottom:1px solid var(--border); margin-bottom:18px; }
.viewing-tabs .tab-btn { flex:1; padding:14px 12px; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--text-muted); cursor:pointer; font:inherit; font-weight:700; }
.viewing-tabs .tab-btn.active { color:var(--primary); border-bottom-color:var(--primary); }
.tab-content { display:none; }
.tab-content.active { display:block; }
.viewing-item-card { display:flex; align-items:stretch; justify-content:space-between; gap:20px; padding:18px; margin-bottom:16px; border:1px solid var(--border); border-radius:16px; background:#fff; box-shadow:var(--shadow); }
.viewing-item-card .item-main { display:flex; align-items:center; gap:18px; min-width:0; flex:1; }
.viewing-item-card .item-img { position:relative; flex:0 0 175px; width:175px; }
.viewing-item-card .item-img img { display:block; width:100%; height:120px; object-fit:cover; border-radius:10px; }
.viewing-item-card .item-badge { position:absolute; right:8px; bottom:8px; padding:4px 8px; border-radius:6px; font-size:11px; font-weight:700; background:#dcfce7; color:#166534; }
.viewing-item-card .item-badge.warning { background:#fef3c7; color:#92400e; }
.viewing-item-card .item-details { min-width:0; }
.viewing-item-card .item-details h4 { margin:0 0 8px; color:var(--secondary); font-size:18px; }
.viewing-item-card .location { margin:0 0 12px; color:var(--text-muted); }
.viewing-item-card .item-specs { display:flex; flex-wrap:wrap; gap:12px; color:var(--text-muted); font-size:13px; }
.viewing-item-card .item-meta { flex:0 0 190px; padding-inline-start:18px; border-inline-start:1px solid var(--border); }
.viewing-item-card .meta-row { display:flex; flex-direction:column; gap:4px; margin-bottom:10px; font-size:13px; }
.viewing-item-card .meta-row .label { color:var(--text-muted); }
.viewing-item-card .meta-row .value { color:var(--secondary); font-weight:700; }
.viewing-item-card .meta-row .value.warning { color:#b7791f; }
.viewing-ways-section { margin-top:24px; padding:22px; border:1px solid #dbeafe; border-radius:16px; background:#f8fbff; }
.viewing-ways-section h3 { margin:0 0 18px; color:var(--secondary); text-align:center; }
.ways-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.way-item { padding:14px; text-align:center; }
.way-icon { color:var(--primary); font-size:25px; margin-bottom:8px; }
.way-item h4 { margin:0 0 6px; color:var(--secondary); font-size:15px; }
.way-item p { margin:0; color:var(--text-muted); font-size:13px; line-height:1.7; }
.help-footer-card { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:20px; padding:18px 22px; border-radius:16px; background:var(--secondary); color:#fff; }
.help-footer-card h4, .help-footer-card p { margin:0; }
.help-footer-card p { margin-top:5px; opacity:.82; font-size:13px; }

@media (max-width:768px) {
  .viewing-compensation-card { flex-direction:column; align-items:stretch; padding:16px; gap:16px; }
  .viewing-compensation-card .comp-left { align-items:flex-start; gap:12px; }
  .viewing-compensation-card .ticket-icon { flex-basis:64px; width:64px; height:64px; }
  .viewing-compensation-card .ticket-icon svg { width:34px; height:34px; }
  .viewing-compensation-card .comp-info h3 { font-size:17px; }
  .viewing-compensation-card .comp-info p { font-size:13px; }
  .viewing-compensation-card .comp-right { border-right:0; border-top:1px solid #dfd3f4; padding:14px 0 0; }
  .viewing-item-card { flex-direction:column; gap:14px; padding:14px; }
  .viewing-item-card .item-main { align-items:flex-start; gap:12px; }
  .viewing-item-card .item-img { flex-basis:110px; width:110px; }
  .viewing-item-card .item-img img { height:92px; }
  .viewing-item-card .item-details h4 { font-size:15px; }
  .viewing-item-card .item-specs { gap:7px; font-size:11px; }
  .viewing-item-card .item-meta { flex:initial; padding-inline-start:0; padding-top:12px; border-inline-start:0; border-top:1px solid var(--border); }
  .ways-grid { grid-template-columns:1fr; gap:4px; }
  .way-item { display:grid; grid-template-columns:38px 1fr; grid-template-rows:auto auto; column-gap:8px; text-align:start; padding:10px 0; }
  .way-icon { grid-row:1 / span 2; text-align:center; }
  .help-footer-card { flex-direction:column; align-items:stretch; text-align:center; }
}
.form-help { display:block; margin-top:6px; color:var(--text-muted); font-size:12px; }


/* قرارات مالك الإعلان على طلبات المعاينة */
.owner-viewing-requests {
  margin: 0 0 24px;
  padding: 20px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
}
.owner-viewing-requests-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.owner-viewing-requests-heading h2 {
  margin: 0;
  color: var(--secondary, #0a1f44);
  font-size: 20px;
}
.owner-viewing-count {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-weight: 700;
}
.owner-viewing-list { display: grid; gap: 14px; margin-top: 16px; }
.owner-viewing-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}
.owner-viewing-request-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.owner-viewing-request-main img {
  width: 92px;
  height: 72px;
  flex: 0 0 92px;
  object-fit: cover;
  border-radius: 10px;
}
.owner-viewing-request-main h3 { margin: 0 0 6px; color: var(--secondary, #0a1f44); font-size: 16px; }
.owner-viewing-request-main p { margin: 4px 0; font-size: 13px; }
.owner-viewing-request-actions { display: flex; flex-direction: column; align-items: stretch; gap: 9px; min-width: 210px; }
.viewing-decision-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.viewing-decision-actions form { margin: 0; }
.btn-viewing-accept, .btn-viewing-reject { width: 100%; color: #fff !important; border: 0; font-weight: 700; }
.btn-viewing-accept { background: #16a34a !important; }
.btn-viewing-accept:hover { background: #15803d !important; }
.btn-viewing-reject { background: #dc2626 !important; }
.btn-viewing-reject:hover { background: #b91c1c !important; }
.item-badge.danger { background: #dc2626; }
.meta-row .value.danger { color: #dc2626; }
.meta-row .value.success { color: #16a34a; }

@media (max-width: 768px) {
  .owner-viewing-requests { padding: 14px; }
  .owner-viewing-requests-heading h2 { font-size: 17px; }
  .owner-viewing-request { align-items: stretch; flex-direction: column; gap: 12px; }
  .owner-viewing-request-main { align-items: flex-start; }
  .owner-viewing-request-main img { width: 84px; height: 68px; flex-basis: 84px; }
  .owner-viewing-request-actions { width: 100%; min-width: 0; }
  .viewing-decision-actions { grid-template-columns: 1fr 1fr; }
  .viewing-decision-actions .btn { min-height: 44px; font-size: 13px; }
}


/* Password visibility toggle */
.password-field {
  position: relative;
  width: 100%;
}
.password-field .password-input {
  width: 100%;
  padding-inline-end: 48px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #6b7a99);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  z-index: 2;
  transition: color .2s ease, background .2s ease;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--primary, #00b6ff);
  background: var(--bg-soft, #eaf4fb);
  outline: none;
}
.password-toggle i { font-size: 16px; pointer-events: none; }
[dir="rtl"] .password-field .password-input { padding-left: 48px; padding-right: 14px; }
[dir="ltr"] .password-field .password-input { padding-right: 48px; padding-left: 14px; }
@media (max-width: 768px) {
  .password-toggle { width: 38px; height: 38px; inset-inline-end: 8px; }
  .password-toggle i { font-size: 17px; }
}


/* وضع اعتماد المعاينات من إدارة الموقع */
.owner-approval-mode-notice {
  margin: 0 0 18px;
  padding: 15px 18px;
  border: 1px solid #bfdbfe;
  border-right: 4px solid var(--primary, #00b6ff);
  border-radius: 12px;
  background: #eff6ff;
  color: var(--secondary, #0a1f44);
}
.owner-approval-mode-notice strong { display: block; margin-bottom: 4px; }
.owner-approval-mode-notice p { margin: 0; color: #475569; font-size: 13px; }
.owner-approval-automatic-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #eff6ff;
  color: var(--secondary, #0a1f44);
  font-size: 13px;
  text-align: center;
}
[dir="ltr"] .owner-approval-mode-notice { border-right: 1px solid #bfdbfe; border-left: 4px solid var(--primary, #00b6ff); }


/* Password visibility control — final accessible style */
.password-field {
  position: relative;
  display: block;
  width: 100%;
}
.password-field .password-input {
  width: 100%;
  min-height: 44px;
  padding-inline-end: 52px !important;
}
.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  transform: translateY(-50%);
  z-index: 5;
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--primary, #00b6ff);
  background: rgba(0, 182, 255, .10);
  outline: 2px solid rgba(0, 182, 255, .25);
  outline-offset: 1px;
}
.password-eye-svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
[dir="rtl"] .password-field .password-input { padding-left: 52px !important; padding-right: 14px !important; }
[dir="ltr"] .password-field .password-input { padding-right: 52px !important; padding-left: 14px !important; }
@media (max-width: 768px) {
  .password-toggle { width: 40px; height: 40px; inset-inline-end: 6px; }
  .password-eye-svg { width: 21px; height: 21px; }
}
