/* ==========================================================================
   شركة وادي الخلال لإنتاج الزلط — أنماط الهوية البصرية
   ملاحظة: Tailwind يُحمَّل من assets/vendor/tailwind.js (نسخة محفوظة محلياً)
   وهذا الملف يضيف رموز الهوية والتأثيرات المخصّصة فوقه.
   ========================================================================== */

:root {
  --brand: #F26522;
  --brand-600: #D94E12;
  --brand-200: #FFC8AA;
  --amber: #FFB020;
  --coal-900: #12151A;
  --coal-800: #1C2129;
  --coal-700: #2A3038;
  --steel-100: #F4F2EE;
  --header-h: 4.5rem;
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { overflow-x: hidden; }

/* --- شريط التخطي --- */
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem;
  z-index: 100; background: var(--brand); color: #fff;
  padding: .6rem 1rem; border-radius: .5rem; font-size: .875rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* --- خطوط --- */
.font-kufi { font-family: "Noto Kufi Arabic", system-ui, sans-serif; }
.font-body { font-family: "Readex Pro", system-ui, sans-serif; }

/* --- شرائط السلامة المائلة (Signature) --- */
.hazard-stripe {
  background-image: repeating-linear-gradient(
    -45deg,
    var(--brand) 0 14px,
    var(--coal-900) 14px 28px
  );
}

/* --- شبكة فنية خفيفة لخلفيات الأقسام الداكنة --- */
.grid-lines {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* --- عناوين الأقسام --- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .75rem; letter-spacing: .18em; font-weight: 600;
  color: var(--brand); text-transform: uppercase; margin-bottom: .9rem;
}
.eyebrow::before {
  content: ""; width: 2.25rem; height: 3px; background: var(--brand); display: block;
}
.eyebrow-light { color: var(--brand-200); }

.section-title {
  font-family: "Noto Kufi Arabic", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 1.05rem + 2.1vw, 2.6rem);
  line-height: 1.45;
  color: var(--coal-900);
  margin-bottom: 1.5rem;
  letter-spacing: -.01em;
}

/* --- الأزرار --- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: .6rem;
  font-family: "Noto Kufi Arabic", system-ui, sans-serif;
  font-weight: 600; font-size: .9rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease,
              box-shadow .18s ease, color .18s ease, border-color .18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }
.btn:active { transform: translateY(1px); }

.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -12px rgba(242,101,34,.7); }
.btn-brand:hover { background: var(--brand-600); transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(242,101,34,.85); }

.btn-ghost { background: rgba(255,255,255,.07); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.15); border-color: #fff; transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--brand-600); border-color: rgba(242,101,34,.4); }
.btn-outline:hover { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateY(-2px); }

.btn-muted { background: var(--steel-100); color: var(--coal-800); border-color: #E2DED6; }
.btn-muted:hover { background: #E9E5DC; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: .35rem; }

/* --- التنقل --- */
.nav-link {
  position: relative; padding: .55rem .8rem; border-radius: .5rem;
  color: #E7E3DB; transition: color .18s ease, background-color .18s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link::after {
  content: ""; position: absolute; inset-inline: .8rem; bottom: .3rem; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: right;
  transition: transform .22s ease;
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: #fff; }

.mobile-link {
  padding: .8rem 1rem; border-radius: .55rem; color: #E7E3DB;
  font-family: "Noto Kufi Arabic", system-ui, sans-serif; font-weight: 500; font-size: .95rem;
  border-inline-start: 3px solid transparent; transition: all .18s ease;
}
.mobile-link:hover { background: rgba(255,255,255,.06); border-inline-start-color: var(--brand); color: #fff; }

#site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.85); }

/* --- تأثير الظهور عند التمرير --- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease-out, transform .55s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }

/* --- بطاقات عن الشركة --- */
.vision-card {
  background: #fff; border: 1px solid #E7E3DB; border-radius: .9rem;
  padding: 1.4rem; position: relative; overflow: hidden;
}
.vision-card::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, var(--brand), var(--amber));
}

.icon-badge {
  width: 2.75rem; height: 2.75rem; flex: 0 0 auto;
  display: inline-grid; place-items: center; border-radius: .65rem;
  background: rgba(242,101,34,.12); color: var(--brand);
  border: 1px solid rgba(242,101,34,.28);
}
.icon-badge-lg { width: 3.5rem; height: 3.5rem; border-radius: .8rem; }
.vision-card .icon-badge { margin-bottom: .9rem; }

.stat-card {
  background: #fff; border: 1px solid #E7E3DB; border-radius: .9rem;
  padding: 1.5rem 1.25rem; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(242,101,34,.45); box-shadow: 0 20px 40px -26px rgba(18,21,26,.5); }
