/* =========================================================
   EARN SECTION
========================================================= */

.earn_section {
  position: relative;
  width: 100%;
  padding: 90px 0;
  overflow: hidden;
}

/* =========================================================
   MAIN CARD
========================================================= */

.earn_card {
  position: relative;

  width: 100%;

  min-height: 515px;

  padding: 48px;

  border-radius: 24px;

  /* background: linear-gradient(
    110deg,
    rgba(24, 28, 35, 0.98) 0%,
    rgba(19, 23, 30, 0.98) 48%,
    rgba(22, 26, 32, 0.97) 100%
  ); */

  background: var(--bg_color);

  border: 1px solid rgba(255, 112, 42, 0.32);

  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);

  overflow: hidden;

  opacity: 0;

  transform: translateY(45px) scale(0.97);

  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =========================================================
   CARD AMBIENT ORANGE LIGHT
========================================================= */

.earn_card::before {
  content: "";

  position: absolute;

  width: 480px;
  height: 480px;

  left: -190px;
  bottom: -230px;

  border-radius: 50%;

  background: rgba(255, 103, 42, 0.13);

  filter: blur(80px);

  pointer-events: none;

  animation: earnCardGlowLeft 8s ease-in-out infinite;
}

.earn_card::after {
  content: "";

  position: absolute;

  width: 500px;
  height: 500px;

  right: -220px;
  top: -250px;

  border-radius: 50%;

  background: rgba(255, 180, 52, 0.12);

  filter: blur(85px);

  pointer-events: none;

  animation: earnCardGlowRight 10s ease-in-out infinite;
}

@keyframes earnCardGlowLeft {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(130px, -50px);
  }
}

@keyframes earnCardGlowRight {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-100px, 80px);
  }
}

/* =========================================================
   SECTION VISIBILITY
========================================================= */

.earn_visible .earn_card {
  opacity: 1;

  transform: translateY(0) scale(1);
}

/* =========================================================
   ROW
========================================================= */

.earn_card .row {
  position: relative;
  z-index: 5;

  min-height: 415px;
}

/* =========================================================
   LEFT CONTENT
========================================================= */

.earn_content {
  position: relative;

  max-width: 520px;

  padding-right: 30px;
}

/* =========================================================
   BADGE
========================================================= */

.earn_badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 31px;
  padding: 0 13px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 174, 54, 0.28);
  border-radius: 30px;
  background: rgba(255, 164, 45, 0.025);
  color: var(--text_secondary_color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
  box-shadow:
    0 0 15px rgba(255, 124, 35, 0.04),
    inset 0 0 12px rgba(255, 124, 35, 0.025);
}

.earn_badge::first-letter {
  color: #ff762d;
}

/* =========================================================
   TITLE
========================================================= */

.earn_title {
  margin: 0;
  color: var(--text_primary_color);
  font-size: clamp(42px, 4vw, 54px);
  line-height: 0.98;
  font-weight: 750;
  letter-spacing: -2.5px;
  max-width: 490px;
  font-family: "Bricolage Grotesque";
}

.earn_title span {
  background: linear-gradient(110deg, #ffca52 0%, #ff9f2f 40%, #ff642c 100%);

  -webkit-background-clip: text;
  background-clip: text;

  -webkit-text-fill-color: transparent;
}

/* =========================================================
   DESCRIPTION
========================================================= */

.earn_description {
  max-width: 470px;

  margin: 25px 0 25px;

  color: var(--text_secondary_color);

  font-size: 15px;

  line-height: 1.65;

  font-weight: 400;
}

/* =========================================================
   EXAMPLE / HOW IT WORKS BOX
========================================================= */

.earn_example {
  position: relative;

  max-width: 480px;

  padding: 16px;

  border-radius: 14px;

  border: 1px solid rgba(255, 255, 255, 0.07);

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.015)
  );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 10px 30px rgba(0, 0, 0, 0.12);

  overflow: hidden;
}

