/* Flip Card Styles */
.flip-card {
    overflow: visible;
    width: 100%;
    height: 320px;
}

.flip-card-content {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 300ms;
    box-shadow: 0px 0px 10px 1px #00000018;
    border-radius: 10px;
}

.flip-card-front,
.flip-card-back {
    background-color: #fff;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.flip-card-back {
    width: 100%;
    height: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: transparent;
}

.flip-card-back::before {
    position: absolute;
    content: ' ';
    display: block;
    width: 160px;
    height: 160%;
    background: linear-gradient(90deg, transparent, #ff9966, #ff9966, #ff9966, #ff9966, transparent);
    animation: rotation_481 5000ms infinite linear;
    opacity: 0.5;
}

.flip-card-back-content {
    position: absolute;
    width: 99%;
    height: 99%;
    background-color: var(--card-bg, #151515);
    border-radius: 5px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 1;
    padding: 20px;
    text-align: center;
}

/* Palette Colors */
.card-color-1 {
    --card-bg: #3E3775;
}

.card-color-2 {
    --card-bg: #B39999;
}

.card-color-3 {
    --card-bg: #3F8AB5;
}

.card-color-4 {
    --card-bg: #4B458C;
}

/* Variant of palette or custom */

/* Text Styles for Back Content */
.flip-card-back-content h3 {
    font-size: 1.25rem;
    margin: 0;
    color: white;
}

.flip-card-back-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.flip-card-back-content .card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.flip-card-back-content .card-link {
    font-size: 0.9rem;
    color: #ffd700;
    font-weight: 600;
    margin-top: 10px;
    position: relative;
    z-index: 10;
}

.flip-card-back-content .card-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    /* Large enough to cover card */
    height: 300px;
    z-index: 10;
}

.flip-card:hover .flip-card-content {
    transform: rotateY(180deg);
}

@keyframes rotation_481 {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

.flip-card-front {
    transform: rotateY(180deg);
    color: white;
    position: relative;
}

.front-content {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass through container */
}

.front-content a {
    pointer-events: auto;
    /* Re-enable pointer events for the link */
    /* Enhance click area */
}

/* Ensure link covers the whole card */
.front-content a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}

.front-content .badge {
    background-color: #00000055;
    padding: 2px 10px;
    border-radius: 10px;
    backdrop-filter: blur(2px);
    width: fit-content;
    font-size: 12px;
}

.description {
    box-shadow: 0px 0px 10px 5px #00000088;
    width: 100%;
    padding: 15px;
    background-color: #00000099;
    backdrop-filter: blur(5px);
    border-radius: 5px;
    position: relative;
    z-index: 10;
}

.title {
    font-size: 11px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
}

.title p {
    width: 100%;
    font-size: 14px;
}

.card-footer {
    color: #ffffff88;
    margin-top: 5px;
    font-size: 10px;
}

.flip-card-front .img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #ffbb66;
    position: relative;
    filter: blur(15px);
    animation: floating 2600ms infinite linear;
}

#bottom {
    background-color: #ff8866;
    left: 50px;
    top: 0px;
    width: 150px;
    height: 150px;
    animation-delay: -800ms;
}

#right {
    background-color: #ff2233;
    left: 160px;
    top: -80px;
    width: 30px;
    height: 30px;
    animation-delay: -1800ms;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Custom images for services */
.img-web-dev {
    background-image: url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
}

.img-design {
    background-image: url('https://images.unsplash.com/photo-1571101628768-6bae026844b6?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
}

.img-social {
    background-image: url('https://images.unsplash.com/photo-1611162616305-c69b3fa7fbe0?q=80&auto=format&fit=crop&w=800');
    background-size: cover;
    background-position: center;
}

.img-marketing {
    background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
}


