/*
Theme Name: Al-Bayan Academy
Theme URI: 
Author: AI Assistant
Description: A complete modern Islamic WordPress theme for an online Quran academy called "Al-Bayan Academy", ready for Elementor.
Version: 1.3
Text Domain: albayan
*/

:root {
    /* Refined Luxurious Palette */
    --primary-dark: #0A3022;
    /* Deeper elegant green */
    --primary-light: #165640;
    --primary-glow: rgba(22, 86, 64, 0.4);

    --bg-warm: #FCFBF9;
    /* Ultra subtle warm paper/pearl */
    --bg-pattern-img: url('figure-pattern-wall.jpg');
    --bg-pattern-two: url('46f1ddc5-2db4-44d9-8c6e-4cfd43070507.jpg');

    --wood-brown: #B79A71;
    /* Softer muted wood */
    --gold-accent: #D4AF37;
    /* Metallic Gold */
    --gold-glow: rgba(212, 175, 55, 0.4);

    --text-dark: #2F3E38;
    --text-body: #5B6D66;
    --text-light: #FFFFFF;

    /* Smooth Shadows */
    --shadow-sm: 0 4px 15px rgba(10, 48, 34, 0.04);
    --shadow-md: 0 15px 40px rgba(10, 48, 34, 0.06);
    --shadow-hover: 0 25px 60px rgba(10, 48, 34, 0.12);

    /* Gradients */
    --gold-gradient: linear-gradient(135deg, #E6C56F 0%, #C49F2D 100%);
    --green-gradient: linear-gradient(135deg, #0A3022 0%, #165640 100%);

    /* Animation Easing */
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito Sans', 'Nunito', sans-serif;
    font-weight: 400;
    background-color: var(--bg-warm);
    color: var(--text-body);
    margin: 0;
    line-height: 1.8;
    direction: ltr;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Nunito', sans-serif;
    color: var(--primary-dark);
    margin-top: 0;
    font-weight: 800;
    line-height: 1.3;
}

/* Beautiful serif accents for premium feel */
.font-serif {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.text-gold {
    color: var(--gold-accent);
}

.text-primary {
    color: var(--primary-dark);
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-body);
    max-width: 650px;
    margin: 0 auto 60px;
    font-weight: 300;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Scroll Revel Animations (Triggered by JS) */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s var(--transition-smooth);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.5s var(--transition-smooth);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s var(--transition-smooth);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s var(--transition-smooth);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* 
 * FIX FOR ELEMENTOR EDITOR LIVE PREVIEW
 * Forces all elements hidden by scroll animations to be fully visible while editing in Elementor
 * to allow users to see their changes instantly without hitting the Preview button.
 */
body.elementor-editor-active .reveal-up,
body.elementor-editor-active .reveal-left,
body.elementor-editor-active .reveal-right,
body.elementor-editor-active .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.is-revealed {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Delay Utility */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

/* Decorative Islamic Elements */
.decorative-line {
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 0 auto 30px;
    border-radius: 2px;
}

.decorative-line.left {
    margin-left: 0;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-sm);
    border-radius: 24px;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s var(--transition-smooth);
    border: 1px solid transparent;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.btn-primary {
    background: var(--gold-gradient);
    color: #fff;
    box-shadow: 0 10px 20px var(--gold-glow);
}

.btn-primary::before {
    background: linear-gradient(135deg, #C49F2D 0%, #E6C56F 100%);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px var(--gold-glow);
    color: #fff;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--primary-light);
}

.btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
}

/* Ultra Smooth Header */
.site-header {
    background: transparent;
    padding: 25px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.6s var(--transition-smooth);
}

.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo h1 {
    margin: 0;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    transition: color 0.4s ease;
}

.header-scrolled .site-logo h1 {
    color: var(--primary-dark);
}

.site-logo h1 span {
    color: var(--gold-accent);
}

.site-logo a {
    text-decoration: none;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding-bottom: 5px;
}

.header-scrolled .main-navigation a {
    color: var(--text-dark);
}

.main-navigation a:hover {
    color: var(--gold-accent);
}

/* Elegant Hero Section */
.hero-section {
    position: relative;
    background: var(--green-gradient);
    padding: 220px 0 200px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-pattern-img);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.08;
    z-index: 1;
}

/* Subtle light bleed */
.hero-section::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    text-align: center;
    margin: 0 auto;
}

.hero-sub-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: var(--gold-accent);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-section h1 {
    color: #fff;
    font-size: 4.5rem;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.hero-section p {
    font-size: 1.25rem;
    font-weight: 300;
    margin: 0 auto 50px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.9;
}

/* Beautiful Floating Features */
.features-section {
    padding: 0 0 100px;
    position: relative;
    z-index: 10;
    margin-top: -100px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    padding: 50px 40px;
    text-align: center;
    transition: all 0.6s var(--transition-smooth);
    border-bottom: 3px solid transparent;
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--gold-accent);
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--gold-accent);
    box-shadow: var(--shadow-sm);
    transition: all 0.5s var(--transition-smooth);
    transform: rotate(45deg);
}

.feature-icon-wrapper svg,
.feature-icon-wrapper i {
    transform: rotate(-45deg);
    stroke-width: 1.5;
    font-size: 32px;
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--gold-gradient);
    color: #fff;
    transform: rotate(0deg);
}

