/* ============================================
   الصفحة الرئيسية – تصميم غرافيكي احترافي
   ============================================ */

.page-home {
  background: #f4f8f8;
}

.page-home .footer {
  margin-top: 0;
}

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #003838;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero__mesh {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, #002e2e 0%, #006060 42%, #008b8b 78%, #0a6e6e 100%);
}

.home-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(212, 175, 55, 0.35), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.1), transparent 26%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 8 L72 40 L40 72 L8 40 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1'/%3E%3Cpath d='M40 20 L60 40 L40 60 L20 40 Z' fill='none' stroke='%23d4af37' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E");
  background-size: auto, auto, 80px 80px;
}

.home-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.home-hero__glow--a {
  width: 420px;
  height: 420px;
  background: rgba(212, 175, 55, 0.18);
  top: -120px;
  left: -80px;
  animation: homeFloat 10s ease-in-out infinite;
}

.home-hero__glow--b {
  width: 360px;
  height: 360px;
  background: rgba(32, 178, 170, 0.2);
  bottom: -80px;
  right: -60px;
  animation: homeFloat 12s ease-in-out infinite reverse;
}

.home-hero__frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.home-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(5rem, 12vh, 8rem) clamp(6rem, 14vh, 9rem);
  width: min(100% - 2rem, 1140px);
}

.home-hero__copy {
  max-width: 820px;
  margin-inline: auto;
  animation: homeFadeUp 0.9s ease both;
}

.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  color: #f0d78c;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.home-hero__eyebrow-mark {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4af37);
  border-radius: 2px;
}

.home-hero__eyebrow-mark--flip {
  background: linear-gradient(90deg, #d4af37, transparent);
}

.home-hero__title {
  margin: 0 0 1rem;
}

.home-hero__brand {
  display: block;
  font-family: "Amiri", "Cairo", serif;
  font-size: clamp(2.2rem, 5.8vw, 3.75rem);
  font-weight: 700;
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
}

.home-hero__lead {
  display: block;
  margin-top: 0.65rem;
  font-family: "Cairo", sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  font-weight: 800;
  color: #d4af37;
  position: relative;
  padding-bottom: 0.7rem;
}

.home-hero__lead::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 0;
  transform: translateX(50%);
  width: 96px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.home-hero__desc {
  margin: 1.25rem auto 2rem;
  max-width: 36rem;
  font-size: clamp(1.02rem, 2.3vw, 1.22rem);
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

/* Atmospheric emblem behind content */
.home-hero__emblem--bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  transform: translate(-50%, -52%);
  opacity: 0.35;
  display: grid;
  place-items: center;
}

.home-hero__emblem-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.45);
}

.home-hero__emblem-ring--inner {
  inset: 48px;
  border-color: rgba(255, 255, 255, 0.18);
  border-style: dashed;
  animation: homeSpin 36s linear infinite;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 50px;
  padding: 0.85rem 1.45rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.home-btn--gold {
  color: #fff;
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  box-shadow: 0 10px 24px rgba(184, 148, 31, 0.32);
}

.home-btn--gold:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(184, 148, 31, 0.4);
}

.home-btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

.home-btn--ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

/* Hero visual emblem (legacy helpers kept minimal) */
.home-hero__visual { display: none; }

.home-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
  z-index: 3;
}

.home-hero__wave svg {
  display: block;
  width: 100%;
  height: clamp(56px, 10vw, 100px);
}

/* ---------- Shared section head ---------- */
.home-section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.home-section-head__label {
  display: inline-block;
  margin-bottom: 0.65rem;
  color: #b8941f;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.home-section-head__title {
  margin: 0 0 0.65rem;
  color: #006666;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 900;
}

.home-section-head__text {
  margin: 0;
  color: #5a6a7a;
  line-height: 1.8;
}

.home-section-head--light .home-section-head__title {
  color: #004848;
}

/* ---------- Knowledge ---------- */
.home-knowledge {
  padding: clamp(3rem, 7vw, 5rem) 0;
  background:
    radial-gradient(ellipse at top, rgba(0, 139, 139, 0.06), transparent 50%),
    #fff;
}

.home-knowledge__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.15rem;
}

.home-quote {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0, 139, 139, 0.12);
  border-radius: 20px;
  padding: 1.5rem 1.35rem 1.6rem;
  box-shadow: 0 12px 32px rgba(0, 102, 102, 0.07);
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.home-quote.is-visible {
  opacity: 1;
  transform: none;
}

