/* =========================================================
   bannar.css  — Enhanced Hero Banner with RTL Layout
   Layout: bg_image full-width | text+btns (right) | box_image (left)
   ========================================================= */

/* ── Google Font for Arabic headings ── */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700;900&display=swap');

/* ── Section wrapper ── */
.S1_home {
    width: 100%;
    height: calc(100vh - 120px);
    margin-top: 120px;
    position: relative;
    overflow: hidden;
    background-color: var(--body_bgColor, #0d0d0d);
}

body .fix ~ .S1_home {
    margin-top: 70px;
    height: calc(100vh - 70px);
}

/* ── Owl carousel fills section ── */
.S1_home .owl-carousel,
.S1_home .owl-carousel .owl-stage-outer,
.S1_home .owl-carousel .owl-stage,
.S1_home .owl-carousel .owl-item {
    height: 100%;
}

/* ── Each slide item ── */
.S1_home .owl-carousel .item {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    direction: rtl;
}

/* ── Background image wrapper ── */
.banner-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: transform 8s ease;
    background-color: #000; /* Fallback */
}

/* New img styling for LCP optimization */
.banner-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.S1_home .owl-carousel .owl-item.active .banner-bg {
    transform: scale(1.05);
}

/* Dark overlay for readability */
.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.45) 50%,
        rgba(0,0,0,0.15) 100%
    );
    z-index: 1;
}

/* ── Inner flex container ── */
.banner-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6vw;
    gap: 32px;
}

/* ── Right side: text + buttons (RTL start) ── */
.banner-content {
    flex: 1;
    max-width: 560px;
    text-align: right;
    direction: rtl;
}

.banner-label {
    display: inline-block;
    font-size: clamp(0.65rem, 1.2vw, 0.78rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--btnColor, #d4af37);
    border: 1px solid rgba(212,175,55,0.5);
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.1s;
}

.banner-title {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: clamp(1.4rem, 3.5vw + 0.5rem, 2.8rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 12px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s ease 0.25s;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.banner-subtitle {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: clamp(0.8rem, 1.5vw + 0.3rem, 1.1rem);
    color: rgba(255,255,255,0.82);
    line-height: 1.7;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease 0.4s;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.banner-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    direction: rtl;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease 0.55s;
}

/* Primary button */
.banner-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: clamp(10px, 1.5vw, 13px) clamp(18px, 3vw, 28px);
    background: var(--btnColor, #d4af37);
    color: #000;
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(0.82rem, 1.2vw + 0.2rem, 1rem);
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(212,175,55,0.35);
    white-space: nowrap;
}
.banner-btn-primary:hover {
    background: transparent;
    color: var(--btnColor, #d4af37);
    border-color: var(--btnColor, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(212,175,55,0.45);
}

/* Secondary button */
.banner-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: clamp(10px, 1.5vw, 13px) clamp(18px, 3vw, 28px);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(0.82rem, 1.2vw + 0.2rem, 1rem);
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    white-space: nowrap;
}
.banner-btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ── Left side: box image ── */
.banner-box {
    flex: 0 0 auto;
    width: min(340px, 35vw);
    height: min(380px, 60vh);
    position: relative;
    opacity: 0;
    transform: translateX(-40px) scale(0.92);
    transition: all 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.3s;
}

.banner-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 48px rgba(0,0,0,0.55));
    animation: bannerFloat 4s ease-in-out infinite;
}

/* Glow ring under box */
.banner-box::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 65%;
    height: 24px;
    background: radial-gradient(ellipse, rgba(212,175,55,0.45) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(6px);
}

/* Floating animation */
@keyframes bannerFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-14px); }
}

/* ── Active slide: animate content IN ── */
.S1_home .owl-carousel .owl-item.active .banner-label,
.S1_home .owl-carousel .owl-item.active .banner-title,
.S1_home .owl-carousel .owl-item.active .banner-subtitle,
.S1_home .owl-carousel .owl-item.active .banner-btns {
    opacity: 1;
    transform: translateY(0);
}

