/* Start global rules */
*{
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root{
    --main-color: #2196f3;
    --main-color-alt: #1787e0;
    --main-transition: 0.3s;
    --main-padding-top: 100px;
    --main-padding-bottom: 100px;
    --section-background: #ececec;
    --hover-background: #fafafa;
}
html{
    scroll-behavior: smooth;
}

body{
    font-family: "cairo",sans-serif;
}
ul{
    list-style: none;
    margin: 0;
    padding: 0;
}
a{
    text-decoration: none;
    background-color: transparent;
}
.container{
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
/* Small */
@media(min-width:768px)
{
    .container{
        width: 750px;
    }
}
/* Medium */
@media(min-width:992px)
{
    .container{
        width: 970px;
    }
}
/* large */
@media(min-width:1200px)
{
    .container{
        width: 1170px;
    }
}
.main-heading {
    font-size: 30px;
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid black;
    padding: 10px 20px;
    transition: var(--main-transition);
    margin: auto;
    max-width: fit-content;
    position: relative;
    cursor: default;
    z-index: 1;
    margin-bottom: 80px;
}

.main-heading::before {
    content: '';
    width: 12px;
    height: 12px;
    position: absolute;
    border-radius: 50%;
    background-color: var(--main-color);
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    animation: collision-left 1s linear;
    animation-play-state: paused;
    animation-fill-mode: forwards;
    z-index: -1;
}

.main-heading::after {
    content: '';
    width: 12px;
    height: 12px;
    position: absolute;
    border-radius: 50%;
    background-color: var(--main-color);
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    animation: collision-right 1s linear;
    animation-play-state: paused;
    animation-fill-mode: forwards;
    z-index: -1;
}

@keyframes collision-left {
    0% {
        right: -30px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }
    25% {
        right: 0;
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }
    50%, 100% {
        right: 0;
        width: 51%;
        height: 100%;
        border-radius: 0;
    }
}

@keyframes collision-right {
    0% {
        left: -30px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }
    25% {
        left: 0;
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }
    50%, 100% {
        left: 0;
        width: 51%;
        height: 100%;
        border-radius: 0;
    }
}
.main-heading:hover{
    transition-delay: 0.5s;
    color: white;
    border-color: white;
}
.main-heading:hover::after,
.main-heading:hover::before{
    animation-play-state: running;
    color: white;
    border-color: transparent;
}
.main-heading:not(:hover),
.main-heading:not(:hover)::after,
.main-heading:not(:hover)::before{
    animation: اي-عبط;
}
/* End global rules */
/* Satrt header */
.header{
    background-color: white;
    position: relative;
    box-shadow: 0 0 10px #ddd;
    -webkit-box-shadow: 0 0 10px #ddd;
    -moz-box-shadow: 0 0 10px #ddd;
}
.header .container{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header .container .logo{
    color: var(--main-color);
    font-size: 26px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72px;
}
.header .container .main-menu{
    display: flex;
}
.header .container .main-menu > li > a{
    padding: 0 30px;
    color: black;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--main-transition);
    position: relative;
    height: 72px;
    overflow: hidden;
}
.header .container .main-menu > li > a::before{
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    background-color: var(--main-color);
    width: 100%;
    height: 4px;
    transition: var(--main-transition);
}
.header .container .main-menu > li > a:hover,
.header .container .main-menu > li > a:focus{
    color: var(--main-color-alt);
}
.header .container .main-menu > li > a:hover::before,
.header .container .main-menu > li > a:focus::before{
    left: 0;
}
.header .container .main-menu li .other-menu{
    position: absolute;
    display: flex;
    top: 120%;
    left: 0;
    align-items: center;
    /* justify-content: space-between; */
    gap: 40px;
    width: 100%;
    border-top: 1px solid var(--section-background);
    /* بدل ماعمل calc */
    border-bottom: 3px solid var(--main-color);
    transition: top var(--main-transition), opacity var(--main-transition) ease, visibility 0.3s ease;
    visibility: hidden;
    background-color: white;
    padding: 30px;
    opacity: 0;
    z-index: 1;
}
.header .container .main-menu > li:last-child:hover .other-menu{
    opacity: 1;
    visibility: visible;
    top: 100%;
}
.header .other-menu .links{
    min-width: 250px;
    flex: 1;
}
.header .other-menu .links li a{
    color: var(--main-color);
    display: block;
    font-size: 17px;
    font-weight: bold;
    padding: 15px;
    transition: var(--main-transition);

}
.header .other-menu .links li{
    border-bottom: 1px solid #ddd;
}
.header .other-menu ul li:last-child{
    border-bottom: none;
}
.header .container .main-menu li a:hover{
    background-color: var(--hover-background);
}
.header .other-menu .links li a i{
    margin-right: 10px;
}
@media (max-width: 1200px) {
    .header .other-menu .image{
        display: none;
    }
}
@media (max-width: 767px) {
    .header .container {
        flex-direction: column;
    }
    .header .container .logo {
        width: 100%;
        height: 50px;
    }
    .header .container .main-menu > li > a{
        font-size: 14px;
        height: 40px;
        padding: 10px;
    }
    .header .other-menu .image{
        display: none;
    }
    .header .container .main-menu li .other-menu{
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .header .other-menu ul li:last-child{
        border-bottom: 1px solid #ddd; 
    }
    .header .other-menu ul:last-child li:last-child{
        border-bottom: none; 
    }
    .header .other-menu .links{
        width: 100%;
    }
}
/* End header */
/* Start Landing */
.landing{
    position: relative;
}
.landing::before{
    content: '';
    position: absolute;
    background-color: var(--section-background);
    width: 100%;
    height: 100%;
    top: -40px;
    left: 0;
    transform: skewy(-6deg);
    transform-origin: top left;
    z-index: -2;
}
.landing .container{
    display: flex;
    align-items: center;
    min-height: calc(100vh - 72px);
    overflow: hidden;
}
.landing .text{
    flex: 1;
}
.landing h1{
    font-size: 40px;
    margin: 0;
    letter-spacing: -2px;
}
.landing p{
    font-size: 23px;
    line-height: 1.7;
    margin-top: 5px;
    color: #666;
    max-width: 500px;
}
.landing .image img{
    width: 600px;
    position: relative;
    animation-name: bounce;
    animation-duration: 5s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
@keyframes bounce {
    0%,100%{
       transform: translateY(0);
    }
    50%{
        transform: translateY(10%);
    }
}
.landing a{
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 900;
    transition: var(--main-transition);
}
.landing a i{
    z-index: 1;
    position: relative;
    color: var(--main-color);
    animation-name: down;
    animation-duration: 1.5s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
@keyframes down {
   0%, 10%, 20%, 50%, 80%, 100% {
       top: 0;
    }
    40%, 60% {
    top: -15px;
}
}
@media (max-width: 992px){
    .landing .image{
        display: none;
    }
    .landing .text{
        text-align: center;
    }
    .landing .text h1{
        font-size: 23px;
        letter-spacing: 1px;
    }
    .landing .text p{
        font-size: 18px;
        margin: 10px 0;
    }
}
/* End Landing */
/* Start articles */
.articles{
    padding-top: var(--main-padding-top);
    padding-bottom: var(--main-padding-bottom);
    position: relative;
}
.article .main-heading:hover{
    transition-delay: 0.5s;
    color: white;
    border-color: white;
}
.article .main-heading:hover::after,
.article .main-heading:hover::before{
    animation-play-state: running;
    color: white;
    border-color: transparent;
}
.article .main-heading:not(:hover),
.article .main-heading:not(:hover)::after,
.article .main-heading:not(:hover)::before{
    animation: اي-عبط;
}
.articles .container .parent-block{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
}
.articles img{
    max-width: 100%;
}
.articles .block{
    box-shadow: 0 2px 15px rgb(0 0 0 / 10%);
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    transition: transform var(--main-transition), box-shadow var(--main-transition);
}
.articles .block:nth-child(1):hover,
.articles .block:nth-child(1):focus {
    background-color: #2F2A1E; 
    color: #E2B255; 
}
.articles .block:nth-child(1):hover p,
.articles .block:nth-child(1):focus p {
    color: #A08356; 
}
.articles .block:nth-child(1):hover .more a,
.articles .block:nth-child(1):focus .more a {
    color: #F8D27C; 
}
.articles .block:nth-child(1):hover .more i,
.articles .block:nth-child(1):focus .more i {
    color: #F8D27C; 
}


.articles .block:nth-child(2):hover,
    .articles .block:nth-child(2):focus {
    background-color: #1A282F;
    color: #37B988
}
.articles .block:nth-child(2):hover p,
    .articles .block:nth-child(2):focus p {
    color: #557A8C;
}
.articles .block:nth-child(2):hover .more a,
    .articles .block:nth-child(2):focus .more a {
    color: #6CD2B6;
}
.articles .block:nth-child(2):hover .more i,
    .articles .block:nth-child(2):focus .more i {
    color: #6CD2B6;
}


.articles .block:nth-child(3):hover,
    .articles .block:nth-child(3):focus {
    background-color: #3B454C; /* رمادي داكن من الصخور */
    color: #A7B6BF; /* رمادي فاتح من الضباب */
}
.articles .block:nth-child(3):hover p,
    .articles .block:nth-child(3):focus p {
    color: #7A8D99; /* رمادي متوسط بارد */
}
.articles .block:nth-child(3):hover .more a,
    .articles .block:nth-child(3):focus .more a {
    color: #D3DBDF; /* رمادي فاتح جداً */
}
.articles .block:nth-child(3):hover .more i,
    .articles .block:nth-child(3):focus .more i {
    color: #D3DBDF; /* نفس لون اللينك */
}

.articles .block:nth-child(4):hover,
.articles .block:nth-child(4):focus{
    background-color: #1A0A0A; /* أسود حالك مع مسحة حمراء داكنة جداً */
    color: #C22B2F; /* أحمر دموي ساطع (نص العنوان) */
}
.articles .block:nth-child(4):hover p,
.articles .block:nth-child(4):focus p{
    color: #8C1C1F; /* أحمر داكن أهدى (نص الفقرة) */
}
.articles .block:nth-child(4):hover .more a,
.articles .block:nth-child(4):focus .more a{
    color: #E63D42; /* أحمر أكثر سطوعاً (للرابط) */
}
.articles .block:nth-child(4):hover .more i,
.articles .block:nth-child(4):focus .more i{
    color: #E63D42; /* نفس لون اللينك */
}


.articles .block:nth-child(5):hover,
    .articles .block:nth-child(5):focus {
    background-color: #4A1C14; /* بني محروق / أحمر داكن جداً */
    color: #E05C33; /* برتقالي ناري */
}
.articles .block:nth-child(5):hover p,
    .articles .block:nth-child(5):focus p {
    color: #9E3A24; /* أحمر داكن */
}
.articles .block:nth-child(5):hover .more a,
    .articles .block:nth-child(5):focus .more a {
    color: #F78E4B; /* برتقالي فاتح */
}
.articles .block:nth-child(5):hover .more i,
    .articles .block:nth-child(5):focus .more i {
    color: #F78E4B; /* نفس لون اللينك */
}


.articles .block:nth-child(6):hover,
.articles .block:nth-child(6):focus {
    background-color: #2F3B4A; /* أزرق داكن من الجبال */
    color: #A7CDDB; /* أزرق فاتح ثلجي */
}
.articles .block:nth-child(6):hover p,
.articles .block:nth-child(6):focus p {
    color: #6C8CA3; /* رمادي مزرق متوسط */
}
.articles .block:nth-child(6):hover .more a,
.articles .block:nth-child(6):focus .more a {
    color: #D0E4EC; /* أزرق فاتح جداً */
}
.articles .block:nth-child(6):hover .more i,
.articles .block:nth-child(6):focus .more i {
    color: #D0E4EC; /* نفس لون اللينك */
}


.articles .block:nth-child(7):hover ,
.articles .block:nth-child(7):focus {
    background-color: #4A1E1E; /* أحمر داكن / بني محروق */
    color: #D65A3D; /* برتقالي محروق / أحمر صدأ */
}
.articles .block:nth-child(7):hover p ,
.articles .block:nth-child(7):focus p {
    color: #A34530; /* برتقالي أغمق */
}
.articles .block:nth-child(7):hover .more a ,
.articles .block:nth-child(7):focus .more a {
    color: #F29528; /* برتقالي ناري ساطع */
}
.articles .block:nth-child(7):hover .more i ,
.articles .block:nth-child(7):focus .more i {
    color: #F29528; /* نفس لون اللينك */
}


.articles .block:nth-child(8):hover,
.articles .block:nth-child(8):focus{
    background-color: #26160F; /* بني غامق جداً / أسود محروق */
    color: #E06C2D; /* برتقالي محروق (نص العنوان) */
}
.articles .block:nth-child(8):hover p,
.articles .block:nth-child(8):focus p{
    color: #A34E24; /* برتقالي بني أغمق (نص الفقرة) */
}
.articles .block:nth-child(8):hover .more a,
.articles .block:nth-child(8):focus .more a{
    color: #AAD0DD; /* أزرق فاتح / قمري (للرابط) */
}
.articles .block:nth-child(8):hover .more i,
.articles .block:nth-child(8):focus .more i{
    color: #AAD0DD; /* نفس لون اللينك */
}
/* اتخنقت بعد اول واحدة و خليت جيميني يكمل بنفس النمط */
.articles .block:hover{
    transform: translateY(-10px);
    transform: scale(1.05);
    box-shadow: 0 2px 15px rgb(0 0 0 / 20%);
}
.articles .block .text{
    padding: 20px;
    border-bottom: 1px solid #e6e6e7;
    line-height: 1.5;
}
.articles .block h3{
    margin: 0;
}
.articles .block p{
    margin-top: 10px;
    color: #777;
}
.articles .block .more{
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.articles .block .more a{
    color: var(--main-color);
    font-weight: bold;
}
.articles .block .more i{
    color: var(--main-color);
    font-size: 14px;
}
.articles .block:hover .more i{
    animation: slide-right  .6s infinite linear;
}
@keyframes slide-right{
    0%{
       transform: translateX(-5px);
    }
}
/* End articles */
/* Start Spikes */
.spikes{
    position: relative;
}
.spikes::after{
    content: "";
    position: absolute;
    right: 0;
    width: 100%;
    height: 30px;
    z-index: 1;
    background-image: linear-gradient(135deg, white 25%, transparent 25%), linear-gradient(225deg, white 25%, transparent 25%);
    background-size: 30px 30px;
}
/* End Spikes */
/* Start Gallery */
.gallery{
    padding-top: var(--main-padding-top);
    padding-bottom: var(--main-padding-bottom);
    background-color: var(--section-background);
}
.gallery .container .parent-block{
    display: grid;
    grid-template-columns: repeat(auto-fill , minmax( 300px , 1fr));
    gap: 40px;
}
.gallery .container .parent-block .block{
    padding: 14px;
    background-color: white;
    box-shadow: 0px 12px 20px 0px rgb(0 0 0 / 13%), 0px 2px 4px 0px rgb(0 0 0 / 12%);
    overflow: hidden;
}
.gallery .container .parent-block .block .image{
    overflow: hidden;
    position: relative;
}
.gallery .container .parent-block .block .image::after{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    transition: opacity var(--main-transition) ease, width var(--main-transition) ease, height var(--main-transition) ease;
    background-color: rgb(255 255 255 / 20%);
    opacity: 0;
    width:  0%;
    height: 0%;
}
.gallery .container .parent-block .block .image:hover::after{
    animation: flashing 0.7s;
}
.gallery .container .parent-block .block img{
    max-width: 100%;
    transition: transform var(--main-transition) ease;
    aspect-ratio: 1;
}
.gallery .container .parent-block .block .image:hover img{
    transform: rotate(6deg) scale(1.2);
}
@keyframes flashing{
    0%,40%{
        opacity: 1;
    }
    100%{
        width: 200%;
        height: 200%;
    }
}
/* End gallery*/
/* Satrt Features */
.features{
    padding-top: var(--main-padding-top);
    padding-bottom: var(--main-padding-bottom);
}
.features .container .parent-block{
    display: grid;
    grid-template-columns: repeat(auto-fill , minmax( 350px , 1fr));
    gap: 40px;
}
.features .container .parent-block .block{
    border: 1px solid #ccc;
    text-align: center;
    background-color: white;
}
.features .container .parent-block .block .image{
    position: relative;
    overflow: hidden;
}
.features .container .parent-block .block .image::before{
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 100%;
}
.features .container .parent-block .block .image::after{
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    border-style: solid;
    border-width: 0px 0px 200px 700px;
    border-color: transparent transparent white transparent;
    transition: var(--main-transition);
}
.features .container .parent-block .block:hover .image::after{
    border-width: 0px 700px 300px 0px;
}
.features .container .parent-block .block .image img{
    max-width: 99.5%;
}
.features .container .parent-block .block h2{
    position: relative;
    font-size: 40px;
    margin: auto;
    width: fit-content;
}
.features .container .parent-block .block h2::after{
    content: '';
    position: absolute;
    height: 5px;
    bottom: -20px;
    /* left: 50%;
    transform: translateX(-50%);
    width: 70% ; */
    left: 15px;
    width: calc(100% - 30px);
    /* حاسس طريقته مظبوطة اكتر */
}
.features p{
    line-height: 2;
    font-size: 20px;
    margin: 30px 0;
    padding: 25px;
    color: #777;
}
.features .block a{
    display: block;
    padding: 10px 30px;
    width: fit-content;
    font-size: 22px;
    font-weight: bold;
    border: 3px solid;
    border-radius: 6px;
    transition: var(--main-transition);
    margin: 0 auto 30px;
}
.features .quality .image::before {
  background-color: rgb(244 64 54 / 60%);
}
.features .quality h2::after {
  background-color: #f44036;
}
.features .quality a {
  color: #f44036;
  border-color: #f44036;
  background: linear-gradient(to right, #f44036 50%, white 50%);
  background-size: 200% 98%;
  background-position: right bottom;
}
.features .time .image::before {
  background-color: rgb(0 150 136 / 60%);
}
.features .time h2::after {
  background-color: #009688;
}
.features .time a {
  color: #009688;
  border-color: #009688;
  background: linear-gradient(to right, #009688 50%, white 50%);
  background-size: 200% 98%;
  background-position: right bottom;
}
.features .passion .image::before {
  background-color: rgb(3 169 244 / 60%);
}
.features .passion h2::after {
  background-color: #03a9f4;
}
.features .passion a {
  color: #03a9f4;
  border-color: #03a9f4;
  background: linear-gradient(to right, #03a9f4 50%, white 50%);
  background-size: 200% 98%;
  background-position: right bottom;
}
.features .block:hover a {
  background-position: left bottom;
  color: white;
}
/* End Features */