/* =========================================================
   أوتاد للمقاولات — تصميم الهاتف (يُحمَّل فقط على الشاشات حتى 760px)
   ========================================================= */

/* ---------- أساسيات ---------- */
html{scroll-padding-top:72px;}
body{font-size:15.5px;line-height:1.75;}
.wrap{padding:0 18px;}
section{padding:64px 0;}
.page-top{padding-top:104px;}
.section-head{margin-bottom:30px;}
.section-head h1,.section-head h2,.restore-copy h2,.contact-info h1,.contact-info h2,.about-copy h1{font-size:1.7rem;line-height:1.4;}
.section-head p,.section-head .sub{font-size:.95rem;}
.eyebrow-line{margin-bottom:10px;font-size:.84rem;}
.eyebrow-line .dash{width:22px;}

/* ---------- الهيدر ---------- */
.site-header,.site-header.scrolled{padding:calc(env(safe-area-inset-top,0px) + 10px) 0 10px;}
.logo{gap:8px;}
.logo-mark,.site-header.scrolled .logo-mark{height:38px;}
.logo-text b{font-size:1.35rem;}
.logo-text small{font-size:.66rem;margin-top:2px;}
.nav-right{gap:8px;}
.theme-toggle,.burger{width:40px;height:40px;}

/* ---------- زرار الاستشارة في الهيدر ---------- */
.nav-right .btn-sm{padding:9px 14px;font-size:.8rem;border-radius:8px;box-shadow:0 8px 18px -10px rgba(201,162,39,.8);}

/* ---------- زرار الواتساب والاتصال (نفس شكل الشاشة الكبيرة) ---------- */
.wa-float,.call-float{left:16px;width:58px;height:58px;}
.wa-float{bottom:calc(18px + env(safe-area-inset-bottom,0px));}
.call-float{bottom:calc(18px + 58px + 12px + env(safe-area-inset-bottom,0px));}
.wa-float svg{width:30px;height:30px;}
.call-float svg{width:25px;height:25px;}

/* ---------- قائمة الموبايل ---------- */
.mobile-panel{padding-left:18px;padding-right:18px;}
.mp-actions{padding-bottom:4px;}

/* ---------- الهيرو ---------- */
.hero{min-height:100svh;align-items:flex-end;padding:96px 0 34px;}
.hero-overlay{background:var(--hero-overlay-m);}
.hero h1{font-size:2rem;line-height:1.35;}
.hero .lead{font-size:.98rem;margin-top:14px;}
.hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px;}
.hero-actions .btn{padding:13px 10px;font-size:.88rem;}
.hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin-top:28px;padding-top:0;border:1px solid var(--line);border-radius:12px;background:var(--glass);overflow:hidden;}
.hero-stats > div{padding:12px 6px;text-align:center;}
.hero-stats > div + div{border-inline-start:1px solid var(--line);}
.hero-stats b{font-size:1.4rem;}
.hero-stats span{font-size:.74rem;}
.hero-tag{display:none;}

/* ---------- الواجهات ---------- */
.showcase{gap:52px;}
.show-row,.show-row:nth-child(even){grid-template-columns:1fr;gap:20px;}
.show-row:nth-child(even) .show-media{order:0;}
.show-media::before{content:none;}
.show-media > img,
.show-media .slides{width:100% !important;height:auto !important;aspect-ratio:4/3;border-radius:14px;}
.show-media .slides img{object-fit:cover;}
.show-media .dots{bottom:12px;right:12px;}
.zoom-chip{bottom:12px;left:12px;}
.show-copy{border:0;padding:0;}
.show-copy h3{font-size:1.6rem;}
.show-copy p{margin:8px 0 14px;font-size:.95rem;}
.show-feats{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-bottom:18px;margin-inline:-18px;padding-inline:18px;}
.show-feats::-webkit-scrollbar{display:none;}
.show-feats li{white-space:nowrap;flex:none;}

/* ---------- الترميم ---------- */
.restore-wrap{gap:26px;}
.ba-fig{padding:6px;border-radius:14px;}
.ba-fig img{border-radius:10px;}
.ba-fig figcaption span{display:none;}
.restore-list{gap:12px;margin-bottom:24px;}
.restore-copy .btn{width:100%;}

/* ---------- المشاريع ---------- */
.proj-types{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;margin-top:16px;margin-inline:-18px;padding-inline:18px;scrollbar-width:none;}
.proj-types::-webkit-scrollbar{display:none;}
.proj-types li{flex:none;white-space:nowrap;padding:6px 14px;border:1px solid var(--line-strong);border-radius:999px;font-size:.82rem;}
.proj-types li::before{display:none;}
.proj-grid,.proj-grid.preview{grid-template-columns:repeat(2,1fr);gap:8px;}
.proj-card{border-radius:10px;aspect-ratio:1/1;}
.proj-grid:not(.preview) .proj-card:nth-child(5n+1){grid-column:span 2;aspect-ratio:16/10;}
.proj-more{margin-top:24px;}
.proj-more .btn{width:100%;}

