#hero-image {
    object-position: 50% 70%;
}

#hero-title {
    bottom: 0;
    left: 0;
    width: 45%;
}

#ai-separator {
    bottom: 0;
    left: 0;
    transform: translate(-35%, 50%);
}

#ai-section {
    position: relative;
    height: fit-content;
    width: 100%;
}

#ai-section>picture>img {
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
}

.info-circle {
    aspect-ratio: 1 / 1;
    width: 30%;
    padding: 3em;
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    word-break: keep-all;
    background-color: rgba(255, 255, 255, .8);
    border-radius: 50%;
}

#services {
    width: 100%;
}

.service {
    opacity: 0;
    transition: opacity .3s;
}

.service-text {
    font-size: .8em;
    font-weight: 600;
    cursor: pointer;
    transition: fill .3s;
}

.service-text:hover {
    fill: var(--secondary);
}

a.hovered+.service {
    opacity: 1;
}

#services-list {
    list-style: none;
    display: none;
    padding-left: 0;
    flex-direction: column;
    gap: 16px;
}

#services-list>li>a {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 1px 1px 7px 2px var(--shadow);
}

#services-list .service-text {
    font-size: 1em;
    color: var(--primary);
}

#services-list .service {
    opacity: 1;
    width: 64px;
}

#portal-images {
    position: relative;
    aspect-ratio: 158 / 99;
    height: 100%;
}

#portal-circle {
    top: 10%;
    left: 15%;
    transform: translate(-50%, -50%);
}

#portal-section {
    margin-top: 64px;
    display: grid;
    gap: 32px;
    justify-content: center;
    grid-template-columns: 1fr 1fr;
}

#portal-section p {
    margin: 0;
}

#portal-laptop {
    position: absolute;
}

#portal-phone {
    width: 35%;
    position: absolute;
    top: 40%;
}

#portal-apps {
    position: absolute;
    right: 15%;
    bottom: 0;
    width: 40%;
    min-width: 250px;
}

#portal-apps>a {
    transition: transform .1s;
}

#portal-apps img {
    filter: drop-shadow(0px 7px 4px var(--shadow));
}

#portal-apps>*:hover {
    transform: scale(1.04);
}

.btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px 8px;
    margin-bottom: 16px;
}

.btns>.btn {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#news {
    padding: 32px;
}

#latest-news {
    max-width: 1300px;
    padding: 32px 0;
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: minmax(auto, 240px) 1fr;
    column-gap: 24px;
    row-gap: 8px;
}

.news {
    display: contents;
}

.news-image {
    overflow: hidden;
    border-radius: 4px;
}

.news-image {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.news-image::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .25) 25%, transparent);
    background-size: 100% 200%;
    background-position-y: 100%;
    transition: background-position-y .5s;
    z-index: 10;
}

.news-image>img {
    min-height: 100%;
    transition: scale .5s;
}

.news:hover>.news-image>img {
    scale: 1.1;
}

.news:hover>.news-image::before {
    background-position-y: 0;
}

.news>.column {
    gap: 8px;
}

.news p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-overflow: ellipsis;
    overflow: hidden;
}

#get-in-touch {
    overflow: initial;
}

@media only screen and (max-width: 1400px) {
    #ai-section {
        display: none;
    }
}

@media only screen and (max-width: 1300px) {
    #portal-section {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

    #latest-news {
        grid-template-columns: 1fr 2fr;
        grid-template-rows: unset;
        grid-auto-rows: 240px;
        grid-auto-flow: row;
    }
}

@media only screen and (max-width: 1200px) {
    picture:has(#hero-image)::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .15), rgba(0, 0, 0, .10));
    }
}

@media only screen and (max-width: 1150px) {
    #hero-title {
        box-sizing: content-box;
        width: 50%;
    }
}

@media only screen and (max-width: 815px) {
    #services {
        display: none;
    }

    #services-list {
        display: flex;
    }

    #latest-news {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 32px;
    }

    .news p {
        margin: 0;
    }

    .news {
        display: flex;
        flex-direction: column;
        gap: 16px;
        text-decoration: none;
    }
}

@media only screen and (max-width: 768px) {
    #hero-title {
        top: 128px;
        width: auto;
    }

    picture:has(#hero-image)::after {
        background: linear-gradient(to bottom, rgba(0, 0, 0, .30), rgba(0, 0, 0, .10));
    }
}

@media only screen and (max-width: 650px) {
    div:has(>#portal-images) {
        display: none;
    }

    #portal-section {
        margin: 0;
        grid-template-rows: 1fr;
    }


    #monitoring-section>div>h2,
    #monitoring-section>div>p,
    #services-section h2,
    #services-section p {
        text-align: unset;
    }
}
