/* =======================================================
   صباح ليبيا للمنسوجات — ورقة الأنماط
   ألوان العلامة مستوحاة من الشعار (تدرّج الأزرق)
   ======================================================= */

:root {
  /* ألوان العلامة التجارية */
  --blue-900: #0f2f73;
  --blue-700: #1746a0;
  --blue-500: #1e74d4;
  --blue-400: #29abe2;   /* الأزرق الفاتح في الشعار */
  --gold:     #c9a14a;   /* لمسة فخامة للمنسوجات */
  --ink:      #16243a;
  --muted:    #5b6b82;
  --bg:       #ffffff;
  --bg-soft:  #f4f8fd;
  --line:     #e3ebf5;

  --grad: linear-gradient(135deg, var(--blue-700), var(--blue-400));
  --shadow-sm: 0 4px 14px rgba(15, 47, 115, .08);
  --shadow-md: 0 12px 30px rgba(15, 47, 115, .14);
  --radius: 16px;
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ====== أزرار ====== */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--light { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }

/* ====== الهيدر ====== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: var(--maxw); margin-inline: auto; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { color: var(--blue-700); font-size: 1.15rem; }
.brand__text small { color: var(--muted); font-size: .72rem; letter-spacing: .5px; }

.nav-menu { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-menu a { font-weight: 600; color: var(--ink); transition: color .2s; }
.nav-menu a:hover { color: var(--blue-500); }
.nav-cta { background: var(--grad); color: #fff !important; padding: 9px 20px; border-radius: 50px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--blue-700); border-radius: 3px; transition: .3s; }

/* ====== Hero ====== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: center;
  color: #fff;
  /* الخلفية: يمكنك استبدالها بصورة من مجلد images/ */
  background: var(--grad);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(201,161,74,.25), transparent 45%);
}
.hero__content { position: relative; z-index: 2; padding: 70px 20px; max-width: 820px; }
.hero__eyebrow { color: var(--gold); font-weight: 700; letter-spacing: 1px; margin-bottom: 12px; }
.hero__title { font-family: 'Cairo', sans-serif; font-weight: 900; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.25; }
.hero__title-en { display: block; font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 700; letter-spacing: 2px; color: rgba(255,255,255,.85); margin-top: 6px; }
.hero__subtitle { font-size: clamp(1rem, 2vw, 1.25rem); margin: 22px 0 32px; color: rgba(255,255,255,.92); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ====== الإحصائيات ====== */
.stats { background: var(--ink); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 28px 20px; }
.stat { text-align: center; color: #fff; }
.stat__num { display: block; font-family: 'Cairo'; font-weight: 900; font-size: 1.7rem; color: var(--blue-400); }
.stat__label { color: rgba(255,255,255,.78); font-size: .9rem; }

/* ====== أقسام عامة ====== */
.section { padding: 80px 0; }
.section:nth-of-type(even) { background: var(--bg-soft); }
.section__eyebrow { color: var(--blue-500); font-weight: 700; letter-spacing: 1px; }
.section__title { font-family: 'Cairo'; font-weight: 800; font-size: clamp(1.5rem, 3.5vw, 2.3rem); margin: 8px 0 14px; color: var(--ink); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section__lead { color: var(--muted); font-size: 1.05rem; }

/* ====== من نحن ====== */
.about__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 46px; align-items: start; }
.about__text p { margin-bottom: 16px; color: #334559; }
.about__list { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.about__list li { position: relative; padding-inline-start: 28px; font-weight: 600; }
.about__list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: #fff; background: var(--grad); width: 20px; height: 20px; border-radius: 50%; font-size: .75rem; display: grid; place-items: center; top: 6px; }
.about__cards { display: grid; gap: 16px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.info-card h3 { color: var(--blue-700); margin-bottom: 6px; }
.info-card--accent { background: var(--grad); color: #fff; border: 0; }
.info-card--accent h3 { color: #fff; }
.about__figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.about__figure img { width: 100%; height: 260px; object-fit: cover; }
.about__figure figcaption { background: var(--ink); color: #fff; text-align: center; padding: 10px; font-size: .9rem; }

/* ====== المنتجات ====== */
.products__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product-card__media { aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__body { padding: 20px; }
.product-card__title { font-family: 'Cairo'; font-size: 1.2rem; color: var(--blue-700); margin-bottom: 8px; }
.product-card__desc { color: var(--muted); font-size: .96rem; }

/* ====== مصادر التوريد ====== */
.origins__grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.origin { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 16px; text-align: center; font-weight: 700; box-shadow: var(--shadow-sm); transition: transform .2s; }
.origin:hover { transform: translateY(-4px); border-color: var(--blue-400); }
.origin__flag { display: block; font-size: 2.4rem; margin-bottom: 8px; }

/* ====== المميزات ====== */
.features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { text-align: center; padding: 28px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.feature__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 1.6rem; }
.feature h3 { color: var(--blue-700); margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ====== شريط CTA ====== */
.cta-band { background: var(--grad); color: #fff; text-align: center; padding: 64px 0; position: relative; }
.cta-band__inner h2 { font-family: 'Cairo'; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 10px; }
.cta-band__inner p { margin-bottom: 26px; color: rgba(255,255,255,.9); }

/* ====== التواصل ====== */
/* العناوين إلى جانب الخريطة على الشاشات العريضة */
.contact__layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: stretch; }
.contact__branches { display: flex; flex-direction: column; gap: 18px; }
.branch { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); border-top: 4px solid var(--blue-400); }
.branch__city { font-family: 'Cairo'; color: var(--blue-700); margin-bottom: 12px; }
.branch__addr { color: #334559; margin-bottom: 12px; }
.branch__phones { display: flex; flex-direction: column; gap: 6px; }
.branch__phones a { font-weight: 700; color: var(--blue-500); direction: ltr; text-align: start; }
.branch__phones a:hover { text-decoration: underline; }

.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); display: flex; flex-direction: column; min-height: 380px; }
.map iframe { display: block; flex: 1; width: 100%; }
.map__link { display: block; text-align: center; padding: 14px; background: var(--blue-700); color: #fff; font-weight: 700; }
.map__link:hover { background: var(--blue-900); }

/* ====== التذييل ====== */
.site-footer { background: var(--ink); color: rgba(255,255,255,.85); padding-top: 56px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; padding-bottom: 36px; }
.site-footer__brand img { background: #fff; padding: 8px; border-radius: 10px; margin-bottom: 14px; }
.site-footer__col h4 { color: #fff; margin-bottom: 14px; }
.site-footer__col ul { list-style: none; display: grid; gap: 8px; }
.site-footer__col a:hover { color: var(--blue-400); }
.muted { color: rgba(255,255,255,.55); font-size: .85rem; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; text-align: center; font-size: .9rem; color: rgba(255,255,255,.6); }

/* ====== زر العودة للأعلى ====== */
.to-top {
  position: fixed; inset-inline-start: 22px; bottom: 22px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 1.4rem;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(20px); transition: .3s; z-index: 60;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ====== كشف العناصر عند التمرير ====== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =======================================================
   التجاوب مع الشاشات
   ======================================================= */
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; }
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .origins__grid { grid-template-columns: repeat(4, 1fr); }
  .contact__layout { grid-template-columns: 1fr; }
  .contact__branches { flex-direction: row; flex-wrap: wrap; }
  .contact__branches .branch { flex: 1 1 240px; }
  .map { min-height: 340px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-menu.open { max-height: 420px; }
  .nav-menu li { border-top: 1px solid var(--line); }
  .nav-menu a { display: block; padding: 14px 20px; }
  .nav-cta { border-radius: 0; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .products__grid { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: 1fr; }
  .origins__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__branches { flex-direction: column; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { min-height: 70vh; }
}

/* احترام تفضيل تقليل الحركة (سهولة الوصول) */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* تحسين التركيز للوصول عبر لوحة المفاتيح */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue-400); outline-offset: 3px; border-radius: 4px;
}
