/**
 * Hero Slider Styles - التصميم الجديد
 *
 * @package Nadiim
 * @since 1.0.0
 */

/* ==========================================
   CSS Variables
   ========================================== */

:root {
    --color-primary: #339063;
    --hero-height: 600px;
    --hero-height-mobile: 420px;
    --container-max: 1200px;
    --transition-default: 0.3s ease;
}

/* ==========================================
   Hero Slider Section
   ========================================== */

.hero-slider-section {
    padding: 0;
    margin-top: 24px;
    margin-bottom: 48px;
    background: #f8f9fa;
    position: relative;
}

.hero-slider-section .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0;
}

/* ==========================================
   Swiper Container
   ========================================== */

.hero-swiper {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-swiper .swiper-wrapper {
    display: flex;
    transition-timing-function: ease-in-out;
}

.hero-swiper .swiper-slide {
    height: auto;
}

/* ==========================================
   Hero Slide Card - صورة خلفية + تدرج
   ========================================== */

.hero-slide-card {
    position: relative;
    height: var(--hero-height);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 16px;
    transition: transform var(--transition-default);
}

.hero-slide-card:hover {
    transform: scale(1.02);
}

/* ─────────────────────────────────────
   تدرج الألوان (Gradient Overlay)
   ───────────────────────────────────── */

.slide-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.4) 60%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* ─────────────────────────────────────
   محتوى الشريحة في الأسفل
   ───────────────────────────────────── */

.slide-content {
    position: relative;
    z-index: 2;
    padding: 48px 60px;
    width: 100%;
    color: #ffffff;
}

/* ─────────────────────────────────────
   العنوان
   ───────────────────────────────────── */

.slide-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────
   المقتطف
   ───────────────────────────────────── */

.slide-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 24px 0;
    max-width: 700px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────
   التقييم بالنجوم (للمراجعات)
   ───────────────────────────────────── */

.slide-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 12px 0 16px 0;
}

.slide-rating .star-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.slide-rating .star-filled {
    color: #fbbf24;
}

.slide-rating .star-empty {
    color: rgba(255, 255, 255, 0.3);
}

/* ─────────────────────────────────────
   زر CTA (شفاف)
   ───────────────────────────────────── */

.slide-cta {
    margin-top: 8px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background-color: transparent;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-default);
    border: 2px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cta-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
}

.cta-button svg {
    transition: transform var(--transition-default);
    transform: scaleX(-1);
}

.cta-button:hover svg {
    transform: translateX(4px) scaleX(-1);
}

/* ==========================================
   أزرار التنقل - في وسط السلايدر (شفافة)
   ========================================== */

.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-default);
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.swiper-button-prev {
    left: 24px;
}

.swiper-button-next {
    right: 24px;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    display: none;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.swiper-button-prev:focus,
.swiper-button-next:focus {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.swiper-button-disabled:hover {
    background-color: transparent;
    color: #ffffff;
    transform: translateY(-50%);
}

/* ─────────────────────────────────────
   Pagination (Bullets) في الأسفل
   ───────────────────────────────────── */

.swiper-pagination {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-default);
    opacity: 1;
}

.swiper-pagination-bullet:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.swiper-pagination-bullet-active {
    background-color: #ffffff;
    width: 32px;
    border-radius: 6px;
}

/* ==========================================
   Accessibility
   ========================================== */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-swiper,
    .hero-swiper .swiper-wrapper,
    .hero-slide-card,
    .cta-button,
    .swiper-pagination-bullet,
    .swiper-button-prev,
    .swiper-button-next {
        transition: none !important;
        animation: none !important;
    }

    .hero-swiper {
        scroll-behavior: auto;
    }

    .hero-slide-card:hover {
        transform: none;
    }
}

