/* ============================================================
   مؤسسة بيت الموردون — نظام التصميم
   نخب اللون: مأخوذ مباشرة من ألوان الشعار (كحلي غامق + بنفسجي/نيلي + توينت من الفوشيا والتركواز)
   الخط: Cairo (يطابق الطابع الهندسي السميك لحروف الشعار عربي/إنجليزي)
   ============================================================ */

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

:root{
  --ink:        #0D2B3E;   /* كحلي غامق من اسم الشعار */
  --ink-700:    #17435C;   /* كحلي أفتح للتدرجات */
  --steel:      #4453D6;   /* الأزرق النيلي من مثلث الشعار الأيمن - لمسات وروابط */
  --rebar:      #4B3FD1;   /* البنفسجي/النيلي من المعين المركزي بالشعار - أزرار الفعل الأساسية */
  --rebar-dark: #392FA6;
  --brand-magenta: #D6368F; /* فوشيا من طرف الشعار - لمسات زخرفية فقط */
  --brand-teal:     #5FCDBB; /* تركواز من أعلى الشعار - لمسات زخرفية فقط */
  --paper:      #F5F7FA;
  --paper-dim:  #ECEFF4;
  --line:       #DCE3EC;
  --text:       #1D2733;
  --muted:      #5B6472;
  --white:      #FFFFFF;

  --font-display: 'Cairo', sans-serif;
  --font-body: 'Cairo', sans-serif;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 10px rgba(13,43,62,.06);
  --shadow-md: 0 10px 30px rgba(13,43,62,.10);
  --container: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--text);
  background:var(--paper);
  direction:rtl;
  line-height:1.75;
}
h1,h2,h3,h4{
  font-family:var(--font-display);
  color:var(--ink);
  margin:0 0 .5em;
  line-height:1.3;
}
h1{ font-weight:900; }
h2{ font-weight:800; }
h3{ font-weight:700; }
p{ margin:0 0 1em; color:var(--muted); }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
.container{ max-width:var(--container); margin:0 auto; padding:0 20px; }
.tag-num{ font-family:'Cairo',sans-serif; direction:ltr; }

/* --------- شريط علوي (اتصل + وسائل تواصل) --------- */
.topbar{
  background:var(--ink);
  color:#C9D6EA;
  font-size:13px;
}
.topbar .container{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:8px; padding-bottom:8px; flex-wrap:wrap; gap:8px;
}
.topbar a{ color:#C9D6EA; }
.topbar .topbar-contact{ display:flex; gap:18px; flex-wrap:wrap; }
.topbar .topbar-contact span{ display:inline-flex; align-items:center; gap:6px; }
.topbar .topbar-social{ display:flex; gap:12px; }
.topbar .topbar-social a{ opacity:.85; }
.topbar .topbar-social a:hover{ opacity:1; color:var(--rebar); }

/* --------- الهيدر / النافيغيشن --------- */
.site-header{
  background:var(--white);
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:50;
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:14px; padding-bottom:14px; gap:20px;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ height:48px; width:auto; }
.brand .brand-text{ font-family:var(--font-display); font-weight:900; font-size:19px; color:var(--ink); }
.brand .brand-text small{ display:block; font-family:var(--font-body); font-weight:500; font-size:11px; color:var(--muted); letter-spacing:.5px; }

.main-nav{ display:flex; align-items:center; gap:6px; }
.main-nav a{
  padding:10px 14px; border-radius:8px; font-weight:600; font-size:15px; color:var(--ink);
  position:relative;
}
.main-nav a:hover, .main-nav a.active{ color:var(--rebar); }
.nav-toggle{ display:none; background:none; border:0; font-size:26px; color:var(--ink); }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 22px; border-radius:8px; font-weight:700; font-size:14.5px;
  border:2px solid transparent; transition:all .18s ease;
}
.btn-primary{ background:var(--rebar); color:var(--white); }
.btn-primary:hover{ background:var(--rebar-dark); transform:translateY(-1px); }
.btn-outline{ border-color:var(--ink); color:var(--ink); background:transparent; }
.btn-outline:hover{ background:var(--ink); color:var(--white); }
.btn-light{ background:var(--white); color:var(--ink); }
.btn-light:hover{ background:var(--paper-dim); }
.btn-sm{ padding:7px 14px; font-size:13px; }
.btn-block{ width:100%; }

