.top-banner.banner-with-bg {
  position: relative;
  background-color: var(--banner-color-bg, none);
  overflow: hidden;
}

/* تصویر روی رنگ قرار بگیرد */
.top-banner.banner-with-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--banner-bg-olympics, none);
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.top-banner.banner-with-bg.theme-olympics:after {
  background-size: 65%;
  background-position: left;
  filter: brightness(0.1);
  z-index: 0;
}

/* تم‌ها (رنگ پایه؛ تصویر از ::before می‌آید) */
.top-banner.banner-with-bg.theme-base {
  --banner-color-bg: #a3a3a3;
}
.top-banner.banner-with-bg.theme-blue {
  --banner-color-bg: #019be5;
}
.top-banner.banner-with-bg.theme-red {
  --banner-color-bg: #f20f0f;
}
.top-banner.banner-with-bg.theme-purple {
  --banner-color-bg: #860efe;
}
.top-banner.banner-with-bg.theme-olympics {
  --banner-color-bg: #262626;
}

.top-banner.banner-with-bg.theme-base a.non-olympics,
.top-banner.banner-with-bg.theme-blue a.non-olympics,
.top-banner.banner-with-bg.theme-red a.non-olympics,
.top-banner.banner-with-bg.theme-purple a.non-olympics {
  background: #fff !important;
  color: #000;
  transition: all 0.3s ease;
}

.top-banner.banner-with-bg.theme-purple a.non-olympics:hover {
  background: #860efe !important;
  color: #fff !important;
  transition: all 0.3s ease;
}

.top-banner.banner-with-bg.theme-red a.non-olympics:hover {
  background: #f20f0f !important;
  color: #fff !important;
  transition: all 0.3s ease;
}

.top-banner.banner-with-bg.theme-blue a.non-olympics:hover {
  background: #019be5 !important;
  color: #fff !important;
  transition: all 0.3s ease;
}

.top-banner.banner-with-bg.theme-base a.non-olympics:hover {
  background: #262626 !important;
  color: #fff !important;
  transition: all 0.3s ease;
}

.top-banner.banner-with-bg.theme-olympics {
  --banner-bg-olympics: url("https://ravinacademy.com/wp-content/uploads/2025/09/banner-header-timer.png");
}

.top-banner.banner-with-bg.theme-base,
.top-banner.banner-with-bg.theme-blue,
.top-banner.banner-with-bg.theme-red,
.top-banner.banner-with-bg.theme-purple {
  --banner-bg-olympics: url("https://ravinacademy.com/wp-content/uploads/2025/09/banner-header-default.png");
}

@media (max-width: 768px) {
  .top-banner.banner-with-bg.theme-base,
  .top-banner.banner-with-bg.theme-blue,
  .top-banner.banner-with-bg.theme-red,
  .top-banner.banner-with-bg.theme-purple {
    --banner-bg-olympics: url("https://ravinacademy.com/wp-content/uploads/2025/09/mobile-header-top.png");
    background-size: cover;
    background-position: center;
  }
}

/* timer style */

.frame.not-olympics::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border: 1px solid #fff;
  border-radius: 7px;
  z-index: 1;
  pointer-events: none;
  background: none;
}

.frame.not-olympics.base::before {
  border: 1px solid #000;
}

.text-wrapper-2.base {
  color: #000 !important;
}

/* تایمر */
.frame {
  display: flex;
  flex-direction: column;
  width: 56px;
  align-items: center;
  justify-content: center;
  gap: 0px;
  padding: 2px;
  position: relative;
  background-color: #ffffff0a;
  border-radius: 7px;
}

.frame .text-wrapper {
  position: relative;
  font-family: "Morabba";
  font-weight: 600;
  color: #ffffff;
  font-size: 21px;
  text-align: center;
  line-height: normal;
}

.frame .div {
  position: relative;
  width: fit-content;
  font-family: "Peyda";
  color: #fff;
  font-size: 11px;
}

.frame .text-wrapper-2 {
  position: absolute;
  text-align: center;
  width: 45px;
  height: 30px;
  top: 10px;
  left: -20px;
  transform: rotate(90deg);
  font-family: "Empires";
  color: #fff;
  font-size: 21px;
  z-index: 9;
}

