.links {
    font-family: 'Yekan', Arial, Tahoma, sans-serif;
    font-size: 1.1em;
}

.links > a {
    color: white;
    padding: 0.75em 0 1.25em 0;
    text-align: center;
    text-decoration: none;
    transition: all .5s;
}

.links > a > i {
    position: relative;
    top: 8px;
    left: 3px;
    font-size: 22px;
    color: yellowgreen;
}

.links > a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.links > .line {
    background: white;
    height: 1px;
    pointer-events: none;
}

.links {
    display: grid;
    grid-template-columns: repeat(var(--items), 1fr);
    position: relative;
}

.links > .line {
    opacity: 0;
    transition: all .5s;
    position: absolute;
    bottom: 0;
    left: var(--left, calc(100% / var(--items) * (var(--index) - 1)));
    width: var(--width, calc(100% / var(--items)));
    height: 2px;
    --index: 0;
}

.links > a:hover ~ .line {
    opacity: 1;
}

.links > a:nth-of-type(1):hover ~ .line {
    --index: 5;
}

.links > a:nth-of-type(2):hover ~ .line {
    --index: 4;
}

.links > a:nth-of-type(3):hover ~ .line {
    --index: 3;
}

.links > a:nth-of-type(4):hover ~ .line {
    --index: 2;
}

.links > a:nth-of-type(5):hover ~ .line {
    --index: 1;
}

@media (min-width: 768px) {
    header {
        position: relative;
        width: 66%;
        right: 33%;
    }
}

@media (max-width: 767px) {
    header {
        position: relative;
        width: 100%;
        right: 0;
    }
}
