* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #ece9f3;
  min-height: 100svh;
  background-size: 170% 130%;
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

header {
  display: flex;
  justify-content: space-between !important;
  align-items: center;
  flex-direction: row !important;
  min-height: 70px;
  border-bottom: solid red 2px;
}

header .header-right,
header .header-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.square {
  aspect-ratio: 1/1 !important;
  border-radius: 100%;
  width: 50px;
  object-fit: cover;
}

.sidebarBtn {
  border: 0px;
  background-color: transparent;
  width: max-content;
  margin-right: 16px;
  cursor: pointer;
}

.header-right .sidebarBtn,
.header-right a {
  display: flex;
  align-items: center;
}

.user-img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .user-img {
    width: 25px;
    height: 25px;
  }

  .user-text {
    font-size: 16px;
  }

  .f-md-16 {
    font-size: 16px;
  }

  .user-link,
  .loginBtn {
    padding: 8px 15px;
    font-size: 14px;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.5;
    white-space: nowrap;
  }

  .user-link {
    color: #333;
    background-color: #ccc;
    border: 1px solid #ddd;
  }

  .user-link:hover {
    border-color: #dd2a1b;
    transform: translateY(-1px);
  }

  .loginBtn {
    color: white;
    background-color: #dd2a1b;
    border: 1px solid #dd2a1b;
    flex-direction: row-reverse;
  }

  .loginBtn:hover {
    border-color: #e5ab1f;
    transform: translateY(-1px);
  }
}

@media (max-width: 767.98px) {
  .user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
  }

  .loginBtn {
    text-decoration: none;
    padding: 4px 15px;
    border-radius: 12px;
    color: white;
    background-color: #dd2a1b;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    flex-direction: row-reverse;
  }

  .header-right .d-none.d-md-flex {
    display: none !important;
  }
}

