/* Header carousel: حفظ ارتفاع و نمایش تصویر */
.header-desktop {
  height: 100vh;
}

.header-desktop .carousel,
.header-desktop .carousel-inner,
.header-desktop .carousel-item {
  height: 100%;
  overflow: hidden;
}

.header-desktop img {
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  will-change: transform;
}

.header-desktop .carousel-item.active img {
  animation: header-hero-zoom 8s ease-out forwards;
}

.header-desktop .carousel-item:not(.active) img {
  animation: none;
  transform: scale(1);
}

@keyframes header-hero-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-desktop .carousel-item.active img {
    animation: none;
  }
}

.header-desktop .title-header h1 {
  text-shadow: -4px 4px 0px #8d0f27;
}

.header-mobile .title-header h1 {
  text-shadow: -2px 2px 0px #8d0f27;
}

.header-mobile {
  height: 95vh;
  overflow: hidden;
  max-width: 100%;
}

.header-mobile .carousel {
  max-width: 100%;
}

.header-mobile .carousel,
.header-mobile .carousel-inner,
.header-mobile .carousel-item {
  height: 100%;
  overflow: hidden;
}

.header-mobile img {
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  will-change: transform;
}

.header-mobile .carousel-item.active img {
  animation: header-hero-zoom 8s ease-out forwards;
}

.header-mobile .carousel-item:not(.active) img {
  animation: none;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .header-mobile .carousel-item.active img {
    animation: none;
  }
}

/* کاروسل هدر: دکمه‌ها و اندیکاتورها بالای overlay */
.header-desktop .carousel-control-prev,
.header-desktop .carousel-control-next,
.header-mobile .carousel-control-prev,
.header-mobile .carousel-control-next {
  z-index: 5;
}

/* دسکتاپ: دو فلش کنار هم سمت چپ پایین، بالاتر و توتر */
.header-desktop .header-carousel-controls {
  z-index: 5;
  left: 2.5rem;
  bottom: 2.5rem;
}

.header-desktop .header-carousel-controls .carousel-control-prev,
.header-desktop .header-carousel-controls .carousel-control-next {
  position: static;
  width: 40px;
  height: 40px;
  opacity: 0.9;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  color: rgb(255, 255, 255);
  /* box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.5); */
  background: linear-gradient(180deg, rgba(141, 15, 38, 0) 0%, rgba(96, 14, 29, 0) 100%);
  padding: 5px;
  border-radius: 30px;
  border: 1px solid rgba(250, 250, 250, 0.24);
  font-size: 14px;
  backdrop-filter: blur(6px) !important;
}

.header-desktop .header-carousel-controls .carousel-control-prev:hover::before,
.header-desktop .header-carousel-controls .carousel-control-next:hover::before {
    transform: scaleY(1);
}
.header-desktop .header-carousel-controls .carousel-control-prev::before,
.header-desktop .header-carousel-controls .carousel-control-next::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(180deg, rgba(141, 15, 39, 1) 0%, rgba(96, 14, 29, 1) 100%);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s ease;
  z-index: -1;
}

/* دسکتاپ: اندیکاتورها سمت راست پایین، بالاتر و توتر */
.header-desktop .carousel-indicators {
  left: auto;
  right: 2.5rem;
  bottom: 2.5rem;
  margin: 0;
  justify-content: flex-end;
}

.header-desktop .carousel-indicators button {
  text-indent: inherit;
  height: 15px;
  border-radius: 15px;
  border: none;
  width: 15px;
  transition: 0.3s;
}

.header-desktop .carousel-indicators button.active {
  width: 30px
}

.header-desktop .carousel-indicators [data-bs-target],
.header-mobile .carousel-indicators [data-bs-target] {
  background-color: rgba(255, 255, 255, 0.6);
}

.header-desktop .carousel-indicators .active,
.header-mobile .carousel-indicators .active {
  background-color: #fff;
}

.products-grid {
  --circle-size: 140px;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding-top: 40px;
}

.circle-bg {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle-bg::before {
  content: "";
  width: var(--circle-size);
  height: var(--circle-size);
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.circle-bg img {
  width: 50%;
  max-height: 220px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 25px 20px rgba(0, 0, 0, 0.15));
  transition: 0.35s;
}

.product-card:hover img {
  transform: rotate(-10deg);
}

.products-grid .title {
  margin: 0 !important;
  font-size: clamp(14px, 1.1vw, 20px);
  color: #111;
  font-weight: 800;
  text-align: center;
}

.text-about-us {
  color: #555;
}

.mySwiper-product .swiper-slide .link-product img {
  border-radius: 25px;
}

.mySwiper-product .swiper-slide .link-product:hover h3 {
  background: linear-gradient(180deg,
      rgba(141, 15, 39, 1) 0%,
      rgba(96, 14, 29, 1) 50%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: 0.5;
}

.mySwiper-product .swiper-slide .link-product .title span {
  color: #555;
}

.mySwiper-product .swiper-button-next,
.mySwiper-product .swiper-button-prev {
  color: #8d0f27 !important;
  z-index: 12;
  font-size: 16px !important;
}

.mySwiper-product::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  background-color: #ffffff;
  width: 200px;
  z-index: 10;
  filter: blur(50px);
  border-radius: 50%;
}

.mySwiper-product::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  top: 0;
  background-color: #ffffff;
  width: 200px;
  z-index: 10;
  filter: blur(50px);
  border-radius: 50%;
}

