#flipcard {
    overflow: hidden;
    background: url(../assets/flipcard.jpg);
    position: relative;
}

body.dark #flipcard {
    background: url(../assets/mramor_b.jpg);
}

.table_back {
    padding: 28px 28px 112px;
    max-width: 1920px;
    position: relative;
    margin: 0 auto;
}

.darkelf {
    position: absolute;
    bottom: -100%;
    right: -170px;
    transition: all 0.5s ease;
}

.wakeup {
    bottom: 0;
}

.table_head {
    display: flex;
    align-items: center;
    gap: 32px;
    justify-content: center;
    padding: 84px 0 64px;
}

.table_title {
    text-transform: uppercase;
    text-shadow: 0px 4px 4px #00000059;
    text-align: center;
}

.table_title span {
    color: var(--red-70);
}

body.dark .table_title span {
    background: linear-gradient(180deg, #FFE5A3 0%, #CBA74C 63.5%, #EECE7F 79%, #8C7845 98.5%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-shadow: none;
}

.table_cards {
    padding: 10px 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    justify-content: center;
    max-width: 1700px;
}

.card_pic {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.card_frame {
    display: block;
    position: absolute;
    top: 16px;
    left: 16px;
}

.darkframe {
    display: none;
}

body.dark .darkframe {
    display: block;
    position: absolute;
    top: 16px;
    left: 16px;
}

body.dark .card_frame {
    display: none;
}

.dotslinel {
    position: absolute;
    left: 24px;
    bottom: 45px;
}

.dotsliner {
    position: absolute;
    right: 24px;
    top: 45px;
    z-index: 0;
}

body.dark .flip_card_face .dotslinel,
body.dark .flip_card_face .dotsliner {
    filter: brightness(0) saturate(100%) invert(25%) sepia(18%) saturate(1033%) hue-rotate(351deg) brightness(93%) contrast(83%);
}

body.dark .flip_card_back .dotslinel,
body.dark .flip_card_back .dotsliner {
    filter: brightness(0) saturate(100%) invert(0%) sepia(93%) saturate(13%) hue-rotate(35deg) brightness(94%) contrast(94%);
}

.flip_card {
    width: 424px;
    height: 302px;
    gap: 8px;
    perspective: 1000px;
    position: relative;
    cursor: pointer;
    filter: drop-shadow(0px 2px 6px #00000026);
    transition: all 0.3s ease-out;
}


.flip_card_face,
.flip_card_back {
    background-image: url(../assets/white-paper.jpg);
    width: 424px;
    height: 302px;
    border-radius: 0;
    overflow: hidden;
    position: relative;

    position: absolute;
    backface-visibility: hidden;
    transition: transform 0.6s;
    clip-path: url("#clip-polygon");
}

body.dark .flip_card_face,
body.dark .flip_card_back {
    background-image: none;
    background: linear-gradient(0deg, #27241E 0%, #3D362C 100%), linear-gradient(180deg, rgba(255, 255, 255, 0.51) 1.5%, rgba(255, 255, 255, 0.60) 100%);
}

.svg_clip {
    position: absolute;
    pointer-events: none;
}

.flip_card_title {
    text-align: center;
    position: relative;
    z-index: 1;
}

.flip_card_title span {
    color: var(--red-70);
}

body.dark .flip_card_title span {
    background: linear-gradient(180deg, #FFE5A3 0%, #CBA74C 63.5%, #EECE7F 79%, #8C7845 98.5%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-shadow: none;
}

.flip_card_text p {
    font-family: Evolventa;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    text-align: left;
}

.flip_card_face .flip_card_text p {
    color: var(--primary-black);
}

.flip_card_back .flip_card_text p {
    color: var(--primary-white);
}

body.dark .flip_card_back .flip_card_text p {
    color: var(--primary-black);
}

.flip_card_text {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 27px;
}

.flip_card_back span {
    color: #28BF88;
}

.flip_card_back {
    transform: rotateY(180deg);
    background: linear-gradient(180deg, #5C1818 0%, #3C0F0F 100%);
    background-blend-mode: multiply;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .flip_card_back {
    background: linear-gradient(180deg, #AF934C 0%, #DEBC66 50%, #AF934C 100%);
}

.flip_card.flipped .flip_card_face {
    transform: rotateY(180deg);
}

.flip_card.flipped .flip_card_back {
    transform: rotateY(0deg);
}

.flip_card.flipped .klac {
    opacity: 0;
}

.flip_card:nth-child(1) {
    transform: rotate(-3deg);
    animation: colorChange 3s infinite;
}

.flip_card:nth-child(1):hover {
    animation-play-state: paused;
}

@keyframes colorChange {
    0% {
        transform: rotate(-3deg) scale(1.05);
    }

    50% {
        transform: rotate(-3deg) scale(1);
    }

    100% {
        transform: rotate(-3deg) scale(1.05);
    }
}

.flip_card.flipped {
    animation: none;
}


.flip_card:nth-child(2) {
    transform: rotate(2deg);
}

.flip_card:nth-child(3) {
    transform: rotate(-3deg);
}

.flip_card:nth-child(4) {
    transform: rotate(2deg);
}

.flip_card:nth-child(5) {
    transform: rotate(-2deg) translateY(10px);
}

.count_box {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    padding: 64px 0 45px;
    width: 100%;
}

.count_line {
    height: 12px;
    border-radius: 12px;
    background: var(--grey-30);
    box-shadow: 0px 0.5px 1px 0px #0000004D inset, 0px -1.5px 1.2px 0px #FFFFFFCC inset;
    width: 100%;
    position: relative;
}

body.dark .count_line {
    background: #292929;
    box-shadow: 0px -1.5px 1.2px 0px rgba(0, 0, 0, 0.80) inset, 0px 0.5px 1px 0px rgba(255, 255, 255, 0.30) inset;
}

.count_inline {
    border-radius: 12px;
    width: 0%;
    background: linear-gradient(90deg, #50D681 0%, #3BBF6C 100%);
    height: 12px;
    box-shadow: 0px 0.5px 1px 0px #0000004D inset, 0px -1.5px 1.2px 0px #FFFFFFCC inset;
    transition: all 0.2s ease;
}

body.dark .count_inline {
    box-shadow: 0px -1.5px 1.2px 0px rgba(0, 0, 0, 0.80) inset, 0px 0.5px 1px 0px rgba(255, 255, 255, 0.30) inset; 
}

.count_text {
    color: var(--grey-80);
}

.count_title {
    font-family: Colus;
    font-size: 24px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0.03em;
    text-align: center;
    text-shadow: 1px 3px 3px rgba(0, 0, 0, 0.3), 1px 4px 6px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 29px;
    left: 0;
    width: 100%;
}

.table_revers {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 1750px) {
    .darkelf {
        display: none;
    }
}

@media (max-width: 900px) {

    .table_title {
        text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.28);
        font-size: 32px;
        line-height: 36px;
        letter-spacing: -0.32px;
    }

    .table_revers {
        flex-direction: column-reverse;
    }

    .table_head {
        padding: 84px 0 0px;
    }

    .count_box {
        padding: 32px 0 64px;
    }

    .flip_card {
        width: 343px;
        height: 302px;
    }

    .flip_card_face,
    .flip_card_back {
        width: 343px;
        height: 302px;
    }

    .card_frame {
        width: 311px;
        height: 270px;
    }

    body.dark .darkframe {
        width: 311px;
        height: 270px;
    }

    .table_cards {
        gap: 21px;
        padding: 16px 0;
    }

    .flip_card:nth-child(1) {
        animation: colorChange 3s infinite;
        transform: rotate(-1deg);
    }

    .flip_card:nth-child(2) {
        transform: rotate(1deg);
    }

    .flip_card:nth-child(3) {
        transform: rotate(-1deg);
    }

    .flip_card:nth-child(4) {
        transform: rotate(1deg);
    }

    .flip_card:nth-child(5) {
        transform: rotate(-1deg) translateY(10px);
    }

    .flip_card_title {
        font-size: 32px;
        line-height: 36px;
        letter-spacing: -0.32px;
    }

    .flip_card_text p {
        font-size: 14px;
        line-height: 20px;
    }

    .table_back {
        padding: 28px 16px 103px;
    }

    .count_title {
        text-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15), 0px 1px 3px rgba(0, 0, 0, 0.30);
    }
}

@media (min-width: 900px) {

    .flip_card:hover {
        filter: drop-shadow(0px 2px 6px #00000056);
    }

    .flip_card_face:hover {
        transform: scale(1.02);
    }
}