/* === Animations for News Section === */
.fade-in-left {
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity 0.7s cubic-bezier(0.77, 0, 0.18, 1),
    transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-bottom {
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity 0.7s cubic-bezier(0.77, 0, 0.18, 1),
    transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);
}

.fade-in-bottom.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(60px);
  transition:
    opacity 0.7s cubic-bezier(0.77, 0, 0.18, 1),
    transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Optional: Add a small gap between cards when animating */
.news-card {
  margin-bottom: 18px;
}

/* Move ideas dots lower */
.ideas-dots-lower {
  margin-top: 60px !important;
  gap: 2rem !important;
}

/* Social label under icon */
.social-label {
  font-size: 0.85rem;
  color: #222;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hero-bs {
  height: 100vh;
  min-height: 320px;
}

.hero-bs__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.05);
  animation: heroZoom 12s ease-out forwards;
}

.hero-bs__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 140, 27, 0.85) 0%,
    rgba(0, 140, 27, 0.65) 40%,
    rgba(137, 91, 0, 0.55) 80%
  );
}

.hero-bs__title {
  color: #ffb41e;
}

.hero-bs__title,
.hero-bs__text {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease-out forwards;
}

.hero-bs__text {
  animation-delay: 0.12s;
  color: #ffffff;
  font-weight: 400;
}

@keyframes heroZoom {
  to {
    transform: scale(1);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SECTION BG */
.ideas-section {
  background: #eaf4e1;
}

/* Header text */
.ideas-title {
  line-height: 1.25;
}

.ideas-desc {
  font-size: 16px;
  line-height: 1.8;
  max-width: 720px;
}

/* =========================
   IDEAS / CARDS
========================= */

/* Card */
.idea-card {
  height: 100%;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.32s cubic-bezier(0.77, 0, 0.18, 1),
    box-shadow 0.32s cubic-bezier(0.77, 0, 0.18, 1);
}

.idea-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.13);
}

.card-zoom {
  transform: scale(1.2);
}

/* Media */
.idea-media {
  position: relative;
  padding: 18px 18px 0;
}

.idea-media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.idea-card--tall .idea-media img {
  height: 400px;
}

/* Badge */
.idea-badge {
  position: absolute;
  right: 17px;
  bottom: 0;
  background: #0b8f2a;
  color: #fff;
  font-size: 13px;
  padding: 8px 12px;
  border-bottom-right-radius: 20px;
  border-top-left-radius: 20px;
  white-space: nowrap;
}

/* Floating circle button */
.idea-float-btn {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 5;

  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;

  background: #fff;
  display: grid;
  place-items: center;

  text-decoration: none;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.idea-float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.14);
}

.idea-float-btn img.arrow-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.idea-float-btn img.arrow-icon {
  filter: invert(33%) sepia(86%) saturate(1200%) hue-rotate(95deg)
    brightness(90%) contrast(95%);
}

.idea-float-btn--active {
  background: #0b8f2a;
}

.idea-float-btn--active img.arrow-icon {
  filter: brightness(0) invert(1);
}

/* Dots */
.ideas-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94c79a;
  opacity: 0.6;
}

.ideas-dots .dot.active {
  width: 12px;
  height: 12px;
  background: #0b8f2a;
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(11, 143, 42, 0.18);
}

:root {
  --ideas-bg: #ffffff;
}

.idea-card--cut .idea-media {
  position: relative;
}

.idea-card--cut .idea-media::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  width: 76px;
  height: 76px;
  background: var(--ideas-bg);
  border-radius: 0 0 30px 0;
  z-index: 2;
}

.idea-card--cut .idea-media::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 28px;
  width: 58px;
  height: 58px;
  background: var(--ideas-bg);
  border-radius: 50%;
  z-index: 3;
}

.idea-card--cut .idea-float-btn {
  z-index: 5;
}

.news-wrap {
  background: #ffffff;
}

.news-box {
  background: #0b8f2a;
  border-radius: 18px;
  padding: 42px 24px;
  min-height: 220px;
  isolation: isolate;
  margin-bottom: -110px;
}

