/* ==========================================================================
   Revolution-Style Hero Content Animation Slider
   Built for El-Masrya Foods (Bootstrap 5 + jQuery)
   ========================================================================== */

.rev-slider-wrapper {
    position: relative;
    width: 100%;
    height: clamp(560px, 84vh, 780px);
    overflow: hidden;
    background: #0d1c20;
    user-select: none;
}

/* Progress Timer Bar (Top & Crisp) */
.rev-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 30;
    overflow: hidden;
}

.rev-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #F4B925 0%, #FFE17D 60%, #F4B925 100%);
    box-shadow: 0 0 12px rgba(244, 185, 37, 0.8);
    transition: width 0.05s linear;
}

/* Slides Stage */
.rev-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.rev-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.85s;
}

.rev-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 5;
}

.rev-slide.is-leaving {
    opacity: 0;
    visibility: visible;
    z-index: 3;
}

/* Background with Ken Burns Effect */
.rev-bg-wrap {
    position: absolute;
    inset: -2%;
    overflow: hidden;
}

.rev-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.0) translate3d(0, 0, 0);
    will-change: transform;
}

.rev-slide.is-active .rev-bg-img {
    animation: revKenBurns 8.5s ease-out forwards;
}

@keyframes revKenBurns {
    0% {
        transform: scale(1.0) translate3d(0, 0, 0);
    }
    100% {
        transform: scale(1.09) translate3d(-1.2%, -0.8%, 0);
    }
}

/* Rich Brand-Matched Scrim Overlays */
.rev-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(95deg, rgba(14, 30, 34, 0.92) 0%, rgba(20, 48, 38, 0.78) 46%, rgba(14, 30, 34, 0.34) 100%),
        linear-gradient(180deg, rgba(14, 30, 34, 0.35) 0%, rgba(14, 30, 34, 0.1) 45%, rgba(14, 30, 34, 0.88) 100%);
    z-index: 2;
}

[dir="rtl"] .rev-scrim {
    background:
        linear-gradient(265deg, rgba(14, 30, 34, 0.92) 0%, rgba(20, 48, 38, 0.78) 46%, rgba(14, 30, 34, 0.34) 100%),
        linear-gradient(180deg, rgba(14, 30, 34, 0.35) 0%, rgba(14, 30, 34, 0.1) 45%, rgba(14, 30, 34, 0.88) 100%);
}

/* Slide Content Container */
.rev-content-container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    padding-bottom: 58px;
}

/* Individual Animated Layers */
.rev-layer {
    opacity: 0;
    will-change: transform, opacity, clip-path;
}

