/* ==========================================================================
   Al Iman Quran Academy - Hero Section Widget CSS
   ========================================================================== */

/* Design Tokens & Colors */
:root {
    --sbw-primary: #058349;
    --sbw-secondary: #FFB606;
    --sbw-muted: #6a6a6a;
    --sbw-dark: #222222;
    --sbw-white: #ffffff;
    --sbw-overlay-default: rgba(0, 0, 0, 0.65);
    --sbw-font-main: 'Philosopher', 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    --sbw-font-arabic: 'Amiri', 'Traditional Arabic', 'Noto Naskh Arabic', serif;
}

.sbw-hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Philosopher', var(--sbw-font-main);
    color: var(--sbw-white);
    overflow: hidden;
    box-sizing: border-box;
}

.sbw-hero-section * {
    font-family: 'Philosopher', var(--sbw-font-main);
}

/* Background Overlay */
.sbw-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* Top Bar - Bismillah Calligraphy */
.sbw-top-bar {
    position: relative;
    z-index: 10;
    padding: 12px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sbw-bismillah-text {
    font-family: var(--sbw-font-arabic);
    font-size: 28px;
    font-weight: 700;
    display: inline-block;
    direction: rtl;
    background: linear-gradient(110deg, #FFB606 0%, #ffffff 30%, #058349 50%, #ffffff 70%, #FFB606 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sbw-bismillah-shine 4s linear infinite;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 182, 6, 0.3);
}

@keyframes sbw-bismillah-shine {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Container Wrapper */
.sbw-hero-container {
    position: relative;
    z-index: 5;
    max-width: 1350px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Main Navbar */
.sbw-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--sbw-primary);
    padding: 14px 28px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Logo Styling */
.sbw-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--sbw-white);
}

.sbw-logo-img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.sbw-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.sbw-logo-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--sbw-white);
    font-family: var(--sbw-font-main);
}

.sbw-logo-subtitle {
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--sbw-secondary);
}

/* Navigation Links */
.sbw-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 28px;
}

.sbw-nav-item {
    position: relative;
}

.sbw-nav-link {
    color: var(--sbw-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sbw-nav-link:hover {
    color: var(--sbw-secondary);
}

/* Submenu Dropdown */
.sbw-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.sbw-nav-item:hover .sbw-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sbw-dropdown-item a {
    display: block;
    padding: 8px 20px;
    color: var(--sbw-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.sbw-dropdown-item a:hover {
    background-color: rgba(5, 131, 73, 0.08);
    color: var(--sbw-primary);
}

/* Header Action Button */
.sbw-header-btn {
    background-color: var(--sbw-secondary);
    color: var(--sbw-dark);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 186, 6, 0.3);
    transition: color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Special Button Hover Animation (Dual-Side Inward Fill) */
.sbw-btn-anim {
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
}

.sbw-btn-anim .sbw-btn-text {
    position: relative;
    z-index: 3;
    transition: color 0.4s ease;
}

.sbw-btn-anim::before,
.sbw-btn-anim::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50.5%;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Left side fill */
.sbw-btn-anim::before {
    left: 0;
    background-color: var(--sbw-primary);
    transform: scaleX(0);
    transform-origin: left center;
}

/* Right side fill */
.sbw-btn-anim::after {
    right: 0;
    background-color: var(--sbw-primary);
    transform: scaleX(0);
    transform-origin: right center;
}

/* Hover State: left & right expand to center */
.sbw-btn-anim:hover::before {
    transform: scaleX(1);
}

.sbw-btn-anim:hover::after {
    transform: scaleX(1);
}

.sbw-btn-anim:hover .sbw-btn-text {
    color: var(--sbw-white) !important;
}

/* Variation for Green Buttons filling with Secondary Yellow */
.sbw-btn-anim-green::before,
.sbw-btn-anim-green::after {
    background-color: var(--sbw-secondary);
}

.sbw-btn-anim-green:hover .sbw-btn-text {
    color: var(--sbw-dark) !important;
}

/* Hero Main Content Area */
.sbw-hero-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    padding: 30px 0 60px 0;
    position: relative;
}

/* Slider Track & Slide Items */
.sbw-hero-slider {
    width: 100%;
    position: relative;
}

.sbw-slide-item {
    display: none;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.sbw-slide-item.active {
    display: grid;
    opacity: 1;
}

/* Content Left Column */
.sbw-slide-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 20px;
}

.sbw-slide-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 20px 0;
    color: var(--sbw-white);
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    animation: sbw-fadeInUp 0.8s ease forwards;
}

.sbw-slide-desc {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 35px 0;
    max-width: 520px;
    animation: sbw-fadeInUp 0.8s ease 0.2s forwards;
}

/* Hero Primary CTA Button */
.sbw-hero-cta {
    background-color: var(--sbw-secondary);
    color: var(--sbw-dark);
    font-size: 16px;
    font-weight: 700;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 25px rgba(255, 186, 6, 0.35);
    animation: sbw-fadeInUp 0.8s ease 0.4s forwards;
}

/* Vertical Slider Dots */
.sbw-slider-pagination {
    position: absolute;
    right: 51%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
}

.sbw-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sbw-dot.active {
    height: 28px;
    background-color: var(--sbw-secondary);
    box-shadow: 0 0 10px var(--sbw-secondary);
}

/* Hero Right Image & Backdrop Section */
.sbw-slide-media-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Yellow Accent Background Curve matching reference screenshot */
.sbw-yellow-accent-bg {
    position: absolute;
    bottom: -60px;
    right: -100px;
    width: 480px;
    height: 480px;
    background-color: var(--sbw-secondary);
    border-radius: 50% 50% 0 50%;
    z-index: 1;
    pointer-events: none;
    box-shadow: -10px 10px 40px rgba(0,0,0,0.15);
}

/* Main Image Wrapper */
.sbw-main-img-box {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    border-radius: 40px 220px 40px 220px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: none !important;
}

.sbw-main-img-box img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.sbw-main-img-box:hover img {
    transform: scale(1.04);
}

/* Floating Circular Badge / Logo */
.sbw-floating-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    z-index: 4;
    width: 110px;
    height: 110px;
    background-color: var(--sbw-primary);
    border: 4px solid var(--sbw-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: sbw-badge-float 4s ease-in-out infinite alternate;
}

.sbw-badge-inner {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sbw-white);
    font-size: 32px;
    animation: sbw-badge-rotate 20s linear infinite;
}

.sbw-badge-inner img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Keyframe Animations */
@keyframes sbw-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sbw-badge-float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-12px) rotate(5deg);
    }
}

