    :root {
      --primary: #334747;
      --accent: #C5B48A;
      --font-primary: 'Shaheen', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
    }

    * {
      -webkit-tap-highlight-color: transparent;
    }

    html,
    body,
    body.font-sans,
    button,
    input,
    textarea,
    select {
      font-family: var(--font-primary);
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes fadeInLeft {
      from {
        opacity: 0;
        transform: translateX(-50px);
      }

      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @keyframes fadeInRight {
      from {
        opacity: 0;
        transform: translateX(50px);
      }

      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @keyframes scaleIn {
      from {
        opacity: 0;
        transform: scale(0.9);
      }

      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .animate-on-scroll {
      opacity: 1;
    }

    .motion-target,
    .project-motion {
      opacity: 0;
      transform: translateY(24px);
      transition: opacity .55s ease, transform .55s ease;
      transition-delay: var(--motion-delay, 0ms);
      will-change: opacity, transform;
    }

    .motion-target.animated,
    .project-motion.animated {
      opacity: 1;
      transform: translateY(0);
    }

    .hero-gradient {
      background: linear-gradient(135deg, rgba(51, 71, 71, 0.75) 0%, rgba(51, 71, 71, 0.85) 100%);
    }

    /* Video Hero Styles */
    .video-hero {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
    }

    .video-hero iframe {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      min-width: 100%;
      min-height: 100%;
      /* يغطي العرض/الطول مع الحفاظ على 16:9 */
      width: 177.7778vh;
      height: 56.25vw;
    }

    /* الجوال */
    @media (max-width:768px) {
      section#home {
        height: 100dvh;
      }

      /* يملأ شاشة الجوال فعليًا */
      .video-hero {
        height: 100dvh;
      }

      .video-hero iframe {
        /* غطّ الشاشة بالكامل بدون object-fit */
        width: 177.7778dvh;
        /* 100dvh * (16/9) */
        height: 100dvh;
        min-width: 100%;
        min-height: 100%;
        transform: translate(-50%, -50%);
      }
    }

    /*Fallback للمتصفحات اللي ما تدعم dvh*/
    @supports not (height:100dvh) {
      @media (max-width:768px) {

        section#home,
        .video-hero {
          height: 100vh;
        }

        .video-hero iframe {
          width: 177.7778vh;
          height: 100vh;
        }
      }
    }


    .glass-effect {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .feature-card {
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @media (hover: hover) {
      .feature-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
      }
    }

    .nav-link {
      position: relative;
      transition: color 0.3s;
      padding: 0.5rem 0;
    }

    .nav-link::after {
      content: '';
      position: absolute;
      bottom: 0;
      right: 0;
      width: 0;
      height: 2px;
      background: var(--accent);
      transition: width 0.3s;
    }

    .nav-link:hover::after {
      width: 100%;
    }

    /* Project Card v2 */
    .project-card {
      position: relative;
      border-radius: 1rem;
      background: #fff;
      border: 1px solid #e5e7eb;
      /* جديد */
      box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
      /* أقوى شوي */
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .project-body {
      padding: 1rem 1.1rem 1.2rem;
    }

    .project-thumb {
      position: relative;
      aspect-ratio: 16/9;
      background: #e5e7eb center/cover no-repeat;
    }

    .project-thumb::after {
      /* تدرّج خفيف أسفل الصورة لقراءة النص */
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 55%);
    }

    .project-badge {
      position: absolute;
      top: .75rem;
      left: .75rem;
      background: #334747;
      color: #fff;
      padding: .25rem .6rem;
      border-radius: .5rem;
      font-size: .75rem;
      font-weight: 700;
    }

    .project-body {
      padding: 1rem 1rem 1.1rem;
    }

    .project-title {
      font-weight: 800;
      color: #498585;
      font-size: 1.1rem;
      margin-bottom: .25rem;
    }

    .project-sub {
      color: #374151;
      opacity: .85;
      font-size: .95rem;
      margin-bottom: .6rem;
    }

    .project-stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: .5rem;
      margin-bottom: .9rem;
      font-size: .85rem;
      color: #374151;
    }

    .project-stat {
      background: #f3f4f6;
      border-radius: .6rem;
      padding: .5rem .6rem;
      text-align: center;
    }

    .project-stat span {
      display: block;
      font-weight: 700;
      color: #0b7261;
      font-size: .95rem;
    }

    .project-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: .75rem;
    }

    .more-btn {
      display: inline-flex;
      align-items: center;
      gap: .35rem;
      padding: .55rem .9rem;
      border-radius: 999px;
      font-weight: 700;
      background: #0b7261;
      color: #fff;
    }

    .more-btn:hover {
      background: #CFA37A;
      color: #fff
    }

    .card-logo {
      position: absolute;
      inset: auto auto .6rem .8rem;
      opacity: .08;
      pointer-events: none;
      height: 28px;
    }

    @media (max-width:768px) {
      .project-title {
        font-size: 1rem
      }

      .project-sub {
        font-size: .9rem
      }

      .project-stats {
        grid-template-columns: repeat(3, 1fr)
      }
    }


    #toTop {
      position: fixed;
      bottom: 20px;
      left: 20px;
      width: 50px;
      height: 50px;
      background: var(--primary);
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: all 0.3s;
      z-index: 1000;
      box-shadow: 0 4px 12px rgba(11, 114, 97, 0.3);
    }

    #toTop.show {
      opacity: 1;
      pointer-events: all;
    }

    #toTop:hover {
      background: var(--accent);
      transform: translateY(-5px);
      box-shadow: 0 6px 20px rgba(207, 163, 122, 0.4);
    }

    @media (max-width: 768px) {
      #toTop {
        width: 45px;
        height: 45px;
        bottom: 15px;
        left: 15px;
      }
    }

    body.mobile-menu-open {
      overflow: hidden;
      touch-action: none;
    }

    .menu-trigger {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(255, 255, 255, 0.28);
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(6px);
    }

    .mobile-menu {
      transform: translateX(100%);
      opacity: 0;
      pointer-events: none;
      transition: transform 0.36s ease, opacity 0.3s ease;
      background:
        radial-gradient(900px 480px at 82% 15%, rgba(197, 180, 138, .12), transparent 62%),
        linear-gradient(165deg, #334747 0%, #2d4141 100%);
    }

    .mobile-menu.open {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
    }

    .mobile-menu-shell {
      height: 100%;
      display: flex;
      flex-direction: column;
      padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 1.5rem;
    }

    .mobile-menu-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.1rem;
    }

    .mobile-close {
      width: 44px;
      height: 44px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.32);
      color: #fff;
      font-size: 1.4rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0.08);
      transition: background .2s ease, transform .2s ease;
    }

    .mobile-close:active {
      transform: scale(.96);
    }

    .mobile-brand {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .mobile-brand-logo {
      height: 52px;
      width: auto;
      object-fit: contain;
      filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.24));
    }

    .mobile-nav-links {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: .85rem;
      padding: 0 .5rem;
    }

    .mobile-nav-links .mobile-link {
      width: min(320px, 100%);
      text-align: center;
      color: #fff;
      font-size: clamp(1.45rem, 4.6vw, 1.7rem);
      font-weight: 800;
      letter-spacing: .3px;
      border-radius: 999px;
      padding: .75rem 1rem;
      transition: color .25s ease, background-color .25s ease, transform .2s ease;
    }

    .mobile-nav-links .mobile-link:hover,
    .mobile-nav-links .mobile-link:focus-visible {
      color: var(--accent);
      background: rgba(255, 255, 255, 0.08);
      transform: translateY(-1px);
      outline: none;
    }

    .mobile-cta {
      width: min(300px, 100%);
      margin: 0 auto max(.4rem, env(safe-area-inset-bottom));
      border: 2px solid rgba(255, 255, 255, .82);
      color: #fff;
      border-radius: 999px;
      padding: .9rem 1.1rem;
      text-align: center;
      font-size: 1.16rem;
      font-weight: 800;
      transition: background-color .25s ease, border-color .25s ease, color .25s ease;
    }

    .mobile-cta:hover,
    .mobile-cta:focus-visible {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
      outline: none;
    }

    @media (prefers-reduced-motion: reduce) {
      .mobile-menu,
      .mobile-nav-links .mobile-link,
      .mobile-cta,
      .mobile-close {
        transition: none;
      }
    }

    .tab-content {
      animation: fadeInUp 0.5s;
    }

    @keyframes pulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.05);
      }
    }

    .pulse-animation {
      animation: pulse 2s infinite;
    }

    /* Button improvements */
    button,
    a {
      -webkit-user-select: none;
      user-select: none;
    }

    .service-tab {
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    /* Better spacing for mobile */
    @media (max-width: 768px) {
      section {
        scroll-margin-top: 70px;
      }
    }

    /* Polish for the currently-generated classes (card/body/stats...) */
    .card {
      border-radius: 16px;
      border: 1px solid #e5e7eb;
      box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
      overflow: hidden;
      padding: 3%;
      background: #fff;
    }

    /* رأس البطاقة (صورة/خلفية) */
    .card-fallback {
      position: relative;
      border-top-left-radius: 16px;
      border-top-right-radius: 16px;
      aspect-ratio: 16/9;
      /* تدرّج براند + علامة مائية خفيفة */
      background:
        linear-gradient(180deg, rgba(73, 133, 133, 0.15), rgba(73, 133, 133, 0.15)),
        url('assets/logo-w.svg') center/45% no-repeat,
        linear-gradient(180deg, #ecf1f1 0%, #cfd7d7 100%);
    }

    .card-fallback::after {
      content: "";
      position: absolute;
      inset: 0;
      /* تدرّج سفلي يساعد القراءة */
      background: linear-gradient(to top, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 60%);
    }

    /* جسم البطاقة */
    .body {
      padding: 14px 16px 16px;
    }

    .body>h3 {
      color: #0b7261;
      font-weight: 800;
      font-size: 1.05rem;
      line-height: 1.4;
      margin-bottom: 6px;
    }

    .body .badges {
      color: #374151;
      opacity: .9;
      font-size: .95rem;
      line-height: 1.7;
      margin-bottom: 10px;
    }

    /* إحصائيات صغيرة بشكل حبوب */
    .stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-bottom: 12px;
      font-size: .85rem;
      color: #374151;
    }

    .stats>div {
      background: #f3f4f6;
      text-align: center;
      padding: 8px 6px;
      border-radius: 10px;
    }

    .stats>div span {
      display: block;
      font-weight: 700;
      color: #0b7261;
    }

    /* زر المزيد */
    .btn.more-btn {
      margin-top: 0.5rem;
      margin-bottom: 0.25rem;
      /* مسافة إضافية من الأسفل */
      float: left;
      background: #CFA37A;
      color: #fff;
      padding: 0.55rem 0.95rem;
      border-radius: 999px;
      font-weight: 700;
      transition: background 0.3s ease, transform 0.2s ease;
    }


    .btn.more-btn:hover {
      background: #b28d61;
      /* لون أغمق عند التمرير */
      transform: translateY(-2px);
    }


    /* شارة حالة المشروع */
    .status-badge {
      position: absolute;
      top: .6rem;
      left: .6rem;
      /* RTL: أعلى يمين */
      z-index: 2;
      padding: .35rem .6rem;
      border-radius: .5rem;
      font-size: .75rem;
      font-weight: 800;
      color: #fff;
      box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
      backdrop-filter: saturate(1.1) blur(2px);
    }

    /* الألوان حسب الحالة */
    .status--available {
      background: #1ec397;
    }

    /* متاح للبيع */
    .status--dev {
      background: #d97706;
    }

    /* قيد التطوير (عنّابي/برتقالي) */
    .status--sold {
      background: #8f0606;
    }

    /* مباع بالكامل (رمادي) */

    /* إن كانت البطاقة بلا صورة، خلّي البادج فوق منطقة الصورة */
    .card-fallback {
      position: relative;
    }

    /* دبوس المدينة */
    .map-pin {
      position: absolute;
      transform: translate(-50%, -100%);
      /* رأس الدبوس على الإحداثية */
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #CFA37A;
      box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    }

    .map-pin::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 100%;
      transform: translateX(-50%);
      width: 2px;
      height: 10px;
      background: #CFA37A;
      border-radius: 2px;
      opacity: .9;
    }

    .map-pin.is-active {
      outline: 6px solid rgba(207, 167, 122, .25)
    }

    #map-progress .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #cbd5e1;
      opacity: .8;
    }

    #map-progress .dot.active {
      background: #0b7261;
      opacity: 1
    }

    #projects-map-showcase {
      background: linear-gradient(135deg, #334747 0%, #0b7261 100%);
      position: relative;
      z-index: 0;
    }


    #projects-map-showcase::before {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(27, 43, 43, 0.9) 100%);
      z-index: -1;
    }

    /* امتداد بعرض الشاشة حتى لو داخل حاوية فيها padding */
    .full-bleed {
      width: 100vw;
      position: relative;
      left: 50%;
      right: 50%;
      margin-left: -50vw;
      margin-right: -50vw;
    }

    /* خلفية قسم الخريطة بألوان الهوية */
    /* ===== Map label fix (override Tailwind utilities) ===== */

    /* 1) السماح بخروج التسميات خارج الحاوية الـ sticky */
    #projects-map-showcase .sticky {
      overflow: visible !important;
      /* يغلب overflow-hidden في الـHTML */
    }

    /* 2) ترتيب الطبقات */
    #map-stage {
      position: relative;
      z-index: 0;
      overflow: visible;
    }

    #map-stage .map-image {
      position: absolute;
      inset: 0;
      z-index: 2;
      display: block;
    }

    /* ===== Map dynamic background (per city) ===== */
    #map-bg {
      position: absolute;
      inset: 0;
      z-index: 0;
      overflow: hidden;
    }

    #map-bg .map-bg-layer {
      position: absolute;
      inset: 0;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      transform: scale(1.03);
      filter: blur(4px);
      opacity: 0;
      transition: opacity 600ms ease;
      will-change: opacity;
    }

    #map-bg .map-bg-layer.is-active {
      opacity: 0.55;
    }

    /* تدرّج بسيط فوق الصور للوضوح */
    #map-bg::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(8, 27, 26, .85) 0%, rgba(8, 27, 26, .55) 35%, rgba(8, 27, 26, .85) 100%);
      pointer-events: none;
    }

    #map-pins {
      position: absolute;
      inset: 0;
      z-index: 20;
      overflow: visible !important;
    }

    /* 3) الدبوس */
    #map-pins .map-pin {
      position: absolute;
      z-index: 21;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #CFA37A;
      box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
      transform: translate(-50%, -100%);
    }

    #map-pins .map-pin::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 100%;
      transform: translateX(-50%);
      width: 2px;
      height: 10px;
      background: #CFA37A;
      border-radius: 2px;
      opacity: .9;
    }

    /* 4) التسمية فوق الدبوس */
    #map-pins .map-label {
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      background: #fff;
      color: rgba(51, 71, 71, .92);
      border: 1px solid rgba(255, 255, 255, .15);
      padding: .25rem .5rem;
      border-radius: .5rem;
      font-size: .75rem;
      line-height: 1;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity .25s, transform .25s;
      box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
      z-index: 30;
    }

    /* 5) زدنا الخصوصية عشان تغلب أي قاعدة ثانية تضبط opacity */
    #map-pins .map-pin.is-active>.map-label {
      opacity: 1 !important;
      transform: translateX(-50%) translateY(-2px) !important;
    }



    /* نقاط التقدّم */
    #map-progress .dot {
      width: 6px;
      height: 28px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .3);
      transition: .3s;
    }

    #map-progress .dot.active {
      background: #C9A86A;
      /* لونك الذهبي */
      height: 40px;
    }


    /* ===== شاشة التحميل ===== */
    #preloader {
      position: fixed;
      inset: 0;
      background: #334747;
      /* لون الهوية */
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      opacity: 1;
      visibility: visible;
      transition: opacity 1s ease, visibility 1s ease;
    }

    #preloader.is-done {
      opacity: 0;
      visibility: hidden;
    }

    /* محتوى التحميل */
    #preloader .loader-content {
      text-align: center;
      animation: fadeInZoom 1.4s ease-out forwards;
    }

    /* الشعار */
    #preloader .pulse-logo {
      width: 190px;
      height: auto;
      opacity: 0;
      transform: scale(0.8);
      animation: fadeInZoom 1.4s ease-out forwards, pulse 1.8s ease-in-out 1.4s infinite;
    }

    /* دخول ناعم من المنتصف */
    @keyframes fadeInZoom {
      0% {
        opacity: 0;
        transform: scale(0.8);
      }

      60% {
        opacity: 1;
        transform: scale(1.05);
      }

      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    /* تأثير النبض */
    @keyframes pulse {
      0% {
        transform: scale(1);
        opacity: 1;
      }

      50% {
        transform: scale(1.12);
        opacity: 0.9;
      }

      100% {
        transform: scale(1);
        opacity: 1;
      }
    }
