/* ==========================================================================
   Waqt Al-Hadhara - hero.css
   Hero Section styling & Background Image
   ========================================================================== */

.hero-sec {
    height: 100dvh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
    background-color: var(--color-bg-primary);
}

/* ── Hero Background Image ───────────────────────────────────────────────── */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    max-width: 100%; /* image can never exceed parent even if its intrinsic 2000px tries to */
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    animation: kenBurns 28s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0%   { transform: scale(1.0) translate(0, 0); }
    100% { transform: scale(1.18) translate(-2%, -1%); }
}

/* Gradient overlay — keeps image visible in center, fades edges for readability */
.hero-sec::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to bottom, 
            rgba(12, 13, 14, 0.45) 0%, 
            rgba(12, 13, 14, 0.15) 30%, 
            rgba(12, 13, 14, 0.1) 50%, 
            rgba(12, 13, 14, 0.5) 75%, 
            rgba(12, 13, 14, 0.85) 90%, 
            var(--color-bg-primary) 100%
        ),
        linear-gradient(to left, 
            rgba(12, 13, 14, 0.4) 0%, 
            rgba(12, 13, 14, 0.08) 40%, 
            rgba(12, 13, 14, 0) 100%
        );
    z-index: 1;
    pointer-events: none;
}

html.light-mode .hero-sec::before {
    background: 
        linear-gradient(to bottom, 
            rgba(250, 248, 244, 0.4) 0%, 
            rgba(250, 248, 244, 0.15) 25%, 
            rgba(250, 248, 244, 0.1) 45%, 
            rgba(250, 248, 244, 0.15) 65%, 
            rgba(250, 248, 244, 0.4) 80%, 
            rgba(250, 248, 244, 0.85) 93%, 
            var(--color-bg-primary) 100%
        ),
        linear-gradient(to left, 
            rgba(250, 248, 244, 0.35) 0%, 
            rgba(250, 248, 244, 0.1) 40%, 
            rgba(250, 248, 244, 0) 100%
        );
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* ── Dark mode gold text (explicit to prevent color loss) ─────────── */
.hero-title .text-gold {
    color: var(--color-gold);
}

/* Light mode hero — dark text, subtle shadows for readability */
html.light-mode .hero-title {
    color: #1A1814;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 1px 3px rgba(0, 0, 0, 0.15);
}

html.light-mode .hero-title .text-gold {
    color: #7A5208;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.8);
}

html.light-mode .hero-desc {
    color: #3A3832;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
}

html.light-mode .hero-title::after {
    background: linear-gradient(90deg, #7A5208, #A67C1A);
}

html.light-mode .hero-badge {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: rgba(139, 94, 10, 0.4);
    color: #4A3808;
}

html.light-mode .hero-badge i {
    color: #7A5208;
}

.hero-sec .container {
    position: relative;
    z-index: 3;
}.hero-content {
    max-width: 720px;
}

/* ── Hero Badge ──────────────────────────────────────────────────────────── */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(229, 184, 105, 0.12);
    border: 1px solid var(--color-gold);
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 28px;
    color: var(--color-gold-bright);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-badge i {
    color: var(--color-gold);
    animation: slowSpin 10s linear infinite;
    filter: drop-shadow(0 0 4px rgba(var(--color-gold-rgb), 0.4));
}

@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hero-title {
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    font-weight: 800;
    line-height: 1.25;
}

/* Gold accent line under heading */
.hero-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-bright));
    margin-top: 20px;
    border-radius: 2px;
}

.hero-desc {
    font-size: 1.15rem;
    margin-bottom: 36px;
    color: var(--color-text-primary);
    line-height: 1.85;
    max-width: 600px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-sec {
        padding-top: 96px;
        padding-bottom: 60px;
        text-align: right;
        align-items: center;
        min-height: 100svh;
    }

    .hero-content {
        max-width: 100%;
    }

    /* Physical Crop Fix: Offset image and slightly extend overlay to bury the edge */
    .hero-bg {
        height: calc(100% + 15px);
        bottom: -10px;
    }

    .hero-sec::before {
        height: calc(100% + 2px); /* Slight overlap to ensure no pixel gaps */
    }

    .hero-badge {
        font-size: 0.78rem;
        padding: 8px 16px;
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: clamp(1.9rem, 7.5vw, 2.8rem);
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .hero-title::after {
        width: 60px;
        margin-top: 14px;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 28px;
    }

    .btn-group {
        gap: 12px;
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        font-size: 0.95rem;
    }

    .hero-sec .btn:focus-visible {
        outline: 2px solid var(--color-gold-bright);
        outline-offset: 3px;
    }
}

@media (max-width: 480px) {
    .hero-sec {
        padding-top: 88px;
    }

    .hero-title {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
    }

    .hero-title::after {
        width: 50px;
    }
}
