:root {
    --h-color: rgb(255, 255, 255);
    --color-p: rgb(142,143,149);
    --color-text-and-btn: rgb(10, 145, 255);
    --color-bold: rgb(78, 79, 235);
    --background-color-hover: rgb(0, 86, 179);
    --h2-size-text: 30px;
    --color-relax:rgb(213, 241, 255);
    --color-back-box: rgb(81, 81, 81);
    --border-radius: 8px;
    --font-size-mobile: 18px;
    --font-size-text: 16px;
    --padding-usually-left: 30px;
    --padding-usually-top: 15px;
    --padding-50px: 50px;
    --margin-50px: 50px;
}

* {
    box-sizing: border-box;  
}




@font-face {  
    font-family: vazir;  
    font-style: normal;  
    font-weight: 100;  
    src: url("../fonts/Vazir-Thin.eot");  
    src: url("../fonts/Vazir-Thin.woff") format("woff"),  
         url("../fonts/Vazir-Thin.ttf") format("truetype"),  
         url("../fonts/Vazir-Thin.woff2") format("woff2");  
}  

@font-face {  
    font-family: vazir;  
    font-style: normal;  
    font-weight: 300;  
    src: url("../fonts/Vazir-Light.eot");  
    src: url("../fonts/Vazir-Light.woff") format("woff"),  
         url("../fonts/Vazir-Light.ttf") format("truetype"),  
         url("../fonts/Vazir-Light.woff2") format("woff2");  
}  

@font-face {  
    font-family: vazir;  
    font-style: normal;  
    font-weight: 400;  
    src: url("../fonts/Vazir-Regular.eot");  
    src: url("../fonts/Vazir-Regular.woff") format("woff"),  
         url("../fonts/Vazir-Regular.ttf") format("truetype"),  
         url("../fonts/Vazir-Regular.woff2") format("woff2");  
}  

@font-face {  
    font-family: vazir;  
    font-style: normal;  
    font-weight: 950;  
    src: url("../fonts/Vazir-Black.eot");  
    src: url("../fonts/Vazir-Black.woff") format("woff"),  
         url("../fonts/Vazir-Black.ttf") format("truetype"),  
         url("../fonts/Vazir-Black.woff2") format("woff2");  
}
body {
    direction: rtl;
    box-sizing: border-box;
    background-color: rgb(34, 37, 41);
    margin: 0px;

}


.News {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: var(--color-bold);
    z-index: 330;
    opacity: 1;
    height: auto; /* ارتفاع اصلی */
    transition: opacity 0.5s ease, transform 0.5s ease, height 0.5s ease;
    transform: translateY(0);
    overflow: hidden; /* برای مخفی کردن محتوا در حالت hidden */
    will-change: opacity, transform, height; /* بهینه‌سازی */
}

.News.hidden {
    opacity: 0;
    height: 0; /* ارتفاع را کاملاً حذف می‌کنیم */
    transform: translateY(-10px); /* حرکت به سمت بالا برای انیمیشن */
    pointer-events: none; /* غیرفعال کردن تعامل */
}
.News h3 {
    color: white;
    font-size: 18px;
}

.News a {
    color: white;
    text-decoration: none;
    margin: 10px;
}

.News p {
    color: white;
}



header {
    display: flex;
    justify-content: end;
}


nav {  
    display: flex;  
    justify-content: space-between;  
    flex-direction: row-reverse;  
    align-items: center;  
    position: fixed;  
    width: 100%;   
    z-index: 10000;   
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: var(--padding-50px);
    padding-left: var(--padding-50px);

}






.a_link_header {
    text-decoration: none;
    color: var(--color-p);
}
.moon_sun {
    cursor: pointer;
    background-color: #fff0;
    border: 0px;

}
#moon_sun {
    border-radius: var(--border-radius);
    border-radius: var(--border-radius);
    border: 3px solid var(--color-relax);
    padding: 3px;

    

}

.menu_toggle {  
    display: none; /* به‌طور پیش‌فرض پنهان است */  
}  

.menu_mobile  {
    display: none;
}


.ul {
    display: flex; 
}



.li_header {
    list-style: none;
    padding: 0px 10px 0px 10px;
    color: var(--color-p);
    font-family: vazir;
    cursor: pointer;
    

}