.S1_home .owl-carousel .owl-item.active .banner-box {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* ── Owl nav buttons ── */
.S1_home .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.S1_home .owl-nav button {
    pointer-events: all;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(212,175,55,0.4);
    background: rgba(0,0,0,0.45) !important;
    backdrop-filter: blur(8px);
    color: var(--btnColor, #d4af37) !important;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.S1_home .owl-nav button:hover {
    background: var(--btnColor, #d4af37) !important;
    color: #000 !important;
    border-color: var(--btnColor, #d4af37);
    transform: scale(1.1);
}

/* ── Dots ── */
.S1_home .owl-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.S1_home .owl-dots .owl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: all 0.3s ease;
    border: none;
}
.S1_home .owl-dots .owl-dot.active {
    background: var(--btnColor, #d4af37);
    width: 28px;
    border-radius: 4px;
}

/* ============================================
   RESPONSIVE — Banner Only
   ============================================ */

/* ── Tablet Landscape (≤1200px) ── */
@media (max-width: 1200px) {
    .banner-content { max-width: 480px; }
    .banner-box { width: min(300px, 32vw); height: min(340px, 55vh); }
    .banner-inner { padding: 0 5vw; gap: 24px; }
}

/* ── Tablet Portrait (≤991px) ── */
@media (max-width: 991px) {
    .S1_home { margin-top: 80px; height: calc(100vh - 80px); }
    .banner-content { max-width: 420px; }
    .banner-title  { font-size: clamp(1.3rem, 3vw + 0.4rem, 2.2rem); }
    .banner-subtitle { font-size: clamp(0.78rem, 1.4vw + 0.25rem, 1rem); }
    .banner-box { width: min(240px, 30vw); height: min(270px, 48vh); }
    .banner-inner { padding: 0 4vw; gap: 20px; }
    .banner-label { font-size: 0.7rem; padding: 3px 12px; margin-bottom: 12px; }
}

/* ── Mobile (≤767px) — column layout, image on top ── */
@media (max-width: 767px) {
    .S1_home {
        margin-top: 70px;
        height: auto;
        min-height: calc(100vh - 70px);
    }
    .banner-inner {
        flex-direction: column-reverse;
        justify-content: center;
        align-items: stretch;
        padding: 32px 6vw;
        gap: 20px;
    }
    .banner-content {
        max-width: 100%;
        text-align: right;
        direction: rtl;
    }
    .banner-title {
        font-size: clamp(1.25rem, 5vw + 0.2rem, 1.9rem);
        line-height: 1.35;
        margin-bottom: 10px;
    }
    .banner-subtitle {
        font-size: clamp(0.75rem, 2.5vw + 0.15rem, 0.95rem);
        line-height: 1.6;
        margin-bottom: 20px;
    }
    .banner-label {
        font-size: 0.62rem;
        padding: 3px 10px;
        margin-bottom: 10px;
        letter-spacing: 1.5px;
    }
    .banner-btns {
        justify-content: flex-start;
        direction: rtl;
        gap: 10px;
    }
    .banner-btn-primary,
    .banner-btn-secondary {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    .banner-box {
        width: min(200px, 50vw);
        height: min(200px, 30vh);
        align-self: center;
        transform: translateY(-20px) scale(0.92);
    }
    .S1_home .owl-carousel .owl-item.active .banner-box {
        transform: translateY(0) scale(1);
    }
    .banner-overlay {
        background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.78));
    }
    .S1_home .owl-nav button { width: 40px; height: 40px; font-size: 17px; }
    .S1_home .owl-dots { bottom: 16px; }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {
    .S1_home { margin-top: 60px; min-height: calc(100vh - 60px); }
    .banner-inner { padding: 24px 5vw; gap: 16px; }
    .banner-title {
        font-size: clamp(1.1rem, 4.5vw, 1.55rem);
        margin-bottom: 8px;
    }
    .banner-subtitle {
        font-size: clamp(0.72rem, 2.2vw + 0.1rem, 0.88rem);
        margin-bottom: 16px;
        line-height: 1.55;
    }
    .banner-label {
        font-size: 0.58rem;
        padding: 2px 8px;
        margin-bottom: 8px;
    }
    .banner-btn-primary,
    .banner-btn-secondary {
        padding: 9px 16px;
        font-size: 0.8rem;
        gap: 6px;
    }
    .banner-box {
        width: min(170px, 48vw);
        height: min(170px, 28vh);
    }
    .S1_home .owl-nav button { width: 34px; height: 34px; font-size: 15px; }
    .S1_home .owl-dots .owl-dot { width: 6px; height: 6px; }
    .S1_home .owl-dots .owl-dot.active { width: 22px; }
}
