.any-header {
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.any-header h2{
    margin: 80px 0;
    border: 2px solid black;
    width: fit-content;
    padding: 20px 20px;
    position: relative;
    overflow: hidden;
    transition: 0.5s;
}
.any-header h2:hover {
    color: white;
    animation: color-image 0.52s linear forwards;
}
@keyframes color-image {
    0% {
        background-image: none;
    }
    90% {
        background-image: none;
    }
    100% {
        background-image: var(--main-background);
    }
}
.any-header .top-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background-color: rgb(214 213 4);
    z-index: -1;
}
.any-header h2:hover .top-left {
    animation: top-left-any-header 0.5s linear forwards;
}
@keyframes top-left-any-header {
    from {
        width: 0;
        height: 0;
    }
    to {
        width: 51%;
        height: 100%;
    }
}
.any-header .bottom-left {
    position: absolute;
    top: 100%;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgb(214 213 4);
    z-index: -1;
}
.any-header h2:hover .bottom-left{
    animation: bottom-left-any-header 0.5s linear forwards;
}
@keyframes bottom-left-any-header {
    from {
        width: 0;
        top: 100%;
    }
    to {
        width: 51%;
        top:0;
    }
}
.any-header .top-right {
    position: absolute;
    top: 0;
    left: 100%;
    width: 51%;
    height: 0;
    background-color: rgb(177 125 33);
    z-index: -1;
}
.any-header h2:hover .top-right {
    animation: top-right-any-header 0.5s linear forwards;
}
@keyframes top-right-any-header {
    from {
        left: 100%;
        height: 0;
    }
    to {
        left: 51%;
        height: 100%;
    }
}
.any-header .bottom-right {
    position: absolute;
    top: 100%;
    left: 100%;
    width: 51%;
    height: 100%;
    background-color: rgb(177 125 33);
    z-index: -1;
}
.any-header h2:hover .bottom-right{
    animation: bottom-right-any-header 0.5s linear forwards;
}
@keyframes bottom-right-any-header {
    from {
        left: 100%;
        top: 100%;
    }
    to {
        left: 51%;
        top: 0%;
    }
}