/**
 * ویجت «اسلایدر تصویری فالنیک» — استایل فرانت
 *
 * طرح: کارت با گرادیان سرمه‌ای، تیتر سفید وسط‌چین، دکمه نارنجی پیل‌شکل و
 * نوار پایین شامل dots کپسولی + فلش‌ها.
 */

.falnic-hero-slider-widget {
    margin-bottom: 24px;
}

.falnic-hero-slider-widget .widget-title {
    margin-bottom: 12px;
}

/* ---------------------------------------------------------------- کارت */
.falnic-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 18px;
    direction: rtl;
    -webkit-tap-highlight-color: transparent;
}

/* نسبت کادر با ترفند padding (سازگار با همه مرورگرها) */
.falnic-hero::before {
    content: "";
    display: block;
}

.falnic-hero--ratio-4-3::before {
    padding-top: 75%;
}

.falnic-hero--ratio-16-9::before {
    padding-top: 56.25%;
}

.falnic-hero--ratio-3-4::before {
    padding-top: 133.3333%;
}

/* -------------------------------------------------------- ساختار اسلایدر */
.falnic-hero-slides {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* قالب Jannah به .slick-list عرض ۱۰۰٪ منهای ۱۰px می‌دهد؛ اینجا اصلاح می‌شود */
.falnic-hero .slick-list {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border-radius: inherit;
}

.falnic-hero .slick-track {
    height: 100%;
    margin: 0;
}

.falnic-hero .slick-slide {
    height: 100%;
    outline: none;
}

.falnic-hero-slide,
.falnic-hero-inner {
    height: 100%;
}

.falnic-hero-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background:
        radial-gradient(70% 45% at 80% 6%, rgba(255, 205, 145, 0.32) 0%, rgba(255, 205, 145, 0) 62%),
        radial-gradient(85% 55% at 22% 104%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 62%),
        linear-gradient(197deg, #081b2e 0%, #14395a 46%, #6d8c9d 78%, #e8edf0 100%);
}

/* پیش از راه‌اندازی اسلایدر فقط اولین اسلاید دیده شود */
.falnic-hero-slides:not(.slick-initialized) .falnic-hero-slide:not(:first-child) {
    display: none;
}

.falnic-hero:not(.falnic-hero-ready) .falnic-hero-nav {
    display: none;
}

/* -------------------------------------------------------------- تصویر */
.falnic-hero-media {
    /* position: absolute;
    inset: 0; */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
}

.falnic-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    -webkit-user-drag: none;
    user-select: none;
}

.falnic-hero--fit-contain .falnic-hero-img {
    object-fit: contain;
    object-position: center bottom;
    padding: 8% 7% 22%;
    box-sizing: border-box;
}

/* گرادیان خوانایی متن + تیره‌کردن ملایم نوار پایین */
.falnic-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(6, 22, 38, 0.55) 0%, rgba(6, 22, 38, 0.12) 34%, rgba(6, 22, 38, 0) 55%, rgba(6, 22, 38, 0.18) 100%),
        linear-gradient(0deg, rgba(6, 22, 38, 0.42) 0%, rgba(6, 22, 38, 0) 24%);
}

.falnic-hero--fit-contain .falnic-hero-shade {
    background:
        linear-gradient(180deg, rgba(6, 22, 38, 0.5) 0%, rgba(6, 22, 38, 0.05) 38%, rgba(6, 22, 38, 0) 58%, rgba(6, 22, 38, 0.22) 100%);
}

/* --------------------------------------------------------------- محتوا */
.falnic-hero-body {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.falnic-hero-titles {
    position: absolute;
    top: 15%;
    right: 16px;
    left: 16px;
    text-align: center;
    color: #fff;
}

.falnic-hero-pretitle {
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 2px 10px rgba(4, 17, 30, 0.45);
}

.falnic-hero-title {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 3px 14px rgba(4, 17, 30, 0.5);
    word-break: break-word;
}

/* ---------------------------------------------------------------- دکمه */
.falnic-hero-cta {
    position: absolute;
    bottom: 58px;
    right: 18px;
    left: 18px;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.falnic-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef7d16 0%, #f79433 55%, #ffb055 100%);
    color: #fff !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(239, 125, 22, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    pointer-events: auto;
}

.falnic-hero-btn:hover,
.falnic-hero-btn:focus {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 11px 22px rgba(239, 125, 22, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    filter: saturate(1.05);
}

.falnic-hero-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.falnic-hero-btn-icon {
    flex-shrink: 0;
    display: block;
    opacity: 0.95;
}

/* ------------------------------------------------------- ناوبری (dots) */
.falnic-hero-nav {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0;
    pointer-events: none;
}

.falnic-hero-arrows {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* تنظیم فاصله یکپارچه به جای margin اینلاین */
    position: relative;
    pointer-events: auto;
    width: auto;
}

.falnic-hero-arrow {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
    filter: drop-shadow(0 1px 3px rgba(4, 17, 30, 0.45));
}

.falnic-hero-arrow:hover,
.falnic-hero-arrow:focus-visible {
    color: #fff;
    opacity: 1;
    transform: scale(1.08); /* حذف translateY چون دیگر absolute نیست */
    outline: none;
}

.falnic-hero-arrow.slick-disabled {
    opacity: 0.35;
    cursor: default;
}

/* در چیدمان راست‌به‌چپ: قبلی سمت راست، بعدی سمت چپ */
.falnic-hero-arrow.slick-prev,
.falnic-hero-arrow.slick-next {
    right: auto;
    left: auto;
}

.falnic-hero-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.falnic-hero-dots-list {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.falnic-hero-dots-list li {
    display: flex;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.falnic-hero-dots-list li button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 3px rgba(4, 17, 30, 0.35);
    font-size: 0;
    line-height: 0;
    color: transparent;
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}

.falnic-hero-dots-list li button:hover,
.falnic-hero-dots-list li button:focus-visible {
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}

.falnic-hero-dots-list li.slick-active button {
    width: 26px;
    background: #fff;
}

/* --------------------------------------------------------- ریسپانسیو */
@media (max-width: 900px) {
    .falnic-hero-titles {
        top: 13%;
    }

    .falnic-hero-title {
        font-size: 21px;
    }

    .falnic-hero-pretitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .falnic-hero {
        border-radius: 16px;
    }

    .falnic-hero-titles {
        top: 12%;
        right: 12px;
        left: 12px;
    }

    .falnic-hero-pretitle {
        font-size: 13px;
    }

    .falnic-hero-title {
        font-size: 19px;
    }

    .falnic-hero-cta {
        bottom: 52px;
        right: 14px;
        left: 14px;
    }

    .falnic-hero-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .falnic-hero-nav {
        bottom: 10px;
        padding: 0 38px;
    }

    .falnic-hero-arrow.slick-prev {
        right: 6px;
    }

    .falnic-hero-arrow.slick-next {
        left: 6px;
    }

    .falnic-hero-dots-list li.slick-active button {
        width: 22px;
    }
}

/* احترام به تنظیم کاهش انیمیشن */
@media (prefers-reduced-motion: reduce) {
    .falnic-hero-btn,
    .falnic-hero-arrow,
    .falnic-hero-dots-list li button {
        transition: none;
    }
}
