﻿/* =========================================================
   دکمه‌های گرادیان قرمز
   - روی همه‌ی MudButtonهای Filled با Color.Primary خودکار اعمال می‌شود
   - برای دکمه/لینک معمولی HTML از کلاس btn-grad استفاده کن
   ========================================================= */

.btn-grad,
.mud-button-filled.mud-button-filled-primary {
    background-image: linear-gradient(to right, #e52d27 0%, #b31217 51%, #e52d27 100%) !important;
    background-size: 200% auto !important;
    background-color: #b31217 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 16px -6px rgba(179, 18, 23, .55) !important;
    transition: background-position .5s, box-shadow .3s, transform .15s !important;
}
.gallery-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 480px;
    padding: 12px 16px;
    margin: 4px 0 16px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    color: #fff;
    text-align: right;
    font-family: inherit;
    background-image: linear-gradient(to right, #e52d27 0%, #b31217 51%, #e52d27 100%);
    background-size: 200% auto;
    box-shadow: 0 8px 20px rgba(179, 18, 23, .28);
    transition: background-position .5s, transform .15s, box-shadow .2s;
}

    .gallery-cta:hover {
        background-position: right center;
        transform: translateY(-2px);
        box-shadow: 0 12px 26px rgba(179, 18, 23, .36);
    }

    .gallery-cta:active {
        transform: translateY(0);
    }

.gallery-cta__icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
}

.gallery-cta__text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gallery-cta__title {
    font-size: 16px;
    font-weight: 700;
}

.gallery-cta__sub {
    font-size: 12px;
    opacity: .85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-cta__arrow {
    flex: 0 0 auto;
    opacity: .9;
    transition: transform .2s;
}

.gallery-cta:hover .gallery-cta__arrow {
    transform: translateX(-4px);
}

@media (max-width: 600px) {
    .gallery-cta {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-cta, .gallery-cta__arrow {
        transition: none;
    }
}

    .btn-grad:hover,
    .btn-grad:focus-visible,
    .mud-button-filled.mud-button-filled-primary:hover,
    .mud-button-filled.mud-button-filled-primary:focus-visible {
        background-position: right center !important;
        color: #fff !important;
        text-decoration: none !important;
        box-shadow: 0 8px 22px -6px rgba(179, 18, 23, .7) !important;
    }

    .btn-grad:active,
    .mud-button-filled.mud-button-filled-primary:active {
        transform: scale(.98);
    }

    /* حالت غیرفعال: بدون گرادیان */
    .btn-grad:disabled,
    .mud-button-filled.mud-button-filled-primary:disabled {
        background-image: none !important;
        background-color: rgba(0, 0, 0, .12) !important;
        color: rgba(0, 0, 0, .38) !important;
        box-shadow: none !important;
        cursor: default;
    }

/* فقط برای کلاس دستی btn-grad (روی MudButton اعمال نمی‌شود تا چیدمان صفحه‌ها به‌هم نریزد) */
.btn-grad {
    display: inline-block;
    padding: 12px 36px;
    text-align: center;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
