/* ===== Slider Base ===== */

.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    --overlay: rgba(0, 0, 0, .35);
}

.hero-slider .slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    background-image: var(--bg);
    background-size: cover;
    background-position: center center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .7s ease, transform 1.2s ease;
    will-change: opacity, transform;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--overlay);
}


/* المثلث (Diagonal) */

.diagonal {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 65vw;
    background: linear-gradient(120deg, rgba(0, 0, 50, 0.7), rgba(0, 0, 50, 0.5) 60%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}


/* محتوى النص */

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 2;
    color: #fff;
    gap: 20px;
    padding-left: 10%;
    max-width: 45%;
}

.slide-title {
    font-size: clamp(18px, 4vw, 28px);
    /* حجم أوضح */
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: #fff;
}

.slide-text {
    max-width: min(600px, 90%);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.7;
    margin: 0;
    color: #f0f0f0;
}


/* ===== تعديلات RTL ===== */

html[dir="rtl"] .slide-content {
    align-items: flex-end;
    padding-right: 2%;
    /* ⬅️ قرب النص أكثر لليمين */
    padding-left: 0;
    text-align: right;
    margin-left: 0;
    margin-right: 0;
}

.title-underline {
    width: 80px;
    height: 3px;
    background: #ff7d00;
    margin: 15px 0 25px;
}

.slide-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 15px 30px;
    background: #ff7d00;
    border: none;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.slide-btn:hover {
    background: #e67100;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* أسهم التنقل */

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .9);
    background: rgba(0, 0, 0, .25);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    display: grid;
    place-items: center;
    transition: background .2s, transform .2s, opacity .2s;
    backdrop-filter: blur(2px);
}

.nav:hover {
    background: rgba(255, 255, 255, .18);
    transform: translateY(-50%) scale(1.05);
}

.nav span {
    font-size: 28px;
    line-height: 1;
    transform: translateY(-2px);
}

.nav.prev {
    left: 18px;
}

.nav.next {
    right: 18px;
}


/* نقاط التحكم */


/* نقاط التحكم - AFTER (حلقات بيضاء، الحالية ممتلئة مع هالة) */

.dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    transform: translateX(-50%);
    bottom: 22px;
    /* عدّل الارتفاع إن لزم */
    display: flex;
    gap: 12px;
    /* مسافة بين النقاط */
}

.dots button {
    width: 18px;
    /* حجم أكبر */
    height: 18px;
    border-radius: 50%;
    background: transparent;
    /* فارغة افتراضيًا */
    border: 2px solid rgba(255, 255, 255, .95);
    opacity: 1;
    /* وضوح كامل */
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.dots button:hover {
    transform: scale(1.06);
}

.dots button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.dots button.active {
    background: #fff;
    /* امتلاء الحالية */
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .25);
    /* هالة خفيفة حولها */
    transform: none;
    /* بدون تكبير لتجنّب الاهتزاز */
}


/* ===== تعديلات RTL ===== */

html[dir="rtl"] .diagonal {
    left: auto;
    right: 0;
    background: linear-gradient(-100deg, rgba(0, 0, 50, 0.7), rgba(0, 0, 50, 0.5) 60%, transparent 60%);
}

html[dir="rtl"] .title-underline {
    margin-left: 0;
    margin-right: 0;
}

html[dir="rtl"] .nav.prev {
    right: 18px;
    left: auto;
}

html[dir="rtl"] .nav.next {
    left: 18px;
    right: auto;
}


/* ===== تجاوبية ===== */

@media (max-width: 992px) {
    .diagonal {
        width: 100vw;
    }
    .slide-content {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .diagonal {
        width: 100vw;
    }
    .slide-content {
        padding-left: 5%;
        max-width: 80%;
    }
    .slide-title {
        font-size: clamp(28px, 5vw, 40px);
    }
    .slide-text {
        font-size: clamp(16px, 2vw, 20px);
    }
    .slide-btn {
        padding: 12px 24px;
        font-size: 16px;
    }
}


/* ===== تأثيرات الظهور ===== */

.slide .slide-content,
.slide .diagonal {
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.show-text .slide-content {
    opacity: 1;
}

.slide.show-shadow .diagonal {
    opacity: 1;
}