body {
    font: 14px sans-serif;
    background-color: black;
}

.wrapper {
    width: 350px;
    padding: 20px;
}

/* Button at the very top - Right */
.top-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999; /* Add a higher z-index value */
}

/* Button at the very bottom - Right */
.bottom-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

/* Button styles */
.top-button button,
.bottom-button button {
    width: 50px;
    height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    border: none;
    cursor: pointer;
    outline: none;
    background-color: transparent;
}

/* Custom scroll down button image 
    background-image: url('https://baftes.com/images/down2.png');
}

/* Custom scroll up button image 
#scrollUpButton {
    background-image: url('https://baftes.com/images/up.png');
}

/* Add more custom styles here */
.rounded-img {
    border-radius: 10px;
}

/* Contact Form styles */
.contactForm input[type="text"],
.contactForm input[type="email"],
.contactForm textarea {
    width: 100%;
    min-height: 40px;
    padding-left: 20px;
    font-size: 13px;
    padding-right: 20px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

select {
    font-size: 13px;
    line-height: 20px;
    background: #fbfbfb;
    border-color: #919191 #919191 #b3b3b3;
    color: #999999;
    -webkit-box-shadow: inset 0 1px 3px #cacaca;
    -moz-box-shadow: inset 0 1px 3px #cacaca;
    box-shadow: inset 0 1px 3px #cacaca;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
}

/* Card styles */
:root {
    --blue-rgb: 92 192 249;
    --green-rgb: 125 161 35;
    --brown-rgb: 127 46 23;
}

body:has(.card[data-color="blue"]:hover) {
    background-color: rgb(var(--blue-rgb) / 25%);
}

body:has(.card[data-color="green"]:hover) {
    background-color: rgb(var(--green-rgb) / 25%);
}

body:has(.card[data-color="brown"]:hover) {
    background-color: rgb(var(--brown-rgb) / 25%);
}

#cards {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
}

.card {
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: scale 100ms;
}

.card .card-front-image {
    position: relative;
    z-index: 2;
}

.card .card-image {
    max-width: 100%;
    max-height: 100%;
    width: clamp(300px, 20vw, 500px);
    aspect-ratio: 2 / 3;
    border-radius: clamp(0.5rem, 0.75vw, 2rem);
}

.card-faders {
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
    z-index: 1;
    opacity: 0;
    transition: opacity 1500ms;
    pointer-events: none;
}

.card:hover .card-faders {
    opacity: 1;
}

.card:active {
    scale: 0.98;
}

.card-fader {
    position: absolute;
    left: 0px;
    top: 0px;
}

.card-fader:nth-child(odd) {
    animation: fade-left 3s linear infinite;
}

.card-fader:nth-child(even) {
    animation: fade-right 3s linear infinite;
}

.card-fader:is(:nth-child(3), :nth-child(4)) {
    animation-delay: 750ms;
}

.card-fader:is(:nth-child(5), :nth-child(6)) {
    animation-delay: 1500ms;
}

.card-fader:is(:nth-child(7), :nth-child(8)) {
    animation-delay: 2250ms;
}

@media (max-width: 1200px) {
    body {
        justify-content: flex-start;
        align-items: flex-start;
    }

    #cards {
        flex-direction: column;
        align-items: center;
        gap: 4rem;
        padding: 4rem;
    }

    .card .card-image {
        width: 400px;
    }
}

@media (max-width: 600px) {
    #cards {
        gap: 2rem;
        padding: 2rem;
    }

    .card {
        width: 80%;
    }

    .card .card-image {
        width: 100%;
    }
}

@keyframes fade-left {
    from {
        scale: 1;
        translate: 0%;
        opacity: 1;
    }

    to {
        scale: 0.8;
        translate: -30%;
        opacity: 0;
    }
}

@keyframes fade-right {
    from {
        scale: 1;
        translate: 0%;
        opacity: 1;
    }

    to {
        scale: 0.8;
        translate: 30%;
        opacity: 0;
    }
}