@keyframes sbw-badge-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Media Queries */
@media (max-width: 991px) {
    .sbw-nav-menu {
        display: none;
    }
    .sbw-slide-item {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .sbw-slide-title {
        font-size: 38px;
    }
    .sbw-slider-pagination {
        display: none;
    }
    .sbw-yellow-accent-bg {
        width: 320px;
        height: 320px;
        right: -40px;
        bottom: -40px;
    }
}

/* Mobile & Tablet View Adjustments */
@media (max-width: 1024px) {
    /* Hide Navbar completely in Mobile & Tablet View */
    .sbw-navbar {
        display: none !important;
    }
}

/* Elementor Live Preview Device Selectors */
.elementor-device-mobile .sbw-navbar,
.elementor-device-tablet .sbw-navbar {
    display: none !important;
}

@media (max-width: 767px) {
    /* Shift content up smoothly to fill space */
    .sbw-hero-body {
        padding: 20px 0 50px 0;
    }

    .sbw-slide-content {
        align-items: center;
        text-align: center;
        padding-right: 0;
    }

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

    .sbw-slide-desc {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .sbw-hero-cta {
        padding: 14px 32px;
        font-size: 15px;
    }

    .sbw-main-img-box {
        max-width: 100%;
        border-radius: 30px 120px 30px 120px;
        border: none !important;
    }

    .sbw-main-img-box img {
        height: 280px;
    }

    .sbw-yellow-accent-bg {
        width: 240px;
        height: 240px;
        right: -20px;
        bottom: -30px;
    }

    .sbw-floating-badge {
        width: 80px;
        height: 80px;
        bottom: -15px;
        left: -10px;
    }

    .sbw-badge-inner {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .sbw-badge-inner img {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Desktop & Full HD Displays (100vh Full Screen Height & Proportionate Scaling)
   ========================================================================== */
@media (min-width: 1200px) {
    .sbw-hero-section {
        min-height: 100vh;
    }

    .sbw-slide-title {
        font-size: 58px;
        margin-bottom: 22px;
    }

    .sbw-slide-desc {
        font-size: 18px;
        max-width: 580px;
        margin-bottom: 38px;
    }

    .sbw-hero-cta {
        font-size: 17px;
        padding: 17px 44px;
    }

    .sbw-main-img-box {
        max-width: 560px;
    }

    .sbw-main-img-box img {
        height: 440px;
    }

    .sbw-yellow-accent-bg {
        width: 520px;
        height: 520px;
        right: -80px;
        bottom: -60px;
    }

    .sbw-floating-badge {
        width: 120px;
        height: 120px;
        bottom: -20px;
        left: -20px;
    }

    .sbw-badge-inner {
        width: 90px;
        height: 90px;
        font-size: 34px;
    }
}

@media (min-width: 1600px) {
    .sbw-hero-container {
        max-width: 1480px;
    }

    .sbw-slide-title {
        font-size: 64px;
    }

    .sbw-slide-desc {
        font-size: 20px;
        max-width: 620px;
    }

    .sbw-main-img-box {
        max-width: 620px;
    }

    .sbw-main-img-box img {
        height: 480px;
    }

    .sbw-yellow-accent-bg {
        width: 580px;
        height: 580px;
        right: -100px;
        bottom: -70px;
    }
}