.earn_example::before {
  content: "";

  position: absolute;

  top: 0;
  left: -100%;

  width: 80%;
  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 123, 45, 0.7),
    transparent
  );

  animation: exampleLight 4s linear infinite;
}

@keyframes exampleLight {
  0% {
    left: -100%;
  }

  100% {
    left: 120%;
  }
}

.example_label {
  display: block;

  margin-bottom: 8px;

  color: rgba(255, 255, 255, 0.5);
}

.earn_example p {
  margin: 0;
  color: var(--text_secondary_color);
  font-size: 14px;
  line-height: 1.55;
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.earn_example .Heading {
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* =========================================================
   RIGHT SIDE
========================================================= */

.earn_right {
  position: relative;

  width: 100%;

  max-width: 510px;

  margin-left: auto;

  padding-top: 4px;
}

/* =========================================================
   USER / YOU
========================================================= */

.earn_user {
  position: relative;

  width: 102px;
  height: 52px;

  margin: 0 auto 38px;

  display: flex;

  align-items: center;
  justify-content: center;

  gap: 9px;

  border-radius: 15px;

  /* background: linear-gradient(145deg, #1b2028, #11151b); */
  background: var(--bg_color);

  border: 1px solid rgba(255, 103, 38, 0.2);

  color: var(--text_primary_color);

  font-size: 14px;

  font-weight: 650;

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.25),
    0 0 20px rgba(255, 94, 33, 0.08);
}

/* Vertical line below You */

.earn_user::after {
  content: "";

  position: absolute;

  left: 50%;

  top: 100%;

  width: 1px;

  height: 38px;

  background: linear-gradient(
    to bottom,
    rgba(255, 103, 38, 0.8),
    rgba(255, 103, 38, 0.1)
  );

  transform: translateX(-50%);
}

/* User icon */

.user_icon {
  width: 28px;
  height: 28px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: linear-gradient(135deg, #ffbd3d, #ff6427);

  color: #111;

  font-size: 12px;

  box-shadow: 0 0 12px rgba(255, 115, 38, 0.4);
}

/* =========================================================
   REFERRAL LEVELS
========================================================= */

.referral_levels {
  position: relative;

  display: flex;

  flex-direction: column;

  gap: 24px;
}

/* Vertical line behind cards */

.referral_levels::before {
  content: "";

  position: absolute;

  top: -38px;
  bottom: -20px;

  left: 50%;

  width: 1px;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 103, 38, 0.2) 0,
    rgba(255, 103, 38, 0.2) 5px,
    transparent 5px,
    transparent 10px
  );

  z-index: -1;
}

/* =========================================================
   REFERRAL ITEM
========================================================= */

.referral_item {
  position: relative;
  width: 100%;
  min-height: 82px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 15px;
  background: var(--bg_color);
  border: 1px solid rgba(115, 125, 140, 0.17);
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  opacity: 0;
  transform: translateX(35px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.referral_item:nth-child(1) {
  transition-delay: 0.25s;
}

.referral_item:nth-child(2) {
  transition-delay: 0.4s;
}

.referral_item:nth-child(3) {
  transition-delay: 0.55s;
}

.earn_visible .referral_item {
  opacity: 1;

  transform: translateX(0);
}

/* =========================================================
   REFERRAL LEFT
========================================================= */

.referral_left {
  display: flex;

  align-items: center;

  gap: 12px;
}

/* =========================================================
   LEVEL BADGE
========================================================= */

.level_badge {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 11px;

  border: 1px solid rgba(255, 105, 38, 0.25);

  background: rgba(255, 105, 38, 0.035);

  color: #ff7433;

  font-size: 12px;

  font-weight: 700;

  box-shadow: inset 0 0 10px rgba(255, 105, 38, 0.025);
}

/* =========================================================
   LEVEL TITLE
========================================================= */

.level_title {
  color: var(--text_primary_color);

  font-size: 15px;

  font-weight: 600;
}

/* =========================================================
   PERCENTAGE
========================================================= */

.level_percentage {
  color: #ff6530;

  font-size: 29px;

  line-height: 1;

  font-weight: 750;

  letter-spacing: -0.7px;

  text-shadow: 0 0 15px rgba(255, 94, 38, 0.15);
}

.level_percentage .Heading {
  font-size: 32px;
}

/* =========================================================
   REFERRAL HOVER
========================================================= */

.referral_item:hover {
  border-color: rgba(255, 105, 38, 0.3);

  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(255, 95, 35, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);

  transform: translateX(-4px) !important;
}

.referral_item:hover .level_badge {
  border-color: rgba(255, 105, 38, 0.5);

  background: rgba(255, 105, 38, 0.08);

  box-shadow: 0 0 12px rgba(255, 105, 38, 0.1);
}

/* =========================================================
   NOTE
========================================================= */

.earn_note {
  margin: 19px 0 0;
  text-align: center;
  color: var(--text_secondary_color);
  font-size: 12px;
  line-height: 1.5;
}

/* =========================================================
   CARD SHIMMER
========================================================= */

.earn_card > .row::after {
  content: "";

  position: absolute;

  top: 0;
  left: -100%;

  width: 45%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.025),
    transparent
  );

  transform: skewX(-15deg);

  pointer-events: none;

  animation: earnCardShimmer 8s ease-in-out infinite;
}