.feature-card:hover .feature-icon-wrapper svg,
.feature-card:hover .feature-icon-wrapper i {
    transform: rotate(0deg);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.8;
}

/* Premium Courses Sections */
.courses-section {
    padding: 120px 0;
    background-color: #fff;
    position: relative;
}

/* Clean abstract shape background */
.courses-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 400px;
    height: 400px;
    background: var(--bg-warm);
    border-radius: 0 0 100% 0;
    opacity: 0.5;
    z-index: 0;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
    position: relative;
    z-index: 2;
}

.course-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.6s var(--transition-smooth);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.course-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.course-image-wrapper {
    height: 220px;
    position: relative;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    overflow: hidden;
}

.course-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-pattern-two);
    opacity: 0.04;
    background-size: cover;
    transition: transform 0.8s ease;
}

.course-card:hover .course-image-wrapper::after {
    transform: scale(1.1);
}

.course-image-wrapper svg,
.course-image-wrapper i {
    position: relative;
    z-index: 2;
    opacity: 0.8;
    transition: all 0.5s ease;
    font-size: 60px;
}

.course-card:hover .course-image-wrapper svg,
.course-card:hover .course-image-wrapper i {
    transform: scale(1.1);
    color: var(--gold-accent);
}

.course-content {
    padding: 40px 30px;
}

.course-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.course-content p {
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Elegant Split Trust Section */
.trust-section {
    padding: 0;
    background: var(--bg-warm);
    position: relative;
    overflow: hidden;
}

.trust-wrapper {
    display: flex;
    align-items: center;
    min-height: 600px;
}

.trust-content {
    flex: 1;
    padding: 100px 5%;
    position: relative;
    z-index: 2;
}

.trust-image {
    flex: 1;
    background: var(--primary-dark);
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-pattern-img);
    opacity: 0.06;
}

.trust-image svg {
    width: 150px;
    height: 150px;
    color: rgba(212, 175, 55, 0.2);
}

/* Testimonials */
.testimonials-section {
    padding: 120px 0;
    background: #fff;
}

.testi-card {
    background: #fff;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all 0.5s var(--transition-smooth);
    border-top: 4px solid var(--gold-accent);
}

.testi-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.testi-card p {
    font-size: 1.05rem;
    color: var(--text-body);
    font-style: italic;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.testi-author {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.testi-avatar {
    width: 45px;
    height: 45px;
    background: var(--bg-warm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
}

.testi-author-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-dark);
}

.testi-author-info span {
    font-size: 0.8rem;
    color: #999;
}

/* Super Smooth FAQ Accordion */
.faq-section {
    padding: 120px 0;
    background: var(--bg-warm);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-item h4 {
    margin: 0;
    padding: 25px 30px;
    cursor: pointer;
    color: var(--primary-dark);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    font-weight: 500;
    transition: color 0.3s;
}

.faq-item:hover h4 {
    color: var(--gold-accent);
}

.faq-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    transition: transform 0.4s var(--transition-smooth);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background: var(--gold-gradient);
    color: #fff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--transition-smooth);
}

.faq-answer-inner {
    padding: 0 30px 30px;
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Beautiful Clean CTA Section */
.cta-section {
    padding: 140px 0;
    background: var(--primary-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-pattern-two);
    opacity: 0.05;
    background-size: cover;
    background-attachment: fixed;
}

.cta-section .container {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.cta-section h2 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 20px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
}

@media screen and (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-section {
        padding: 160px 0 100px;
    }

    .trust-wrapper {
        flex-direction: column;
    }

    .trust-image {
        min-height: 300px;
        width: 100%;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .courses-section,
    .faq-section,
    .testimonials-section {
        padding: 80px 0;
    }

    .cta-section {
        padding: 80px 0;
    }

    .cta-section h2 {
        font-size: 2.2rem;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        background: var(--primary-dark);
        padding: 20px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        /* Mobile menu toggle requires JS, hidden on pure CSS setup without toggle */
    }
}

@media screen and (max-width: 480px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .features-section {
        margin-top: -60px;
    }

    .course-card .course-image-wrapper {
        height: 180px;
    }

    .btn {
        width: 100%;
        padding: 14px 20px;
    }
}