.rev-layer.is-animated {
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Keyframe Animations matching Slider Revolution feel */
@keyframes revAnimFadeUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 42px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes revAnimSlideLeft {
    0% {
        opacity: 0;
        transform: translate3d(-65px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes revAnimSlideRight {
    0% {
        opacity: 0;
        transform: translate3d(65px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes revAnimMaskReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 0 100% 0);
        transform: translate3d(0, 28px, 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0% 0);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes revAnimZoomPop {
    0% {
        opacity: 0;
        transform: scale(0.84) translate3d(0, 18px, 0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translate3d(0, 0, 0);
    }
}

.rev-anim-fadeUp.is-animated { animation-name: revAnimFadeUp; }
.rev-anim-slideLeft.is-animated { animation-name: revAnimSlideLeft; }
.rev-anim-slideRight.is-animated { animation-name: revAnimSlideRight; }
.rev-anim-maskReveal.is-animated { animation-name: revAnimMaskReveal; }
.rev-anim-zoomPop.is-animated { animation-name: revAnimZoomPop; }

/* Typography & Layer Styling */
.rev-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    border-radius: 50px;
    background: rgba(244, 185, 37, 0.16);
    border: 1px solid rgba(244, 185, 37, 0.48);
    color: #FFE082;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.rev-kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F4B925;
    box-shadow: 0 0 0 4px rgba(244, 185, 37, 0.25);
}

.rev-headline {
    font-family: var(--font-display);
    font-size: clamp(2.15rem, 4.7vw, 4.1rem);
    font-weight: 800;
    line-height: 1.08;
    color: #FFFFFF;
    margin-top: 1.15rem;
    margin-bottom: 1.15rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

[dir="rtl"] .rev-headline {
    font-family: var(--font-ar);
    line-height: 1.24;
}

.rev-headline .rev-accent-line {
    display: block;
    color: #F4B925;
}

.rev-description {
    font-size: clamp(0.98rem, 1.3vw, 1.16rem);
    line-height: 1.68;
    color: rgba(247, 245, 234, 0.9);
    max-width: 600px;
    margin-bottom: 1.85rem;
}

/* Floating Stat / Purity Badge Card (Right Column Parallax Layer) */
.rev-floating-card {
    background: rgba(19, 38, 43, 0.74);
    border: 1px solid rgba(244, 185, 37, 0.35);
    border-radius: 20px;
    padding: 1.65rem 1.85rem;
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.42);
    max-width: 310px;
    transition: transform 0.25s ease-out;
}

.rev-floating-metric {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #F4B925;
    margin-bottom: 0.45rem;
}

.rev-floating-label {
    color: #F7F5EA;
    font-weight: 600;
    font-size: 0.98rem;
    margin-bottom: 0.85rem;
}

.rev-floating-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #b7d2be;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 0.75rem;
}

/* Revolution Arrows with Thumbnail Hover Preview */
.rev-arrow {
    position: absolute;
    top: 48%;
    transform: translateY(-50%);
    z-index: 25;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(19, 38, 43, 0.65);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.28s ease;
}

.rev-arrow:hover {
    background: #F4B925;
    border-color: #F4B925;
    color: #13262B;
    transform: translateY(-50%) scale(1.06);
}

.rev-arrow-prev { left: 24px; }
.rev-arrow-next { right: 24px; }

.rev-arrow-preview {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    width: 190px;
    background: rgba(19, 38, 43, 0.95);
    border: 1px solid rgba(244, 185, 37, 0.45);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.rev-arrow-prev .rev-arrow-preview { left: 66px; }
.rev-arrow-next .rev-arrow-preview { right: 66px; flex-direction: row-reverse; text-align: right; }

.rev-arrow:hover .rev-arrow-preview {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.rev-arrow-preview img {
    width: 56px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.rev-arrow-preview span {
    font-size: 0.74rem;
    font-weight: 600;
    color: #F7F5EA;
    line-height: 1.25;
}

/* Bottom Revolution Slide Tabs */
.rev-tabs-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 25;
    background: rgba(13, 28, 32, 0.78);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.rev-tabs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.rev-tab-btn {
    position: relative;
    background: transparent;
    border: 0;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
    padding: 13px 16px;
    text-align: start;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rev-tab-btn:last-child {
    border-inline-end: 0;
}

.rev-tab-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #F4B925;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.rev-tab-btn.is-active {
    background: rgba(46, 90, 54, 0.35);
    color: #FFFFFF;
}

.rev-tab-btn.is-active::before {
    transform: scaleX(1);
}

.rev-tab-num {
    font-size: 0.76rem;
    font-weight: 800;
    color: #F4B925;
    background: rgba(244, 185, 37, 0.14);
    border: 1px solid rgba(244, 185, 37, 0.35);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rev-tab-title {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.rev-tab-sub {
    display: block;
    font-size: 0.72rem;
    opacity: 0.72;
}

@media (max-width: 991.98px) {
    .rev-slider-wrapper {
        height: 600px;
    }
    .rev-arrow {
        width: 42px;
        height: 42px;
    }
    .rev-arrow-prev { left: 10px; }
    .rev-arrow-next { right: 10px; }
    .rev-arrow-preview { display: none; }
    .rev-tab-sub { display: none; }
}

@media (max-width: 767.98px) {
    .rev-slider-wrapper {
        height: 580px;
    }
    .rev-tabs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .rev-tab-btn {
        padding: 10px 8px;
        justify-content: center;
    }
    .rev-tab-text {
        display: none;
    }
}