.stat-value {
  display: block; font-family: "Noto Kufi Arabic", system-ui, sans-serif;
  font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  color: var(--brand); line-height: 1.2;
}
.stat-label { display: block; margin-top: .5rem; font-size: .82rem; color: #5b6472; line-height: 1.7; }

/* --- بطاقات المنتجات --- */
.product-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #E7E3DB; border-radius: 1rem;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover { transform: translateY(-6px); border-color: rgba(242,101,34,.45); box-shadow: 0 28px 55px -32px rgba(18,21,26,.55); }

.product-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--coal-800); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-media img { transform: scale(1.06); }
.product-tag {
  position: absolute; inset-block-start: .8rem; inset-inline-start: .8rem;
  background: rgba(18,21,26,.85); color: var(--brand-200);
  font-size: .68rem; letter-spacing: .08em; font-weight: 600;
  padding: .3rem .65rem; border-radius: .4rem;
  border: 1px solid rgba(242,101,34,.35); backdrop-filter: blur(4px);
}

.product-body { display: flex; flex-direction: column; gap: .65rem; padding: 1.3rem 1.25rem 1.4rem; flex: 1; }
.product-title { font-family: "Noto Kufi Arabic", system-ui, sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--coal-900); }
.product-sub { font-size: .72rem; letter-spacing: .06em; color: var(--brand); font-weight: 600; }
.product-desc { font-size: .85rem; line-height: 1.95; color: #4b5563; }

.spec-list { display: flex; flex-direction: column; gap: .45rem; margin: .35rem 0 .9rem; }
.spec-list li {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  font-size: .78rem; padding: .5rem .7rem;
  background: var(--steel-100); border-radius: .45rem;
}
.spec-list li span { color: #6b7280; }
.spec-list li b { color: var(--coal-900); font-weight: 600; }

/* --- قسم الجودة --- */
.quality-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: .9rem; padding: 1.5rem;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.quality-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.07); border-color: rgba(242,101,34,.5); }
.quality-card .icon-badge { margin-bottom: 1rem; }
.quality-title { font-family: "Noto Kufi Arabic", system-ui, sans-serif; font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: .5rem; }
.quality-desc { font-size: .82rem; line-height: 1.95; color: #B9C0C9; }

.qc-note {
  display: flex; flex-direction: column; gap: .25rem;
  border-inline-start: 3px solid var(--brand); padding-inline-start: .9rem;
}
.qc-note b { font-family: "Noto Kufi Arabic", system-ui, sans-serif; color: #fff; font-size: .9rem; }
.qc-note span { font-size: .72rem; letter-spacing: .06em; color: #8b939d; }

/* --- المشاريع --- */
.project-card {
  background: #fff; border: 1px solid #E7E3DB; border-radius: 1rem; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.project-card:hover { transform: translateY(-5px); border-color: rgba(242,101,34,.45); box-shadow: 0 28px 55px -32px rgba(18,21,26,.5); }
.project-card > img { width: 100%; height: 210px; object-fit: cover; }
.project-body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.project-cat { font-size: .7rem; font-weight: 600; letter-spacing: .08em; color: var(--brand); }
.project-title { font-family: "Noto Kufi Arabic", system-ui, sans-serif; font-weight: 700; font-size: 1.08rem; color: var(--coal-900); }
.project-body p { font-size: .85rem; line-height: 1.95; color: #4b5563; }
.project-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .6rem; }
.project-meta li {
  font-size: .72rem; padding: .3rem .6rem; border-radius: .35rem;
  background: rgba(242,101,34,.1); color: var(--brand-600); font-weight: 600;
}

/* --- المعرض --- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-btn {
  padding: .5rem 1rem; border-radius: .5rem; font-size: .82rem; font-weight: 600;
  background: var(--steel-100); color: #4b5563; border: 1px solid #E7E3DB;
  cursor: pointer; transition: all .18s ease;
}
.filter-btn:hover { color: var(--brand-600); border-color: rgba(242,101,34,.45); }
.filter-btn.is-active { background: var(--coal-900); color: #fff; border-color: var(--coal-900); }

#gallery-grid { grid-auto-rows: 170px; }
@media (min-width: 768px) { #gallery-grid { grid-auto-rows: 200px; } }

.gallery-item {
  position: relative; overflow: hidden; border-radius: .7rem; padding: 0;
  border: 1px solid #E7E3DB; background: var(--coal-800); cursor: zoom-in;
  transition: transform .22s ease, box-shadow .22s ease;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item:hover { box-shadow: 0 22px 45px -26px rgba(18,21,26,.65); }
.gallery-cap {
  position: absolute; inset-block-end: 0; inset-inline: 0;
  padding: 1.5rem .8rem .6rem; text-align: start;
  font-size: .78rem; font-weight: 600; color: #fff;
  background: linear-gradient(to top, rgba(18,21,26,.9), transparent);
  transform: translateY(100%); transition: transform .25s ease;
}
.gallery-item:hover .gallery-cap, .gallery-item:focus-visible .gallery-cap { transform: none; }
.gallery-item.is-hidden { display: none; }

/* --- التواصل --- */
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: .85rem; padding: 1rem 1.1rem;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
  text-decoration: none;
}
a.contact-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.08); border-color: rgba(242,101,34,.5); }
.contact-label { display: block; font-size: .7rem; letter-spacing: .08em; color: #8b939d; margin-bottom: .15rem; }
.contact-value { display: block; font-weight: 600; color: #fff; font-size: .95rem; }

/* --- النماذج --- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--coal-800); }
.field .req { color: var(--brand); }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; border-radius: .55rem;
  border: 1px solid #DCD7CD; background: #fff; color: var(--coal-900);
  font-family: inherit; font-size: .88rem; transition: border-color .18s ease, box-shadow .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #A8A196; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,101,34,.16);
}
.field input.is-invalid, .field select.is-invalid { border-color: #DC2626; box-shadow: 0 0 0 3px rgba(220,38,38,.13); }
.field-error { font-size: .74rem; color: #DC2626; min-height: 0; }

.form-feedback {
  margin-top: 1rem; padding: .8rem 1rem; border-radius: .6rem;
  font-size: .84rem; line-height: 1.7;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.35); color: #15803D;
}
.form-feedback.is-error { background: rgba(220,38,38,.09); border-color: rgba(220,38,38,.35); color: #B91C1C; }

#quote-modal .field label, #quote-modal .field-error { color: #E7E3DB; }
#quote-modal .field input, #quote-modal .field select, #quote-modal .field textarea {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #fff;
}
#quote-modal .field input::placeholder, #quote-modal .field textarea::placeholder { color: #7b8490; }

/* --- النوافذ المنبثقة --- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,12,15,.78); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; width: 100%; max-width: 44rem; max-height: 92vh; overflow-y: auto;
  background: var(--coal-800); border: 1px solid rgba(255,255,255,.12);
  border-radius: 1rem; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9);
  animation: modalIn .22s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,.1);
  position: sticky; top: 0; background: var(--coal-800); z-index: 2;
}
.modal-x {
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: .5rem; background: rgba(255,255,255,.07); color: #fff;
  border: 1px solid rgba(255,255,255,.14); cursor: pointer; transition: all .18s ease;
}
.modal-x:hover { background: var(--brand); border-color: var(--brand); }
.modal-body { padding: 1.4rem; }
body.modal-open { overflow: hidden; }

/* --- عارض الصور --- */
.lightbox {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center;
  background: rgba(8,10,13,.94); padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lb-figure { max-width: min(1100px, 94vw); text-align: center; animation: modalIn .22s ease-out; }
.lb-figure img { max-height: 78vh; width: auto; max-width: 100%; border-radius: .8rem; box-shadow: 0 30px 70px -30px #000; }
.lb-figure figcaption { margin-top: 1rem; color: #E7E3DB; font-size: .9rem; }
.lb-close, .lb-nav {
  position: absolute; z-index: 2; width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2);
  transition: all .18s ease;
}
.lb-close { inset-block-start: 1.2rem; inset-inline-start: 1.2rem; }
.lb-nav:hover, .lb-close:hover { background: var(--brand); border-color: var(--brand); }
.lb-prev { inset-inline-start: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 1rem; top: 50%; transform: translateY(-50%); }

/* --- أزرار عائمة --- */
.float-wa {
  position: fixed; inset-block-end: 1.3rem; inset-inline-start: 1.3rem; z-index: 60;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: #25D366; box-shadow: 0 14px 30px -10px rgba(37,211,102,.65);
  transition: transform .2s ease;
}
.float-wa:hover { transform: scale(1.08); }

.to-top {
  position: fixed; inset-block-end: 1.3rem; inset-inline-end: 1.3rem; z-index: 60;
  width: 3rem; height: 3rem; border-radius: .65rem; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: var(--brand); border: none;
  box-shadow: 0 14px 30px -14px rgba(242,101,34,.85);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .25s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-600); }

/* --- الفوتر --- */
.footer-heading {
  font-family: "Noto Kufi Arabic", system-ui, sans-serif; font-weight: 700;
  color: #fff; font-size: .95rem; margin-bottom: 1.1rem;
  padding-bottom: .6rem; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-links { display: flex; flex-direction: column; gap: .6rem; font-size: .85rem; }
.footer-links a { color: #C4CAD2; transition: color .18s ease, padding-inline-start .18s ease; }
.footer-links a:hover { color: var(--brand); padding-inline-start: .35rem; }
.footer-icon {
  width: 2rem; height: 2rem; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: .45rem; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); color: var(--brand);
}

/* --- احترام تقليل الحركة --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- الطباعة --- */
@media print {
  #site-header, .float-wa, .to-top, .filter-bar, #quote-modal, #lightbox, iframe { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
  section { break-inside: avoid; padding: 1rem 0; }
}