/* =========================================
   FT Hero Parallax Slider - Main Styles
   ========================================= */

/* Container */
.ft-hero-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
    direction: ltr !important;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ft-hero-slider.loaded {
    opacity: 1;
}

.ft-hero-slider .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Slide Base */
.ft-hero-slider .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Backgrounds */
.ft-hero-slider .ft-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: var(--bg-desktop);
    z-index: 0;
    transform: scale(1);
    transition: transform 6s ease;
}

.ft-hero-slider.ft-zoom-active .swiper-slide-active .ft-slide-bg {
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .ft-hero-slider .ft-slide-bg {
        background-image: var(--bg-tablet);
    }
}

@media (max-width: 767px) {
    .ft-hero-slider .ft-slide-bg {
        background-image: var(--bg-mobile);
    }
}

/* Video */
.ft-hero-slider .ft-slide-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Overlay - نباید مانع کلیک شود */
.ft-hero-slider .ft-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none !important;
}

/* =========================================
   Content Box
   ========================================= */
.ft-hero-slider .hero-content {
    position: relative;
    z-index: 5;
    padding: 20px;
    color: #fff;
    direction: rtl;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    margin: 0 !important;
    box-sizing: border-box;
    pointer-events: none;
}

/* 👇 تغییر کلیدی: حذف width: 100% و جایگزینی با max-width: 100% */
.ft-hero-slider .hero-content-inner {
    display: flex;
    flex-direction: column;
    /* width: 100%; */   /* این خط دیگر وجود ندارد */
    max-width: 100%;     /* برای جلوگیری از سرریز محتوا */
    pointer-events: none;
}

/* Title */
.ft-hero-slider .hero-content h1 {
    margin: 0 0 20px 0 !important;
    width: 100%;
    line-height: 1.2;
    pointer-events: none;
}

/* Description */
.ft-hero-slider .hero-content p {
    margin: 0 0 30px 0 !important;
    width: 100%;
    pointer-events: none;
}

/* =========================================
   Button - راه‌حل قطعی برای کلیک‌پذیری
   ========================================= */
.ft-hero-slider .ft-hero-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s;
    border-style: solid;
    border-width: 1px;
    white-space: nowrap;
    position: relative;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    background-color: var(--btn-bg, #007aff);
    color: var(--btn-color, #fff);
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ft-hero-slider .ft-hero-btn:hover {
    background-color: var(--btn-bg-hover, #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Button Alignment with Inner Content */
.ft-hero-slider .hero-content-inner .ft-hero-btn {
    align-self: inherit;
}

.ft-hero-slider .hero-content-inner[style*="text-align: center"] .ft-hero-btn {
    align-self: center;
}

.ft-hero-slider .hero-content-inner[style*="text-align: right"] .ft-hero-btn {
    align-self: flex-end;
}

.ft-hero-slider .hero-content-inner[style*="text-align: left"] .ft-hero-btn {
    align-self: flex-start;
}

/* =========================================
   Thumbnails
   ========================================= */
.ft-hero-slider .thumbs-container {
    position: absolute;
    bottom: 30px;
    z-index: 10;
    padding: 10px;
    width: auto;
    left: 4%;
    pointer-events: auto;
}

.thumbs-align-center .thumbs-container {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
}

.thumbs-align-end .thumbs-container {
    left: auto;
    right: 4%;
}

.ft-hero-slider .thumb-slider {
    width: 320px !important;
    max-width: 90vw;
    overflow: hidden;
}

.ft-hero-slider .thumb-slider .swiper-slide {
    width: 100px !important;
    height: 70px !important;
    opacity: 0.6;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    background: #000;
    transition: all 0.3s ease;
}

.ft-hero-slider .thumb-slider .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #fff;
    transform: scale(1);
}

.ft-hero-slider .thumb-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   Navigation Arrows & Pagination
   ========================================= */
.ft-hero-slider .swiper-button-next,
.ft-hero-slider .swiper-button-prev {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: 0.3s;
    pointer-events: auto !important;
    z-index: 20;
    cursor: pointer !important;
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #fff;
}

.ft-hero-slider .swiper-button-prev::after,
.ft-hero-slider .swiper-button-next::after {
    font-size: 28px;
    font-weight: bold;
}

.ft-hero-slider .swiper-button-prev::after {
    content: "‹";
}

.ft-hero-slider .swiper-button-next::after {
    content: "›";
}

.ft-hero-slider .swiper-pagination {
    pointer-events: auto !important;
    z-index: 20;
}

.ft-hero-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    cursor: pointer !important;
}

.ft-hero-slider .swiper-pagination-bullet-active {
    background: #fff;
}

/* =========================================
   Scroll Down Arrow
   ========================================= */
.ft-hero-slider .scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    color: #7c7c7c;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    pointer-events: auto !important;
}

.ft-hero-slider .scroll-down-arrow:hover {
    color: #fff;
}

.ft-hero-slider .scroll-down-arrow svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2px;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* =========================================
   Utility Classes
   ========================================= */
.ft-hero-slider.hide-arrows .swiper-button-next,
.ft-hero-slider.hide-arrows .swiper-button-prev,
.ft-hero-slider.hide-dots .swiper-pagination {
    display: none !important;
}