#services {
    display: flex;
    flex-direction: column;
    gap: 0rem;
    color: var(--secondary-colour);
    text-align: justify;
    box-sizing: border-box;
    --border-thickness: 2px;
    flex: 1;
    overflow-y: auto;

    >div {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 0rem;
        overflow: hidden;
        /*background: linear-gradient(to right, var(--secondary-colour) 25%, transparent), var(--bg-image);
		*/
        background-size: cover;
        background-position: center;
        opacity: .5;
        transition: grid-template-columns .3s ease, background .3s ease, opacity .5s ease, gap .3s ease .3s;
        box-sizing: border-box;
        padding-bottom: 1rem;
        flex-shrink: 0;

        >.border.vertical {
            position: absolute;
            top: 2.5rem;
            bottom: 100%;
            width: var(--border-thickness);
            background: var(--secondary-colour);
            height: auto;
            transition: bottom .3s ease-out;
            transition-delay: .3s;

            &.left {
                left: 0;
            }

            &.right {
                right: 0;
            }
        }

        >.border.horizontal {
            position: absolute;
            bottom: 0;
            height: var(--border-thickness);
            background: var(--secondary-colour);
            width: 0%;
            transition: width .3s ease-out;

            &.left {
                left: 0;
            }

            &.right {
                right: 0;
            }
        }

        >p {
            line-height: 0;
            overflow: hidden;
            transition: line-height .3s ease;
            transition-delay: .3s;
            padding: 0 1rem;
        }

        &:hover+hr,
        hr:has(+ &:hover) {
            width: 100%;
        }

        &:hover,
        &.active {
            opacity: 1;

            >h2 {
                font-size: 3.5rem;
                transition-delay: 0s;

                &::after,
                &::before {
                    transition-delay: 0s;
                }
            }
        }

        >div.more {
            font-weight: 600;
            font-size: 1.2rem;
            height: 0rem;
            transition: height .3s ease;
            transition-delay: .3s;

            .contact {
                display: inline-block;
                align-self: center;
                white-space: nowrap;
                width: fit-content;
                background: none;
                border: none;
                text-decoration: underline;
                font-size: 1.4rem;
                height: 100%;
                aspect-ratio: 1;
                background: var(--secondary-colour);
                mask-image: url(/envelope.svg);
                mask-repeat: no-repeat;
                mask-position: center;
                cursor: pointer;
                opacity: .5;

                &:hover {
                    opacity: 1;
                }
            }
        }

        &:hover {
            >h2 {
                gap: 1rem;
                font-size: 2.55rem;

                &::before,
                &::after {
                    width: 10rem;
                    height: var(--border-thickness);
                }
            }
        }

        &.active {
            gap: 1rem;

            >h2 {
                gap: 1.5rem;
                font-size: 3.5rem;

                &::before,
                &::after {
                    width: 50%;
                    height: var(--border-thickness);
                }
            }

            .border.vertical {
                bottom: 0%;
                transition-delay: .3s;
            }

            .border.horizontal {
                width: 50%;
                transition-delay: .6s;
            }

            >div.more {
                height: 2rem;
                transition-delay: .3s;
            }
        }

        >h2 {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 5rem;
            gap: .5rem;

            &::before,
            &::after {
                content: '';
                display: inline-block;
                width: 1rem;
                height: 1px;
                background: var(--secondary-colour);
                transition: width .3s ease, height .3s ease;
                transition-delay: .6s;
            }
        }

        &:not(.active) {
            >h2 {
                cursor: pointer;
            }
        }

        &.active {
            >p {
                line-height: 1.1;
            }

            >div {
                display: block;
            }
        }
    }

    >hr {
        margin: auto;
        width: 5rem;
        transition: .75s ease-in-out;
    }
}