/* below 1200px */
@media (max-width: 75em) {
    .header__nav-list {
        gap: 2.4rem;
    }
    .main__heading {
        line-height: 1.3;
    }
}

/* below 912px */
@media (max-width: 57em) {
    html {
        font-size: 56.25%;
    }
    .projects__container {
        justify-content: right;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-color: #ccc transparent;
    }
    span {
        font-size: 1.6rem;
    }
    .header__container {
        padding: 1.2rem 2.4rem;
    }
    .hero__title {
        font-size: 4.8rem;
    }
    .hero__description {
        font-size: 2.4rem;
    }
    .hero__cta:link,
    .hero__cta:visited {
        font-size: 2.4rem;
    }
    
    .hero__container {
        padding: 0 6.4rem;
    }
    .about-us__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-us__text-box {
        align-items: center;
    }
    .features__text-box {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
    .features__icon {
        font-size: 3.6rem;
    }
    .features__description {
        font-size: 1.6rem;
    }
    .packages__container {
        padding: 0 6.4rem;
    }
    .packages__item {
        width: 75%;
    }
    .packages__icon {
        font-size: 3.6rem;
    }
    .packages__name {
        font-size: 2rem;
    }
    .packages__btn:link,
    .packages__btn:visited,
    .packages__cta:link,
    .packages__cta:visited {
        font-size: 2rem;
    }
    .projects__box {
        flex-shrink: 0;
    }
    .projects__img-box{
        height: 50%;
    }
    .projects__title {
        display: block;
        width: 100%;
        font-size: clamp(1.4rem, 2.5vw, 2rem);
        margin-top: 0.8rem;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        padding: 0 0.5rem;
        text-align: center; /* or right, if you're keeping RTL alignment */
        box-sizing: border-box;
        direction: rtl; /* important for Persian text layout */
        hyphens: auto;

    }

    .projects__text-box {
        width: 100%;
        box-sizing: border-box;
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center; /* or flex-start if you want RTL alignment */
    }

    .projects__btn:hover{
        box-shadow: gray 10px 0px 18px;
    }

    .projects__btn:link,
    .projects__btn:visited {
        font-size: 1.6rem;
    }
    .contact-us__container {
        padding: 0;
    }
    .contact-us__icon {
        width: 3.6rem;
    }
    .footer__text {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    .footer__container {
        gap: 4.8rem;
        row-gap: 0;
    }
    .details__heading {
        font-size: 5.2rem;
        padding: 8rem 0;
    }
    .main__container {
        margin: 4.8rem 9.6rem;
        padding: 2.4rem;
    }
    .our-need__description {
        font-size: 2rem;
    }

    /** mobile navigation **/
    .header__btn {
        border: none;
        background: none;
        cursor: pointer;
        display: block;
    }
    .header__icon {
        width: 4.4rem;
        height: 4.4rem;
        color: #2563eb;
    }
    .header__icon[name="close-outline"] {
        display: none;
    }
    .header__nav {
        background-color: rgb(15, 40, 94, 0.5);
        position: absolute;
        top: 0;
        right: 0;
        width: 40%;
        height: 100vh;

        display: flex;
        justify-content: right;
        align-items: start;

        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: all 0.5s ease-in;

        transform: translateX(100%);
        backdrop-filter: blur(10px);
    }
    .header__nav-list {
        flex-direction: column;
        align-items: start;
        gap: 3.2rem;
        margin-top: 35%;
        margin-right: 2.8rem;
    }
    .header__link:link,
    .header__link:visited {
        color: #fff;
    }
    .header__link:link,
    .header__link:visited {
        font-size: 2.4rem;
    }
    .open .header__nav {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
    .open .header__icon[name="close-outline"] {
        display: block;
    }
    .open .header__icon[name="menu-outline"] {
        display: none;
    }
    .open .header__nav {
        transform: translateX(0);
    }
}
/* for contact page */
@media (max-width: 39em) {
    .contact__form-group {
        flex: 1 1 100%;
    }
}
/* below 592px */
@media (max-width: 37em) {

        .details__descriptionn {
        display: block;
        margin: 0 auto 2.4rem auto;
        padding: 0.2rem 1rem;
        white-space: normal;
        width: 75%;       /* اضافه کردن این خط */
        max-width: 320px; /* یا به جای درصد، پیکسل مشخص */
        word-wrap: break-word;
        box-sizing: border-box;
        background-color: #eef4ff;
        border-radius: 1rem;
        color: red;
        font-size: clamp(0.3rem, 2vw, 1.3rem);
        line-height: 1.4;
    }
    
    .about-us__container {
        padding: 0rem 1.6rem;
    }
    .about-us__description {
        font-size: 2rem;
    }

    .projects__title{
        font-size: 10px;
    }

    .details__description-flex .details__text p {
        font-size: clamp(1.6rem, 2vw, 2.5rem) !important;
        line-height: 1.6 !important;
    }
    .details__image img {
        margin-top: 7px;
        max-width: 80px !important;
    }
    html {
        font-size: 40%;
    }
    .header__container {
        padding: 1.2rem 1.6rem;
    }
    .hero__container {
        padding: 0 1.6rem;
    }
    .hero__text-box {
    margin: 8rem auto 0;
    }
    .hero__btn-holder {
        flex-direction: column;
    }
    .features__container {
        padding: 0 1.6rem;
    }
    .features__text-box {
        gap: 2.4rem;
    }
    .packages__container {
        padding: 0 1.6rem;
    }
    .packages__item {
        width: 80%;
    }
    .projects__container {
        padding: 1.6rem;
    }
    .projects__text-box {
        padding: 1rem;
    }
    .projects__title {
        font-size: 2rem;
    }
    .footer {
        padding: 0 1.6rem;
        text-align: center;
    }
    .footer__container {
        display: inline-block;
    }
    .footer__widget {
        margin-bottom: 4.4rem;
    }
    .contact-us__text-box {
        margin-bottom: 4.4rem;
    }
    .footer__widget--col-left {
        text-align: center;
        margin-bottom: 4.4rem;
    }
    .main__heading {
        padding: 8rem 2.4rem 4.8rem;
    }
    .main__container {
        margin: 0 2.4rem 9.6rem;
        padding: 1.4rem;
   
    }
    .main__container--margin-top {
        margin-top: 2.4rem;
    }
    .details__description {
        font-size: 1.8rem;
    }
    .error-message {
        font-size: 1.4rem;
    }
}
