/* Google Fonts removed - using Vazirmatn from main.css instead */

.carousel-section {
  position: relative;
  background-color: transparent;
  color: beige;
  min-height: auto;
  font-family: "Poppins", sans-serif;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .hero-video-wrapper {
    width: 100%;
    border-radius: 0;
    padding: 4px 0;
    height: auto;
  }
  
  .hero-background-video {
    min-height: 320px; /* کاهش 20 درصد از 400px */
    height: 320px; /* کاهش 20 درصد */
    border-radius: 0;
  }
  
  .hero-overlay {
    border-radius: 0;
  }
  
  .carousel {
    top: 22%;
    padding: 0 16px;
    margin-top: 0;
    z-index: 15;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
  }
  
  .carousel-track {
    gap: 16px;
    width: fit-content;
    margin: 0 auto;
    justify-content: center;
  }
  
  .glass-intro-container {
    position: absolute !important;
    top: 8px !important; /* انتقال به بالای ویدئو، بالاتر از کارت‌های دسته‌بندی */
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 80%;
    padding: 20px 28px;
    width: calc(100% - 32px);
    margin-top: 0;
    margin-bottom: 0;
    z-index: 20 !important; /* بالاتر از کارت‌های دسته‌بندی */
  }
}

@media (max-width: 768px) {
  .carousel-section {
    padding: 0 12px 16px;
    margin-bottom: 32px;
  }
  
  .hero-video-wrapper {
    width: 100%;
    border-radius: 16px;
    padding: 2px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    height: auto;
  }
  
  .hero-background-video {
    min-height: 224px; /* کاهش 20 درصد از 280px */
    height: 224px; /* کاهش 20 درصد */
    border-radius: 14px;
  }
  
  .hero-overlay {
    border-radius: 14px;
  }
  
  .carousel {
    position: absolute;
    top: calc(8px + 255px + 8px); /* 8px top متن + ارتفاع واقعی متن (255px) + 8px فاصله = 271px */
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 8px;
    margin-top: 0;
    margin-bottom: 0;
    z-index: 10; /* کمتر از glass-intro-container که z-index: 20 دارد */
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
  }
  
  /* تنظیم دقیق‌تر بر اساس ارتفاع واقعی متن */
  .hero-video-wrapper .glass-intro-container ~ .carousel {
    top: calc(8px + var(--intro-height, 255px) + 8px);
  }
  
  .carousel-track {
    gap: 10px;
    width: fit-content;
    margin: 0 auto;
    justify-content: center;
  }
  
  .carousel .card {
    width: 90px;
    height: 120px;
    border-radius: 45px;
    box-shadow: 0 2px 6px rgba(184, 167, 136, 0.15),
                0 0.6px 4px rgba(184, 167, 136, 0.1);
  }
  
  .glass-intro-container {
    position: absolute !important;
    top: 8px !important; /* انتقال به بالای ویدئو، بالاتر از کارت‌های دسته‌بندی */
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 90%;
    padding: 12px 14px;
    width: calc(100% - 20px);
    margin-top: 0;
    margin-bottom: 0;
    z-index: 20 !important; /* بالاتر از کارت‌های دسته‌بندی */
  }
  
  /* تنظیم ارتفاع متن برای استفاده در calc */
  .hero-video-wrapper {
    --intro-height: 255px;
  }
  
  /* ایجاد فاصله 8 پیکسل با استفاده از margin-bottom */
  .glass-intro-container::after {
    content: '';
    display: block;
    height: 8px;
    width: 100%;
  }
  
  .glass-intro-title {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .glass-intro-text {
    font-size: 12px;
    line-height: 1.6;
    text-align: justify;
  }
}

@media (max-width: 480px) {
  .carousel-section {
    padding: 0 10px 12px;
    margin-bottom: 24px;
  }
  
  .hero-video-wrapper {
    width: 100%;
    border-radius: 12px;
    padding: 2px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    height: auto;
  }
  
  .hero-background-video {
    min-height: 192px; /* کاهش 20 درصد از 240px */
    height: 192px; /* کاهش 20 درصد */
    border-radius: 10px;
  }
  
  .hero-overlay {
    border-radius: 10px;
  }
  
  .carousel {
    position: absolute;
    top: calc(8px + 255px + 8px); /* 8px top متن + ارتفاع واقعی متن (255px) + 8px فاصله = 271px */
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 6px;
    margin-top: 0;
    margin-bottom: 0;
    z-index: 10; /* کمتر از glass-intro-container که z-index: 20 دارد */
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
  }
  
  .carousel-track {
    gap: 8px;
    width: fit-content;
    margin: 0 auto;
    justify-content: center;
  }
  
  .carousel .card {
    width: 75px;
    height: 100px;
    border-radius: 37px;
    box-shadow: 0 2px 6px rgba(184, 167, 136, 0.15),
                0 0.6px 4px rgba(184, 167, 136, 0.1);
  }
  
  .carousel .card-label {
    padding: 5px 4px;
  }
  
  .carousel .card-label h3 {
    font-size: 9px;
  }
  
  .glass-intro-container {
    position: absolute !important;
    top: 8px !important; /* انتقال به بالای ویدئو */
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 92%;
    padding: 10px 12px;
    width: calc(100% - 16px);
    margin-top: 0;
    margin-bottom: 0;
    z-index: 20 !important; /* بالاتر از کارت‌های دسته‌بندی */
  }
  
  .glass-intro-title {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .glass-intro-text {
    font-size: 10px;
    line-height: 1.5;
    text-align: justify;
  }
}

/* Wrapper برای ویدیو با قاب مینیمال */
.hero-video-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto 60px;
  border-radius: 0;
  overflow: visible;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.18);
  border-top: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(184, 167, 136, 0.1), 
              inset 0 0.6px 0.6px rgba(255, 255, 255, 0.1);
  padding: 4px 0;
}

