/* Miftah Carousel Hero Widget Styles */

.miftah-hero-slider {
    position: relative;
    width: 100%;
    /* Height is set via inline style from settings */
}

.miftah-hero-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    width: 100%;
    height: 100%;
}

.miftah-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.miftah-hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    box-sizing: border-box;
}

.miftah-hero-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 30px;
}

.miftah-hero-text-wrap {
    flex: 1 1 auto;
    max-width: 65%;
}

.miftah-hero-btn-wrap {
    flex: 0 0 auto;
    margin-bottom: 5px; /* slight visual adjustment so it aligns nicely with text baseline */
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .miftah-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .miftah-hero-text-wrap {
        max-width: 100%;
    }
}

.miftah-hero-title {
    margin-top: 0;
    line-height: 1.2;
}

.miftah-hero-desc {
    margin-top: 0;
    line-height: 1.5;
}

.miftah-hero-price {
    margin-top: 0;
    line-height: 1.2;
    font-weight: 600;
    color: #c9a96e; /* Elegant golden brand color */
}

.miftah-hero-btn {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
}

/* Navigation Overrides */
.miftah-hero-slider .swiper-button-next,
.miftah-hero-slider .swiper-button-prev {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.miftah-hero-slider .swiper-pagination-bullet {
    transition: all 0.3s ease;
}

/* --- Animations --- */
.miftah-hero-text-wrap > * {
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block; /* ensures transforms work */
}

.miftah-hero-btn-wrap > * {
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: inline-block; /* ensures transforms work */
}

/* Badge animation - independent from btn-wrap */
.miftah-hero-slide:not(.swiper-slide-active) > .badge-container {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.miftah-hero-slide.swiper-slide-active > .badge-container {
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Fade In */
.miftah-animate-fadeIn .miftah-hero-text-wrap > *,
.miftah-animate-fadeIn .miftah-hero-btn-wrap > * {
    opacity: 1;
}

/* Fade Up */
.miftah-hero-slide:not(.swiper-slide-active) .miftah-hero-text-wrap > *,
.miftah-hero-slide:not(.swiper-slide-active) .miftah-hero-btn-wrap > *,
.miftah-hero-slider[data-animation="fadeUp"] .miftah-hero-slide:not(.miftah-animate-fadeUp) .miftah-hero-text-wrap > *,
.miftah-hero-slider[data-animation="fadeUp"] .miftah-hero-slide:not(.miftah-animate-fadeUp) .miftah-hero-btn-wrap > * {
    transform: translateY(30px);
}
.miftah-animate-fadeUp .miftah-hero-text-wrap > *,
.miftah-animate-fadeUp .miftah-hero-btn-wrap > * {
    opacity: 1;
    transform: translateY(0);
}

/* Fade Down */
.miftah-hero-slider[data-animation="fadeDown"] .miftah-hero-slide:not(.miftah-animate-fadeDown) .miftah-hero-text-wrap > *,
.miftah-hero-slider[data-animation="fadeDown"] .miftah-hero-slide:not(.miftah-animate-fadeDown) .miftah-hero-btn-wrap > * {
    transform: translateY(-30px);
}
.miftah-animate-fadeDown .miftah-hero-text-wrap > *,
.miftah-animate-fadeDown .miftah-hero-btn-wrap > * {
    opacity: 1;
    transform: translateY(0);
}

/* Zoom In */
.miftah-hero-slider[data-animation="zoomIn"] .miftah-hero-slide:not(.miftah-animate-zoomIn) .miftah-hero-text-wrap > *,
.miftah-hero-slider[data-animation="zoomIn"] .miftah-hero-slide:not(.miftah-animate-zoomIn) .miftah-hero-btn-wrap > * {
    transform: scale(0.9);
}
.miftah-animate-zoomIn .miftah-hero-text-wrap > *,
.miftah-animate-zoomIn .miftah-hero-btn-wrap > * {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Delays */
.miftah-hero-slide.swiper-slide-active .miftah-hero-title {
    transition-delay: 0.1s;
}
.miftah-hero-slide.swiper-slide-active .miftah-hero-desc {
    transition-delay: 0.2s;
}
.miftah-hero-slide.swiper-slide-active .miftah-hero-btn,
.miftah-hero-slide.swiper-slide-active > .badge-container {
    transition-delay: 0.3s;
}

/* --- Badge Styles --- */
.badge-container {
    position: absolute;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2c4a6e;
    transform: skewX(-5deg);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Default position: bottom right */
.badge-container.badge-h-right {
    right: 40px;
    left: auto;
}
.badge-container.badge-h-left {
    left: 40px;
    right: auto;
}
.badge-container.badge-v-bottom {
    bottom: 80px;
    top: auto;
}
.badge-container.badge-v-top {
    top: 80px;
    bottom: auto;
}

.badge-text {
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    z-index: 3;
    transform: skewX(5deg);
    transition: all 0.3s ease;
    color: #ffffff;
}

/* Responsive: badge on mobile */
@media (max-width: 767px) {
    .badge-container {
        width: 120px;
        height: 70px;
    }
}
