@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes soft-glow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(99, 102, 241, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.08);
    }

    50% {
        box-shadow:
            0 0 30px rgba(99, 102, 241, 0.25),
            0 8px 20px rgba(0, 0, 0, 0.12);
    }
}

@keyframes badge-glow {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
    }
}

.package-featured {
    position: relative;
    border: none !important;
    transform: scale(1.02);
    z-index: 10;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: soft-glow 3s ease-in-out infinite;
    overflow: visible;
}

.package-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(120deg,
            #6366f1 0%,
            #8b5cf6 15%,
            #ec4899 30%,
            #f59e0b 45%,
            #10b981 60%,
            #06b6d4 75%,
            #6366f1 100%);
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
    margin: 0;
}

.package-featured::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: inherit;
    background: inherit;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);
    z-index: 0;
    pointer-events: none;
}

.package-featured:hover {
    transform: scale(1.04) translateY(-4px);
}

.package-featured:hover::before {
    padding: 2.5px;
    animation-duration: 4s;
}

.package-featured>* {
    position: relative;
    z-index: 1;
}

.package-featured .label-corner,
.package-featured .label-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    animation: badge-glow 2.5s ease-in-out infinite;
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-featured.package-lg::before {
    padding: 3px;
}

.package-featured.package-sm::before {
    padding: 1.5px;
}

.package-featured .card,
.package-featured .panel {
    background: #ffffff;
    position: relative;
    z-index: 2;
}

.package-featured .package-title,
.package-featured h4.package-title {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.package-featured .btn,
.package-featured button {
    position: relative;
    overflow: hidden;
}

.package-featured .btn::before,
.package-featured button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.package-featured .btn:hover::before,
.package-featured button:hover::before {
    width: 300px;
    height: 300px;
}

@media (max-width: 768px) {
    .package-featured {
        transform: scale(1);
    }

    .package-featured:hover {
        transform: scale(1.02) translateY(-2px);
    }

    .package-featured::before {
        padding: 1.5px;
    }
}

.lagom-dark-mode .package-featured .card,
.lagom-dark-mode .package-featured .panel {
    background: rgba(30, 30, 40, 0.95);
}

.lagom-dark-mode .package-featured .package-title,
.lagom-dark-mode .package-featured h4.package-title {
    background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lagom .package-featured {
    border-radius: 12px;
}

.package-featured.package-lg::before {
    padding: 2.5px;
}

.package-featured.package-sm::before {
    padding: 1.5px;
}

.package-featured .package-price,
.package-featured .pricing-text {
    color: #6366f1;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {

    .package-featured,
    .package-featured::before,
    .package-featured .label-corner {
        animation: none !important;
    }

    .package-featured::before {
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    }
}

@supports not (mask-composite: exclude) {
    .package-featured::before {
        -webkit-mask-composite: xor;
        mask-composite: xor;
    }
}