/* تنظیمات پایه */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5b5b5b;
  --primary: #1e66f5;
  --ring: 0 0 0 3px rgba(30,102,245,.25);
}

* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: 'Vazirmatn', sans-serif;
  overflow-x: hidden; /* جلوگیری از اسکرول افقی */
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  direction: rtl;
}

/* CONTAINER */
.container {
  width: min(1200px, 92%);
  margin: 0 auto;
  padding-right: 15px;
  padding-left: 15px;
}

/* هدر/ناوبری */
.site-header {
  background-color: #ddd;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 10;
  height: 18%;
}

/* --- هدر دسکتاپ --- */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-top: 0.5%;
  
}
.logo-container img {
  height: 100px; /* اندازه پیش‌فرض لوگو */
  display: block;
  margin: 0 auto;
  max-width: 100%;
  object-fit: contain;
}
.main-nav ul {
  list-style: none;
  padding-left: 0px;
  display: flex;
  gap: 40px;
  padding-left: 40px;
  font-family: 'Vazirmatn', sans-serif;
}
.main-nav a {
  color: #000000;
  text-decoration: none;
  font-size: 1.1rem;
}
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: #ffffff;
  background: var(--primary);
  font-family: 'Vazirmatn', sans-serif;
  font-weight: bold;
}
.btn.small {
  padding: 8px 12px;
  font-size: .9rem;
}
.btn:hover { filter: brightness(0.95); }
.btn:focus { outline: none; box-shadow: var(--ring); }

/* --- هدر موبایل (که به صورت پیش‌فرض مخفی است) --- */
.mobile-header-content {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2px 15px;
    background-color: #eee;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.mobile-logo-container img {
    height: 70px;
    display: block;
}
.menu-toggle-checkbox { display: none; }
.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    margin-left: 15px;
}
.menu-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}
.mobile-nav {
    position: absolute;
    top: 80px;
    right: 0;
    background-color: #f6f7fb;
    width: 100%;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 15;
}
.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}
.mobile-nav a {
    color: #333;
    font-size: 1.1rem;
    text-decoration: none;
    display: block;
}
.menu-toggle-checkbox:checked ~ .mobile-nav { transform: translateX(0); }
.menu-toggle-checkbox:checked ~ .menu-icon span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle-checkbox:checked ~ .menu-icon span:nth-child(2) { opacity: 0; }
.menu-toggle-checkbox:checked ~ .menu-icon span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- اسلایدر Hero --- */
.hero {
  background: transparent;
  color: #ffffff;
  padding: 0;
  text-align: right;
  position: relative;
  overflow: hidden;
  height: 90vh;
  min-height: 500px;
}
/* تنظیمات اسلایدر در حالت موبایل */
@media (max-width: 700px) {
  .hero {
    height: auto;
    min-height: 400px;
    padding: 0;
  }
  .hero-slide {
    flex-direction: column; /* عکس بالا، متن پایین */
    text-align: center;
    transform: translateY(0); /* حذف حرکت چپ/راست */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    z-index: 0; /* اولویت پایین */
  }
   .hero-slide.active {
      z-index: 1; /* اولویت بالا */
      transform: translateY(0);
   }
   .hero-slide.prev, .hero-slide.next {
       z-index: 0; /* اولویت پایین */
       transform: translateY(0);
       opacity: 0;
   }
  .slide-content {
    flex-direction: column; /* عکس و متن زیر هم */
    padding: 15px;
  }
  .slide-image { max-width: 80%; margin-bottom: 20px; }
  .slide-text { padding-left: 0; }
  .slide-text h1 { font-size: 2.2rem; }
  .slide-text p { font-size: 1rem; }
  .slider-navigation { bottom: 20px; }
  .prev-slide, .next-slide { width: 35px; height: 35px; font-size: 1.3rem; }
  .indicator { width: 10px; height: 10px; }
  .contact-item { flex-direction: column; }
}

.hero {
  background: #00c9c9; /* پس‌زمینه شفاف، چون اسلایدها خودشون عکس دارن */
  color: #ffffff;
  padding: 0; /* padding را روی container اسلایدر اعمال می‌کنیم */
  text-align: right;
  position: relative;
  overflow: hidden; /* برای اینکه محتوای اسلاید از bounds بیرون نزنه */
  height: 90vh; /* ارتفاع اسلایدر، مثلا 80% صفحه نمایش */
  min-height: 500px; /* حداقل ارتفاع */
}

.herop {
  background: #00c9c9; /* پس‌زمینه شفاف، چون اسلایدها خودشون عکس دارن */
  color: #ffffff;
  padding: 0; /* padding را روی container اسلایدر اعمال می‌کنیم */
  text-align: right;
  position: relative;
  overflow: hidden; /* برای اینکه محتوای اسلاید از bounds بیرون نزنه */
  height: 20vh; /* ارتفاع اسلایدر، مثلا 80% صفحه نمایش */
}