@keyframes earnCardShimmer {
  0%,
  60% {
    left: -100%;
  }

  100% {
    left: 150%;
  }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {
  .earn_section {
    padding: 70px 0;
  }

  .earn_card {
    padding: 38px;
  }

  .earn_content {
    padding-right: 15px;
  }

  .earn_title {
    font-size: 42px;
  }

  .earn_description {
    font-size: 14px;
  }

  .earn_right {
    max-width: 100%;
  }

  .referral_item {
    min-height: 76px;
  }

  .level_percentage {
    font-size: 25px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
  .earn_section {
    padding: 50px 0;
  }

  .earn_card {
    min-height: auto;

    padding: 30px 22px;

    border-radius: 20px;
  }

  .earn_card .row {
    min-height: auto;
  }

  .earn_content {
    max-width: 100%;

    padding-right: 0;

    margin-bottom: 50px;
  }

  .earn_badge {
    margin-bottom: 18px;

    font-size: 9px;
  }

  .earn_title {
    font-size: 36px;

    letter-spacing: -1.7px;
  }

  .earn_description {
    margin-top: 20px;

    font-size: 13px;

    line-height: 1.65;
  }

  .earn_example {
    max-width: 100%;

    padding: 14px;
  }

  .earn_example p {
    font-size: 13px;
  }

  .earn_right {
    max-width: 100%;
  }

  .earn_user {
    margin-bottom: 35px;
  }

  .referral_levels {
    gap: 15px;
  }

  .referral_item {
    min-height: 72px;

    padding: 12px 14px;

    border-radius: 13px;
  }

  .level_badge {
    width: 36px;
    height: 36px;

    border-radius: 9px;

    font-size: 11px;
  }

  .level_title {
    font-size: 13px;
  }

  .level_percentage {
    font-size: 23px;
  }

  .earn_note {
    font-size: 10px;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .earn_card {
    padding: 25px 17px;
  }

  .earn_title {
    font-size: 31px;

    letter-spacing: -1.3px;
  }

  .earn_description {
    font-size: 12px;
  }

  .referral_item {
    padding: 11px 12px;
  }

  .referral_left {
    gap: 9px;
  }

  .level_badge {
    width: 34px;
    height: 34px;
  }

  .level_title {
    font-size: 12px;
  }

  .level_percentage {
    font-size: 20px;
  }

  .earn_note {
    font-size: 9px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .earn_section::before,
  .earn_section::after,
  .earn_card::before,
  .earn_card::after,
  .earn_card > .row::after,
  .earn_example::before {
    animation: none;
  }

  .earn_card,
  .referral_item {
    transition: none;
  }
}