.li_header:hover {
    background-color: var(--background-color-hover);
    border-radius: var(--border-radius);
    color: white;
}

.img_logo {
    width: 60px;
    cursor: pointer;
}

nav.scrolled {
    backdrop-filter: blur(10px);
}

.section_start {
    align-items: center;
    position: relative;
    gap: 20px;
}

.center_page {
    display: flex;
    justify-content: space-around;
    margin-left: var(--margin-50px);
    margin-right: var(--margin-50px);

}
.position-absolute {
    position: absolute;

}


#move1 {
    top: 50px;
    right: 0px;
    fill: #fd7e14;
}


#move2 {
    bottom: 0px;
    fill: #3f41c8;
    left: 20px;
}

#move3 {
    fill: #abc6f9;
    left: 0;
}

#img_hello {
    margin-bottom: -40px;
    width: 50px;
}

.background_fazel {
    background-image: url(../images/fazel\ web.png);
    height: 574px;
    width: 800px;
    background-size: cover;
    background-position: center;
}


.h1 {
    color: var(--h-color);
    font-size: 45px;
    text-wrap: nowrap;

} 


#space_bottom {
    margin-bottom: 0;
}
#space_top {
    margin-top: 0;
}
.color_blue {
    color: var(--color-text-and-btn);
}

#animation {  
    border-right: 2px solid var(--color-text-and-btn); /* خط مرزی */  
    white-space: nowrap; /* جلوگیری از شکستن خط */  
    overflow: hidden; /* پنهان کردن متن اضافی */  
    width: 0; /* شروع از عرض صفر */  
    animation: typing 3s steps(40, end) forwards, borderRemoval 0.5s 3.5s forwards; /* اعمال انیمیشن‌ها */  
    animation-fill-mode: forwards; /* حفظ حالت نهایی انیمیشن */  
}  


#customer {  
    position: relative;  
    display: inline-block;
    
}  

#customer::after {  
    content: '';  
    position: absolute;  
    left: 0;  
    bottom: 0;  
    height: 2px; /* ضخامت خط */  
    background-color: blue; /* رنگ خط */  
    width: 100%; /* عرض خط */  
    transform: translateX(20%); /* خط را از سمت چپ خارج می‌کند */  
    animation: slide 10s forwards; /* انیمیشن */  
}
.btn { 
    color: rgb(255, 255, 255);  
    box-shadow: 1px 3px 10px var(--color-bold);
    background-color: #007bff; /* رنگ آبی */  
    padding: var(--padding-usually-top) var(--padding-usually-left);  
    border: none;  
    border-radius: 5px;  
    font-size: var(--font-size-text);  
    cursor: pointer; 
    transition: background-color 0.3s ease; 
    margin-left: 30px;
    text-decoration: none;
}  

.btn:hover { 
    box-shadow: none; 
    background-color: var(--background-color-hover); /* رنگ تیره‌تر در حالت هاور */  
} 



.h2_description {
    font-size: var(--h2-size-text);
    color: var(--h-color);
    text-align: center;
}

.border_bottom {
    border-bottom: 2px solid var(--background-color-hover);
}

.about_me_p {
    padding: 20px;
    animation: borderFill 5s ease-in-out forwards;
    border-right: 5px solid blue;
}

.container_text_description {
    display: flex;
}

.li_skill_desgine {
    width: 160px;
    background-color: var(--color-bold);
    margin: 5px;
    text-align: center;
    border-radius: var(--border-radius);
    padding: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    will-change: transform, box-shadow, background-color; 
  }
  
  .li_skill_desgine:hover {
    background-color: var(--color-hover);
    transform: scale(1.05); 
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
  }
  
  .li_skill_desgine::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .li_skill_desgine:hover::after {
    opacity: 1;
  }
  



.skill_box {
    background-color: var(--color-back-box);
    padding: 10px var(--padding-50px) 10px var(--padding-50px);
    border-radius: var(--border-radius);
    border: 2px solid var(--background-color-hover);
}

#skil{
    display: flex;
    flex-direction: column;
    text-align: initial;
    color: var(--h-color);
    padding: 0px;

}



.h3_skill {
    text-align: start;
    font-size: 24px;
}

.li_skill {
    list-style: none;
    font-size: var(--font--text);
    color: var(--color-relax);
}