/* --------- الهيرو / البانر --------- */
.hero{
  position:relative; overflow:hidden;
  background:var(--ink); color:var(--white);
}
.hero-slide{
  display:none;
  background-size:cover; background-position:center; background-repeat:no-repeat;
  min-height:520px;
}
.hero-slide.is-active{ display:flex; align-items:center; }
.hero-content{ max-width:640px; padding:80px 0; }
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:700;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.25);
  padding:6px 14px; border-radius:999px; margin-bottom:18px; color:#DCE8FF;
}
.hero h1{ color:var(--white); font-size:clamp(28px,4vw,46px); margin-bottom:.4em; }
.hero p.lead{ color:#C9D6EA; font-size:17px; max-width:520px; }
.hero-actions{ display:flex; gap:14px; margin-top:28px; flex-wrap:wrap; }
.hero-dots{ display:flex; gap:8px; justify-content:center; padding-bottom:22px; }
.hero-dots button{ width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.35); border:0; padding:0; }
.hero-dots button.is-active{ background:var(--rebar); width:22px; border-radius:6px; }

/* شريط ترحيبي بأرقام سريعة تحت الهيرو */
.stat-strip{ background:var(--white); border-bottom:1px solid var(--line); }
.stat-strip .container{
  display:grid; grid-template-columns:repeat(4,1fr); gap:0;
}
.stat-strip .stat{ text-align:center; padding:22px 10px; border-right:1px solid var(--line); }
.stat-strip .stat:first-child{ border-right:none; }
.stat-strip .stat b{ display:block; font-family:var(--font-display); font-size:26px; color:var(--ink); }
.stat-strip .stat span{ font-size:12.5px; color:var(--muted); }

/* --------- فاصل ريبار (توقيع التصميم) --------- */
/* نمط بصري مستوحى من تعرجات حديد التسليح (rebar ribs) يُستخدم كفاصل بين الأقسام */
.rebar-divider{
  height:14px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--rebar) 0px, var(--rebar) 3px,
    transparent 3px, transparent 16px
  );
  opacity:.9;
}
.rebar-divider.thin{ height:8px; opacity:.55; }
section .section-head .rebar-divider{ width:64px; height:6px; margin-bottom:16px; border-radius:4px; }