/* استایل‌های دسکتاپ برای wrapper ویدیو */
@media (min-width: 1025px) {
  .hero-video-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 60px;
  }
}

.hero-background-video {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 600px;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  border-radius: 20px;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1;
  pointer-events: none;
  border-radius: 20px;
}

.carousel-section h1,
.carousel-section h3,
.carousel-section h2,
.carousel-section p {
  margin: 0;
  padding: 0;
}

.carousel-section nav {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: none; /* مخفی شده چون هدر جدید ثابت است */
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 40px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  flex-wrap: wrap;
}

.carousel-section ul {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 24px;
  padding: 0;
  margin: 0;
}

.carousel-section li {
  list-style: none;
}

.carousel-section li img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: invert() hue-rotate();
}

.carousel {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  width: 100%;
  padding: 0 20px;
  pointer-events: auto;
  margin-top: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
}

.carousel-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: fit-content;
  min-width: max-content;
  margin: 0 auto;
  animation: none !important;
  transform: none !important;
}

.carousel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.carousel {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.carousel::-webkit-scrollbar-track {
  display: none;
}

.carousel::-webkit-scrollbar-thumb {
  display: none;
}

.carousel::-webkit-scrollbar-thumb:hover {
  display: none;
}

.carousel .card-wrapper {
  pointer-events: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 15;
}

.carousel .card-link {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
}


.carousel .card {
  padding: 0;
  width: 120px;
  height: 160px;
  border-radius: 60px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.5s ease-in-out, opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  position: relative;
  overflow: hidden;
  z-index: 15;
  box-shadow: 0 2px 6px rgba(184, 167, 136, 0.15),
              0 0.6px 4px rgba(184, 167, 136, 0.1) !important;
}

/* استایل خاص برای کارت‌های سلفون و حباب دار - استفاده از contain برای جلوگیری از بیرون زدن از کادر */
.carousel .card#c3,
.carousel .card#c4 {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: rgba(0, 0, 0, 0.5);
}

.carousel .card:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(184, 167, 136, 0.2),
              0 0.6px 4px rgba(184, 167, 136, 0.15);
}

