/* HEADER */
#header{
    /* background: url(../media/homepage/reference/ref1.jpg) no-repeat center center;
    background-size: cover; */
    width: 100%;
    min-height: 40lvh;
    padding-top: var(--navbar-height);

    display: flex;
    justify-content: center;
    align-items: center;
}
#header-container{
    flex-direction: column;
    padding-top: 100px;
    padding-bottom: 0px;
    color: var(--clr-3);

    text-align: center;
}

#header-title{
    font-size: calc(var(--font-size) * 3);
    font-weight: 700;
}

#header-subtitle{
    font-size: calc(var(--font-size) * 1.3);
    font-weight: 500;
    margin: 20px 0;
    max-width: 700px;
    line-height: 2;

}

#header-link{
    padding: 10px;
    margin-top: 10px;

    display: flex;
    justify-content: center;
    align-items: center;
}
#header-link-icon{
    width: 40px;
    filter: brightness(0) saturate(100%) invert(9%) sepia(7%) saturate(2933%) hue-rotate(169deg) brightness(96%) contrast(88%);
}


/* MAIN */
#main{
    width: 100%;
    padding-top: 50px;
    padding-bottom: 100px;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* SERVICES */
#services{
    width: 100%;
    /* padding: 200px 0; */

    display: flex;
    justify-content: center;
    align-items: center;
}
#services-container{
    flex-direction: column;
    max-width: none;
    width: 100%;
}


#services-group{
    width: 100%;
    margin-top: 50px;
    padding: 5px;

    display: grid;
    gap: 5px;
    grid-template-areas: 
    'one two two three four'
    'five six seven seven eight';
    grid-template-columns: repeat(5, 1fr);
}

.services-item{
    position: relative;
    min-height: 300px;
    opacity: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
    }
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
.services-item.animate__fadeIn {
    -webkit-animation: fadeIn .5s linear forwards;
    animation: fadeIn .5s linear forwards;
}


.services-item-img{
    z-index: 0;
    position: absolute;
    object-fit: cover;
    width: 100%;
    height: 100%;
    /* filter: brightness(30%); */
}

.services-item:nth-child(1){grid-area: one;}
.services-item:nth-child(2){grid-area: two;}
.services-item:nth-child(3){grid-area: three;}
.services-item:nth-child(4){grid-area: four;}
.services-item:nth-child(5){grid-area: five;}
.services-item:nth-child(6){grid-area: six;}
.services-item:nth-child(7){grid-area: seven;}
.services-item:nth-child(8){grid-area: eight;}

.services-item-text{
    z-index: 10;
    color: var(--clr-7);
    font-size: calc(var(--font-size) * 1.5);
    font-weight: 700;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    transition: background-color .2s ease, color .2s ease;
    padding: 0 20px;

    display: flex;
    justify-content: center;
    align-items: center;
}
@media (hover: hover) and (pointer: fine) {
    .services-item:hover .services-item-text{
        background-color: rgba(255, 255, 255, 0.9);
        color: var(--clr-3);
    }
}


.services-item-icon{
    visibility: visible;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 20px;
    z-index: 10;
    transition: filter .2s ease;
    filter: invert(1);
}
@media (hover: hover) and (pointer: fine) {
    .services-item:hover .services-item-icon{
        filter: none;

    }
}




@media screen and (max-width: 1300px) {
    #services-group{
        grid-template-areas: 
        'two two seven seven'
        'six three four four'
        'five eight eight one';    
        grid-template-columns: repeat(4, 1fr);

    }
}
@media screen and (max-width: 767px) {
    #services-container{
        padding: 0;
    }    
    #services-group{
        grid-template-areas: 
        'one one'
        'two two'
        'three three'
        'four four'
        'five five'
        'six six'
        'seven seven'
        'eight eight';    
        grid-template-columns: repeat(1, 1fr);

    }
}