/* --------- الأقسام العامة --------- */
.section{ padding:74px 0; }
.section.alt{ background:var(--white); }
.section-head{ max-width:640px; margin-bottom:44px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.eyebrow{
  display:inline-block; font-family:var(--font-display); font-weight:800; font-size:13px;
  color:var(--rebar); letter-spacing:1px; margin-bottom:10px;
}

/* --------- من نحن --------- */
.about-grid{ display:grid; grid-template-columns:.9fr 1.1fr; gap:52px; align-items:center; }
.about-media{ position:relative; }
.about-media img{ border-radius:var(--radius-lg); box-shadow:var(--shadow-md); aspect-ratio:1/1; object-fit:cover; width:100%; }
.about-media::after{
  content:''; position:absolute; inset:auto -14px -14px auto; width:70%; height:70%;
  border:6px solid var(--rebar); border-radius:var(--radius-lg); z-index:-1; opacity:.35;
}
.about-copy .checklist{ margin-top:22px; display:grid; gap:12px; }
.about-copy .checklist li{ display:flex; gap:10px; align-items:flex-start; color:var(--text); font-weight:600; }
.about-copy .checklist li::before{ content:'✓'; color:var(--rebar); font-weight:900; }

/* --------- بطاقات (خدمات / منتجات) --------- */
.grid{ display:grid; gap:26px; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }

.card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius-lg);
  overflow:hidden; transition:transform .2s ease, box-shadow .2s ease; position:relative;
}
.card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.card .card-media{ aspect-ratio:16/11; overflow:hidden; background:var(--paper-dim); position:relative; }
.card .card-media img{ width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.card:hover .card-media img{ transform:scale(1.06); }
.card .card-num{
  position:absolute; top:12px; inset-inline-start:12px; background:rgba(13,43,62,.85); color:#fff;
  font-family:'Cairo'; direction:ltr; font-weight:700; font-size:13px;
  padding:4px 10px; border-radius:6px; letter-spacing:1px;
}
.card .card-body{ padding:20px 20px 22px; }
.card h3{ font-size:18px; margin-bottom:8px; }
.card p{ font-size:14px; margin-bottom:14px; }
.card .card-link{ font-weight:700; color:var(--steel); font-size:14px; display:inline-flex; align-items:center; gap:6px; }
.card .card-link::after{ content:'←'; transition:transform .15s; }
.card:hover .card-link::after{ transform:translateX(-4px); }

.section-foot{ text-align:center; margin-top:38px; }

/* --------- قسم عرض السعر / CTA --------- */
.cta-band{
  background:linear-gradient(120deg, var(--ink), var(--ink-700));
  color:var(--white); border-radius:var(--radius-lg); padding:48px;
  display:flex; align-items:center; justify-content:space-between; gap:30px; flex-wrap:wrap;
  position:relative; overflow:hidden;
}
.cta-band h2{ color:var(--white); margin-bottom:8px; }
.cta-band p{ color:#C9D6EA; margin-bottom:0; }
.cta-band .cta-actions{ display:flex; gap:12px; flex-wrap:wrap; }

/* --------- أحدث المشاريع / شبكة صغيرة --------- */
.latest-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; }

/* --------- صفحة تفاصيل (خدمة/منتج) --------- */
.detail-hero{ background:var(--paper-dim); padding:40px 0; border-bottom:1px solid var(--line); }
.breadcrumb{ font-size:13px; color:var(--muted); display:flex; gap:8px; align-items:center; }
.breadcrumb a{ color:var(--steel); }
.detail-body{ display:grid; grid-template-columns:2fr 1fr; gap:46px; padding:50px 0; }
.detail-body img.cover{ width:100%; border-radius:var(--radius-lg); margin-bottom:26px; box-shadow:var(--shadow-sm); }
.media-gallery{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:30px; }
.media-gallery figure{ margin:0; border-radius:var(--radius); overflow:hidden; aspect-ratio:4/3; background:var(--paper-dim); }
.media-gallery img, .media-gallery video{ width:100%; height:100%; object-fit:cover; }
.side-card{ background:var(--white); border:1px solid var(--line); border-radius:var(--radius-lg); padding:26px; position:sticky; top:100px; }
.side-card h4{ margin-bottom:14px; }
.side-card .btn{ margin-bottom:10px; }

/* --------- الفورمات (اتصل بنا / عرض سعر) --------- */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid .full{ grid-column:1 / -1; }
label{ display:block; font-weight:700; font-size:14px; margin-bottom:6px; color:var(--ink); }
input,select,textarea{
  width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:8px;
  font-family:inherit; font-size:14.5px; background:var(--white); color:var(--text);
}
input:focus,select:focus,textarea:focus{ outline:none; border-color:var(--steel); box-shadow:0 0 0 3px rgba(47,111,235,.12); }
textarea{ resize:vertical; min-height:120px; }
.form-box{ background:var(--white); border:1px solid var(--line); border-radius:var(--radius-lg); padding:32px; box-shadow:var(--shadow-sm); }
.alert{ padding:14px 18px; border-radius:8px; margin-bottom:20px; font-weight:600; font-size:14.5px; }
.alert-success{ background:#E7F6EC; color:#1B7A3D; border:1px solid #BFE8CB; }
.alert-error{ background:#FDECEA; color:#B3261E; border:1px solid #F6C6C2; }

/* --------- الأسئلة الشائعة --------- */
.faq-item{ border-bottom:1px solid var(--line); padding:18px 0; }
.faq-q{ display:flex; align-items:center; justify-content:space-between; cursor:pointer; font-weight:700; color:var(--ink); font-size:16px; }
.faq-q .plus{ font-size:22px; color:var(--rebar); transition:transform .2s; }
.faq-item.open .faq-q .plus{ transform:rotate(45deg); }
.faq-a{ max-height:0; overflow:hidden; transition:max-height .25s ease; }
.faq-item.open .faq-a{ max-height:400px; padding-top:12px; }

/* --------- زر الواتساب العائم --------- */
.whatsapp-float{
  position:fixed; bottom:26px; inset-inline-start:26px; z-index:200;
  width:60px; height:60px; border-radius:50%; background:#25D366; color:#fff;
  display:flex; align-items:center; justify-content:center; box-shadow:0 8px 22px rgba(37,211,102,.45);
  animation:wa-pulse 2.4s infinite;
}
.whatsapp-float svg{ width:30px; height:30px; }
@keyframes wa-pulse{
  0%{ box-shadow:0 0 0 0 rgba(37,211,102,.5); }
  70%{ box-shadow:0 0 0 14px rgba(37,211,102,0); }
  100%{ box-shadow:0 0 0 0 rgba(37,211,102,0); }
}

/* --------- الفوتر --------- */
.site-footer{ background:var(--ink); color:#B9C7DE; padding-top:60px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:36px; padding-bottom:40px; }
.site-footer h4{ color:#fff; font-size:16px; margin-bottom:16px; }
.site-footer .brand-text{ color:#fff; }
.site-footer p{ color:#93A4C2; font-size:14px; }
.site-footer ul li{ margin-bottom:10px; }
.site-footer a{ color:#B9C7DE; font-size:14px; }
.site-footer a:hover{ color:var(--rebar); }
.footer-social{ display:flex; gap:10px; margin-top:16px; }
.footer-social a{
  width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:center;
}
.footer-social a:hover{ background:var(--rebar); }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1); padding:20px 0; font-size:13px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; color:#8496B6;
}
.footer-bottom a{ color:#8496B6; }

/* --------- صفحات عامة (سياسة، صفحات ديناميكية) --------- */
.static-content{ max-width:820px; margin:0 auto; padding:60px 0; }
.static-content h1{ margin-bottom:20px; }
.static-content h2{ font-size:22px; margin-top:30px; }
.static-content p, .static-content li{ color:var(--text); }

/* --------- استجابة (Responsive) --------- */
@media (max-width:960px){
  .hero-slide{ min-height:400px; }
  .hero-content{ padding:56px 0; max-width:100%; }
  .about-grid{ grid-template-columns:1fr; }
  .detail-body{ grid-template-columns:1fr; }
  .grid-3, .grid-4, .latest-grid{ grid-template-columns:repeat(2,1fr); }
  .stat-strip .container{ grid-template-columns:repeat(2,1fr); }
  .stat-strip .stat:nth-child(3){ border-right:none; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:720px){
  .main-nav{
    position:fixed; inset-inline-end:0; top:0; bottom:0; width:78%; max-width:320px;
    background:var(--white); flex-direction:column; align-items:stretch; padding:90px 24px 24px;
    box-shadow:-10px 0 30px rgba(0,0,0,.15); transform:translateX(105%); transition:transform .25s ease; z-index:60;
  }
  [dir="rtl"] .main-nav{ transform:translateX(-105%); }
  .main-nav.open{ transform:translateX(0); }
  .nav-toggle{ display:block; }
  .header-cta{ display:none; }
  .grid-3, .grid-4, .latest-grid{ grid-template-columns:1fr; }
  .form-grid{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; }
  .cta-band{ flex-direction:column; text-align:center; }
  .media-gallery{ grid-template-columns:repeat(2,1fr); }
}
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}

/* وضع التركيز الظاهر لإمكانية الوصول */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline:3px solid var(--steel); outline-offset:2px;
}