.home-quote--featured {
  background:
    linear-gradient(165deg, rgba(0, 139, 139, 0.08), transparent 42%),
    #fff;
  border-color: rgba(0, 139, 139, 0.18);
}

.home-quote__ornament {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  top: -70px;
  left: -50px;
}

.home-quote__ornament::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(0, 139, 139, 0.18);
  border-radius: 50%;
}

.home-quote__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  color: #008b8b;
  font-weight: 800;
  font-size: 0.86rem;
}

.home-quote__text {
  margin: 0 0 1rem;
  font-family: "Amiri", "Cairo", serif;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 2;
  color: #004848;
}

.home-quote__text--hadith {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.95;
}

.home-quote__mark {
  color: #d4af37;
  font-size: 1.25em;
}

.home-quote__source {
  display: inline-block;
  color: #b8941f;
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding-top: 0.7rem;
}

/* ---------- Features ---------- */
.home-features {
  position: relative;
  padding: clamp(3rem, 7vw, 5rem) 0;
  overflow: hidden;
}

.home-features__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #eef6f6 0%, #f7fafb 55%, #ffffff 100%);
}

.home-features__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 6 L54 30 L30 54 L6 30 Z' fill='none' stroke='%23008B8B' stroke-opacity='0.06'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.home-features .container {
  position: relative;
  z-index: 1;
}

.home-features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.home-feature {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 1.55rem 1.3rem 1.45rem;
  border: 1px solid rgba(0, 139, 139, 0.1);
  box-shadow: 0 10px 28px rgba(0, 102, 102, 0.06);
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.3s ease;
}

.home-feature.is-visible {
  opacity: 1;
  transform: none;
}

.home-feature:hover {
  box-shadow: 0 16px 34px rgba(0, 102, 102, 0.12);
  transform: translateY(-4px);
}

.home-feature__num {
  position: absolute;
  top: 0.85rem;
  left: 1rem;
  font-size: 1.6rem;
  font-weight: 900;
  color: rgba(0, 139, 139, 0.1);
  line-height: 1;
}

.home-feature__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: #008b8b;
  background: linear-gradient(145deg, rgba(0, 139, 139, 0.12), rgba(212, 175, 55, 0.12));
  font-size: 1.2rem;
}

.home-feature h3 {
  margin: 0 0 0.5rem;
  color: #006666;
  font-size: 1.12rem;
}

.home-feature p {
  margin: 0;
  color: #5a6a7a;
  font-size: 0.94rem;
  line-height: 1.75;
}

/* ---------- CTA ---------- */
.home-cta {
  padding: 0 0 clamp(2.5rem, 5vw, 3.5rem);
}

.home-cta__panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 22px;
  background:
    linear-gradient(125deg, #004848 0%, #008b8b 55%, #006666 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 102, 102, 0.22);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.home-cta__panel.is-visible {
  opacity: 1;
  transform: none;
}

.home-cta__panel::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.25);
  top: -80px;
  left: -40px;
}

.home-cta__copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.home-cta__copy h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-weight: 900;
}

.home-cta__copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
}

.home-cta__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ---------- Motion ---------- */
@keyframes homeFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes homeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes homeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .home-knowledge__grid,
  .home-features__grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-quote--featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .home-hero {
    min-height: auto;
  }

  .home-hero__frame {
    inset: 10px;
    border-radius: 14px;
  }

  .home-hero__inner {
    padding-block: 3.75rem 5rem;
  }

  .home-hero__emblem--bg {
    width: min(380px, 88vw);
    height: min(380px, 88vw);
    opacity: 0.28;
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
    margin-inline: auto;
  }

  .home-btn {
    width: 100%;
  }

  .home-knowledge__grid,
  .home-features__grid {
    grid-template-columns: 1fr;
  }

  .home-cta__panel {
    flex-direction: column;
    text-align: center;
  }

  .home-cta__actions {
    width: 100%;
    justify-content: center;
  }

  .home-cta__actions .home-btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .home-hero__brand {
    font-size: 1.75rem;
  }

  .home-hero__lead {
    font-size: 1.12rem;
  }

  .home-hero__desc {
    font-size: 0.98rem;
  }

  .home-quote,
  .home-feature {
    padding: 1.25rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__copy,
  .home-hero__visual,
  .home-quote,
  .home-feature,
  .home-cta__panel,
  .home-hero__glow,
  .home-hero__orbit,
  .home-hero__emblem-ring--inner {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