.mySwiper-recipe .swiper-button-next,
.mySwiper-recipe .swiper-button-prev {
  color: #8d0f27 !important;
  z-index: 12;
  font-size: 16px !important;
}

.mySwiper-recipe::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  background: #FFF;
  background: linear-gradient(-90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  width: 150px;
  z-index: 10;
  /* filter: blur(50px);
  border-radius: 50%; */
}

.mySwiper-recipe::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  top: 0;
  background: #FFF;
  background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  width: 150px;
  z-index: 10;
  /* filter: blur(50px);
  border-radius: 50%; */
}

.banner .link-banner img {
  border-radius: 25px;
}

.link-recipe {
  border-radius: 25px;
  overflow: hidden;
}

.link-recipe .item {
  width: 70px !important;
  text-indent: unset !important;
  opacity: 1 !important;
  background-color: unset !important;
}

.link-recipe .carousel-indicators img {
  border-radius: 10px !important;
}

.link-recipe .bg .carousel-caption {
  position: unset !important;
}

.link-recipe .bg .carousel-indicators {
  position: unset !important;
}

.link-recipe .bg {
  background-color: rgb(255 255 255 / 12%) !important;
  backdrop-filter: blur(15px) !important;
  border-radius: 25px;
  overflow: hidden;
}

.link-recipe .bg h5 {
  text-shadow: -1px 1px 0px #8d0f27;
  font-size: 18px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.offcanvas-header-menu-mobile img {
  filter: brightness(0) saturate(100%) invert(0%) sepia(90%) saturate(7460%) hue-rotate(346deg) brightness(104%) contrast(108%);
}

/* Research & development (home) */
.research-section {
  background-color: #f9f6f0;
  padding: 4rem 0;
}

.research-section__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  gap: 32px;
}

.research-section__badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(140, 15, 39, 0.1);
  color: #8c0f27;
  font-size: 14px;
  line-height: 20px;
  /* margin-bottom: 1rem; */
}

.research-section__title {
  font-size: clamp(2rem, 4.5vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 1.25rem !important;
}

.research-section__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 38.5rem;
  /* margin-bottom: 1.75rem; */
}

.research-section__text p {
  color: #364153;
  font-size: 18px;
  line-height: 1.625;
}

.research-section__btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 16px 32px !important;
}

.research-section__btn img {
  flex-shrink: 0;
  transition: filter 0.4s ease;
  transform: scaleX(-1) !important;
}

.research-section__btn:hover img {
  filter: brightness(0) saturate(100%) invert(14%) sepia(47%) saturate(4065%)
    hue-rotate(331deg) brightness(93%) contrast(106%);
}

.research-section__visual {
  position: relative;
}

.research-section__cards-wrap {
  position: relative;
  max-width: 28rem;
  margin-inline-end: auto;
  margin-inline-start: 0;
}

.research-section__cards-glow {
  position: absolute;
  inset: -5% -8%;
  border-radius: 50%;
  background: linear-gradient(143deg, rgba(140, 15, 39, 0.05) 0%, rgba(140, 15, 39, 0.2) 100%);
  filter: blur(64px);
  pointer-events: none;
  z-index: 0;
}

.research-section__cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.research-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  box-shadow:
    0 4px 3px rgba(0, 0, 0, 0.1),
    0 10px 7.5px rgba(0, 0, 0, 0.1);
}

.research-card__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.research-card__background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.research-card__body {
  position: relative;
  z-index: 1;
}

.research-card--highlight.research-card--has-bg {
  background: transparent;
}

.research-card--highlight.research-card--has-bg .research-card__background::after {
  background: linear-gradient(
    141deg,
    rgba(140, 15, 39, 0.92) 0%,
    rgba(136, 15, 38, 0.92) 12.5%,
    rgba(132, 14, 37, 0.92) 25%,
    rgba(128, 14, 36, 0.92) 37.5%,
    rgba(124, 13, 35, 0.92) 50%,
    rgba(120, 13, 34, 0.92) 62.5%,
    rgba(117, 12, 33, 0.92) 75%,
    rgba(113, 12, 32, 0.92) 87.5%,
    rgba(109, 11, 31, 0.92) 100%
  );
}

.research-card--tall {
  min-height: 13.75rem;
}

.research-card--short {
  min-height: 10.75rem;
}

.research-card--offset-top {
  margin-top: 3rem;
}

.research-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  margin-bottom: 1rem;
}

