.history .card3 {
    position: relative;
    width: 300px;
    height: 300px;
    transition: transform 0.4s;
    padding: .5rem;
    z-index: 3;
    background: var(--bg-sec-color);
    transition: all 0.3s ease-in;
    z-index: 100;
    overflow: hidden;
    border-radius: 10px;
}
.history #second-card,.history #third-card{
    height: 250px;
}
.history #fourh-card{
    height: 370px;
}
.history #fifth-card{
    height: 340px;
}
@keyframes animateBottom {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
@keyframes animateTop {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}
@keyframes animateRight {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(-100%);
    }
}
@keyframes animateLeft {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}
.card3 span:nth-child(1) {
    top: 0px;
    left: 0px;
    width: 100%;
    height: 5px;
    background: linear-gradient(to left, rgba(8, 43, 26, 0), var(--text-sec-color));
    animation: 2s animateTop linear infinite;
}
.card3 span:nth-child(2) {
    top: 0px;
    right: 0px;
    height: 100%;
    width: 5px;
    background: linear-gradient(to left, rgba(8, 43, 26, 0), var(--text-sec-color));
    animation: 2s animateRight linear -1s infinite;
    z-index: 1000;
}
.card3 span:nth-child(3) {
    bottom: 0px;
    left: 0px;
    width: 100%;
    height: 5px;
    background: linear-gradient(to left, rgba(8, 43, 26, 0), var(--text-sec-color));
    animation: 2s animateBottom linear infinite;
    z-index: 1000;
}
.card3 span:nth-child(4) {
    top: 0px;
    left: 0px;
    height: 100%;
    width: 5px;
    background: linear-gradient(to left, rgba(8, 43, 26, 0), var(--text-sec-color)); 
    animation: 2s animateLeft linear -1s infinite;
    
}
.card3 span {
    position: absolute;
    opacity: 0.5;
  }
.line{
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    opacity: 0;
}
.card3 .line{
    opacity: 1;
}
.content3 {
    position: absolute;
    top: 30px;
    left: 20px;
    padding-right: 4px;
    z-index: 3;
}
.card3:hover{
    transform: scale(1.1);
    filter:none;
}
.card3 .num-card {
    position: absolute;
    top: 80%;
    font-size: .6rem;
    color: var(--text-sec-color);
    user-select: none;
    transition: all 0.4s;
    z-index: 100;
    overflow: hidden;
}
.history .card3 #fourth-num-card{
    top: 90%;
}
.history .card3:hover #fourth-num-card {
    transform: scale(1.1);
    filter:none;
    top: 0%;
    font-size: .7rem;
    transform: translateX(5%);
}
.history .card3 #fifth-num-card{
    top: 92%;
}
.history .card3:hover #fifth-num-card {
    transform: scale(1.1);
    filter:none;
    top: 0%;
    font-size: .7rem;
    transform: translateX(5%);
}
.card3 .num-card{
    filter: brightness(0.4);
}
.card3:hover .num-card {
    transform: scale(1.1);
    filter:none;
    top: 0%;
    font-size: .7rem;
    transform: translateX(5%);
}
.history {
    margin-top: 1.2rem;
}
.history #first{
    text-align:left;
    margin-left: .5rem;
    margin-top: 0;
}
.history #first::after{
    bottom:0;
    position: relative;
    content: "";
    width: 100%;
    height: 3px;
    background-color: #3498db;
    display: block;
    margin-top: 10px;
    transition: width 0.3s;
}
.history .second{
    margin-top: 18px;
}
.history .second::after{
    bottom:0;
    position: relative;
    content: "";
    width: 100%;
    height: 3px;
    background-color: #3498db;
    display: block;
    margin-top: 10px;
    transition: width 0.3s;
}
.history img{
    max-width: 100%;
    border-radius: 10px;
}
.second-part{
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
}

@media screen and (max-width: 767px) {
    .history .section-right, .history  .section-left{
        gap:0;
    }
    .history .image-right{
        margin-top: 1.2rem;
        grid-area: e1;
    }
    .history .image-left{
        grid-area: e1;
        margin-top: .2rem;
    }
    .history .card3{
        margin-bottom: 1.2rem;
    }
    .history #first {
        margin-left: 0;
    }
    .history .second-part{
        margin-top: -32px;
    }
    .history .card3 {
        max-width: 250px;
    }
}