.carousel .card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.3s ease;
  padding: 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), transparent);
  text-align: center;
}

.carousel .card-label h3 {
  color: white;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 2px 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 1);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel .card-label p {
  display: none;
}

.carousel .card-indicator {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 8px;
  text-decoration: none;
}

.carousel .card-indicator svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.carousel .card-indicator:hover {
  transform: scale(1.2);
  color: rgba(255, 255, 255, 1);
}

.carousel .card-indicator.active {
  color: rgba(255, 255, 255, 1);
}

.carousel .card-indicator.active svg circle {
  fill: rgba(255, 255, 255, 0.6);
  stroke-width: 3;
}

.carousel .card .txt {
  display: none;
}

.carousel .card h1 {
  font-size: 24px;
}

.carousel .card p {
  font-size: 12px;
}

/* تصاویر کارت‌ها از طریق inline style در HTML تنظیم می‌شوند */

.carousel-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.carousel-content .right p {
  font-size: 12px;
}

.carousel-content .left h1 {
  font-size: 28px;
}

.carousel-content .left h3 {
  font-size: 16px;
}

.carousel-content .right {
  width: 50%;
}

.carousel-content .left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

/* قاب شیشه‌ای معرفی */
.glass-intro-container {
  position: absolute;
  top: auto;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: 900px;
  padding: 40px 50px;
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
  width: calc(100% - 80px);
  margin-top: 0;
  margin-bottom: 0;
  box-sizing: border-box;
}

/* استایل‌های دسکتاپ برای قاب معرفی */
@media (min-width: 1025px) {
  .glass-intro-container {
    top: 60px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    max-width: 900px;
    width: 85%;
    padding: 40px 50px;
    margin-bottom: 80px;
  }
  
  .carousel {
    top: calc(55% + 15px);
  }
}