.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 7px;
  background: linear-gradient(
    80deg,
    rgba(242, 15, 15, 1) 0%,
    rgba(134, 14, 254, 1) 36%,
    rgba(96, 71, 255, 1) 68%,
    rgba(0, 136, 209, 1) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
}

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.rotating-border {
  position: relative;
  padding: 0.5rem 1.5rem !important;
  cursor: pointer;
  font-weight: 600 !important;
  border: 1px solid transparent;

  /* لایه‌ی پس‌زمینه ثابت + خط دور گرادینتی */
  background: linear-gradient(#2f2f2f, #2f2f2f) padding-box,
    conic-gradient(
        from var(--border-angle),
        #f20f0f,
        #860efe,
        #6047ff,
        #0088d1,
        #f20f0f
      )
      border-box;
  background-clip: padding-box, border-box;

  /* مقدار اولیه */
  --border-angle: 0deg;
  transition: --border-angle 1s linear;
  /* برگشت نرم */
}

/* موقع هاور مقدار زاویه رو عوض می‌کنیم */
.rotating-border:hover {
  --border-angle: 360deg;
  color: #fff;
}

@media screen and (max-width: 480px) {
  .rotating-border {
    /* display: none !important; */
    padding: 0.5rem !important;
    font-size: 12px;
    height: 40px;
    background: linear-gradient(#171717, #171717) padding-box,
      conic-gradient(
          from var(--border-angle),
          #f20f0f,
          #860efe,
          #6047ff,
          #0088d1,
          #f20f0f
        )
        border-box !important;
  }

  .frame {
    width: 36px;
    gap: 0px;
    padding: 0px;
  }

  .frame .div {
    font-size: 9px;
  }

  .frame .text-wrapper {
    font-weight: normal;
    font-size: 14px;
  }

  .frame .text-wrapper-2 {
    width: 41px;
    height: 17px;
    top: 8px;
    left: -20px;
    font-size: 12px;
  }

  .mobilever {
    flex-direction: column-reverse !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 4px 0px 4px 0px;
  }

  .timemobile {
    gap: 0.7rem !important;
  }

  .mobilever p {
    font-size: 12px;
  }
}

.banner-with-bg > * {
  position: relative;
  z-index: 1;
  /* محتوای داخل، روی فیلتر قرار بگیره */
}

@media (max-width: 768px) {
  .banner-with-bg:before {
    background-image: none;
  }
}

.titles.images-bg {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 20px;
}

img.image-title-class {
  width: 70px;
  display: inline-block;
  transform-origin: center center;
  will-change: transform, filter;
  animation: glitchStep 2s steps(2, end) infinite;
  padding: 0px;
}

/* کاربران با reduced motion */
@media (prefers-reduced-motion: reduce) {
  img.image-title-class {
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}

/* Glitch RGB شبیه‌سازی با drop-shadow های رنگی */
@keyframes glitchStep {
  0%, 100% {
    transform: translate(0, 0);
    filter: none;
  }
  8% {
    transform: translate(2px, -2px) rotate(0.2deg);
    /* قرمز + فیروزه‌ای برای RGB split */
    filter: drop-shadow(2px -2px 0 #ff004c) drop-shadow(-2px 2px 0 #00f6ff);
  }
  16% {
    transform: translate(-2px, 2px) rotate(-0.2deg);
    filter: drop-shadow(-2px 2px 0 #ff004c) drop-shadow(2px -2px 0 #00f6ff);
  }
  24% {
    transform: translate(3px, 0);
    filter: drop-shadow(3px 0 0 #ff004c) drop-shadow(-3px 0 0 #00f6ff);
  }
  32% {
    transform: translate(-3px, 0);
    filter: drop-shadow(-3px 0 0 #ff004c) drop-shadow(3px 0 0 #00f6ff);
  }
  40% {
    transform: translate(1px, -1px);
    filter: drop-shadow(1px -1px 0 #ff004c) drop-shadow(-1px 1px 0 #00f6ff);
  }
  48% {
    transform: translate(-1px, 1px);
    filter: drop-shadow(-1px 1px 0 #ff004c) drop-shadow(1px -1px 0 #00f6ff);
  }
  56% {
    transform: translate(0, 0);
    filter: none;
  }
  70% {
    transform: translate(0, 0) scale(1.02);
    filter: drop-shadow(2px 0 0 #ff004c) drop-shadow(-2px 0 0 #00f6ff);
  }
  84% {
    transform: translate(0, 0);
    filter: none;
  }
}


/* کاربران با reduced motion انیمیشن رو نبینن */
@media (prefers-reduced-motion: reduce) {
  img.image-title-class {
    animation: none !important;
    transform: none !important;
  }
}

.btn-register {
  display: flex;
  align-items: center;
  gap: 50px;
}

@media (max-width: 480px) {
  img.image-title-class {
    width: 45px;
    padding: 0;
  }
  p.text-white.text-xl {
    line-height: 1.2;
  }
  .mobilever.base,
  .mobilever.blue,
  .mobilever.purple,
  .mobilever.red,
  .mobilever.olympics {
    padding: 10px 0px 5px 0px !important;
    flex-direction: column !important;
  }
  a.non-olympics {
    height: 32px;
    width: max-content;
    font-size: 13px;
  }
  .timemobile {
    justify-content: space-around;
  }
  .time-btn-group.flex.flex-row.gap-10 {
    display: block;
  }
  .close-btn-banner-top {
    right: 0px !important;
    top: 0px !important;
    padding: 7px !important;
  }
  .close-btn-banner-top svg {
    width: 13px !important;
  }
}

.close-btn-banner-top {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 10px;
  cursor: pointer;
  z-index: 99;
}

.banner-full-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 9;
  background: transparent;
  cursor: pointer;
}