/* box_service*/
.section_service  {
    flex-direction: column;
}

.container_box {  
    display: grid;  
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));  
    gap: 20px; /* فاصله بین گریدها */  
    padding: 20px;
}





.box_blur {
    display: none;
    align-items: center;
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.096);
    backdrop-filter: blur(5px);
    z-index: 9999;

}

.description_box_service {
    background-color: var(--color-text-and-btn);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    display: none;
    animation: none;
    position: absolute;
    margin: var(--margin-50px);
} 

.close {
    position: absolute;
    right: 10px;
    top: 20px;
    
}


.box_service {  
    background-color: var(--color-back-box);
    padding: 20px;  
    text-decoration: none;
    border-radius: 8px;   
    text-align: center; 
    transition: transform 0.3s;  
    border: 3px solid blue; /* حاشیه اولیه */
    animation: changeBorderColor 5s infinite; /* انیمیشن تغییر رنگ حاشیه */
}  



.box_service:hover {
    animation: none;
    border: 0;
    background-color: var(--background-color-hover);
    

}

.img_services {
    width: 150px;
}



/* 
.container_sample_wrok {
    display: flex;
    flex-wrap: wrap;
} */

.container_sample_wrok {  
    display: grid;  
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));  
    gap: 20px;  
}  

#padding_bottom_service {
    padding-bottom: 150px;
}

.Sample_work {
    background-color: var(--color-back-box);
    border-radius: var(--border-radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.btn_go {
    display: flex;
    justify-content: center;
}

.h3_without_margin {
    margin-top: 10px;
    margin-bottom: 0px;
}

.img_work {
    width: 100%;
    height: 200px;
    box-shadow: 2px 3px 2px 3px var(--color-p);
    border-radius: var(--border-radius);
}





video {
    width: 100%;
    border: 1px solid black;
    border-radius: var(--border-radius);
}

#back_footer {
    background: linear-gradient(to bottom, rgb(0, 0, 0), rgb(30, 30, 100), rgb(0, 42, 143));
    padding-top: var(--padding-50px);
    padding-bottom: 100px;
    
}



#light {
    background-color: var(--background-color-hover);
    border-radius: var(--border-radius);
}

.container_footer {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}


.footer_item {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.icon_conection {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.space_icon {
    padding: 3px;
}

#codepen {
    width: 35px;
}

#karlancerr {
    background-color: var(--color-text-and-btn);
    border-radius: var(--border-radius);
    padding: 5px 10px 5px 10px;
    text-decoration: none;
}

/*  code repeat */
.style_text {
    font-family: vazir;
    font-style: normal;
    text-wrap: wrap;
}


.nowrap_btn {
    text-wrap: nowrap;
}


.p_color_text {
    color: var(--color-p);
    font-size: var(--font-size-text);

}

.section_start {
    align-items: center;
    position: relative;
}

.center_page {
    display: flex;
    justify-content: space-around;
    margin-left: var(--margin-50px);
    margin-right: var(--margin-50px);

}

.color_matter {
    color: var(--color-relax);
}

.color_white {
    color: var(--h-color);
}

.color_footer_white {
    color: rgb(255, 255, 255);
}

.container_btns_start {
    padding-top: var(--padding-50px);
}
.section_description {
    padding-top: 200px;
}

.telegram {
    position: fixed;
    left: 30px;
    bottom: 150px;
    background-color: var(--color-relax);
    border-radius: var(--border-radius);
    z-index: 1000;
}


.li_footer {
    list-style: none;
}
 
.li_footer:hover {
    transform: translate(-20px);
    color: var(--color-relax);
}

.text_align {
    text-align: center;
}

.margin_none {
    margin: 0;
}



/* animation */
@keyframes typing {  
    from {  
        width: 0; /* شروع از عرض صفر */  
    }  
    to {  
        width: 100%; /* پایان با عرض کامل */  
    }  
}  
@keyframes borderRemoval {  
    from {  
        border-right: 2px solid var(--color-text-and-btn); /* حفظ رنگ اصلی */  
    }  
    to {  
        border-right: 2px solid transparent; /* تغییر به شفاف */  
    }  
}  


