/* حذف مارجین و پدینگ پیش‌فرض */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    background-color: #0c2461;
}

/* بخش لوگو وسط صفحه */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 21.5vh;
}

.logo-section img {
    max-width: 900px;
    width: 100%;
    height: auto;
}
/* ============= DROPDOWN MENU ============= */
.menu li {
  position: relative;
}

.menu li .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0; /* راست چین */
  background-color: #ecf0f1;
  min-width: 220px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  z-index: 999;
  text-align: right; /* متن راست‌چین */
}

.menu li .dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  color: #333;
  font-weight: normal;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  text-align: right; /* لینک راست‌چین */
}

.menu li .dropdown-menu li a:hover {
  background-color: #007bff;
  color: #fff;
}

/* نمایش کرکره وقتی ماوس روی منو بره */
.menu li.dropdown:hover .dropdown-menu {
  display: block;
}

/* ریسپانسیو: در موبایل منوی کرکره عمودی بشه */
@media (max-width: 768px) {
  .menu li .dropdown-menu {
    position: static;
    box-shadow: none;
    min-width: unset;
  }
}


/* بخش منو */
.menu-section {
    background-color: #ecf0f1;
    padding: 15px 0;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-section .menu {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    gap: 25px;
}

.menu-section .menu li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 12px;
    transition: color 0.3s;
    margin-right: 1.5rem;
}

.menu-section .menu li a:hover {
    color: #007bff;
}

/* دکمه همبرگری */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
}

/* موبایل منو */
@media (max-width: 768px) {
    .menu-section .menu {
        display: none;
        flex-direction: column;
        gap: 10px;
    }
    .menu-section .menu.show {
        display: flex;
    }
    .menu-toggle {
        display: flex;
    }
}

/* کانتینر */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

/* سکشن تبلیغ */
.promo-section {
    padding: 50px 0;
    background-color: #f9f9f9;
}

/* محتوا: دوتا ستون */
.promo-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;

}

.promo-text {
    flex:1;
    justify-items: right;
    font-size:.55rem;
    color: #211786;
    align-items: center;
    align-content: center;
    line-height: 2.5rem;
    margin: auto 0;

}

/* کانتینر عکس */
.promo-image {
    flex: 1;
    display: block;
    text-align: center;
    margin: 0 auto;      /* وسط‌چین کردن تصویر */
    max-width: 100%;     /* هیچ وقت از container بزرگتر نشود */
    width: 100%;         /* تمام عرض در دسترس */
    height: auto;        /* حفظ نسبت تصویر */
    overflow: hidden;    /* جلوگیری از بیرون زدن تصویر */
    transform: none;     /* حذف translateX یا translateY */
}

/* خود تصویر */
.promo-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
}

/* ریسپانسیو برای تبلت */
@media (max-width: 992px) {

    .promo-image {
        width: 95%;
    }
    .promo-image img {
        width: 100%;
        height: auto;
    }
    .promo-content{
        display: block;
        margin: auto 0;
        line-height: 1rem;
        margin: 0 .5rem 0 .5rem;
    }

}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .body{
        width: 95%;
        max-width: 100;
        margin: auto 0;
        transform: none;
    }
    .promo-image {
        width: 100%;
        padding: 0 10px;   /* کمی فاصله از لبه موبایل */
    }
    .promo-image img {
        width: 100%;
        height: auto;
    }
}




/* دکمه‌ها */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.cta-btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: 2px solid #007bff;
    color: #007bff;
    background-color: #f0f0f0;
}

.cta-btn:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateY(-2px);
}

/* ریسپانسیو موبایل دکمه‌ها */
@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 80%;
    }
}

/* متن باکس‌ها */
.box-text, .box-text2{
    justify-items: right;
    font-size: 175%;
    font-weight: 500;
    color: #211786;
}

/* باکس‌ها */
.box ,.box-main2{
    display: flex;
    justify-content: right;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.box-main2 {
  display: flex;
  flex-wrap: wrap;       /* اجازه میده در موبایل به خط بعدی بره */
  gap: 20px;
  justify-content: center; /* وسط چین شدن کل باکس‌ها */
  padding-bottom: 10px;
  overflow-x: visible;     /* اسکرول افقی برداشته شد */
}

.box-main2 a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex: 1 1 calc(20% - 20px); /* هر باکس تقریبا 20% عرض، 5 تا کنار هم */
}

