/* المسار: alnohkba/assets/css/discount-badge.css
   شارة الخصم "النجمة" (discountBadgeHTML في components/ui/course-card.js)

   - نجمة/ختم مسنّن بيلف ببطء شديد
   - حلقة داخلية متقطعة زي الأختام
   - النص (خصم + النسبة) عليه لمعة بتعدّي كل شوية
   - الشارة نفسها مايلة شوية وبتكبر مع الهوفر */

.discount-burst {
    --burst-size: 76px;
    --burst-ink: #0E1A19;
    position: relative;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: var(--burst-size);
    height: var(--burst-size);
    transform: rotate(-12deg);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 6px 10px rgb(14 26 25 / 0.18));
}

.group:hover .discount-burst,
.discount-burst:hover {
    transform: rotate(-4deg) scale(1.06);
}

.discount-burst__star {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    animation: burstSpin 28s linear infinite;
}

.discount-burst__star .burst-ring {
    fill: none;
    stroke: var(--burst-ink);
    stroke-opacity: 0.22;
    stroke-width: 1.4;
    stroke-dasharray: 2.2 3.2;
}

.discount-burst__label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    text-align: center;
}

/* اللمعة: تدرّج بيعدّي على الحروف (background-clip: text) */
.discount-burst__word,
.discount-burst__value {
    color: transparent;
    background-image: linear-gradient(105deg,
        var(--burst-ink) 0%, var(--burst-ink) 40%,
        #FFFFFF 50%,
        var(--burst-ink) 60%, var(--burst-ink) 100%);
    background-size: 260% 100%;
    background-position: 130% 0;
    -webkit-background-clip: text;
            background-clip: text;
    animation: burstShine 3.2s ease-in-out infinite;
}

.discount-burst__word {
    font-family: 'Cairo', sans-serif;
    font-size: calc(var(--burst-size) * 0.17);
    font-weight: 800;
    margin-bottom: calc(var(--burst-size) * 0.03);
}

.discount-burst__value {
    font-family: 'Alexandria', 'Cairo', sans-serif;
    font-size: calc(var(--burst-size) * 0.3);
    font-weight: 900;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    animation-delay: 0.12s;
}

@keyframes burstSpin {
    to { transform: rotate(360deg); }
}

@keyframes burstShine {
    0%, 35%  { background-position: 130% 0; }
    75%, 100% { background-position: -30% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .discount-burst { transition: none; }
    .discount-burst__star,
    .discount-burst__word,
    .discount-burst__value { animation: none; }
    .discount-burst__word,
    .discount-burst__value { color: var(--burst-ink); background: none; }
}
