.html{
    scroll-behavior: smooth;
  
  }
  @font-face {
      font-family: "vazir";
      src: url(../Fonts/Vazir.eot),
      url(../Fonts/Vazir.ttf),
      url(../Fonts/Vazir.woff),
      url(../Fonts/Vazir.woff2);
    }
    
    @font-face {
      font-family: "shabnam";
      src: url(../Fonts/Shabnam-Bold.eot),
      url(../Fonts/Shabnam-Bold.ttf),
      url(../Fonts/Shabnam-Bold.woff),
      url(../Fonts/Shabnam-Bold.woff2);
    }
    @font-face {
      font-family: "modam";
      font-weight: bold;
      src: url(../Fonts/Modam-Medium.eot),
      url(../Fonts/Modam-Medium.svg),
      url(../Fonts/Modam-Medium.ttf),
      url(../Fonts/Modam-Medium.woff),
      url(../Fonts/Modam-Medium.woff);
    }
    @font-face {
      font-family: "b_modam";
      font-weight: bold;
      src: url(../Fonts/Modam-ExtraBold.eot),
      url(../Fonts/Modam-ExtraBold.svg),
      url(../Fonts/Modam-ExtraBold.ttf),
      url(../Fonts/Modam-ExtraBold.woff),
      url(../Fonts/Modam-ExtraBold.woff2);
    }
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }
  
  body {
      background-color: #C0C0C0;
      overflow-x: hidden;
  }
  .first_page{
      text-align: center;
      margin-top: 2%;
  }
  .first_page h1{
      font-family: "b_modam";
  }
  .first_page p{
    font-family: "shabnam";
    margin-top: 1%;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }
  .span_bold{
    font-size: 1.5rem;
    color: rgb(169, 19, 19);
  }
  #error_message_pro {
      display: none;
      margin-top: 2%;
  font-family: "shabnam";
  text-align: center;
    color: #721c24;
    background-color: #f8d7da;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 20px;
  }
  
/* content */
.container_services{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 0.5rem;
    margin-top: 3%;
    background-color: #C0C0C0 !important;

}
/* کانتینر کارت‌ها */
#services-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

/* کارت‌ها */
.card_services {
    background-color: #A8A9AD !important;
    border: 1px solid #ddd !important;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1 1 calc(30% - 1rem); /* چهار کارت در ردیف در سایز دسکتاپ */
    max-width: 100%;  
}

/* افکت هاور روی کارت */
.card_services:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* تصویر کارت */
.card-img-top {
    object-fit: contain;
    width: 100%;
    height: 200px;
    margin-top: 3%;
}

/* متن و عنوان کارت */
.card-title {
    font-family: "shabnam";
    font-size: 1.2rem;
    margin: 1rem 0;
    color: #1C1C1C;
    text-align: center;
}

.card-text {
    font-family: "vazir";
    font-size: 0.9rem;
    text-align: justify;
    color: #333;
    margin: 0 1rem 1rem 1rem;
}

/* دکمه کارت */
.btn_ser {
    display: block;
    margin: 1rem auto;
    width: 90%;
    background-color: rgb(169, 19, 19);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    border-radius: 5px;
    font-family: "modam";
    transition: 0.2s ease-in-out;
    text-decoration: none;
}

.btn_ser:hover {
    background-color: rgb(130, 10, 10);
    box-shadow: 2px 3px 10px black;

}

/* دکمه خدمات بیشتر */
.ul_ser{
    margin-right: 2%;
    list-style: decimal;
    font-family: "vazir";
}
.btn_card {
    background-color: rgb(169, 19, 19);
    color: white;
    border: none;
    border-radius: 0px 0px 5px 5px;
    width: 100%;
    height: 50px;
    cursor: pointer;
    font-family: "modam";
    transition:  0.3s ease;
}

.btn_card:hover {
    background-color: rgb(130, 10, 10);
    box-shadow: 2px 3px 10px black;
}

/* content */

  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex; /* برای وسط‌چین کردن */
    align-items: center; /* مرکزیت عمودی */
    justify-content: center; /* مرکزیت افقی */
    backdrop-filter: blur(80px);
    overflow-x: hidden;
    overflow-y: hidden;
  }
  
  .modal-content {
    background-color: #A8A9AD !important;
    border: 1px solid #ddd !important;
    padding: 20px;
    width: 90%;
    max-width: 600px; /* عرض پیش‌فرض برای مدال */
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin: 1% auto 1% auto;
  }
  .modal-image{
    object-fit: contain;
    width: 100%;
    height: 250px;
    mix-blend-mode: multiply;
    margin-top: 5%;
    margin-bottom: 5%;
  }
  .modal-title{
    font-family: "modam";
    margin-top: 10%;
    font-size: 1.3rem;
  }
  .modal-description{
    text-align: justify;
    font-family: "shabnam";
  }
  .modal-features{
    font-family: "vazir";
    list-style: none;
    text-align: center;
  }
  .modal-features li{
    padding-top: 3%;

  }
  .btn_buy{
    background-color: rgb(169, 19, 19);
    text-align: center;
    color: white;
    border-radius: 30px;
    transition:  0.3s ease;
    text-decoration: none;
  }
  .btn_buy p{
    padding-top: 3%;
    font-family: "modam";
    font-size: 1.2rem;

  }
  .btn_buy:hover{
    background-color: rgb(130, 10, 10);
    box-shadow: 2px 3px 10px black;
  }
  .modal-content.active {
    transform: scale(1);
    opacity: 1;
  }
  
  .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 40px;
    cursor: pointer;
  }
  
  /* گام ۱: عرض کمتر از 768px */
  @media (max-width: 768px) {
    .modal-content {
      max-width: 500px;
      padding: 15px;
    }
    .modal-title{
      margin-top: 8%;
    }
    .card_services{
        flex: 1 1 calc(50% - 1rem); /* دو کارت در هر ردیف در تبلت */
    }
  }
  
  /* گام ۲: عرض کمتر از 600px */
  @media (max-width: 600px) {
    .modal-content {
      max-width: 400px;
      padding: 15px;
      margin-top: 5%;

    }
    .modal-title{
      margin-top: 11%;
    }
    .btn_buy p{
      padding-top: 4%;
    }
  }
  @media (max-width: 550px) {
.btn_buy{
  border-radius: 5px;
}
  }
  /* گام ۳: عرض کمتر از 480px */
  @media (max-width: 480px) {
    .modal-content {
      max-width: 320px;
      padding: 10px;
      margin-top: 7%;

    }
    .modal-title{
      margin-top: 13%;
    }
  }
  
  /* گام ۴: عرض کمتر از 300px */
  @media (max-width: 300px) {
    .modal-content {
      max-width: 280px;
      padding: 8px;
    }
    .modal-title{
      margin-top: 15%;
    }
  }

  @media screen and (max-width: 576px) {
    .card_services {
        flex: 1 1 100% !important; /* دو کارت در هر ردیف در تبلت */
    }
}