/* حذف مارجین و پدینگ پیش‌فرض */
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;
}

/* بخش منو */
.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;
}

/* باکس‌ها و متن */
.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 تا در هر ردیف */
  }
}

.box5, .box6, .box7, .box8, .box-8, .box9, .box10 {
    width: 200px;
    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;
    margin:.5rem  1rem 1rem;
}

.box5 span, .box6 span, .box7 span, .box8 span,.box-8 span, .box9 span, .box10 span {
    font-size: 16px;
    margin-top: 8px;
    color: #333;
}

/* بخش اصلی محتوا */
.main {
    width: 85%;
    max-width: 1200px;
    margin: auto;
    padding: 5rem;
    background-color: #ecf0f1;
    border-radius: 5rem;
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 0.8rem;
}

/* تصویر */
.image {
    width: 100%;
    height: auto;
    /* transition: transform 0.3s ease; */
    margin: auto;
    margin-top: 4rem;
    max-width: 100%;
    border-radius: 10px; /* اختیاری برای زیبایی */
}

.image:hover {
    transform: scale(.75);
}

/* متن‌ها */
.text-h1 h1 {
    font-size: 2rem;
    color: #211786;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
}

.text p {
    line-height: 2.6;
    margin-bottom: 1rem;
}

.title {
    color: #211786;
    font-weight: bold;
    line-height: 2.6;
    position: relative;
    align-items: flex-start;
    margin-top: 3rem;
    font-size: large;
}

.paragraph p {
    color: #211786;
    font-weight: bold;
    line-height: 2.6;
    position: relative;
    margin-top: 4rem;
}

.number1 { color:#4b7bec; }
.number2 { color: #fa8231; }
.number3 { color: #20bf6b; }

.call-ferst { color: #211786; }
.call a {
    color: #211786;
    text-decoration: none;
}

.main li {
    list-style: none;
}

/* فوتر */
.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;
}

/* ======================= R E S P O N S I V E ======================= */
@media (max-width: 768px) {

    /* لوگو */
    .logo-section img {
        max-width: 250px;
    }

    /* منو موبایل */
    .menu-section .menu {
        display: none;
        flex-direction: column;
        gap: 10px;
    }
    .menu-section .menu.show {
        display: flex;
    }
    .menu-toggle {
        display: flex;
    }
    .menu-section .menu li a {
        margin-right: 0;
    }

    /* باکس‌ها موبایل */
/* حالت ریسپانسیو برای موبایل */
@media (max-width: 576px) {
  .image img {
    max-width: 90%;   /* کوچیک‌تر از عرض صفحه */
    height: auto;     /* حفظ تناسب تصویر */
    display: block;
    margin: 0 auto;   /* وسط‌چین در موبایل */
  }
}
    .box, .box-main2 {
        flex-wrap: wrap;
        justify-content: center;
    }
    .box > div, .box-main2 > div {
        width: 90%;
        max-width: 250px;
        margin-bottom: 20px;
    }

    /* بخش اصلی */
    .main {
        padding: 2rem;
    }

    /* فوتر موبایل */
    .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;
    }

    /* منو کرکره موبایل */
    .menu li .dropdown-menu {
        position: static;
        box-shadow: none;
        min-width: unset;
    }
}
