/* ===== Hero Section (Final Fixed Version) ===== */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(320px, min(40vw, 420px));
  gap: clamp(20px, 4vw, 56px);
  align-items: center;

  text-align: left;
  /* extend to full viewport width so background always touches the edges */
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  padding: clamp(86px, 10vw, 130px) clamp(40px, 8vw, 140px);

  color: var(--text);
  overflow: hidden;

  background:
    radial-gradient(900px at 12% 12%, rgba(56,189,248,0.18), transparent 55%),
    radial-gradient(760px at 88% 90%, rgba(37,99,235,0.18), transparent 60%),
    linear-gradient(rgba(8,14,26,0.76), rgba(8,14,26,0.82)),
    url('../img/home-page.png') center/cover no-repeat;
}

/* subtle top highlight */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 35%);
}

/* ===== Content ===== */

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.eyebrow {
  color: #9fb6d4;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

.hero-content h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 6vw, 4.8rem);
  font-weight: 700;
  line-height: 1;
  color: #f5fbff;
  text-shadow: 0 8px 28px rgba(2,6,23,0.55);
}

.hero-content p {
  margin-bottom: 24px;
  max-width: 62ch;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.75;
  color: #b2c1d8;
}

/* ===== Buttons ===== */

.hero-ctas {
  display: inline-flex;
  gap: 14px;
  align-items: center;
}

.hero-content .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: linear-gradient(90deg, #7dd3fc, #60a5fa 50%, #818cf8);
  color: #0b1220;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(59,130,246,0.35);
  transition: 0.3s ease;
}

.hero-content .btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 34px rgba(99,102,241,0.45);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: #dbeafe;
  border: 1px solid rgba(255,255,255,0.12);
}


/* ===== Hero Image ===== */

.hero-image {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  border: 6px solid rgba(12,18,34,0.52);
  box-shadow: 0 28px 72px rgba(2,6,23,0.55);
  transition: 0.7s cubic-bezier(.2,.9,.2,1);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.7s cubic-bezier(.2,.9,.2,1);
}

.hero-image:hover {
  transform: translateY(-8px);
}

.hero-image:hover img {
  transform: scale(1.05);
}

/* ===== Entry Animation ===== */

.hero-content h1,
.hero-content p,
.hero-content .btn {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 700ms ease forwards;
}

.hero-content p { animation-delay: 120ms; }
.hero-content .btn { animation-delay: 240ms; }

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Mobile Fix ===== */

/* extend breakpoint so wider phones/tablets use stacked layout and
   avoid any horizontal scroll caused by the two‑column grid */
@media (max-width: 768px) {
  .hero {
    padding: 100px 16px 50px;
    min-height: 100svh;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero-content {
    max-width: 90%;
    padding: 0;
  }

  .hero-content h1 {
    font-size: clamp(1.6rem, 8vw, 2.8rem);
    line-height: 1.2;
  }

  .hero-content p {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    line-height: 1.6;
  }

  .hero-ctas {
    flex-direction: row; /* خليهم جنب بعض */
    gap: 10px;           /* مسافة صغيرة بينهم */
    justify-content: center;
    width: auto;          /* خليهم لا يشغلوا كل العرض */
  }

  .hero-image {
    display: none; /* نخفي الصورة الكبيرة */
  }
}



/* ===== Reduced Motion ===== */

@media (prefers-reduced-motion: reduce) {
  .hero-content h1,
  .hero-content p,
  .hero-content .btn {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-image,
  .hero-image img {
    transition: none !important;
  }
}

/* ===== Hero Buttons Hover + Pop Effect ===== */

/* الزر gradient */
.hero-content .btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), 
              box-shadow 0.25s ease,
              background 0.3s ease;
}

/* Hover effect + تكبير */
.hero-content .btn:hover {
  transform: scale(1.1) translateY(-2px); /* أكبر من hover القديم */
  box-shadow: 0 26px 60px rgba(99,102,241,0.55); /* ظل أكبر */
  background: linear-gradient(90deg, #60a5fa, #818cf8, #7dd3fc);
}

/* لمعة صغيرة عند Hover */
.hero-content .btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: rgba(255,255,255,0.15);
  transform: skewX(-25deg);
  transition: left 0.7s ease-in-out;
}

.hero-content .btn:hover::before {
  left: 125%;
}

/* Pop عند الضغط */
.hero-content .btn:active {
  transform: scale(1.14) translateY(-1px); /* يكبر أكثر عند الضغط */
  box-shadow: 0 32px 80px rgba(99,102,241,0.6);
}

/* زر ghost */
.btn-ghost {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1),
              box-shadow 0.25s ease,
              background 0.3s ease,
              color 0.3s ease;
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-ghost:hover {
  transform: scale(1.08) translateY(-1px); /* تكبير عند Hover */
  box-shadow: 0 16px 36px rgba(125,211,252,0.4);
  background: rgba(125,211,252,0.12);
  color: #262424;
}

.btn-ghost::before {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 60%;
  height: 100%;
  background: rgba(125,211,252,0.18);
  transform: skewX(-25deg);
  transition: left 0.7s ease-in-out;
}

.btn-ghost:hover::before {
  left: 140%;
}

/* Pop عند الضغط على ghost */
.btn-ghost:active {
  transform: scale(1.12) translateY(-1px);
  box-shadow: 0 20px 50px rgba(125,211,252,0.45);
  background: rgba(125,211,252,0.15);
}
/* ===== End of Hero Buttons Hover + Pop Effect ===== */
/* ========== SCROLLBAR ========== */

::-webkit-scrollbar{
  width:7px;
}

/* track شفاف ليذوب مع التصميم */
::-webkit-scrollbar-track{
  background: transparent;
}

/* مخفي افتراضياً */
::-webkit-scrollbar-thumb{

  background: linear-gradient(
    180deg,
    var(--accent-2),
    var(--accent-3)
  );

  border-radius:999px;
  border:1.5px solid rgba(255,255,255,0.06);

  opacity:0;
  transition:
    opacity 0.35s ease,
    background 0.25s ease;
}

/* يظهر وقت التمرير */
body.scrolling ::-webkit-scrollbar-thumb{
  opacity:0.75;
}

/* hover ناعم */
::-webkit-scrollbar-thumb:hover{
  opacity:1;

  background: linear-gradient(
    180deg,
    var(--accent),
    var(--accent-3)
  );
}