.hist {
  background: #0073ff;
  background: linear-gradient(0deg, rgba(0, 115, 255, 1) 0%, rgba(0, 7, 207, 1) 50%, rgba(0, 28, 168, 1) 100%);
  color: white;
padding: 20%;
}

.hero-slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  transform: translateX(100%);
  transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
  z-index: 1;
  transform: translateX(0);
}
.hero-slide.prev { opacity: 0; transform: translateX(-100%); z-index: 0; }
.hero-slide.next { opacity: 0; transform: translateX(100%); z-index: 0; }


.slide-content {
  display: flex;
  flex-direction: row-reverse; /* عکس راست، متن چپ */
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  position: relative;
  z-index: 2;
}
.slide-image { flex: 1; max-width: 50%; }
.slide-image img { width: 100%; height: auto; display: block; border-radius: 10px; }
.slide-text {
  flex: 1;
  padding-right: 40px;
  padding-left: 40px;
  text-align: right;
}

img[src="images/slide2.png"] {
    max-height: 80vh;
    object-fit: contain;
}

img[src="images/slide3.png"] {
    margin-top: 50px;
}

.slide-text h1 { font-size: 3rem; margin: 0 0 16px; line-height: 1.2; }
.slide-text p { font-size: 1.2rem; margin-bottom: 24px; opacity: 0.9; }
.slide-text .btn { font-size: 1.1rem; padding: 12px 24px; }

