@font-face {
	font-family: 'FontName'; 
	src: url(/fonts/Gilroy-Light.otf); 
}

@font-face {
	font-family: 'Brush'; 
	src: url(/fonts/ComforterBrush-Regular.ttf); 
}

body {
    margin: 0;
    font-family: 'FontName';
    background-color: #333;
}

.main {
    display: flex;
    justify-content: center;
}
.main h1 {
    text-align: center;
    width: 650px;
    padding-top: 80px;
    font-family: 'Brush';
    font-size: 45px;
    background: linear-gradient(90deg, #e9bd2e, #f8e4b0, #a67c00, #f8e4b0, #d4af37); /* Золотой градиент */
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
#all {
    position: absolute;
    margin: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 400px;
    width: 630px;
}

#next {
    position: absolute;
    margin: auto;
    top: 600px;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #741416;
    height: 15px;
    width: 150px;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #741416 ;
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 1);
    color:#ffe2e2;
}

.card {
    position: absolute;
    background-image: url('../media/1.png');
    background-size: 560px 570px;
    background-position: center;
    background-repeat: no-repeat;
    height: 424px;
    width: 300px;
    border-radius: 20px;
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 1);
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.card-after {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-image: url('../media/3.png');
    background-size: 560px 570px;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffe2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 20px;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    padding: 30px;
    box-sizing: border-box;
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 1);    
}

.btns {
    display: flex;
    justify-content: space-evenly
}

#prev {
    background-color: #fff;
    height: 100px;
    width: 100px;
}

#text {
    position: absolute;
    top: 430px;
    text-align: center;
    z-index: 5;
    width: 300px;
    color: #ffe2e2;
    font-size: 20px;
}
#card3 {
    position: absolute; 
    top: 0;
    left: 350px;
    height: 100%;
    width: 100%;
    background-size: 560px 570px; 
    background-position: center;
    background-repeat: no-repeat;
    height: 424px;
    width: 300px;
    border-radius: 20px;
    transform: none; 
    backface-visibility: hidden;
    z-index: 1; 
    position: absolute;
    color: #ffe2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 20px;
    backface-visibility: hidden;
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 1);
    padding: 30px;
    box-sizing: border-box;
    background-image: url('../media/3.png');
}

.card-after h1{
    font-size: 18px;
    text-align: center; 
}

.card-after p{
    font-size: 14px;
    text-align: center; 
}

.card-after li{
    font-size: 12px;
}

#card3 h1{
    font-size: 18px;
    text-align: center; 
}

#card3 h3{
    font-size: 16px;
    text-align: center; 
}

#card3 p{
    font-size: 14px;
    text-align: center; 
}

#card3 li{
    font-size: 12px;
}

#card1 {
    z-index: 3; 
}

#card3 {
    z-index: 2; 
}

#card2 {
    z-index: 1; 
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 1);
}

.animate #card1 {
    z-index: 3;
    animation: a 2s 0.5s forwards;
}

.animate #card2 {
    animation: b 2s 0.5s forwards;
}

.animate #text {
    animation: c 2s infinite;
}

@keyframes reverse-a {
    0% {
        transform: translateX(350px) rotateY(180deg);
    }
    80% {
        transform: translateX(0) rotateY(0deg);
    }
    100% {
        transform: translateX(0) rotateY(0deg);
    }
}

@keyframes reverse-b {
    0% {}
    100% {
        z-index: 1;
    }
}

.animate.reverse #card1 {
    animation: reverse-a 2s 0.5s forwards;
}

.animate.reverse #card2 {
    animation: reverse-b 2s 0.5s forwards;
}

.animate.reverse #text {
    animation: c 2s infinite;
}


@keyframes a {
    0% {}
    80% {
        transform: translateX(350px) rotateY(180deg);
    }
    100% {
        transform: translateX(350px) rotateY(180deg);
    }
}

@keyframes b {
    0% {}
    100% {
        z-index: 2;
    }
}

@keyframes c {
    0% { transform: translateY(0px); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0px); }
}

@media (max-width: 700px){
    @keyframes a {
        0% {}
        80% {
            transform: translateY(-100px) rotateY(180deg);
        }
        100% {
            transform:  rotateY(180deg);
        }
    }

    #card3 {
        left: 0;
    }

    #card1 {
        left: 0;
    }

    #all {
        width: 300px;
    }

}
@media (max-width: 450px){
    .main h1 {
        font-size: 35px;
    }
}

@media (max-height: 776px){
    .main h1 {
        padding-top: 20px;
    }
}

@media (max-width: 350px){
    #card, #card1, #card2, #card3 {
        position: absolute;
        background-size: 470px 470px;
        height: 350px;
        width: 250px;
    }

    #next {
        top: 450px;
    }

    #all {
        width: 250px;
    }

    .card-after h1{
        font-size: 15px;
        text-align: center; 
    }
    
    .card-after p{
        font-size: 13px;
        text-align: center; 
    }
    
    .card-after li{
        font-size: 10px;
    }
    
    #card3 h1{
        font-size: 15px;
        text-align: center; 
    }
    
    #card3 h3{
        font-size: 13px;
        text-align: center; 
    }
    
    #card3 p{
        font-size: 13px;
        text-align: center; 
    }
    
    #card3 li{
        font-size: 10px;
    }
}

@media (max-height: 670px){
    #card, #card1, #card2, #card3 {
        position: absolute;
        background-size: 470px 470px;
        height: 350px;
        width: 250px;
    }

    #all {
        width: 250px;
    }

    #next {
        top: 450px;
    }

    .card-after h1{
        font-size: 15px;
        text-align: center; 
    }
    
    .card-after p{
        font-size: 13px;
        text-align: center; 
    }
    
    .card-after li{
        font-size: 10px;
    }
    
    #card3 h1{
        font-size: 15px;
        text-align: center; 
    }
    
    #card3 h3{
        font-size: 13px;
        text-align: center; 
    }
    
    #card3 p{
        font-size: 13px;
        text-align: center; 
    }
    
    #card3 li{
        font-size: 10px;
    }
}

@media (max-height: 595px){
    #card, #card1, #card2, #card3 {
        position: absolute;
        background-size: 411px 426px;
        height: 320px;
        width: 220px;
    }

    #all {
        width: 220px;
        height: 300px;
    }

    #next {
        padding: 10px;
        top: 430px;
        font-size: 14px;
        width: 130px;
    }

    .card-after h1{
        font-size: 13px;
        text-align: center; 
    }
    
    .card-after p{
        font-size: 12px;
        text-align: center; 
    }
    
    .card-after li{
        font-size: 10px;
    }
    
    #card3 h1{
        font-size: 13px;
        text-align: center; 
    }
    
    #card3 h3{
        font-size: 13px;
        text-align: center; 
    }
    
    #card3 p{
        font-size: 12px;
        text-align: center; 
    }
    
    #card3 li{
        font-size: 10px;
    }

    .main h1 {
        padding-top: 10px;
    }
}