/* ---------- الخدمات: سحب أفقي بدل قائمة طويلة ---------- */
.services-grid{
  display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px;
  background:none;border:0;border-radius:0;
  margin-inline:-18px;padding:0 18px 8px;scrollbar-width:none;
}
.services-grid::-webkit-scrollbar{display:none;}
.service-item{flex:0 0 78%;scroll-snap-align:start;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:24px 20px;}
.service-item .icon-wrap{width:42px;height:42px;margin-bottom:14px;}
.swipe-hint{display:block;margin-top:12px;font-size:.8rem;color:var(--muted);}

/* ---------- خطوات العمل ---------- */
.process-step{grid-template-columns:44px 1fr;column-gap:14px;padding-bottom:22px;}
.process-num{width:44px;height:44px;font-size:1.05rem;}
.process-row::before{right:21.5px;}
.process-step p{font-size:.88rem;}

/* ---------- التواصل ---------- */
.contact-wrap{gap:26px;}
.contact-info > p{margin-bottom:20px;}
.contact-method{padding:12px;border-radius:12px;}
.contact-method .ic{width:40px;height:40px;}
.contact-form{padding:22px 16px;border-radius:14px;}
.field-row{grid-template-columns:1fr;gap:0;}

/* ---------- من نحن ---------- */
.about-wrap{gap:24px;}
.about-vm{grid-template-columns:1fr;gap:10px;}
.why-card{padding:22px 18px;border-radius:14px;}

/* ---------- المدونة: قائمة المقالات ---------- */
.blog-grid{grid-template-columns:1fr;gap:18px;}
.post-card{border-radius:16px;box-shadow:var(--shadow-sm);transition:scale .2s ease,border-color .2s ease;-webkit-tap-highlight-color:transparent;}
.post-card:active{scale:.985;border-color:var(--accent-line);}
.post-thumb{position:relative;aspect-ratio:16/10;}
.post-thumb::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(13,15,20,.55),transparent 55%);pointer-events:none;}
/* أحدث مقال يظهر أكبر */
.blog-grid > .post-card:first-child .post-thumb{aspect-ratio:4/3;}
.blog-grid > .post-card:first-child .post-body h2{font-size:1.32rem;}
.post-body{padding:18px 18px 0;gap:10px;}
.post-meta{gap:10px;font-size:.8rem;}
.post-meta time::before{content:"";display:inline-block;width:4px;height:4px;margin-inline-end:10px;border-radius:50%;background:var(--muted);vertical-align:middle;}
.post-tag{padding:3px 12px;border:1px solid var(--accent-line);}
.post-body h2{font-size:1.18rem;line-height:1.6;}
.post-body p{font-size:.92rem;line-height:1.8;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.post-more{
  align-self:stretch;display:flex;align-items:center;justify-content:space-between;
  margin:6px -18px 0;padding:14px 18px;border-top:1px solid var(--line);font-size:.9rem;
}
.post-more::after{content:"←";font-size:1.1rem;transition:transform .2s ease;}
.post-card:active .post-more::after{transform:translateX(-4px);}

/* ---------- المقال ---------- */
.crumbs{flex-wrap:nowrap;overflow:hidden;white-space:nowrap;gap:8px;font-size:.8rem;margin-bottom:18px;}
.crumbs [aria-current]{overflow:hidden;text-overflow:ellipsis;min-width:0;}
.article-head{margin:0 0 20px;}
.article-head h1{font-size:1.6rem;line-height:1.55;margin-top:12px;}
/* صورة الغلاف بعرض الشاشة كاملة */
.article-cover{
  width:calc(100% + 36px);max-width:none;margin:0 -18px 26px;
  height:auto;aspect-ratio:4/3;border-radius:0;box-shadow:none;
}
.article-body{font-size:1.04rem;line-height:2;}
.article-body p{margin-bottom:16px;}
/* الفقرة الافتتاحية */
.article-body > p:first-child{
  font-size:1.08rem;line-height:1.95;padding:16px 18px;margin-bottom:26px;
  background:var(--accent-soft);border-inline-start:3px solid var(--gold);border-radius:12px;
}
/* العناوين الفرعية */
.article-body h2{
  display:flex;align-items:center;gap:10px;
  font-size:1.32rem;line-height:1.5;margin:36px 0 12px;
}
.article-body h2::before{content:"";flex:none;width:4px;height:1.1em;border-radius:4px;background:var(--gold-grad);}
.article-body a{text-decoration-color:var(--accent-line);text-decoration-thickness:1.5px;}

/* النقاط: كروت خفيفة */
.article-body ul{list-style:none;padding:0;display:grid;gap:10px;}
.article-body ul li{
  position:relative;margin:0;padding:12px 40px 12px 14px;line-height:1.85;
  background:var(--surface);border:1px solid var(--line);border-radius:12px;
}
.article-body ul li::before{
  content:"";position:absolute;right:16px;top:1.35em;width:8px;height:8px;
  background:var(--gold-grad);transform:rotate(45deg);border-radius:2px;
}
/* الخطوات المرقّمة */
.article-body ol{list-style:none;padding:0;counter-reset:step;display:grid;gap:12px;}
.article-body ol li{
  counter-increment:step;position:relative;margin:0;padding:14px 56px 14px 14px;line-height:1.85;
  background:var(--surface);border:1px solid var(--line);border-radius:12px;
}
.article-body ol li::before{
  content:counter(step);position:absolute;right:12px;top:12px;
  width:32px;height:32px;display:grid;place-items:center;border-radius:50%;
  background:var(--gold-grad);color:var(--on-gold);font-weight:700;font-size:.92rem;line-height:1;
}
.article-body li b{display:block;margin-bottom:2px;color:var(--accent);}

/* الجدول: عمود أول ثابت أثناء السحب */
.table-wrap{border-radius:12px;margin-bottom:8px;-webkit-overflow-scrolling:touch;}
.article-body table{min-width:480px;font-size:.92rem;}
.article-body th,.article-body td{padding:11px 14px;line-height:1.7;}
.article-body th:first-child,.article-body td:first-child{
  position:sticky;inset-inline-start:0;z-index:1;background:var(--surface-2);
  font-weight:700;color:var(--text);border-inline-end:1px solid var(--line-strong);
}
.article-body tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--surface) 70%,transparent);}
.article-body tbody tr:nth-child(even) td:first-child{background:var(--surface-2);}
.table-wrap + h2,.table-wrap + p{margin-top:28px;}