.glass-intro-container:hover {
  /* Removed translateY to prevent movement */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass-intro-title {
  font-size: 42px;
  font-weight: 900;
  color: #B8A788;
  margin-bottom: 24px;
  text-shadow: 0 4px 20px rgba(184, 167, 136, 0.4);
  letter-spacing: -0.3px;
  animation: titleGlow 3s ease-in-out infinite;
}

.glass-intro-text {
  font-size: 18px;
  line-height: 1.8;
  color: #E6E7E8;
  text-shadow: 0 0.6px 4px rgba(0, 0, 0, 0.5);
  text-align: justify;
  direction: rtl;
}

/* استایل‌های دسکتاپ برای عنوان و متن معرفی */
@media (min-width: 1025px) {
  .glass-intro-title {
    font-size: 42px;
    margin-bottom: 24px;
  }
  
  .glass-intro-text {
    font-size: 18px;
    line-height: 1.8;
  }
}

/* ریسپانسیو برای تبلت */
@media (max-width: 1024px) {
  .carousel-section nav {
    padding: 14px 30px;
    gap: 14px;
    max-width: 100%;
  }
  
  .search-wrapper {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: 10px 0 0 0;
  }
  
  .carousel-section nav ul.links {
    gap: 16px;
    font-size: 12px;
  }
  
  .carousel-content {
    padding: 14px 30px;
    max-width: 100%;
  }
  
  .carousel-content .left h1 {
    font-size: 24px;
  }
  
  .carousel-content .left h3 {
    font-size: 14px;
  }
  
  .carousel-content .right p {
    font-size: 10px;
  }
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
  
  .carousel-section nav {
    flex-direction: column;
    gap: 14px;
    padding: 14px 20px;
    max-width: 100%;
  }
  
  .search-wrapper {
    order: 2;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  
  .carousel-section nav ul.links {
    order: 1;
  }
  
  .carousel-section nav ul.icons {
    order: 3;
  }
  
  .carousel-section nav ul.links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
  }
  
  .carousel-section nav ul.icons {
    justify-content: center;
    gap: 20px;
  }
  
  .carousel-section nav ul.icons li img {
    width: 24px;
    height: 24px;
  }
  
  .carousel {
    position: absolute;
    top: calc(8px + 255px + 8px); /* 8px top متن + ارتفاع واقعی متن (255px) + 8px فاصله = 271px */
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    margin-bottom: 0;
    z-index: 10; /* کمتر از glass-intro-container که z-index: 20 دارد */
    width: 100%;
    padding: 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
  }
  
  .carousel-track {
    gap: 12px;
    width: fit-content;
    margin: 0 auto;
    justify-content: center;
  }
  
  .carousel .card {
    width: 100px;
    height: 135px;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(184, 167, 136, 0.15),
                0 0.6px 4px rgba(184, 167, 136, 0.1);
  }
  
  .carousel .card-label {
    padding: 8px 6px;
  }
  
  .carousel .card-label h3 {
    font-size: 11px;
  }
  
  .carousel .card-indicator {
    width: 24px;
    height: 24px;
    margin-top: 6px;
  }
  
  .carousel-content {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    max-width: 100%;
  }
  
  .carousel-content .left {
    width: 100%;
    align-items: center;
    text-align: center;
  }
  
  .carousel-content .right {
    width: 100%;
  }
  
  .carousel-content .left h1 {
    font-size: 22px;
  }
  
  .carousel-content .left h3 {
    font-size: 12px;
  }
  
  .carousel-content .right p {
    font-size: 10px;
    text-align: center;
  }
  
  .glass-intro-container {
    position: absolute !important;
    top: 8px !important; /* انتقال به بالای ویدئو، بالاتر از کارت‌های دسته‌بندی */
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 92%;
    padding: 16px 14px;
    width: calc(100% - 20px);
    margin-top: 0;
    margin-bottom: 0;
    z-index: 20 !important; /* بالاتر از کارت‌های دسته‌بندی */
  }
  
  .glass-intro-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .glass-intro-text {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* ریسپانسیو برای موبایل کوچک */
@media (max-width: 480px) {
  
  .carousel-section nav {
    padding: 12px 14px;
    max-width: 100%;
  }
  
  .carousel-section nav ul.links {
    font-size: 10px;
    gap: 8px;
  }
  
  .carousel-section nav ul.icons li img {
    width: 20px;
    height: 20px;
  }
  
  .carousel {
    position: absolute;
    top: calc(8px + 255px + 8px); /* 8px top متن + ارتفاع واقعی متن (255px) + 8px فاصله = 271px */
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
    margin-top: 0;
    margin-bottom: 0;
    z-index: 10; /* کمتر از glass-intro-container که z-index: 20 دارد */
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 0 6px;
    display: flex;
    flex-wrap: nowrap;
  }
  
  .carousel .card {
    width: 85px;
    height: 120px;
    border-radius: 42px;
    box-shadow: 0 2px 6px rgba(184, 167, 136, 0.15),
                0 0.6px 4px rgba(184, 167, 136, 0.1);
  }
  
  .carousel .card-label {
    padding: 6px 4px;
  }
  
  .carousel .card-label h3 {
    font-size: 9px;
  }
  
  .carousel .card-indicator {
    width: 24px;
    height: 24px;
    margin-top: 8px;
  }
  
  .carousel-content {
    padding: 14px;
    max-width: 100%;
  }
  
  .carousel-content .left h1 {
    font-size: 20px;
  }
  
  .carousel-content .left h3 {
    font-size: 12px;
  }
  
  .carousel-content .right p {
    font-size: 10px;
  }
  
  .glass-intro-container {
    position: absolute !important;
    top: 8px !important; /* انتقال به بالای ویدئو، بالاتر از کارت‌های دسته‌بندی */
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 92%;
    padding: 14px 12px;
    width: calc(100% - 16px);
    margin-top: 0;
    margin-bottom: 0;
    z-index: 20 !important; /* بالاتر از کارت‌های دسته‌بندی */
  }
  
  .glass-intro-title {
    font-size: 20px;
    margin-bottom: 14px;
  }
  
  .glass-intro-text {
    font-size: 12px;
    line-height: 1.5;
  }
}