.news-box.news-animate {
  opacity: 0;
  transform: translateY(100px);
  /* Start further down */
  transition:
    transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

.news-box.news-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.news-box.news-animate .news-anim {
  opacity: 0;
  transform: translateY(40px);
  /* Elements start lower */
  transition:
    transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

.news-box.news-animate.is-visible .news-anim {
  opacity: 1;
  transform: translateY(0);
}

.news-title {
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 28px);
}

.word-highlight {
  position: relative;
  display: inline-block;
}

.word-highlight {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
  line-height: 1;
}

.title-curves {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 100%;
  height: 14px;
  pointer-events: none;
}

.first-curve {
  bottom: -5px;
  width: 110px;
}

.second-curve {
  bottom: -10px;
  width: 90px;
}

.news-sub {
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
  margin-inline: auto;
  line-height: 1.8;
}

.news-form {
  max-width: 650px;
}

.news-input {
  height: 44px;
  border-radius: 5px;
  border: 0;
  padding-inline: 14px;
}

.email-input {
  height: 40px;
  padding-right: 20px;
  padding-left: 20px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid #e3e7ea;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.nl-decor {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 1;
  width: clamp(70px, 8vw, 100px);
  height: auto;
}

/* Right side */
.nl-right-top {
  width: clamp(40px, 8vw, 50px);
  top: 18px;
  right: -10px;
}

.nl-right-mid {
  top: 100px;
  right: -20px;
  transform: translateY(-50%);
}

.nl-right-bot-mid {
  width: clamp(40px, 8vw, 50px);
  top: 140px;
  right: -10px;
}

.nl-right-bot {
  top: 220px;
  right: -20px;
  transform: translateY(-50%);
}

/* Left side */
.nl-left-top {
  top: 18px;
  left: -10px;
  width: clamp(40px, 8vw, 50px);
}

.nl-left-mid {
  top: 100px;
  left: -20px;
  transform: translateY(-50%);
}

.nl-left-bot-mid {
  top: 140px;
  left: -10px;
  width: clamp(40px, 8vw, 50px);
}

.nl-left-bot {
  top: 220px;
  left: -20px;
  transform: translateY(-50%);
}

.newsletter-box > *:not(img) {
  position: relative;
  z-index: 1;
}

.box-btn {
  position: relative;
  overflow: hidden;
  background: #e7b900;
  font-size: 14px;
  border: none;
  color: #fff;
  border-radius: 12px;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.box-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  transition: left 0.2s ease;
}

.box-btn:hover {
  background: #d4a800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
  color: #fff;
}

.box-btn:hover::before {
  left: 120%;
}

/* موبايل: صغّر/خبّي الديكور لتجنب الزحمة */
@media (max-width: 575.98px) {
  .nl-decor {
    width: 68px;
    opacity: 0.95;
  }

  .nl-right-mid,
  .nl-left-mid {
    display: none;
  }
}

.news-input {
  background-color: #fff;
}

[dir="ltr"] .news-input {
  text-align: left;
}

/* Newsbox fade text: يظهر من العدم */
.newsbox-fade-text {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.77, 0, 0.18, 1);
}

.newsbox-fade-text.visible {
  opacity: 1;
}

/* Newsbox fade bottom: يظهر من الأسفل */
.newsbox-fade-bottom {
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity 0.8s cubic-bezier(0.77, 0, 0.18, 1),
    transform 0.8s cubic-bezier(0.77, 0, 0.18, 1);
}

.newsbox-fade-bottom.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .news-form .row.g-2 > div {
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
  }
  .news-form .box-btn {
    font-size: 0.89rem;
    padding: 0.5rem 1.1rem;
    white-space: nowrap;
    min-width: 120px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .news-form .search-box {
    margin-top: 0;
    width: 250px;
  }
}

@media (max-width: 767.98px) {
  /* إخفاء الفوانيس */
  .news-box .nl-decor {
    display: none !important;
  }
  .news-form .row.g-2 {
    flex-direction: column;
    align-items: center;
  }
  .news-form .row.g-2 > div {
    width: 100%;
    max-width: 350px;
    flex: unset;
    display: block;
    margin-bottom: 0.3rem;
  }
  .news-form .search-box {
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
  }
  .news-form .box-btn {
    width: 100%;
    min-width: 0;
    font-size: 0.97rem;
    padding: 0.5rem 0.5rem;
    height: 40px;
    display: block;
    margin: 0 auto;
  }
  .news-form .email-input {
    height: 40px;
    font-size: 1.08rem;
    padding-right: 22px;
    padding-left: 22px;
  }
  .news-form .search-box,
  .news-form .email-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (min-width: 992px) {
  .news-form .row.g-2 {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  .news-form .row.g-2 > div {
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
  }
  .news-form .search-box {
    margin-top: 0;
    margin-bottom: 0;
    width: 320px;
  }
  .news-form .box-btn {
    width: auto;
    min-width: 120px;
    font-size: 1rem;
    padding: 0.6rem 1.5rem;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0 0.5 rem;
  }
}