.box-main2 .box5,
.box-main2 .box6,
.box-main2 .box7,
.box-main2 .box-8,
.box-main2 .box9 {
  width: 100%;              /* باکس پرکننده لینک */
  padding: 25px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background-color: #ecf0f1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

/* هاور */
.box-main2 a:hover .box5,
.box-main2 a:hover .box6,
.box-main2 a:hover .box7,
.box-main2 a:hover .box-8,
.box-main2 a:hover .box9 {
  transform: translateY(-5px);
  border-color: #007bff;
}

/* ریسپانسیو موبایل */
@media (max-width: 1200px) {
  .box-main2 a {
    flex: 1 1 calc(33.33% - 20px); /* 3 تا در هر ردیف */
  }
}

@media (max-width: 768px) {
  .box-main2 a {
    flex: 1 1 calc(50% - 20px); /* 2 تا در هر ردیف */
  }
}

@media (max-width: 480px) {
  .box-main2 a {
    flex: 1 1 100%; /* 1 تا در هر ردیف */
  }
}


.box2, .box3, .box4, .box5, .box6, .box7, .box-8 , .box9, .box10 {
    width: 300px;
    height: auto;
    padding: 25px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background-color: #ecf0f1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease;
}

.box2 span, .box3 span, .box4 span, .box5 span, .box6 span, .box7 span, .box-8 span , .box9 span, .box10 span {
    font-size: 16px;
    margin-top: 8px;
    color: #333;
}
.khadamat-flex ,.box8 li  a{
    text-decoration: none;
    list-style: none;
    list-style-type: none;
}

/* تصاویر داخل باکس‌ها */
.image-box2, .image-box3, .image-box4 {
    width: 100%;
    filter: drop-shadow(1px 5px 20px #7f8c8d);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 170px;
    padding: 10px;
    border-radius: 1rem;
    transition: filter 0.3s ease, transform 0.3s ease;
    backdrop-filter: drop-shadow(4px 4px 10px blue);
}

.image-box2 { transform: translateY(-15px); }
.image-box3 { transform: translateY(-30px); }
.image-box4 { transform: translateY(-3px); }

.image-box2:hover, .image-box3:hover, .image-box4:hover {
    filter: blur();
}

/* ریسپانسیو باکس‌ها برای موبایل */
@media (max-width: 768px) {
    .box, .box-main2 {
        flex-wrap: wrap;
        justify-content: center;


    }

    .box-text ,.box-text2{
        margin: 0 .5rem 0 .5rem;
    }

    .box > div, .box-main2 > div {
        margin-bottom: 20px;
    }
}

.box-text3 {
  display: block;
  text-align: center;
  margin: 0 auto;
  width: 90%;
  font-size: 2rem;
  font-weight: 400;
  color: #211786;
  margin-top: 5rem;
}

/* بخش خدمات */
.khadamat-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  width: 90%;
  margin: 0 auto 3rem auto; /* وسط چین کامل */
}

/* باکس‌ها */
.box8 {
  flex: 0 0 calc(16.66% - 20px);
  height: 180px;
  background-color: #ecf0f1;
  color: #211786;
  padding: 10px;
  border-radius: 0.78rem;
  text-align: center;
  box-sizing: border-box;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.box8:hover {
  transform: translateY(-5px);
}

/* 📱 برای تبلت‌ها (زیر 992px) */
@media (max-width: 992px) {
  .box8 {
    flex: 0 0 calc(25% - 20px); /* ۴ تا در هر ردیف */
  }
}

/* 📱 برای موبایل متوسط (زیر 768px) */
@media (max-width: 768px) {
  .khadamat-flex {
    width: 95%;
    gap: 25px;
  }
  .box8 {
    flex: 0 0 calc(45% - 20px); /* ۲ تا در هر ردیف */
    height: 150px;
    font-size: 15px;
  }
  .box-text3 {
    font-size: 1.5rem;
    margin-top: 3rem;
  }
}

/* 📱 برای موبایل کوچک (زیر 480px) */
@media (max-width: 480px) {
  .box8 {
    flex: 0 0 100%; /* یکی در هر ردیف */
    height: auto;
    padding: 15px;
  }
  .khadamat-flex {
    width: 100%;
    margin-right: 0;
    gap: 15px;
  }
  .box-text3 {
    font-size: 1.3rem;
    margin-top: 2rem;
  }
}




/* فوتر */
.site-footer {
    background-color: #ecf0f1;
    color: #211786;
    padding: 20px 10px;
    text-align: center;
}

/* لوگو داخل فوتر */
.site-footer .logo-section img {
    max-width: 200px; /* کوچک‌تر برای جمع و جور شدن فوتر */
    margin-bottom: 15px;
}

/* شبکه‌های اجتماعی */
.site-footer .social-links {
    display: flex;
    justify-content: center; /* وسط چین شدن روی موبایل */
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .social-links li a {
    color: #007bff; /* رنگ مناسب */
    font-size: 28px;
    transition: color 0.3s;
}

.site-footer .social-links li a:hover {
    color: #0056b3;
}

/* ریسپانسیو موبایل فوتر */
@media (max-width: 768px) {

    .site-footer {
        padding: 15px 10px;
        text-align: center;
    }

    .site-footer .logo-section {
        justify-content: center;
        margin-bottom: 10px;
    }

    .site-footer .social-links {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
}

/* جلوگیری از اسکرول افقی و بیرون زدن محتوا */
html, body {
  width: 100%;
  overflow-x: hidden;
}

/* اطمینان از اینکه همه بخش‌ها تمام عرض را پر می‌کنند */
.container,
.promo-section,
.menu-section,
.khadamat-flex,
.box-main2 {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* اصلاح khadamat-flex که باعث بیرون زدن می‌شد */
.khadamat-flex {
  margin-right: 0;
  padding: 0 10px; /* کمی فاصله از لبه‌ها برای زیبایی */
  width: 100%;
}