aside {
  height: 100svh;
  position: fixed;
  right: -100%;
  background-color: white;
  color: black;
  width: 70svw;
  top: 0px;
  transition: right 0.3s ease-in-out;
  z-index: 10000000000;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

body.dark aside {
  background-color: rgb(37, 37, 37);
}

aside.active {
  right: 0px;
}

aside a {
  max-width: fit-content;
  text-decoration: none;
  color: black;
  transition: color 0.2s ease;
}

aside a:hover {
  color: #dd2a1b;
}

aside .active {
  color: #dd2a1b;
}

aside nav ul li {
  transition: all 0.2s ease;
}

aside nav ul li:hover {
  background-color: rgba(253, 193, 60, 0.1);
  border-radius: 8px;
}

div.antiAside {
  position: fixed;
  height: 100svh;
  width: 100svw;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000000000;
  display: none;
  top: 0px;
}

div.antiAside.active {
  display: block;
}

.header-right .d-flex.align-items-center.ms-md-3 {
  display: flex;
  align-items: center !important;
  height: 100%;
}

.header-right ul {
  display: flex;
  align-items: center !important;
  margin-bottom: 0 !important;
  padding-right: 0 !important;
  height: 100%;
}

.header-right ul li {
  display: flex;
  align-items: center;
  list-style: none;
  position: relative;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.header-right ul li:not(:last-child)::after {
  content: "|";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  color: #5d5d5d;
  font-size: 14px;
  font-weight: 300;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .header-right ul li {
    padding: 0 8px;
    font-size: 12px;
  }

  .header-right ul li:not(:last-child)::after {
    left: -1px;
  }
}

@media (min-width: 992px) {
  .header-right ul li {
    padding: 0 15px;
    font-size: 15px;
  }
}

.user-box {
  display: flex;
  align-items: center;
}

.user-text {
  font-size: 14px;
  font-weight: 500;
}

.f-13 {
  font-size: 13px;
}

.f-md-16 {
  font-size: 13px;
}

.aspect1 {
  aspect-ratio: 1/1;
}

@media only screen and (max-width: 768px) {
  header.d-grid {
    display: flex !important;
    justify-content: space-between;
  }

  .logoName {
    display: flex;
  }
}

/*  */

.imgSection {
  background-image: url(../images/JutZ88JCIEVJiteWyV2ng29BAFhf9KymlMyn7BMG.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 300px;
  border-radius: 0;
}

@media (min-width: 768px) {
  .imgSection {
    height: 400px;
  }
}

.title {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50px;
  padding: 10px 10px;
}

.imgSearch {
  width: 25px;
  height: 25px;
}

.d-flex.justify-content-center.align-items-center > div {
  display: flex;
  align-items: center;
}

.outline {
  outline: 0px;
}

.d-flex.justify-content-center.align-items-center select,
.d-flex.justify-content-center.align-items-center input,
.d-flex.justify-content-center.align-items-center button {
  height: 50px;
  font-size: 12px;
  padding: 0 12px;
  transition: all 0.3s ease;
}

.d-flex.justify-content-center.align-items-center select {
  cursor: pointer;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  width: 100px;
}

.d-flex.justify-content-center.align-items-center input {
  width: 200px;
}

.d-flex.justify-content-center.align-items-center button {
  background-color: #dd2a1b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.d-flex.justify-content-center.align-items-center button img {
  width: 25px;
  height: 25px;
}

@media (min-width: 768px) {
  .d-flex.justify-content-center.align-items-center select,
  .d-flex.justify-content-center.align-items-center input,
  .d-flex.justify-content-center.align-items-center button {
    height: 48px;
    font-size: 14px;
    padding: 0 16px;
  }

  .d-flex.justify-content-center.align-items-center input {
    width: 250px;
  }

  .d-flex.justify-content-center.align-items-center select {
    width: 150px;
  }

  .d-flex.justify-content-center.align-items-center button img {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 992px) {
  .d-flex.justify-content-center.align-items-center select,
  .d-flex.justify-content-center.align-items-center input,
  .d-flex.justify-content-center.align-items-center button {
    height: 54px;
    font-size: 15px;
    padding: 0 20px;
  }

  .d-flex.justify-content-center.align-items-center input {
    width: 420px;
  }

  .d-flex.justify-content-center.align-items-center select {
    width: 150px;
  }

  .d-flex.justify-content-center.align-items-center button img {
    width: 30px;
    height: 30px;
  }
}

/* Nima Code */
.statImg img {
  width: 50px;
}

.stats {
  background-color: #ececec;
  margin-top: 70px;
}

/* slider */
.carouselImg {
  width: 100px;
  height: 100px;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: #ececec;
  border-radius: 999px;
  padding: 10px;

  overflow: hidden;
}

.carouselImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customCard {
  max-width: 33%;
}

.carouselTop {
  position: relative;
  top: 30px;
  left: 30px;
  display: flex;
  justify-content: end;
  align-items: center;
  flex-direction: row-reverse;
}

.carouselText {
  text-align: justify;
}

.carouselBottom {
  background-color: #ececec;
  padding: 40px 30px;
  border-radius: 24px;
}

.swiperTop {
  position: relative;
  top: 30px;
  left: 20px;

  display: flex;
  justify-content: end;
  align-items: center;
  flex-direction: row-reverse;
  column-gap: 12px;

  z-index: 2;
}

.text-container {
  padding: 2rem;
}

/* کلید اصلی: wrapper با انیمیشن max-height */
.text-wrapper {
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.long-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #2d3748;
  text-align: justify;
}

.button-container {
  padding: 0 2rem 2rem 2rem;
  text-align: center;
}

.toggle-btn {
  background-color: transparent;
  color: black;
  border: none;
  cursor: pointer;
}

.toggle-btn:active {
  transform: translateY(0);
}

.scroll-top-btn {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: #dd2a1b;
  /* background-image: radial-gradient(circle at 30% 20%, #2c6e9e, #0f2b3d); */
  border: none;
  cursor: pointer;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  z-index: 1000;
  opacity: 0.9;
}

/* آیکون فلش بالا (طراحی با CSS خالص + پشتیبانی از SVG fallback) */
.scroll-top-btn svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s ease;
}

.scroll-top-btn:hover {
  /* transform: scale(1.07); */
  background: #a72014;
  /* background-image: radial-gradient(circle at 30% 20%, #3782b0, #14384d); */
  /* box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); */
  opacity: 1;
}

.scroll-top-btn:active {
  transform: scale(0.96);
}

/* انیمیشن نرم هنگام اسکرول با کلاس‌های جاوااسکریپت */
html {
  scroll-behavior: smooth; /* fallback اگر اسکریپت مشکل داشته باشد */
}

@media (max-width: 600px) {
  .scroll-top-btn {
    width: 48px;
    height: 48px;
    bottom: 1.2rem;
    right: 1.2rem;
  }
  .scroll-top-btn svg {
    width: 24px;
    height: 24px;
  }
  .content {
    padding: 1rem 1rem 5rem 1rem;
  }
  .card {
    padding: 1rem 1.2rem;
  }
}

/* نمایش/مخفی شدن اختیاری برای دکمه (وقتی در بالای صفحه باشیم، شاید دکمه کم‌رنگ شود)
       اما کاربر پسند است که همیشه دکمه هست. برای تجربه بهتر دکمه همیشه دیده می‌شود. */
.scroll-top-btn {
  transition:
    opacity 0.3s ease,
    transform 0.2s ease,
    background 0.2s;
}

.goToTopNone {
  opacity: 0;
}

.goToTopBlock {
  opacity: 1;
}

.fastAccess {
  width: max-content;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  border: 1px solid #ccc;
  position: relative;
  top: -70px;
  background-color: white;

  @media (max-width: 768px) {
    top: -30px;
    padding: 8px 12px;
  }
}

.fastAccess img {
  width: 40px;
}

.accessItem {
  position: relative;
  padding: 5px 10px;
}

.accessItem a {
  row-gap: 3px;
}

.accessItem a p {
  margin-bottom: 0px;
}

.accessItem a:hover p {
  color: #f15a31;
}

.accessItem button {
  border: 0px;
  background-color: #44bc7c;
  color: white;
  padding: 8px;
  border-radius: 1000000px;
  aspect-ratio: 1/1;
}

.accessItem button p {
  margin-bottom: 0px;
}

.accessItem:not(:last-child) {
  border-left: 1px solid #e9e9e9;
}

.popover > div {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  /* padding-inline: 24px; */

  @media (max-width: 992px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media only screen and (max-width: 768px) {
  .popover {
    padding: 16px !important;
  }

  /* .item{
    max-width: 300px;
  } */
}

.fastPopItem {
  position: relative;
  padding: 5px 10px;
  background-color: #ece9f3;
  border-radius: 10px;
  margin: 12px;
  padding: 20px 4px;
}

.fastPopItem a {
  row-gap: 4px;
}

.fastPopItem a:hover p {
  color: #f15a31;
}

.fastPopItem img {
  width: 40px;
}

.fastPopItem p {
  margin: 0px;
}

.grid {
  column-width: 280px;
  column-gap: 16px;
}

.item {
  break-inside: avoid;
  margin-bottom: 16px;

  border-radius: 22px;
  overflow: hidden;

  background: #1e1e1e;
  color: white;

  transition: 0.25s transform;
  cursor: pointer;
  position: relative;
}

.item:hover {
  transform: translateY(-5px);
}

.item:hover .content {
  opacity: 1;
}

.item img {
  width: 100%;
  display: block;
}

.content {
  padding: 14px;
  position: absolute;
  bottom: 0px;
  opacity: 0;
  color: white;
  background-color: transparent !important;
  background-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.836)
  );
  width: 100%;
  transition: opacity 0.2s linear;
}

.content:hover p {
  color: #dd2a1b;
}

.content h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.content p {
  opacity: 0.7;
  line-height: 1.5;
  margin-bottom: 0px;
  font-size: 12px;
  transition: color 0.1s linear;
  text-align: center;
}

.gridSystem > div.container > div.row > a {
  background-color: #dd2a1b;
  border-radius: 100000px;
  width: max-content !important;
  transition: background-color 0.1s linear;
}

.gridSystem > div.container > div.row > a:hover {
  background-color: #a72014;
}

.carouselSection > div.container > div.row > a {
  background-color: #dd2a1b;
  border-radius: 100000px;
  width: max-content !important;
  transition: background-color 0.1s linear;
}

.carouselSection > div.container > div.row > a:hover {
  background-color: #a72014;
}

.textAfter {
  position: relative;
}

.textAfter::after {
  content: "";
  background-color: #dd2a1b;
  color: #dd2a1b;
  width: 100px;
  height: 1px;
  position: absolute;
  top: 164%;
  left: 50%;
  transform: translateX(-50%);
}

.tab {
  cursor: pointer;
  position: relative;
}

.tab.active {
  color: #dd2a1b;
}

.tab.active::after {
  content: "";
  background-color: #dd2a1b;
  color: #dd2a1b;
  width: 100px;
  height: 1px;
  position: absolute;
  top: 164%;
  left: 50%;
  transform: translateX(-50%);
}

@media only screen and (max-width: 768px) {
  div.tab.newest {
    display: none !important;
  }
  div.tab.free {
    display: none !important;
  }
}

@media only screen and (min-width: 768px) {
  div.tab.newest2 {
    display: none !important;
  }
  div.tab.free2 {
    display: none !important;
  }
}

/* 
question page
*/

.video-container {
  border: solid 1px #ccc;
  background-color: #fff;
  position: relative;
  margin-top: 30px;
}

/* .video-container2 {
  border: solid 1px #ccc;
  background-color: #fff;
  margin-top: 30px;
  cursor: pointer;
} */

/* استایل‌های اصلی تو */
.video-container2 {
  border: solid 1px #ccc;
  background-color: #fff;
  margin-top: 30px;
  cursor: pointer;
  width: 500px;
  flex-direction: column !important;
  align-items: stretch !important;
  padding-bottom: 0 !important;
  position: relative;
}

.header-part {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 1;
}

.extra-content {
  width: 100%;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
  margin-top: 0;
}

.video-container2.open .extra-content {
  grid-template-rows: 1fr;
  margin-top: 15px;
}

.extra-content-inner {
  overflow: hidden;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition: padding-top 0.3s ease-out;
}

.video-container2.open .extra-content-inner {
  padding-top: 12px;
  border-top-color: #ddd;
}

.toggle-icon {
  transition: transform 0.3s ease;
  display: inline-block;
  font-size: 24px;
  font-weight: bold;
}

.video-container2.open .toggle-icon {
  transform: rotate(45deg);
}

.title-wrapper {
  position: absolute;
  top: -18px;
  right: 0;
  left: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.titleLearn {
  background-color: #dd2a1b;
  border-radius: 100000px;
  width: max-content;
  transition: background-color 0.1s linear;
  white-space: nowrap;
  font-size: 14px;
  padding: 6px 20px !important;
}

.video-list {
  list-style: none;
  padding: 30px 20px 20px 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 480px) {
  .title-wrapper {
    top: -14px;
  }

  .titleLearn {
    font-size: 12px;
    padding: 4px 16px !important;
  }

  .video-list {
    padding: 25px 12px 15px 12px;
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .title-wrapper {
    top: -12px;
  }

  .titleLearn {
    font-size: 11px;
    padding: 4px 12px !important;
  }

  .video-list {
    padding: 22px 10px 12px 10px;
  }
}

@media (min-width: 768px) {
  .video-list {
    padding: 35px 20px 20px 20px;
  }
}

.video-item {
  display: flex;
  justify-content: center;
  column-gap: 5px;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  width: 100%;
}

.video-item span:first-child {
  flex: 1;
  margin-right: 0;
}

.play-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: 0;
}

.play-icon::before {
  content: "▶";
  position: absolute;
  color: #000000;
  font-size: 8px;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
}

.video-item:hover {
  color: #dd2a1b;
  transition: all 0.3s ease;
}

.video-item:hover .play-icon {
  border-color: #dd2a1b;
}

.video-item:hover .play-icon::before {
  color: #dd2a1b;
}

.video-item .play-icon {
  margin-right: 0;
}

@media (min-width: 768px) {
  .video-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    flex-direction: unset;
    gap: 15px;
  }

  .video-item {
    margin-bottom: 0;
    width: auto;
  }

  .video-item {
    height: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .video-list {
    gap: 12px;
    padding: 20px 15px;
  }

  .video-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .play-icon {
    width: 22px;
    height: 22px;
    border-width: 1.5px;
  }

  .play-icon::before {
    font-size: 7px;
  }

  .titleLearn {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .video-list {
    gap: 18px;
  }

  .video-item {
    padding: 14px 18px;
    font-size: 15px;
  }

  .play-icon {
    width: 26px;
    height: 26px;
    border-width: 1.5px;
  }

  .play-icon::before {
    font-size: 9px;
  }

  .titleLearn {
    font-size: 18px;
    padding: 10px 24px !important;
  }
}

@media (min-width: 1400px) {
  .video-list {
    gap: 22px;
    padding: 25px 25px;
  }

  .video-item {
    padding: 16px 20px;
    font-size: 16px;
  }

  .play-icon {
    width: 28px;
    height: 28px;
    border-width: 2px;
  }

  .play-icon::before {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .video-list {
    padding: 15px 12px;
    gap: 10px;
  }

  .video-item {
    padding: 10px 12px;
    /* font-size: 12px; */
  }

  .play-icon {
    width: 20px;
    height: 20px;
    border-width: 1.5px;
  }

  .play-icon::before {
    font-size: 7px;
  }

  .titleLearn {
    font-size: 13px;
    padding: 6px 16px !important;
  }
}

[dir="rtl"] .video-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .video-item .play-icon {
  margin-right: 0;
  margin-left: 0;
}

.video-item a {
  /* flex: 1; */
  margin-right: 0;
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.video-item a:hover {
  color: #dd2a1b;
}

[dir="rtl"] .video-item a {
  margin-right: 0;
  margin-left: 0;
}