/* شريط تقدّم القراءة (للمتصفحات الداعمة) */
@supports (animation-timeline:scroll()){
  .article-head::before{
    content:"";position:fixed;z-index:55;top:env(safe-area-inset-top,0px);right:0;left:0;height:3px;
    background:var(--gold-grad);transform-origin:right;transform:scaleX(0);
    animation:awtadRead linear both;animation-timeline:scroll(root);
  }
  @keyframes awtadRead{to{transform:scaleX(1);}}
}
/* ظهور ناعم للكروت والعناوين أثناء التمرير */
@media(prefers-reduced-motion:no-preference){
  @supports (animation-timeline:view()){
    .post-card,.article-body h2,.article-body li,.table-wrap{
      animation:awtadRise linear both;animation-timeline:view();animation-range:entry 0% entry 35%;
    }
    @keyframes awtadRise{from{opacity:0;transform:translateY(18px);}to{opacity:1;transform:none;}}
  }
}

/* ---------- صندوق الدعوة ---------- */
.page-cta{margin-top:40px;padding:22px 18px;border-radius:14px;flex-direction:column;align-items:stretch;gap:14px;}
.page-cta h2,.page-cta h3{font-size:1.25rem;}
.page-cta .btn{width:100%;}

/* ---------- الفوتر ---------- */
.site-footer{padding:44px 0 20px;}
.footer-grid{grid-template-columns:1fr 1fr;gap:28px 16px;margin-bottom:28px;}
.footer-brand{grid-column:1 / -1;}
.footer-col:last-child{grid-column:1 / -1;}
.footer-bottom{flex-direction:column;gap:8px;text-align:center;align-items:center;}

/* ---------- عارض الصور ---------- */
.lb-scroll{padding:64px 0 20px;}
.lb img{width:180vw;max-width:none;border-radius:0;}

/* ---------- شاشات صغيرة جداً ---------- */
@media(max-width:360px){
  .wrap{padding:0 14px;}
  .hero h1{font-size:1.7rem;}
  .hero-actions{grid-template-columns:1fr;}
  .logo-text b{font-size:1.2rem;}
  .nav-right .theme-toggle{display:none;}
  .wa-float,.call-float{width:52px;height:52px;left:12px;}
  .call-float{bottom:calc(18px + 52px + 10px + env(safe-area-inset-bottom,0px));}
  .wa-float svg{width:27px;height:27px;}
  .call-float svg{width:22px;height:22px;}
  .services-grid,.show-feats,.proj-types{margin-inline:-14px;padding-inline:14px;}
  .article-cover{width:calc(100% + 28px);margin-inline:-14px;}
  .post-more{margin-inline:-18px;}
  .article-head h1{font-size:1.45rem;}
}
/* الهاتف بالعرض */
@media(orientation:landscape) and (max-height:500px){
  .hero{min-height:auto;padding:90px 0 30px;}
}