/* ================================================================
   Redesign v3 — يُحمَّل بعد style.css (تحسين التصميم العام + الموبايل)
   ================================================================ */
:root {
  --gold: #e0a800;
  --gold-dark: #a87c00;
  --gold-soft: #fbf1cf;
  --ink: #0f0f10;
  --ink-2: #18181a;
  --ink-3: #242427;
  --paper: #f7f4ec;
  --line: rgba(255, 255, 255, .08);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, .28);
  --shadow-soft: 0 8px 24px -10px rgba(0, 0, 0, .14);
  --header-h: 76px;
}

body { line-height: 1.75; -webkit-font-smoothing: antialiased; }
h1, h2 { letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.25; }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section__head { margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section__head p { color: inherit; opacity: .8; font-size: 1.05rem; }

/* Eyebrow كـ pill */
.eyebrow {
  font-size: .85rem; padding: .3em .9em; border-radius: 999px;
  background: rgba(224, 168, 0, .12); border: 1px solid rgba(224, 168, 0, .35);
}
.eyebrow::before { width: 8px; height: 8px; border-radius: 50%; }
.eyebrow--dark { background: rgba(15, 15, 16, .07); border-color: rgba(15, 15, 16, .18); }
.section--gold .eyebrow--dark { background: rgba(0, 0, 0, .1); }

/* Buttons */
.btn { font-weight: 800; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); }
.btn--gold { background: linear-gradient(180deg, #f2bd14, var(--gold)); }
.btn--ghost { backdrop-filter: blur(6px); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .6); }
.btn:focus-visible, .nav a:focus-visible, .tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Header */
.header { background: rgba(15, 15, 16, .86); border-bottom: 1px solid rgba(224, 168, 0, .45); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.brand img { width: 48px; height: 48px; box-shadow: 0 0 0 2px var(--gold); }
.nav a:not(.btn) { position: relative; padding-block: .3rem; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; background: var(--gold);
  transform: scaleX(0); transition: transform .25s; transform-origin: right;
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

/* Hero */
.hero { min-height: 92svh; isolation: isolate; }
.hero::after {
  background:
    linear-gradient(0deg, rgba(15, 15, 16, .95) 0%, rgba(15, 15, 16, 0) 35%),
    linear-gradient(270deg, rgba(10, 10, 10, .9) 0%, rgba(10, 10, 10, .65) 50%, rgba(10, 10, 10, .2) 100%);
}
.hero h1 { font-size: clamp(2rem, 5.6vw, 4.2rem); line-height: 1.2; }
.hero h1 br + *, .hero h1 { text-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
.hero__lead { font-size: clamp(1rem, 1.8vw, 1.2rem); opacity: .9; }
.hero__trust {
  list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; flex-wrap: wrap; gap: .7rem;
}
.hero__trust li {
  display: flex; align-items: center; gap: .55rem; padding: .55rem 1rem; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px); font-size: .92rem; font-weight: 600;
}
.hero__trust b { color: var(--gold); font-weight: 900; direction: ltr; }

/* About */
.about__media img { border-radius: var(--radius); }
.about__media::before { border-width: 3px; inset: -12px 12px 12px -12px; }
.about__text p { color: #3d382e; }
.stats { gap: 1.2rem; }
.stat {
  background: linear-gradient(160deg, var(--ink-3), var(--ink)); border: 1px solid var(--line);
  border-bottom: 3px solid var(--gold); padding: 1.6rem 1rem; box-shadow: var(--shadow-soft);
}
.stat b { font-size: clamp(2rem, 4vw, 2.8rem); }

/* Dark sections */
.section--dark { background: radial-gradient(90% 60% at 100% 0%, #1e1a10 0%, var(--ink) 60%); }

/* Service cards */
.card {
  position: relative; background: var(--ink-2); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card img { transition: filter .3s; }
.card:hover img { filter: brightness(1.08) saturate(1.1); }
.card__body { position: relative; padding: 1.3rem 1.4rem 1.5rem; }
.card__body::before {
  content: ""; position: absolute; top: 0; inset-inline-start: 1.4rem; width: 40px; height: 3px; background: var(--gold); border-radius: 2px;
}
.card h3 { margin-top: .5rem; }

/* Crusher */
.crusher3d { border: 0; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 0 0 6px var(--ink); }
.tabpanel { background: rgba(255, 255, 255, .45); }
.uses li {
  background: var(--ink); border: 1px solid rgba(255, 255, 255, .06); box-shadow: var(--shadow-soft);
  flex-direction: row; align-items: center; gap: .8rem; line-height: 1.5;
}
.uses .ico {
  flex-shrink: 0; width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.5rem;
  background: rgba(224, 168, 0, .14); border-radius: 12px;
}
.feature {
  background: #fff8e1; border-inline-start: 0; border-top: 4px solid var(--ink);
  box-shadow: var(--shadow-soft);
}

/* Supplies */
.supply { border-top: 0; box-shadow: var(--shadow-soft); transition: transform .25s, box-shadow .25s; }
.supply:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.supply h3 { position: relative; padding-top: .2rem; }

/* Projects */
.table-wrap { border-color: var(--line); background: rgba(255, 255, 255, .02); }
.projects-table td:nth-child(3) { color: #d8cfb9; }
.gallery img { border-radius: var(--radius-sm); }

/* FAQ */
.faq { margin-inline: auto; }
.faq details { border-inline-start: 0; border: 1px solid rgba(0, 0, 0, .06); transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-soft); border-color: rgba(224, 168, 0, .5); }
.faq summary::after {
  width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
  background: var(--gold-soft); font-size: 1.2rem;
}
#faq .section__head { margin-inline: auto; text-align: center; }

/* Form */
.form { border: 1px solid var(--line); }
.form input, .form select, .form textarea { font-size: 16px; min-height: 48px; border-radius: var(--radius-sm); }

/* Contact */
.qi svg { background: rgba(255, 255, 255, .04); }

/* شريط التواصل السفلي للموبايل */
.mbar { display: none; }

/* ============ Tablet ============ */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav { visibility: hidden; transition: transform .3s, visibility .3s; }
  .nav.is-open { visibility: visible; }
  .brand img { width: 42px; height: 42px; }

  .mbar {
    position: fixed; z-index: 70; inset: auto 0 0; display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: .5rem;
    padding: .6rem 12px calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(15, 15, 16, .94); backdrop-filter: blur(10px); border-top: 1px solid rgba(224, 168, 0, .4);
  }
  .mbar a {
    display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px;
    border-radius: 12px; text-decoration: none; font-weight: 800; font-size: .95rem;
    color: #fff; background: var(--ink-3);
  }
  .mbar svg { width: 20px; height: 20px; }
  .mbar__wa { background: #1fa855 !important; }
  .mbar__quote { background: var(--gold) !important; color: var(--ink) !important; }
  .float-icons { display: none; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ============ Mobile ============ */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 3.2rem 0; }
  h2 { font-size: 1.65rem; }

  /* Hero */
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2.5rem); padding-bottom: 2.5rem; }
  .hero__content { padding-block: 1rem; }
  .hero h1 { font-size: 2rem; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
  .hero__actions .btn { flex: none; padding: .8em .6em; font-size: 1rem; }
  .hero__trust { margin-top: 1.6rem; gap: .5rem; }
  .hero__trust li { font-size: .82rem; padding: .45rem .8rem; }

  /* Stats 2×2 مضغوطة */
  .stats { margin-top: 2.2rem; gap: .7rem; }
  .stat { padding: 1.1rem .6rem; }
  .stat span { font-size: .85rem; line-height: 1.4; display: block; }

  /* الكروت: سلايدر أفقي بدل عمود طويل */
  .cards, .supplies, .gallery {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    grid-auto-columns: 82%; gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: -16px; padding: .3rem 16px 1rem; scrollbar-width: none;
  }
  .cards::-webkit-scrollbar, .supplies::-webkit-scrollbar, .gallery::-webkit-scrollbar { display: none; }
  .card, .supply, .gallery img { scroll-snap-align: start; }
  .supplies { grid-auto-columns: 68%; }
  .gallery { grid-auto-columns: 70%; }
  .gallery img { aspect-ratio: 4/3; }

  .uses { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .uses li { flex-direction: column; align-items: flex-start; padding: 1rem; font-size: .92rem; }
  .features { grid-template-columns: 1fr; gap: .7rem; }
  .feature { padding: 1rem 1.1rem; }
  .crusher3d { aspect-ratio: 1; }
  .subhead { font-size: 1.3rem; margin-top: 2.4rem; }

  .faq summary { font-size: 1rem; padding: .9rem 1rem; }
  .faq details p { padding: 0 1rem 1rem; }

  .quick-icons { justify-content: center; }
  .footer { padding-bottom: 1.5rem; }
}

/* ================================================================
   v4 — صور responsive، أيقونات SVG، تواصل وخريطة، معرض بأسهم
   ================================================================ */
img { height: auto; }
picture { display: contents; }
picture > source { display: none; } /* حتى لا تأخذ <source> خانة في grid المعرض */
.hero__bg { height: 100%; }

/* أيقونات الاستخدامات (بدل الإيموجي) */
.uses .ico svg { width: 26px; height: 26px; color: var(--gold); }

/* المعرض: لوحة المفاتيح */
.gallery img:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Lightbox بأسهم */
.lightbox { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; }
.lightbox[hidden] { display: none; }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .6rem; max-width: min(1100px, 100%); }
.lightbox__fig img { max-height: 80vh; width: auto; }
.lightbox__cap { color: #ddd; font-weight: 600; font-size: .95rem; text-align: center; }
.lightbox__nav {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s;
}
.lightbox__nav:hover, .lightbox__nav:focus-visible { background: var(--gold); color: var(--ink); outline: none; }
.lightbox__nav svg { width: 24px; height: 24px; }
.lightbox__next svg { transform: scaleX(-1); } /* RTL: التالي يشير لليسار */
.lightbox__close:focus-visible { outline: 3px solid var(--gold); }

@media (max-width: 560px) {
  .lightbox { padding: .5rem; gap: 0; }
  .lightbox__nav { position: absolute; bottom: 1.2rem; width: 48px; height: 48px; }
  .lightbox__prev { right: 1.2rem; }
  .lightbox__next { left: 1.2rem; }
  .lightbox__fig img { max-height: 72vh; }
}

/* ================================================================
   كروت سابقة الأعمال
   ================================================================ */
.pcards {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
}
.pcard {
  display: flex; flex-direction: column; gap: .45rem;
  padding: 1.6rem 1.5rem 1.3rem; background: var(--ink-2);
  border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pcard:hover { transform: translateY(-3px); border-color: rgba(224, 168, 0, .45); border-top-color: var(--gold); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.pcard__loc { color: var(--gold); font-weight: 800; font-size: .92rem; }
.pcard__name { margin: 0 0 .5rem; color: #fff; font-size: 1.3rem; font-weight: 900; line-height: 1.4; }
.pcard__tags { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.pcard__tags li {
  padding: .3rem .85rem; border-radius: 999px; font-size: .88rem; font-weight: 700;
  color: #f0e2b6; background: rgba(224, 168, 0, .12); border: 1px solid rgba(224, 168, 0, .18);
}
@media (max-width: 1100px) { .pcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; } }
@media (max-width: 520px) {
  .pcards { grid-template-columns: 1fr; gap: .7rem; margin-top: 1.4rem; }
  .pcard { padding: 1.1rem 1.1rem 1rem; }
  .pcard__name { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { .pcard, .pcard:hover { transition: none; transform: none; } }