/* Focus visible styles */
.hero-slide-card:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Large Desktop (> 1440px) */
@media screen and (min-width: 1441px) {
    :root {
        --hero-height: 650px;
    }

    .slide-content {
        padding: 60px 80px;
    }

    .slide-title {
        font-size: 48px;
    }

    .slide-excerpt {
        font-size: 20px;
        max-width: 800px;
    }

    .cta-button {
        padding: 16px 36px;
        font-size: 18px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 64px;
        height: 64px;
    }

    .swiper-button-prev {
        left: 32px;
    }

    .swiper-button-next {
        right: 32px;
    }
}

/* Desktop (1025px - 1440px) - Default */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
    .slide-content {
        padding: 48px 60px;
    }

    .slide-title {
        font-size: 42px;
    }

    .slide-excerpt {
        font-size: 18px;
    }
}

/* Tablet (769px - 1024px) */
@media screen and (max-width: 1024px) {
    :root {
        --hero-height: 500px;
    }

    .slide-content {
        padding: 40px 48px;
    }

    .slide-title {
        font-size: 36px;
    }

    .slide-excerpt {
        font-size: 17px;
        max-width: 600px;
    }

    .cta-button {
        padding: 13px 28px;
        font-size: 16px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 50px;
        height: 50px;
    }

    .swiper-button-prev {
        left: 20px;
    }

    .swiper-button-next {
        right: 20px;
    }
}

/* Small Tablet & Large Mobile (481px - 768px) */
@media screen and (max-width: 768px) {
    :root {
        --hero-height: var(--hero-height-mobile);
    }

    .slide-content {
        padding: 32px 32px;
    }

    .slide-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .slide-excerpt {
        font-size: 16px;
        margin-bottom: 20px;
        max-width: 100%;
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 15px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 44px;
        height: 44px;
    }

    .swiper-button-prev {
        left: 16px;
    }

    .swiper-button-next {
        right: 16px;
    }

    .swiper-button-prev svg,
    .swiper-button-next svg {
        width: 24px;
        height: 24px;
    }

    .swiper-pagination {
        bottom: 20px;
        gap: 8px;
    }

    .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }

    .swiper-pagination-bullet-active {
        width: 28px;
    }
}

/* Small Mobile (320px - 480px) */
@media screen and (max-width: 480px) {
    :root {
        --hero-height: 400px;
    }

    .slide-content {
        padding: 24px 20px;
    }

    .slide-title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .slide-excerpt {
        font-size: 15px;
        margin-bottom: 16px;
        -webkit-line-clamp: 2;
    }

    .cta-button {
        padding: 11px 20px;
        font-size: 14px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .swiper-button-prev {
        left: 12px;
    }

    .swiper-button-next {
        right: 12px;
    }

    .swiper-button-prev svg,
    .swiper-button-next svg {
        width: 20px;
        height: 20px;
    }

    .swiper-pagination {
        bottom: 16px;
    }

    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .swiper-pagination-bullet-active {
        width: 24px;
    }
}

/* Extra Small Mobile (< 360px) */
@media screen and (max-width: 359px) {
    :root {
        --hero-height: 350px;
    }

    .slide-content {
        padding: 20px 16px;
    }

    .slide-title {
        font-size: 20px;
    }

    .slide-excerpt {
        font-size: 14px;
    }

    .cta-button {
        padding: 10px 18px;
        font-size: 13px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .swiper-button-prev {
        left: 8px;
    }

    .swiper-button-next {
        right: 8px;
    }
}

/* ==========================================
   RTL Support
   ========================================== */

/* LTR override */
[dir="ltr"] .cta-button svg {
    transform: none;
}

[dir="ltr"] .cta-button:hover svg {
    transform: translateX(4px);
}

/* ============================================
   لمسات الأكسنت الذهبي - Accent Color Touches
   ============================================ */

/* 1. النقطة النشطة في السلايدر */
.swiper-pagination-bullet-active,
.hero-slider .active-bullet {
	background: var(--color-accent) !important;
}

/* 2. أسهم التنقل */
.swiper-button-next,
.swiper-button-prev,
.hero-slider-arrow {
	color: var(--color-accent);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
	background: var(--color-accent);
	color: var(--color-accent-text);
}
