/* ==========================================================================
   דף הבית - front-page.php
   ========================================================================== */

/* ---------- HERO ---------- */
.home-hero {
  position: relative;
  width: 100%;
  height: 850px;
  overflow: hidden;
  background: var(--brand-darker);
}

.home-hero-bg {
  position: absolute;
  left: 0;
  top: -160px;
  width: 1920px;
  height: 1005px;
  object-fit: cover;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 0 40px;
}

.home-hero-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 135px;
  color: var(--page-bg);
  line-height: 1;
}

.home-hero-subtitle {
  margin: 0;
  max-width: 840px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 32px;
  color: var(--page-bg);
}

/* ---------- ABOUT ---------- */
.home-about {
  position: relative;
  width: 100%;
  min-height: 910px;
  padding: 120px 0 80px;
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.home-about-ellipse {
  position: absolute;
  width: 891px;
  height: 891px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.home-about-ellipse--top {
  left: 50%;
  top: -520px;
  transform: translateX(-50%);
}

.home-about-ellipse--bottom {
  left: 50%;
  bottom: -520px;
  transform: translateX(-50%);
}

.home-about-title {
  position: relative;
  z-index: 1;
  margin: 0 0 40px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 64px;
  color: var(--brand-dark);
  text-align: center;
}

.home-about-body {
  position: relative;
  z-index: 1;
  max-width: 1027px;
  width: 100%;
  padding: 0 24px;
}

.home-about-image {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- BOOKS / COURSES HUB ---------- */
.home-hub {
  position: relative;
  width: 100%;
  min-height: 920px;
  background: var(--page-bg);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  padding: 100px 40px 140px;
}

.home-hub-circle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  color: var(--brand-dark);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 40px;
  z-index: 1;
  transition: transform 0.2s ease;
}

.home-hub-circle:hover {
  transform: translateY(-6px);
}

.home-hub-circle--books,
.home-hub-circle--courses,
.home-hub-circle--featured {
  border: 4px solid var(--brand-dark);
  background: transparent;
}

.home-hub-circle--featured {
  width: 380px;
  height: 380px;
  font-size: 44px;
  order: 3;
  flex-basis: 100%;
  margin-top: 20px;
}

.home-hub-circle-tagline {
  margin-top: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 22px;
  max-width: 300px;
}

.home-hub-line {
  display: none;
  position: absolute;
  z-index: 0;
  height: 2px;
  width: 216px;
  background: var(--brand-dark);
}

/* סיבוב "כיסאות מוזיקליים": שלושת העיגולים מחליפים מקומות ביניהם בלולאה
   רציפה (ספרים -> קורסים -> אור גנוז -> ספרים...), כשכל אחד מהם גם משנה
   קנה מידה בהתאם לגודל העיגול שבמקומו הוא נכנס (340px לעומת 380px). */
@keyframes home-hub-spin-books {
  0% { transform: translate(0, 0) scale(1); }
  33.333% { transform: translate(400px, 0) scale(1); }
  66.666% { transform: translate(200px, 440px) scale(1.118); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes home-hub-spin-courses {
  0% { transform: translate(0, 0) scale(1); }
  33.333% { transform: translate(-200px, 440px) scale(1.118); }
  66.666% { transform: translate(-400px, 0) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes home-hub-spin-featured {
  0% { transform: translate(0, 0) scale(1); }
  33.333% { transform: translate(-200px, -440px) scale(0.895); }
  66.666% { transform: translate(200px, -440px) scale(0.895); }
  100% { transform: translate(0, 0) scale(1); }
}

/* בטווח הרוחבים הזה הפריסה קבועה: שורה ראשונה = "קורסים"+"ספרים" זה לצד זה
   (ברוחב כולל 740px, ממורכזת), ושורה שנייה = "אור גנוז" ממורכז מתחתיה.
   בזכות justify-content: center שני האלמנטים חולקים אותו מרכז אופקי, וזה
   מה שמאפשר לחשב מסלולי סיבוב מדויקים ביניהם. */
@media (min-width: 860px) and (max-width: 1299px) {
  /* למשתמשים שמעדיפים פחות תנועה - משאירים את העיגולים במקומם הקבוע,
     עם קווי החיבור הסטטיים בין "אור גנוז" לבין "ספרים" ו"קורסים". */
  @media (prefers-reduced-motion: reduce) {
    .home-hub-line {
      display: block;
      top: 440px;
    }

    .home-hub-line--left {
      left: calc(50% - 200px);
      transform-origin: 0 50%;
      transform: rotate(21.8deg);
    }

    .home-hub-line--right {
      right: calc(50% - 200px);
      transform-origin: 100% 50%;
      transform: rotate(-21.8deg);
    }
  }

  /* למשתמשים ללא העדפת "פחות תנועה" - שלושת העיגולים מסתובבים ומתחלפים. */
  @media (prefers-reduced-motion: no-preference) {
    .home-hub-circle--books,
    .home-hub-circle--courses,
    .home-hub-circle--featured {
      animation-duration: 12s;
      animation-timing-function: ease-in-out;
      animation-iteration-count: infinite;
      will-change: transform;
    }

    .home-hub-circle--books {
      animation-name: home-hub-spin-books;
    }

    .home-hub-circle--courses {
      animation-name: home-hub-spin-courses;
    }

    .home-hub-circle--featured {
      animation-name: home-hub-spin-featured;
    }

    .home-hub-circle:hover {
      animation-play-state: paused;
    }
  }
}

@media (min-width: 1300px) {
  .home-hub {
    padding-top: 40px;
  }

  .home-hub-circle--books,
  .home-hub-circle--courses {
    margin-top: 0;
  }

  .home-hub-circle--featured {
    flex-basis: auto;
    margin-top: 220px;
  }
}

/* ---------- CONTACT ---------- */
.home-contact {
  position: relative;
  width: 100%;
  min-height: 869px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 40px;
}

.home-contact-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.home-contact-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.home-contact-form {
  flex: 1 1 500px;
  max-width: 625px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
    top: -18px;
    right: -77px;
}

.home-contact-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-contact-form label {
  font-size: 24px;
  color: var(--page-bg);
  font-family: var(--font-body);
  text-align: right;
}

.home-contact-form input,
.home-contact-form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(252, 247, 237, 0.6);
  color: var(--page-bg);
  font-size: 20px;
  font-family: var(--font-body);
  padding: 6px 4px;
  outline: none;
  resize: vertical;
}

.home-contact-form input:focus,
.home-contact-form textarea:focus {
  border-bottom-color: var(--page-bg);
}

.home-contact-submit {
  align-self: flex-start;
  margin-top: 12px;
  padding: 14px 40px;
  background: transparent;
  border: 1px solid var(--page-bg);
  border-radius: 4px;
  color: var(--page-bg);
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.home-contact-submit:hover {
  background: var(--page-bg);
  color: var(--brand-dark);
}

.form-notice {
  font-size: 18px;
  margin: 0;
}

.form-notice--success {
  color: #8fd19e;
}

.form-notice--error {
  color: #e0928f;
}

.home-contact-aside {
  flex: 0 1 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.home-contact-seal {
  width: 220px;
  height: 220px;
  object-fit: contain;
      position: relative;
        top: 24px;
        right: -54px;
}

.home-contact-email {
  font-size: 32px;
  color: var(--page-bg);
  text-decoration: none;
  font-family: var(--font-body);
  direction: ltr;
      position: relative;
        top: 58px;
        right: -56px;
}

.home-contact-email:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .home-hero-title {
    font-size: 72px;
  }

  .home-about-title {
    font-size: 44px;
  }
}

.home-hub-circle home-hub-circle--courses{
position: relative;
position: relative;
left: -26%;
}

.home-hub-circle home-hub-circle--featured{
  position: relative;
  left: -26%;
}