:root {
    /* Color Palette */
    --theme-primary: #0f172a; /* Deep Navy Blue */
    --theme-primary-hover: #1e293b;
    --theme-accent: #eab308; /* Warm Gold */
    --theme-accent-hover: #ca8a04;
    --theme-accent-glow: rgba(234, 179, 8, 0.2);
    --theme-light: #f8fafc; /* Soft White */
    --theme-text: #334155;
    --theme-text-dark: #0f172a;
    --theme-text-muted: #64748b;
    
    /* Layout */
    --nav-height: 80px;
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-arabic: 'Noto Sans Arabic', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--theme-text);
    background-color: var(--theme-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--nav-height);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
    color: var(--theme-text-dark);
    font-weight: 700;
}

html[dir="rtl"] body {
    font-family: var(--font-arabic), var(--font-body);
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 {
    font-family: var(--font-arabic), var(--font-heading);
}

a {
    color: var(--theme-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--theme-accent);
}

/* Glassmorphism Navbar */
.glass-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all 0.3s ease;
}

.glass-nav .nav-link {
    font-weight: 500;
    color: var(--theme-text-dark) !important;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.glass-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--theme-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.glass-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-brand img.logo {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}
.navbar-brand:hover img.logo {
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 10rem 0 8rem;
    position: relative;
    overflow: hidden;
    margin-top: calc(-1 * var(--nav-height)); /* pull up behind navbar */
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(234, 179, 8, 0.1) 0%, transparent 40%);
    animation: rotateSlow 30s linear infinite;
    pointer-events: none;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #ffffff;
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    font-weight: 400;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-search-form {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.search-input-modern {
    padding: 1.2rem 1.5rem;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}
.search-input-modern:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--theme-accent);
    box-shadow: 0 0 20px var(--theme-accent-glow);
    color: #fff;
    outline: none;
}
.search-input-modern::placeholder {
    color: #94a3b8;
}

/* Premium Buttons */
.btn-premium {
    background: var(--theme-accent);
    color: #1e293b;
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 179, 8, 0.4);
    background: var(--theme-accent-hover);
    color: #fff;
}

.btn-premium-outline {
    background: transparent;
    color: var(--theme-primary);
    border: 2px solid var(--theme-primary);
    font-weight: 600;
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-premium-outline:hover {
    background: var(--theme-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Premium Cards */
.card-premium {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    height: 100%;
}

.card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.card-premium .card-img-top {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transition: transform 0.5s ease;
    object-fit: cover;
    height: 220px;
}

.card-premium:hover .card-img-top {
    transform: scale(1.05);
}

.card-premium-img-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 20px 20px 0 0;
}

/* Badges */
.badge-modern {
    background: rgba(15, 23, 42, 0.05);
    color: var(--theme-primary);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.badge-primary {
    background: var(--theme-primary);
    color: #fff;
}
.badge-accent {
    background: var(--theme-accent);
    color: var(--theme-primary);
}

/* Knowledge Assistant Section */
.ai-section {
    background: #ffffff;
    border-radius: 30px;
    padding: 4rem;
    margin: 5rem 0;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ai-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.08) 0%, transparent 70%);
    z-index: 0;
}

/* Verse of the Day */
.verse-section {
    text-align: center;
    padding: 5rem 2rem;
    background: linear-gradient(to bottom, #ffffff 0%, var(--theme-light) 100%);
    border-radius: 30px;
    margin: 4rem 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.verse-quote-icon {
    font-size: 3rem;
    color: var(--theme-accent);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.verse-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--theme-text-dark);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Footer */
.footer-premium {
    background: var(--theme-primary);
    color: #cbd5e1;
    padding: 5rem 0 2rem;
    margin-top: 5rem;
}

.footer-premium h5 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-premium a {
    color: #cbd5e1;
}

.footer-premium a:hover {
    color: var(--theme-accent);
    padding-left: 5px;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: #fff;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.footer-social-icon:hover {
    background: var(--theme-accent);
    color: var(--theme-primary);
    transform: translateY(-3px);
}

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

@keyframes rotateSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.float-anim {
    animation: floating 6s ease-in-out infinite;
}

/* Sections Global */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--theme-text-dark);
}