@keyframes slide {  
    to {  
        transform: translateX(0); /* خط به سمت راست حرکت می‌کند */  
    }  
}  
  
  /* انیمیشن مرز */
  @keyframes borderFill {
    0% {
      border-color: rgba(78, 79, 235, 0); /* شفاف */
    }
    50% {
      border-color: rgba(78, 79, 235, 0.5); /* نیمه شفاف */
    }
    100% {
      border-color: rgba(78, 79, 235, 1); /* پررنگ */
    }
  }

  @keyframes changeBorderColor {
    0% {
        border-color: var(--background-color-hover); /* شروع با رنگ آبی */
    }
    50% {
        border-color: var(--color-relax); /* تغییر به رنگ سفید در وسط انیمیشن */
    }
    100% {
        border-color: var(--background-color-hover); /* بازگشت به رنگ آبی */
    }
}





/* responsive */
@media (max-width: 1024px) {  
    .ul {  
        display: none;  
    }  

    .menu_toggle {
        display: block;
    }
    .menu_mobile {  
        display: none; 
        position: absolute;  
        top: 100%;
        left: 0; 
        width: 100%;
        background-color: var(--color-back-box);; 
        z-index: 1000; 
    }

    .a_link_header:hover {
        color: var(--background-color-hover);
        text-decoration: none;
    }

    .li_header:hover {
        background-color: #fff0;
        border-radius: 0px;
    }
    
    
    .background_fazel {
        background-image: none;

    }

    .description_box_service {
        display: none;
    }




}




@media (max-width: 768px) {  
    
    .img_logo {
        width: 50px;
    }
    .center_page {
        flex-direction: column;
        padding-top: 100px;
    }



    .background_fazel {
        background-image: url(../images/fazel\ web.png);
        background-size: cover;
        margin-top: 70px;
        width: 450px;
    }

    #img_hello {
        display: none;
    }

    .container_btns_start {
        display: flex;
        justify-content: center;    
    }

    .my_profile {
        text-align: center;
        
    }

    .h1 {
        font-size: var(--h2-size-text);
    }

    .position-absolute {
        display: none;
    }

    .btn {
        margin: 0;
    }

    .telegram {  
        display: block; 
        bottom: 50px;
        left: 15px;  
    }  


    .h2_description {
        font-size: 24px;
    }

    .h3_skill {
        font-size: var(--font-size-text);
    }

    .font_responsive_box_service {
        font-size: var(--font-size-text);
    }

    .box_service {
        width: 100%;
    }

    .description_box_service {
        display: none;
        width: 100%;
        margin: 0;
    }
    
    .container_sample_wrok {  
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); /* یا minmax(300px, 1fr) برای حداقل 300 پیکسل */  
    }  

    .container_box {  
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));  
    }  

    .container_text_description {
        flex-direction: column;
    }
    #p_text_news {
        display: none;
      }


}  






@media (max-width: 480px) {
    .background_fazel {
        background-image: url(../images/fazel\ web.png);
        background-repeat: no-repeat;
        background-size: contain;
        width: 350px;
    }

    .container_btns_start {
        display: flex;
        justify-content: space-around;
    }

    .description_box_service {
        display: none;
        top: 10%;
    }


    .li_skill_desgine {
        transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; /* کوتاه‌تر کردن زمان انیمیشن در صفحات کوچک‌تر */
      }
    
      .li_skill_desgine:hover {
        transform: scale(1.03); /* کاهش مقیاس به 1.03 برای کاهش فشار روی پردازشگر */
        box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15); /* سایه کمتر برای صفحات کوچک‌تر */
      }

      #p_text_news {
        display: none;
      }


}

/* scroll with library */

/* برای وب‌سایت‌های Chrome, Safari و Edge */  
::-webkit-scrollbar {  
    width: 10px; /* عرض نوار اسکرول */  
}  

::-webkit-scrollbar-track {  
    background: rgb(255, 255, 255); /* رنگ پس‌زمینه */  
}  

::-webkit-scrollbar-thumb {  
    background: var(--color-bold); /* رنگ نوار اسکرول */  
    border-radius: 10px; /* گرد کردن لبه‌ها */  
}  

::-webkit-scrollbar-thumb:hover {  
    background: var(--background-color-hover); /* رنگ نوار اسکرول هنگام هاور */  
}