.slider-navigation {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 3;
}
.prev-slide, .next-slide {
  background: rgba(255,255,255,0.7); color: #333; border: none; border-radius: 50%;
  width: 40px; height: 40px; font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
}
.prev-slide:hover, .next-slide:hover { background: rgba(255,255,255,1); }
.slide-indicators { display: flex; gap: 8px; }
.indicator {
  width: 12px; height: 12px; background-color: rgba(255,255,255,0.5);
  border-radius: 50%; cursor: pointer; transition: background-color 0.3s ease;
}
.indicator.active { background-color: #ffffff; }

/* گزارش محصولات */
.section-title {
  font-size: 1.75rem;
  margin: 40px 0 24px;
  text-align: right;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.product-card {
  background: var(--card);
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.img-wrap {
  height: 180px; background: #f0f0f0; display: grid; place-items: center;
  border-radius: 8px; overflow: hidden;
}
.img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-title { font-size: 1.15rem; margin: 10px 0 6px; text-align: right; }
.product-desc { color: var(--muted); font-size: 1rem; margin-bottom: auto; }
.price-row { flex-direction: row; display: flex; justify-content: flex-end; margin-top: 10px; }
.price { font-weight: 700; }

/* --- فوتر --- */
.site-footer {
  background: #111; /* پس‌زمینه تیره */
  color: #ddd; /* رنگ متن روشن */
  padding-top: 40px; /* فضای بالا */
  font-family: 'Vazirmatn', sans-serif; /* فونت */
}
.site-footer .container { /* برای محتوای داخل فوتر */
    display: flex; /* استفاده از فلکس باکس برای چیدمان */
    flex-wrap: wrap; /* اجازه به رفتن آیتم‌ها به خط بعد در صورت کمبود جا */
    justify-content: space-between; /* فاصله بین دو قسمت */
    align-items: flex-start; /* هم‌ترازی از بالا */
    gap: 30px; /* فاصله بین آیتم‌ها */
    padding-bottom: 20px; /* فضای پایین */
}

.footer-section {
  flex: 1; /* هر قسمت سعی می‌کنه فضای مساوی بگیره */
  min-width: 250px; /* حداقل عرض برای جلوگیری از کوچک شدن زیاد */
  padding: 0 15px; /* کمی padding داخلی */
}

.footer-right {
  display: flex;
  flex-direction: column; /* آیتم‌ها زیر هم */
  align-items: flex-start; /* چسبیده به راست */
}
.footer-logo img {
  height: 100px; /* اندازه لوگو در فوتر */
  margin-bottom: 0px;
}
.company-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 0 10px 0;
  color: #ffffff;
}
.about-company {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #bbb;
  max-width: 400px; /* محدود کردن عرض متن */
}

/* خط جداکننده بصری */
.footer-separator {
  width: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  height: 150px; /* ارتفاع خط */
  margin: 0 20px; /* فاصله از اطراف */
}

.footer-left {
  display: flex;
  flex-direction: column; /* آیتم‌ها زیر هم */
  align-items: flex-start; /* چسبیده به راست */
}
.footer-left .section-title { /* عنوان "راه‌های ارتباطی" */
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0 0 20px 0;
  color: #ffffff;
  position: relative; /* برای خط زیر عنوان */
  padding-bottom: 10px; /* فاصله از خط */
}
.footer-left .section-title::after { /* خط راست بالای عنوان */
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 50px; /* طول خط */
  height: 2px;
  background-color: var(--primary); /* رنگ خط */
  border-radius: 2px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.contact-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px; /* فاصله آیکون و متن */
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #bbb;
}
.contact-item i { /* استایل آیکون‌ها (نیاز به Font Awesome یا مشابه) */
  font-size: 1.2rem;
  color: var(--primary);
  width: 25px; /* عرض ثابت برای هم‌ترازی */
  text-align: center;
}
.contact-item span {
  flex-grow: 1; /* متن اطلاعات تماس فضا را پر کند */
}

.social-icons {
  display: flex;
  flex-wrap: wrap; /* اجازه به رفتن به خط بعد */
  gap: 15px; /* فاصله بین آیکون‌ها */
  margin-top: 20px; /* فاصله از بالای لیست تماس */
}
.social-icons a {
  color: #ddd;
  font-size: 1.6rem; /* اندازه آیکون‌ها */
  transition: color 0.3s ease;
}
.social-icons a:hover {
  color: var(--primary); /* تغییر رنگ در هاور */
}

/* کپی رایت */
.copyright {
  background-color: #0a0a0a; /* کمی تیره‌تر از فوتر اصلی */
  text-align: center;
  padding: 15px 0;
  font-size: 0.85rem;
  color: #888;
  width: 100%; /* عرض کامل */
  margin-top: 40px; /* فاصله از بخش اصلی فوتر */
}

/* --- مدیا کوئری برای موبایل --- */
@media (max-width: 700px) { /* نقطه شکست برای تبلت و موبایل */
  .site-footer .container {
    flex-direction: column; /* آیتم‌ها زیر هم قرار می‌گیرند */
    align-items: center; /* وسط‌چین شدن */
    text-align: center; /* متن‌ها وسط‌چین */
  }
  .footer-section {
    width: 100%; /* عرض کامل در موبایل */
    text-align: center; /* وسط‌چین کردن همه متن‌ها */
    align-items: center; /* وسط‌چین کردن آیتم‌های فلکس */
  }
  .footer-right, .footer-left {
    align-items: center; /* وسط‌چین کردن محتوای هر بخش */
  }
  .footer-separator {
    display: none; /* حذف خط جداکننده در موبایل */
  }
  .footer-left .section-title::after {
    /* خط عنوان در موبایل وسط‌چین شود */
    right: 50%;
    transform: translateX(50%);
  }
  .contact-item {
    justify-content: center; /* وسط‌چین کردن آیکون و متن */
  }
  .social-icons {
    justify-content: center; /* وسط‌چین کردن آیکون‌های اجتماعی */
  }
  .about-company {
    max-width: none; /* حذف محدودیت عرض متن */
  }
}


/* --- مدیا کوئری‌ها --- */

/* قوانین کلی برای همه اندازه‌ها */
@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .container { width: min(950px, 92%); }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .main-nav ul { gap: 25px; }
}

/* قوانین مخصوص موبایل (کوچکتر از 700px) */
@media (max-width: 700px) {
  /* --- هدر موبایل --- */
  .header-inner { display: none; } /* هدر دسکتاپ پنهان */
  .mobile-header-content { display: flex; } /* هدر موبایل نمایش */
  .hide-on-mobile { display: none; } /* دکمه تماس پنهان */

  /* --- بقیه تنظیمات موبایل --- */
  .hero { padding: 0px 0; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .product-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.5rem; text-align: center; }
  .product-title, .product-desc { text-align: center; }
  .price-row { justify-content: center; }
  .hist { padding: 10% ;}
  .slide-content { flex-direction: column; }
  .slide-image { min-width: 80%;}
}

/* قوانین مخصوص دسکتاپ/تبلت (بزرگتر از 700px) */
@media (min-width: 701px) {
  .mobile-header-content { display: none; } /* هدر موبایل پنهان */
  .header-inner { display: flex; } /* هدر دسکتاپ نمایش */
  .hide-on-mobile { display: block; } /* دکمه تماس نمایش */

}

@media (max-width: 400px) {
  .header-inner { padding: 10px 10px; }
  .main-nav ul { gap: 10px; }
  .hero h1 { font-size: 1.8rem; }
  .btn { padding: 8px 12px; }
  .mobile-header-content .mobile-logo-container img { height: 60px; }
}

/* TYPO/RTL helpers */
[dir="rtl"] { direction: rtl; }