.research-card__icon img {
  filter: brightness(0) invert(1);
}

.research-card__icon--light {
  background: rgba(255, 255, 255, 0.2);
}

.research-card__plus {
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
}

.research-card__title {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  color: #fff;
}

.research-card--highlight {
  background: linear-gradient(
    141deg,
    #8c0f27 0%,
    #880f26 12.5%,
    #840e25 25%,
    #800e24 37.5%,
    #7c0d23 50%,
    #780d22 62.5%,
    #750c21 75%,
    #710c20 87.5%,
    #6d0b1f 100%
  );
}

.research-card--highlight .research-card__title {
  color: #fff;
}

@media (max-width: 991.98px) {
  .research-section {
    padding: 3rem 0;
  }

  .research-section__content {
    align-items: flex-start;
    text-align: start;
  }

  .research-section__cards-wrap {
    max-width: 100%;
    margin-inline: auto;
  }

  .research-card--offset-top {
    margin-top: 0;
  }
}

@media (max-width: 575.98px) {
  .research-section__text p {
    font-size: 16px;
  }

  .research-section__cards {
    gap: 1rem;
  }

  .research-card {
    padding: 1.25rem;
    border-radius: 18px;
  }

  .research-card--tall {
    min-height: 10rem;
  }

  .research-card--short {
    min-height: 8.5rem;
  }

  .research-card__icon {
    width: 52px;
    height: 52px;
    margin-bottom: 0.75rem;
  }

  .research-card__title {
    font-size: 16px;
  }
}

.about-us .icon-title {
  z-index: -1;
}

.about-us h2 {
  line-height: 1.4;
}

.box-banner .banner {
  border-radius: 25px;
}

.banner .box-btns {
  padding-bottom: 7rem;
}

.banner .box-btn-mobile {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  display: flex;
  margin: auto;
  justify-content: center;
}

.banner .box-text-mobile p {
  color: #666;
}

.banner .box-text-mobile {
  padding-top: 2rem;
}

.box-banner .box-text::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border: 1px solid #fff;
  margin: 10px;
  border-radius: 15px;
}

@media (max-width: 991.98px) {
  .mySwiper-product::before,
  .mySwiper-recipe::before,
  .mySwiper-product::after,
  .mySwiper-recipe::after {
    display: none;
  }

  .recipe,
  .mySwiper-recipe,
  .mySwiper-product {
    max-width: 100%;
    overflow-x: clip;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  .mySwiper-product::before,
  .mySwiper-recipe::before {
    display: none;
  }

  .mySwiper-product::after,
  .mySwiper-recipe::after {
    display: none;
  }

  .banner .link-banner img {
    border-radius: 16px;
  }

  .box-banner .banner {
    border-radius: 0px;
  }

  .box-banner .box-text::after {
    content: "";
    display: none;
  }

  .banner .box-btns {
    padding-bottom: 5rem;
  }

  .mySwiper-product .swiper-button-next,
  .mySwiper-product .swiper-button-prev svg,
  .mySwiper-recipe .swiper-button-next,
  .mySwiper-recipe .swiper-button-prev svg {
    height: 25px !important;
    width: 25px !important;
  }

  .products-grid {
    --circle-size: 110px;
  }
}

@media (min-width: 576px) and (max-width: 768px) {
  .mySwiper-product::before,
  .mySwiper-recipe::before {
    display: none;
  }

  .mySwiper-product::after,
  .mySwiper-recipe::after {
    display: none;
  }

  .banner .link-banner img {
    border-radius: 16px;
  }

  .box-banner .banner {
    border-radius: 0px;
  }

  .box-banner .box-text::after {
    content: "";
    display: none;
  }

  .mySwiper-product .swiper-button-next,
  .mySwiper-product .swiper-button-prev svg,
  .mySwiper-recipe .swiper-button-next,
  .mySwiper-recipe .swiper-button-prev svg {
    height: 25px !important;
    width: 25px !important;
  }
}

@media (max-width: 576px) {
  .mySwiper-product::before,
  .mySwiper-recipe::before {
    display: none;
  }

  .mySwiper-product::after,
  .mySwiper-recipe::after {
    display: none;
  }

  .product-card {
    padding-top: 15px;
  }

  .products-grid {
    --circle-size: 100px;
  }

  .btn-2 {
    padding: 12px 24px 10px 24px !important;
    font-size: 12px !important;
  }

  .banner .link-banner img {
    border-radius: 16px;
  }

  .box-banner .banner {
    border-radius: 0px;
  }

  .box-banner .box-text::after {
    content: "";
    display: none;
  }

  .mySwiper-product .swiper-button-next,
  .mySwiper-product .swiper-button-prev svg,
  .mySwiper-recipe .swiper-button-next,
  .mySwiper-recipe .swiper-button-prev svg {
    height: 25px !important;
    width: 25px !important;
  }

  .header-mobile .box-btns {
    flex-direction: column;
    align-items: start !important;
  }

}