/* ========== استایل‌های مخصوص صفحه اصلی ========== */
/* این استایل‌ها در کنار styles.css لود می‌شوند */

/* نوار پیشرفت اسکرول */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  background-color: #1a5f8a;
  z-index: 1001;
  width: 0%;
  transition: width 0.1s ease;
}

/* دکمه بازگشت به بالا */
.scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background-color: #1a5f8a;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: #124468;
  transform: translateY(-3px);
}

/* ========== Hero Section با شمارنده ========== */
.hero-section {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 700px;
  margin-top: 0;
  overflow: hidden;
}

.hero-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* ویدیو هیرو — همان موقعیت عکس */
.hero-video {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 2;
}

.hero-text {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  color: white;
  text-align: center;
  width: 90%;
  max-width: 1200px;
  padding: 0 20px;
  z-index: 3;
}

.hero-badge {
  display: inline-block;
  background-color: rgba(26, 95, 138, 0.9);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  margin-bottom: 25px;
  font-weight: 500;
  backdrop-filter: blur(5px);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-title .highlight {
  color: #1a5f8a;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 1.3rem;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.6;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* شمارنده‌ها روی هیرو */
.hero-stats {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 3;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Stats Section (مابین مزایا و گواهی‌ها) ========== */
.stats-section {
  background: linear-gradient(135deg, #1a5f8a 0%, #124468 100%);
  padding: 50px 0;
}

.stats-section .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stats-section .stat-item {
  text-align: center;
  padding: 20px 10px;
  position: relative;
}

.stats-section .stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.25), transparent);
}

.stats-section .stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1;
  position: relative;
  display: inline-block;
}

.stats-section .stat-number::before {
  content: '+';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: -16px;
  font-size: 1.4rem;
  color: #e53935;
}

.stats-section .stat-label {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

@media (max-width: 576px) {
  .stats-section .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .stats-section .stat-item::after { display: none !important; }
  .stats-section .stat-number { font-size: 2.2rem; }
  .stats-section .stat-label { font-size: 0.78rem; }
}

/* ========== Sections General ========== */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-subtitle {
  display: inline-block;
  color: #1a5f8a;
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #333;
}

.section-title .highlight {
  color: #1a5f8a;
}

.section-description {
  color: #666;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.text-center {
  text-align: center;
}

/* ========== About Section — Timeline ========== */
.about-section {
  padding: 50px 0 40px;
  background-color: #fff;
}

/* تایم‌لاین افقی */
.about-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 36px;
  padding-top: 20px;
}

/* خط وصل‌کننده */
.timeline-line {
  position: absolute;
  top: 44px;
  right: 12.5%;
  left: 12.5%;
  height: 2px;
  background: linear-gradient(to left, #1a5f8a, #e0eef5);
  z-index: 0;
}

/* هر آیتم */
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* دایره نقطه */
.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c8dce8;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #1a5f8a;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.timeline-dot--active {
  background: #1a5f8a;
  width: 22px;
  height: 22px;
  box-shadow: 0 0 0 3px rgba(26,95,138,0.3);
}

/* سال */
.timeline-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: #999;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.timeline-year--active {
  color: #1a5f8a;
  font-size: 0.9rem;
}

/* کارت هر مرحله */
.timeline-card {
  background: #f8fafc;
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  width: 90%;
  border: 1px solid #e8f0f6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(26,95,138,0.12);
}

.timeline-card--active {
  background: #1a5f8a;
  border-color: #1a5f8a;
}

.timeline-card i {
  font-size: 1.6rem;
  color: #1a5f8a;
  margin-bottom: 10px;
  display: block;
}

.timeline-card--active i { color: #fff; }

.timeline-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 8px;
}

