/* public/assets/css/pages/home.css */

/* ألوان وهوية متناسقة مع header.css */
:root{
  --brand-from:#060066;
  --brand-to:#2a2ad0;
  --ink:#0b1220;
  --muted:#607d8b;
  --panel:#3c6b7b;      /* الخلفية الزرقاء البترولية في الأقسام */
  --panel-ink:#e6f3f7;
  --accent:#67c1b3;     /* الأخضر المزرق للأزرار المضيئة */
  --accent-ink:#0b3a33;
  --ghost:#3e5f71;      /* الزر الثاني الداكن */
  --ghost-ink:#e9f2f6;
  --card:#ffffff;
  --line:#e2e8f0;
  --radius-xl:22px;
  --radius-lg:18px;
}

/* ====== البطل (الهيرو) ====== */
.home-hero{
  padding: 56px 16px 24px;
}
.home-hero__wrap{
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}
.home-hero__title{
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: .2px;
}
.home-hero__lead{
  margin: 0 0 20px;
  color: #6a7a86;
  line-height: 1.9;
  font-size: 18px;
}
.home-hero__cta{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* أزرار */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .06s ease, box-shadow .2s ease, background-color .2s ease, opacity .2s ease;
  will-change: transform;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 14px 28px rgba(103,193,179,.28);
}
.btn--primary:hover{ filter: brightness(1.03); }
.btn--ghost{
  background: var(--ghost);
  color: var(--ghost-ink);
  box-shadow: 0 14px 28px rgba(62,95,113,.28);
}
.btn--ghost:hover{ filter: brightness(1.05); }

/* جانب الصورة والزخرفة */
.home-hero__media{
  position: relative;
  justify-self: center;
}
.home-hero__figure{
  margin: 0;
  background: #366178;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  position: relative;
  z-index: 1;
}
.home-hero__figure img{
  display: block;
  width: 240px;
  height: auto;
  border-radius: 14px;
  height: 300px;
}
.home-hero__decor{
  position: absolute;
  inset-inline-start: -26%;
  inset-block-start: -12%;
  width: 86%;
  height: auto;
  opacity: .9;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,.12));
  z-index: 0;
}

/* ====== الأقسام الثلاثة ====== */
.home-block{
  padding: 26px 16px;
}
.home-block__wrap{
  max-width: 1160px;
  margin: 0 auto 22px;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.14);
}
.home-block__wrap--reverse{
  direction: rtl; /* نحافظ على RTL لكن نعكس أعمدة المحتوى بصريًا */
}
.home-block__wrap--reverse > *{
  direction: rtl;
}

/* النص */
.home-block__title{
  margin: 0 0 10px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  color: #a6ead7; /* أخضر فاتح مشابه في الصور */
}
.home-block__subtitle{
  margin: 0 0 8px;
  color: #7dd6be;
  font-weight: 700;
}
.home-block__body{
  margin: 0;
  line-height: 2;
  color: #e0f2f6;
}

/* الصورة داخل القسم */
.home-block__media figure{
  margin: 0;
  background: #2f5f71;
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.home-block__media img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* ====== تجاوب ====== */
@media (max-width: 980px){
  .home-hero__wrap{
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .home-hero__media{
    order: -1; /* الصورة فوق النص على الجوال */
  }
  .home-hero__figure img{
    width: min(520px, 100%);
    height: 200px;
  }

  .home-block__wrap{
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* تحسين طفيف للمسافات الكبيرة على الشاشات الواسعة */
@media (min-width: 1280px){
  .home-hero{ padding-top: 70px; }
}
