/* الحاوية التي تُحقن فيها الهيرو: مساحة فوقية لتفادي تداخل المحتوى مع المنيو الثابت + مساحة كما في التصميم */
[data-y="header"] {
  display: block;
  padding-top: 80px; /* ارتفاع شريط المنيو تقريباً */
}

body.admin-bar [data-y="header"] {
  padding-top: 112px; /* عند ظهور شريط إدارة ووردبريس */
}

.header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 4rem 8%;
  margin-top: 2.5rem; /* مساحة بين نهاية المنيو وبداية كلمة دارك كما في التصميم */
  gap: 2rem;
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
  max-width: 1200px;
  margin-inline: auto;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
  position: relative;
}

.content h1 {
  font-size: clamp(2.5rem, 8vw, 8rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--y-main);
  line-height: 1.2;
  font-family: "Gulzar", sans-serif;
}

.content p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 500px;
  font-weight: 600;
  color: var(--y-color-text-dark, #333);
}

header .btn-primary {
  display: inline-block;
  width: auto;
  background: var(--y-main);
  border: 2px solid var(--y-main);
  font-family: var(--y-font-alt);
  color: #fff;
  font-size: clamp(1rem, 1.5vw, 2rem);
  font-weight: 600;
  padding: 0.8rem 3rem;
  border-radius: 40px;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

header .btn-primary:hover {
  background: var(--y-main);
  transform: translateY(-3px);
  color: #fff;
}

.image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-wrapper img {
  max-width: 100%;
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  animation: float 4s ease-in-out infinite;
  display: block;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (max-width: 820px) {
  .header {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: 2rem 1rem;
    margin-top: 1rem;
    gap: 1rem;
  }

  .image-wrapper {
    order: 1;
    width: 100%;
    max-height: 45vh;
    min-height: 200px;
    margin: 0;
  }

  .image-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 45vh;
    object-fit: contain;
    border-radius: 16px;
    animation: none;
  }

  .content {
    order: 2;
    padding: 1rem 0.5rem;
    text-align: center;
  }

  .content h1 {
    font-size: clamp(2.25rem, 10vw, 4rem);
  }

  .content p {
    margin: 0 auto 1.25rem;
    font-size: 1rem;
    max-width: 100%;
  }

  header .btn-primary {
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    margin: 0.5rem auto 0;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 1.5rem 0.75rem;
  }

  .content h1 {
    font-size: 2rem;
  }

  .content p {
    font-size: 0.9375rem;
  }
}