.timeline-card--active h4 { color: #fff; }

.timeline-card p {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.timeline-card--active p { color: rgba(255,255,255,0.85); }

/* ردیف آمار */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #e8f0f6;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e8f0f6;
}

.about-stat {
  background: #fff;
  padding: 30px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.about-stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: #1a5f8a;
  line-height: 1;
}

.about-stat-plus {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e53935;
  position: absolute;
  top: 28px;
  margin-right: 4px;
}

.about-stat-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

/* موبایل — طراحی کارت عمودی حرفه‌ای */
@media (max-width: 767px) {
  .about-timeline {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 0;
  }

  .timeline-line { display: none; }

  /* هر آیتم — کارت کامل */
  .timeline-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  /* نقطه مخفی در موبایل */
  .timeline-dot { display: none; }

  /* سال — بج بالای کارت */
  .timeline-year {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1a5f8a;
    background: #daeaf5;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 6px;
  }

  .timeline-year--active {
    background: #1a5f8a;
    color: #fff;
  }

  /* کارت — grid دو‌ستونه: متن | آیکون (RTL) */
  .timeline-card {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 44px;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 3px;
    padding: 14px 16px;
    border-right: 4px solid #c8dce8;
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-radius: 0 12px 12px 0;
    background: #f8fafc;
    box-shadow: none;
    text-align: right;
    align-items: center;
  }

  .timeline-card--active {
    border-right-color: #1a5f8a;
    background: #eef5fa;
  }

  /* آیکون — ستون دوم (راست RTL)، دو ردیف */
  .timeline-card i {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 1.2rem;
    color: #1a5f8a;
    margin: 0;
    width: 44px;
    height: 44px;
    background: #daeaf5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
  }

  .timeline-card--active i { background: #c5dcea; }

  .timeline-card h4 {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: #1a2332;
    align-self: end;
    text-align: right;
  }

  .timeline-card--active h4 { color: #1a2332; }

  .timeline-card p {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.8rem;
    margin: 0;
    color: #666;
    line-height: 1.5;
    align-self: start;
    text-align: right;
  }

  .timeline-card--active p { color: #555; }

  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ========== Stack Scroll Section (جایگزین موزاییک) ========== */
.stack-section {
  height: calc(var(--stack-count, 4) * 50vh + 94vh);
  background: #f8f9fa;
}

.stack-sticky {
  position: sticky;
  top: 0;
  height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 24px 20px 16px;
}

/* نوار لوگو + عنوان */
.stack-logo-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 820px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.stack-logo {
  height: 350px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
}

.stack-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1a2332;
  margin: 0;
  white-space: nowrap;
}

.stack-title .highlight { color: #1a5f8a; }

.stack-layout {
  position: relative;
  width: 100%;
  max-width: 820px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* کارت‌ها — ارتفاع محدود (۲۵٪ کوچک‌تر از حالت پر) */
.stack-cards {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
}

/* نقطه‌های ناوبری — روی عکس، پایین چپ */
.stack-dots {
  position: absolute;
  bottom: 18px;
  left: 20px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  z-index: 20;
}

.stack-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: background 0.3s, transform 0.3s;
  cursor: default;
}

.stack-dot.active {
  background: #fff;
  transform: scale(1.4);
}

/* هر کارت — روی هم، landscape */
.stack-card {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  background: #1a1a2e;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.stack-card.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.stack-card.is-prev {
  opacity: 0;
  transform: translateX(40px);
}

.stack-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: opacity 0.3s ease;
}

.stack-card:hover img { opacity: 1; }

.stack-card-info {
  position: relative;
  z-index: 2;
  padding: 28px 28px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 100%);
  width: 100%;
}

.stack-tag {
  display: inline-block;
  background: #1a5f8a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.stack-card-info h3 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 7px;
}

.stack-card-info p {
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
  margin: 0;
}

/* نوار پیشرفت پایین */
.stack-progress {
  width: 100%;
  max-width: 820px;
  height: 3px;
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
  margin-top: 18px;
  overflow: hidden;
}

.stack-progress-bar {
  height: 100%;
  background: #1a5f8a;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== دسکتاپِ کوتاه (مثل 1366×768): لوگوی بزرگ کارت را می‌بُرید — کوچکش می‌کنیم و چیدمان از بالا ===== */
@media (min-width: 993px) and (max-height: 820px) {
  .stack-sticky { justify-content: flex-start; padding-top: 72px; }
  .stack-logo { height: 170px; }
  .stack-title { font-size: 1.2rem; }
  .stack-logo-bar { gap: 4px; margin-bottom: 10px; }
}

/* موبایل stack */
@media (max-width: 768px) {
  .stack-section { height: calc(var(--stack-count, 4) * 45vh + 100vh); }
  .stack-sticky { padding: 16px 12px 12px; }
  /* لوگو کوچک‌تر تا عکس‌های مدل‌ها ارتفاع بیشتری بگیرند */
  .stack-logo { height: 120px; }
  .stack-title { font-size: 1.1rem; }
  .stack-logo-bar { gap: 8px; margin-bottom: 10px; }
  .stack-card { border-radius: 14px; }
  .stack-card-info { padding: 14px 14px 12px; }
  .stack-card-info h3 { font-size: 1.05rem; }
}

@media (max-width: 480px) {
  .stack-logo { height: 95px; }
  .stack-title { font-size: 0.95rem; }
  .stack-logo-bar { margin-bottom: 8px; }
  .stack-card-info h3 { font-size: 0.95rem; }
  .stack-card-info p { display: none; }
  .stack-progress { margin-top: 8px; }
}

/* ========== About Section Layout Fixes ========== */
.about-section {
  position: relative;
}

/* مخفی کردن عکس موبایل در دسکتاپ */
.about-image.mobile-image-top {
  display: none;
  margin-bottom: 40px;
  text-align: center;
  width: 100%;
}

.about-image.mobile-image-top .image-frame {
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: auto; /* تغییر به auto */
  position: relative;
  padding-top: 177.78%; /* برای نسبت 9:16 (16 ÷ 9 × 100) */
}

.about-image.mobile-image-top img {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* پر کردن کامل کادر */
}

/* استایل عکس دسکتاپ */
.about-image.desktop-image {
  display: block;
}

/* نمایش در موبایل و تبلت */
@media (max-width: 992px) {
  .about-image.mobile-image-top {
    display: block;
  }
  
  .about-image.desktop-image {
    display: none;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  /* تنظیم ارتفاع برای نسبت 9:16 */
  .about-image.mobile-image-top .image-frame {
    padding-top: 177.78%; /* حفظ نسبت 9:16 */
    max-height: 80vh; /* حداکثر ارتفاع 80% صفحه */
  }
}

/* تنظیم ارتفاع عکس در موبایل کوچک */
@media (max-width: 576px) {
  .about-image.mobile-image-top .image-frame {
    padding-top: 177.78%; /* حفظ نسبت 9:16 */
    max-height: 70vh; /* حداکثر ارتفاع 70% صفحه در موبایل کوچک */
  }
  
  .about-image.mobile-image-top {
    margin-bottom: 30px;
  }
}

/* ========== افزایش کیفیت نمایش عکس ========== */
.image-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  object-fit: contain; /* نمایش کامل عکس بدون برش */
}

.image-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa; /* پس‌زمینه برای عکس‌هایی با پس‌زمینه شفاف */
}

.image-frame:hover img {
  transform: scale(1.05);
}

/* ========== About Section Original ========== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: #333;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
}

.about-features {
  margin: 30px 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.feature-item i {
  color: #1a5f8a;
  font-size: 1.1rem;
}

.feature-item span {
  color: #555;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 2px solid transparent;
  font-family: inherit;
}

.btn-primary {
  background-color: #1a5f8a;
  color: white;
}

.btn-primary:hover {
  background-color: #124468;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(26, 95, 138, 0.3);
}

.btn-secondary {
  background-color: #333;
  color: white;
}

.btn-secondary:hover {
  background-color: #444;
  transform: translateY(-3px);
}

.btn-outline {
  background-color: transparent;
  color: #1a5f8a;
  border-color: #1a5f8a;
}

.btn-outline:hover {
  background-color: #1a5f8a;
  color: white;
}

.btn-light {
  background-color: white;
  color: #333;
}

.btn-light:hover {
  background-color: #f5f5f5;
}

.btn-outline-light {
  background-color: transparent;
  color: white;
  border-color: white;
}

.btn-outline-light:hover {
  background-color: white;
  color: #333;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ========== انیمیشن فلش شرکت‌های زیرمجموعه ========== */
@keyframes arrow-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ========== Subsidiary Companies ========== */
.subsidiaries-section {
  padding: 40px 0 64px;
  background: #f8f9fa;
}

.subs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.subs-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  border-top: 4px solid var(--accent, #1a5f8a);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.subs-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.subs-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.subs-card-top > i {
  font-size: 1.8rem;
  color: var(--accent, #1a5f8a);
}

.subs-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-active       { background: #e6f9f0; color: #1a7a4a; }
.badge-construction { background: #fff3e0; color: #b36200; }
.badge-planning     { background: #f0f0ff; color: #5b2cb3; }

.subs-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a2332;
  margin: 0 0 4px;
}

.subs-en {
  font-size: 0.72rem;
  color: #aaa;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}

.subs-products {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #f0f0f0;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subs-products li {
  font-size: 0.82rem;
  color: #555;
  padding-right: 14px;
  position: relative;
}

.subs-products li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, #1a5f8a);
}

@media (max-width: 900px) { .subs-grid { grid-template-columns: repeat(2, 1fr); } }

/* موبایل — grid قدیمی حذف شده، اسکرول-کارت جدید استفاده می‌شه */

/* ---- حذف CSS های قدیمی زیرمجموعه ---- */
.subs-layout,
.subs-nav, .subs-nav-item, .subs-nav-num, .subs-nav-name, .subs-arrow,
.subs-panel, .subs-pane, .subs-pane-icon, .subs-pane-info, .subs-pane-en,
.subs-pane-details, .subs-timeline, .subs-line, .subs-item, .subs-dot,
.subs-detail-panel, .subs-detail, .subs-detail-header, .subs-detail-body {
  display: none !important;
}

/* layout دو ستونه */
.subs-layout-old {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 0;
  border: 1px solid #e0ecf5;
  border-radius: 20px;
  overflow: hidden;
}

/* ستون راست — لیست شرکت‌ها */
.subs-nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e0ecf5;
}

.subs-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid #eef3f8;
  cursor: pointer;
  text-align: right;
  transition: background 0.2s;
  font-family: inherit;
}

.subs-nav-item:last-child { border-bottom: none; }

.subs-nav-item:hover { background: #f5f9fc; }

.subs-nav-item.is-active {
  background: #1a5f8a;
}

.subs-nav-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: #aac4d8;
  min-width: 20px;
  flex-shrink: 0;
}

.subs-nav-item.is-active .subs-nav-num { color: rgba(255,255,255,0.6); }

.subs-nav-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a2332;
  text-align: right;
}

.subs-nav-item.is-active .subs-nav-name { color: #fff; }

.subs-nav-item .subs-status {
  font-size: 0.62rem;
  padding: 2px 7px;
  flex-shrink: 0;
}

.subs-nav-item.is-active .subs-status {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.subs-arrow {
  color: #ccc;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.subs-nav-item.is-active .subs-arrow { color: rgba(255,255,255,0.6); transform: translateX(-3px); }

/* ستون چپ — پنل جزئیات */
.subs-panel {
  background: #f8fafc;
  position: relative;
  min-height: 320px;
}

.subs-pane {
  display: none;
  padding: 36px 32px;
  animation: subsFadeIn 0.3s ease;
}

.subs-pane.is-active { display: block; }

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

.subs-pane-icon {
  width: 64px;
  height: 64px;
  background: #fff;
  border: 1px solid #dceaf5;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #1a5f8a;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(26,95,138,0.08);
}

.subs-pane-en {
  font-size: 0.75rem;
  color: #aaa;
  margin: 0 0 4px;
  letter-spacing: 0.03em;
}

.subs-pane-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a2332;
  margin: 0 0 10px;
}

.subs-pane-info { margin-bottom: 24px; }

.subs-pane-details h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a5f8a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.subs-pane-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subs-pane-details li {
  font-size: 0.9rem;
  color: #444;
  padding-right: 18px;
  position: relative;
}

.subs-pane-details li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1a5f8a;
}

/* موبایل */
@media (max-width: 768px) {
  .subs-layout { grid-template-columns: 1fr; }
  .subs-nav { border-left: none; border-bottom: 1px solid #e0ecf5; flex-direction: row; flex-wrap: wrap; }
  .subs-nav-item { flex: 1 1 50%; border-left: 1px solid #eef3f8; justify-content: center; flex-direction: column; gap: 4px; text-align: center; }
  .subs-nav-item .subs-status, .subs-arrow { display: none; }
  .subs-nav-name { font-size: 0.78rem; text-align: center; }
}

/* تایم‌لاین ۶ ستونه زیرمجموعه‌ها */
.subs-timeline {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 0 !important;
  padding-top: 20px;
}

.subs-line {
  right: calc(100% / 12) !important;
  left:  calc(100% / 12) !important;
}

/* کارت کوچک زیرمجموعه */
.subs-card {
  padding: 16px 12px !important;
  width: 95% !important;
}

.subs-card i {
  font-size: 1.3rem !important;
  margin-bottom: 8px !important;
}

.subs-card h4 {
  font-size: 0.82rem !important;
  margin-bottom: 6px !important;
}

.subs-card p {
  font-size: 0.72rem !important;
  margin-bottom: 10px !important;
  line-height: 1.5 !important;
}

/* بج وضعیت */
.subs-status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.subs-status.status-active       { background: #e6f9f0; color: #1a7a4a; }
.subs-status.status-construction  { background: #fff3e0; color: #b36200; }
.subs-status.status-planning      { background: #f0f4ff; color: #3b5bdb; }
.subs-status.status-construction-inv { background: rgba(255,255,255,0.2); color: #fff; }

@media (max-width: 900px) {
  .subs-timeline { grid-template-columns: repeat(3, 1fr) !important; }
  .subs-line { right: calc(100%/6) !important; left: calc(100%/6) !important; }
}

@media (max-width: 560px) {
  .subs-timeline { grid-template-columns: repeat(3, 1fr) !important; }
  .subs-line { display: none; }
}

/* پنل جزئیات */
.subs-detail-panel {
  margin-top: 24px;
  border-radius: 16px;
  overflow: hidden;
}

.subs-detail {
  display: none;
  padding: 28px 32px;
  background: #f8fafc;
  border: 1px solid #e0ecf5;
  border-radius: 16px;
  animation: subsFadeIn 0.3s ease;
}

.subs-detail.is-open { display: block; }

@keyframes subsFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.subs-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.subs-detail-header > i {
  font-size: 2rem;
  color: #1a5f8a;
  flex-shrink: 0;
}

.subs-detail-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2332;
  margin: 0 0 4px;
}

.subs-detail-header span:not(.subs-status) {
  font-size: 0.78rem;
  color: #888;
}

.subs-detail-header .subs-status { margin-right: auto; }

.subs-detail-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a5f8a;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subs-detail-body ul {
  margin: 0;
  padding-right: 20px;
  display: flex;
  gap: 12px 32px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.subs-detail-body ul li {
  color: #444;
  font-size: 0.875rem;
  padding-right: 16px;
  position: relative;
}

.subs-detail-body ul li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1a5f8a;
}

/* کارت انتخاب‌شده در تایم‌لاین */
.subs-item.is-active .timeline-card {
  border-color: #1a5f8a;
  background: #eef6fb;
}

.subs-item.is-active .subs-dot {
  background: #1a5f8a;
  box-shadow: 0 0 0 3px rgba(26,95,138,0.3);
}

/* کارت آخر active نماند روی رنگ پیش‌فرض */
.subs-item.is-active .timeline-card.timeline-card--active {
  background: #1a5f8a;
}

.subsidiaries-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Grid برای دسکتاپ - 2 ردیف 3 ستونی */
.subsidiaries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.subsidiary-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #eaeaea;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 180px;
  height: auto !important;
  cursor: pointer;
}

/* حالت عادی (بسته) */
.subsidiary-card:not(.active) {
  height: auto !important;
  min-height: 180px;
  overflow: hidden;
}

/* حالت باز */
.subsidiary-card.active {
  height: auto !important;
  min-height: 180px;
}

.card-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  background: white;
  position: relative;
  flex-shrink: 0;
}

.company-number {
  width: 40px;
  height: 40px;
  background: #1a5f8a;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.company-info {
  flex: 1;
  overflow: hidden;
}

.company-name-main {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-name-main i {
  color: #1a5f8a;
  font-size: 1rem;
}

.company-name-english {
  font-size: 0.85rem;
  color: #666;
  font-family: 'Courier New', monospace;
  direction: ltr;
  word-break: break-word;
  line-height: 1.3;
}

.accordion-arrow {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
  cursor: pointer;
}

/* تغییر استایل هاور روی فلش */
.subsidiary-card:not(.active):hover .accordion-arrow {
  background: #1a5f8a;
  color: white;
  transform: scale(1.1);
}

/* انیمیشن فلش برای دسکتاپ (هاور) */
@media (min-width: 769px) {
  .subsidiary-card:not(.active):hover .accordion-arrow i {
    animation: arrow-bounce 0.8s ease infinite;
  }
  
  /* افکت هاور روی کل کارت */
  .subsidiary-card:not(.active):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #1a5f8a;
  }
}

/* انیمیشن فلش برای موبایل (لمس) */
@media (max-width: 768px) {
  .subsidiary-card:not(.active) .accordion-arrow i {
    animation: arrow-bounce 1.2s ease infinite;
  }
}

/* وقتی کارت باز شد، انیمیشن متوقف شود و فلش بچرخد */
.subsidiary-card.active .accordion-arrow {
  transform: rotate(180deg);
  background: #1a5f8a;
  color: white;
}

.subsidiary-card.active .accordion-arrow i {
  animation: none !important;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.accordion-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.subsidiary-card.active .accordion-content {
  max-height: 1500px;
  padding: 0 20px 20px 20px;
  opacity: 1;
  transform: translateY(0);
}

/* محتوای درونی - همگی مثل نگین زرین چوب */
.content-section {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.content-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title-small {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-small i {
  color: #1a5f8a;
  font-size: 0.9rem;
}

/* لیست محصولات - کاملاً مثل نگین زرین چوب */
.production-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.production-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  padding-right: 15px;
}

.production-list li::before {
  content: "•";
  color: #1a5f8a;
  font-weight: bold;
  font-size: 1.2rem;
  position: absolute;
  right: 0;
  top: 0;
  line-height: 1;
}

/* لیست پروژه‌ها - کاملاً مثل نگین زرین چوب */
.projects-list-detailed {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  border-left: 3px solid #1a5f8a;
}

.project-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.project-icon {
  width: 24px;
  height: 24px;
  background: #1a5f8a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.project-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.project-details p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

/* company-footer کاملاً جدا و پایین */
.company-footer {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.company-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.status-construction {
  background: #fff3e0;
  color: #ef6c00;
  border: 1px solid #ffcc80;
}

.status-planning {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.company-actions {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-primary {
  background: #1a5f8a;
  color: white;
}

.badge-secondary {
  background: #667eea;
  color: white;
}

/* حل مشکل برای دسکتاپ: کارت‌های همردیف تأثیر نپذیرند */
@media (min-width: 769px) {
  .subsidiaries-grid {
    align-items: start;
  }
  
  .subsidiary-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, height 0.4s ease, border-color 0.3s ease;
  }
  
  /* وقتی کارتی باز می‌شود، ارتفاع کارت‌های همردیف تغییر نکند */
  .subsidiaries-grid .subsidiary-card:not(.active) {
    height: 180px !important;
  }
  
  .subsidiary-card.active {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }
}

/* ========== Products Preview - FIXED (عکس‌ها نمایش داده می‌شوند) ========== */

/* ========== Preview Grid با اسلایدر افقی ========== */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.preview-column {
  background-color: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preview-column:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.preview-column-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  color: #333;
  position: relative;
  padding-bottom: 15px;
}

.preview-column-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 3px;
  background-color: #1a5f8a;
}

/* کادر اسلایدر در هر ستون */
.preview-column .products-slider {
  position: relative;
  width: 100%;
  height: 680px;
  margin-bottom: 20px;
}

.preview-column .swiper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.preview-column .swiper-wrapper {
  height: 100%;
}

.preview-column .swiper-slide {
  height: 100%;
  display: flex;
}

/* تنظیمات کارت محصول در اسلایدر */
.preview-column .product-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.preview-column .product-card:hover {
  border-color: #1a5f8a;
  box-shadow: 0 5px 15px rgba(26, 95, 138, 0.2);
}

/* کادر عکس محصول - کل ارتفاع کارت را پر می‌کند */
.preview-column .product-image {
  width: 100%;
  height: 100%;
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.preview-column .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* تصویر عمودی کل کادر را پر می‌کند */
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.preview-column .product-card:hover .product-image img {
  transform: scale(1.08);
}

/* اطلاعات محصول */
.preview-column .product-info {
  padding: 25px;
  background-color: white;
  border-top: 1px solid #f5f5f5;
  text-align: center;
  flex-shrink: 0;
}

.preview-column .product-model-color {
  font-size: 1.3rem; /* افزایش سایز فونت */
  font-weight: 700;
  margin-bottom: 0;
  color: #333;
  line-height: 1.5;
}

/* پاگینیشن (دایره‌ها) - در پایین اسلایدر */
.preview-column .swiper-pagination {
  position: absolute;
  bottom: 20px !important; /* فاصله بیشتر از پایین */
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 10;
}

.preview-column .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 1;
}

.preview-column .swiper-pagination-bullet-active {
  background-color: #1a5f8a;
  transform: scale(1.4);
}

/* دکمه‌های مشاهده محصولات */
.preview-column .text-center {
  margin-top: auto;
  padding-top: 25px;
  border-top: 1px solid #f0f0f0;
}

.preview-column .btn {
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.preview-column .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(26, 95, 138, 0.4);
}

/* ========== تغییرات برای دسکتاپ (صفحه بزرگ) ========== */
@media (min-width: 1200px) {
  .products-preview {
    overflow: hidden;
  }
  
  .products-preview .section-container {
    max-width: 1400px;
    padding-left: 40px;
    padding-right: 40px;
  }
  
  .preview-grid {
    gap: 30px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .preview-column .products-slider {
    height: 700px;
  }
}

/* ========== تنظیمات برای لپتاپ متوسط ========== */
@media (max-width: 1200px) {
  .preview-grid {
    gap: 30px;
    grid-template-columns: 1fr 1fr;
  }
  
  .preview-column .products-slider {
    height: 640px;
  }
}

/* ========== تبلت ========== */
@media (max-width: 992px) {
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .preview-column {
    padding: 20px;
  }
  
  .preview-column .products-slider {
    height: 720px;
  }
}

/* ========== موبایل ========== */
@media (max-width: 768px) {
  .preview-grid {
    gap: 25px;
  }
  
  .preview-column {
    padding: 15px;
  }
  
  .preview-column .products-slider {
    height: 600px;
  }

  .preview-column .swiper-pagination {
    bottom: 15px !important;
  }
}

/* ========== موبایل کوچک ========== */
@media (max-width: 576px) {
  .preview-column .products-slider {
    height: 540px;
  }

  .preview-column-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
}

/* ========== Features Section ========== */
.features-section {
  padding: 40px 0 56px;
  background-color: #f4f6f8;
}

.features-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  padding-top: 20px;
}

/* خط وصل‌کننده ۶ ستونه */
.features-line {
  right: calc(100% / 12) !important;
  left:  calc(100% / 12) !important;
}

@media (max-width: 900px) {
  .features-timeline { grid-template-columns: repeat(3, 1fr); }
  .features-line { right: calc(100% / 6) !important; left: calc(100% / 6) !important; }
}

@media (max-width: 560px) {
  .features-timeline { grid-template-columns: repeat(2, 1fr); padding-top: 0; gap: 12px; }
  .features-line { display: none; }
  .features-timeline .timeline-dot { display: none; }
  .features-timeline .timeline-year { font-size: 0.75rem; }
  .features-timeline .timeline-card { padding: 14px 12px; }
  .features-timeline .timeline-card i { font-size: 1.3rem; margin-bottom: 8px; }
  .features-timeline .timeline-card h4 { font-size: 0.85rem; }
  .features-timeline .timeline-card p { font-size: 0.75rem; }
}

/* ========== Certificates Section ========== */
.certificates-section {
  padding: 40px 0;
  background-color: #fff;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* ===== کاروسل گواهی‌ها (۳ عکس) ===== */
/* دسکتاپ: هر سه عکس کنار هم */
.cert-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cert-slide {
  margin: 0;
  background: #f6f8fb;
  border: 1px solid rgba(15, 40, 70, 0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 6px 22px -10px rgba(15, 40, 70, 0.18);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cert-slide img {
  width: 100%;
  height: 320px;
  object-fit: contain;   /* کل گواهی دیده شود، بدون برش */
  border-radius: 10px;
  display: block;
}
.cert-slide:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px -14px rgba(15, 40, 70, 0.28);
}
.cert-dots { display: none; }

/* موبایل/تبلت: اسکرول افقی با snap (سوایپ چپ/راست) */
@media (max-width: 768px) {
  .cert-carousel {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 4px 16px 12px;
    margin: 0 -16px;            /* تا لبه‌ها به کناره صفحه برسند */
    scrollbar-width: none;
  }
  .cert-carousel::-webkit-scrollbar { display: none; }
  .cert-slide {
    flex: 0 0 82%;             /* کمی از اسلاید بعدی پیداست = راهنمای سوایپ */
    scroll-snap-align: center;
  }
  .cert-slide img { height: 300px; }

  .cert-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
  }
  .cert-dots .cert-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccd5df;
    transition: background 0.3s ease, transform 0.3s ease;
  }
  .cert-dots .cert-dot.active {
    background: var(--accent, #1a5f8a);
    transform: scale(1.4);
  }
}

.certificate-card {
  background-color: white;
  padding: 22px 18px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.certificate-icon {
  font-size: 1.8rem;
  color: #1a5f8a;
  margin-bottom: 10px;
}

.certificate-title {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #333;
  line-height: 1.3;
}

.certificate-description {
  color: #666;
  line-height: 1.4;
  font-size: 0.8rem;
  max-width: 90%;
}

/* ========== CTA Section ========== */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  color: white;
  text-align: center;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.cta-description {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ========== Responsive ========== */

/* برای دسکتاپ بزرگ */
@media (max-width: 1200px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-card:nth-child(3n+1) { border-left: 2px solid #eef1f5; }
  .feature-card:nth-child(2n+1) { border-left: none; }
  .features-grid,
  .certificates-grid,
  .subsidiaries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .subsidiary-title {
    min-height: 60px;
    font-size: 1.3rem;
  }
  
  /* کاهش ارتفاع کادرهای گواهی در لپتاپ */
  .certificate-card {
    height: 200px;
    padding: 35px 25px;
  }
}

/* برای تبلت */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  /* کاهش ارتفاع کادرهای گواهی در تبلت */
  .certificate-card {
    height: 200px;
    padding: 30px 20px;
  }
}

/* برای موبایل */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-card { border-left: none !important; }
  .features-grid,
  .certificates-grid,
  .subsidiaries-grid {
    grid-template-columns: 1fr;
  }
  
  /* برای گواهینامه‌ها در موبایل: 3 ردیف 2 تایی */
  .certificates-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  /* About در موبایل */
  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .subsidiary-card {
    padding: 30px 25px;
  }
  
  .subsidiary-title {
    min-height: auto;
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  .subsidiary-description {
    font-size: 0.95rem;
  }
  
  .subsidiary-icon {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
  
  /* کاهش ارتفاع کادرهای گواهی در موبایل */
  .certificate-card {
    height: 160px;
    padding: 25px 15px;
  }
  
  .certificate-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
  }
  
  .certificate-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  
  .certificate-description {
    font-size: 0.85rem;
    line-height: 1.4;
  }
}

/* موبایل کوچک */
@media (max-width: 576px) {
  .about-content {
    gap: 25px;
  }
  
  .preview-column .product-model-color {
    font-size: 1rem;
  }
  
  .preview-column .btn {
    padding: 10px 25px;
    font-size: 0.95rem;
  }
  
  .subsidiary-card .product-image {
    height: 350px;
  }
  
  /* برای موبایل کوچک: 2 ستون */
  .certificates-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  /* کاهش بیشتر ارتفاع کادرهای گواهی */
  .certificate-card {
    height: 140px;
    padding: 20px 12px;
  }
  
  .certificate-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }
  
  .certificate-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }
  
  .certificate-description {
    font-size: 0.8rem;
    line-height: 1.3;
  }
}

/* موبایل خیلی کوچک */
@media (max-width: 400px) {
  .certificate-card {
    height: 130px;
    padding: 15px 10px;
  }
  
  .certificate-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }
  
  .certificate-title {
    font-size: 0.95rem;
  }
  
  .certificate-description {
    font-size: 0.75rem;
  }
  
  .certificates-grid {
    gap: 10px;
  }
}

/* شمارنده‌ها در موبایل */
@media (max-width: 768px) {
  .stats-grid {
    gap: 10px;
    padding: 15px;
    border-radius: 15px 15px 0 0;
  }
  
  .stat-item {
    padding: 8px;
  }
  
  .stat-item:not(:last-child)::after {
    left: -5px;
    height: 50%;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-number::before {
    font-size: 1rem;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    gap: 8px;
    padding: 10px;
    border-radius: 10px 10px 0 0;
  }
  
  .stat-item {
    padding: 6px;
  }
  
  .stat-item:not(:last-child)::after {
    display: none;
  }
  
  .stat-number {
    font-size: 1.7rem;
  }
  
  .stat-number::before {
    font-size: 0.8rem;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
}

/* عکس هیرو در موبایل */
@media (max-width: 768px) {
  .hero-section {
    height: 60vh;
    min-height: 400px;
  }
  
  .hero-image {
    background-position: center center;
  }
}

@media (max-width: 576px) {
  .hero-section {
    height: 50vh;
    min-height: 300px;
  }
}

/* ========== فونت‌های موبایل ========== */

/* موبایل متوسط (تا 768px) */
@media (max-width: 768px) {
  /* هیرو */
  .hero-title {
    font-size: 2.2rem;
    line-height: 1.2;
  }
  
  .hero-description {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .hero-badge {
    font-size: 0.8rem;
    padding: 6px 15px;
  }
  
  /* عناوین بخش‌ها */
  .section-title {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .section-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  /* متن درباره ما */
  .about-text h3 {
    font-size: 1.4rem;
  }
  
  .about-text p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .feature-item span {
    font-size: 0.9rem;
  }
  
  /* کارت‌ها */
  .feature-title,
  .certificate-title {
    font-size: 1.2rem;
  }
  
  .feature-description,
  .certificate-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  /* CTA */
  .cta-title {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .cta-description {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  /* شمارنده‌ها */
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
}

/* موبایل کوچک (تا 576px) */
@media (max-width: 576px) {
  /* هیرو */
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .hero-description {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .hero-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
  
  /* عناوین بخش‌ها */
  .section-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  
  .section-description {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  /* متن درباره ما */
  .about-text h3 {
    font-size: 1.3rem;
  }
  
  .about-text p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .feature-item span {
    font-size: 0.85rem;
  }
  
  /* کارت‌ها */
  .feature-title,
  .certificate-title {
    font-size: 1.1rem;
  }
  
  .feature-description,
  .certificate-description {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  /* CTA */
  .cta-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  
  .cta-description {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* دکمه‌ها */
  .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
  
  .btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
  }
  
  /* شمارنده‌ها */
  .stats-grid {
    gap: 5px;
    padding: 15px 10px;
  }
  
  .stat-number {
    font-size: 1.7rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
}
/* ========== Subsidiaries Dual Layout ========== */

/* دسکتاپ: scroll section مخفی، grid نمایش */
.subs-scroll-section { display: none; }
.subs-desktop-grid { display: block; }

/* موبایل: grid مخفی، scroll section نمایش */
@media (max-width: 560px) {
  .subs-desktop-grid { display: none !important; }
  .subsidiaries-section { height: auto; padding: 0; overflow: visible; }

  .subs-scroll-section {
    display: block;
    height: calc(var(--subs-count, 6) * 60vh + 100vh);
    position: relative;
  }

  .subs-scroll-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 24px 16px 0;
    box-sizing: border-box;
    background: #fff;
  }

  .subs-scroll-header {
    flex-shrink: 0;
    text-align: center;
    margin-bottom: 12px;
  }

  .subs-scroll-header .section-subtitle {
    font-size: 0.72rem;
  }

  .subs-scroll-header .section-title {
    font-size: 1.05rem;
    margin: 2px 0 0;
  }

  .subs-scroll-cards {
    position: relative;
    width: 100%;
    flex: none;
    height: 32vh;
    min-height: 200px;
  }

  /* نشانگرها (دایره‌ها) در ردیف مستقل زیر کارت‌ها — دیگر روی کارت‌ها نمی‌افتند */
  .subs-scroll-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 10px 0 2px;
    flex-shrink: 0;
  }

  .subs-scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.3s, transform 0.3s;
  }

  .subs-desc-box {
    width: 100%;
    background: #f8fafc;
    border-right: 4px solid var(--subs-accent, #1a5f8a);
    border-radius: 0 14px 14px 0;
    padding: 16px 18px 22px;   /* پدینگ پایینِ بیشتر تا عکس به لبه نچسبد */
    margin-top: 12px;
    margin-bottom: 16px;
    font-size: 0.86rem;
    line-height: 1.85;
    color: #444;
    text-align: justify;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  /* عکس دورنمای کارخانه داخلِ خودِ باکس توضیحات، چسبیده به پایینِ کادر (موبایل) */
  .subs-desc-text { margin: 0; }
  .subs-factory-photo {
    width: 100%;
    margin-top: auto;   /* عکس به پایینِ کادر می‌رود و از متن فاصله می‌گیرد */
    padding-top: 16px;  /* فاصله‌ی حداقلی از متن حتی وقتی جا کم است */
  }
  .subs-factory-photo img {
    width: 100%;
    height: 150px;   /* ۱۵٪ بلندتر از ۱۳۰px */
    object-fit: cover;
    border-radius: 10px;
    display: block;
  }

  .subs-scroll-dot.active {
    background: var(--accent, #1a5f8a);
    transform: scale(1.4);
  }

  .subs-scroll-card {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    border-radius: 20px;
    background: #f8fafc;
    border-top: 5px solid var(--accent, #1a5f8a);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .subs-scroll-card.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .subs-scroll-card.is-prev {
    opacity: 0;
    transform: translateX(40px);
  }

  .subs-scroll-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px 18px;
    gap: 7px;
    text-align: center;
  }

  .subs-scroll-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent, #1a5f8a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .subs-scroll-icon i {
    font-size: 1.2rem;
    color: #fff;
  }

  .subs-scroll-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .subs-scroll-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2535;
    margin: 0;
  }

  .subs-scroll-info .subs-en {
    font-size: 0.7rem;
    color: #888;
    margin: 0;
  }

  .subs-scroll-info .subs-en::after { display: none; }

  .subs-scroll-info .subs-badge {
    margin-bottom: 4px;
  }

  .subs-scroll-info .subs-products {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    max-height: none !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(0,0,0,0.08) !important;
    list-style: none;
    margin: 0;
    padding-right: 0 !important;
  }

  .subs-scroll-info .subs-products li {
    font-size: 0.78rem;
    color: #444;
  }

  .subs-scroll-info .subs-products li::before { display: none; }
}

/* ========== دسترس‌پذیری: کاهش حرکت ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
