/**
 * ملف الأنماط المخصصة الكامل - نظام تحفيظ القرآن الكريم الذكي
 * يتضمن: التنقل، القوائم الفرعية، الأزرار، المقاطع، والواجهة الكاملة
 */

/* ========================================
   المتغيرات العامة والألوان
   ======================================== */

:root {
    /* الألوان الأساسية */
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #43e97b;
    --success-color: #38f9d7;
    --warning-color: #fa709a;
    --danger-color: #f5576c;
    --info-color: #4facfe;
    
    /* ألوان محايدة */
    --text-dark: #022f5b;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    
    /* الظلال */
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.15);
    --shadow-md: 0 4px 16px rgba(102, 126, 234, 0.2);
    --shadow-lg: 0 8px 32px rgba(102, 126, 234, 0.25);
    
    /* الانتقالات */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* الحواف */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ========================================
   شريط التنقل الرئيسي (Navbar)
   ======================================== */

.navbar {
    background: var(--bg-white) !important;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    transition: all var(--transition-normal);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-left: 0.5rem;
}

/* ========================================
   عناصر القائمة (Nav Items)
   ======================================== */

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(102, 126, 234, 0.08);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}

/* ========================================
   القوائم المنسدلة (Dropdowns)
   ======================================== */

.navbar-nav .dropdown {
    position: relative;
}

.navbar-nav .dropdown-toggle::after {
    margin-right: 0.5rem;
    transition: transform var(--transition-fast);
}

.navbar-nav .dropdown:hover > .dropdown-toggle::after {
    transform: rotate(180deg);
}

.navbar-nav .dropdown-menu {
    background: var(--bg-white);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.2rem;
    min-width: 220px;
    animation: dropdownFadeIn var(--transition-normal);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

/* فتح القائمة عند hover على الشاشات الكبيرة */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-nav .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    margin: 0.125rem 0.5rem;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary-color);
    padding-right: 2rem;
}

.navbar-nav .dropdown-item i {
    margin-left: 0.75rem;
    opacity: 0.7;
}

/* ========================================
   القوائم الفرعية متعددة المستويات
   ======================================== */

.navbar-nav .dropdown-submenu {
    position: relative;
}

.navbar-nav .dropdown-submenu > .dropdown-menu {
    top: 0;
    right: 100%;
    margin-top: 0;
    margin-left: -1px;
}

@media (min-width: 992px) {
    .navbar-nav .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

.navbar-nav .dropdown-submenu > .dropdown-item::after {
    content: '\F284';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 1rem;
    opacity: 0.5;
    transition: all var(--transition-fast);
}

.navbar-nav .dropdown-submenu:hover > .dropdown-item::after {
    left: 0.75rem;
    opacity: 1;
}

/* ========================================
   أزرار التنقل المخصصة
   ======================================== */

.nav-custom-btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-custom-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.nav-custom-btn:hover::before {
    left: 100%;
}

.nav-custom-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: #fff !important;
}

.nav-custom-btn:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.nav-custom-btn i {
    margin-left: 0.5rem;
}

/* تنوعات الألوان */
.nav-custom-btn.btn-success {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--success-color) 100%);
}

.nav-custom-btn.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #fee140 100%);
}

.nav-custom-btn.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, var(--danger-color) 100%);
}

.nav-custom-btn.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #00f2fe 100%);
}

/* أحجام الأزرار */
.nav-custom-btn.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.nav-custom-btn.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

/* أزرار محددة */
.nav-custom-btn.btn-outline {
    background: transparent;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.nav-custom-btn.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff !important;
    border-color: transparent;
}

/* ========================================
   مقطع البطل (Hero Section)
   ======================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.hero-section .btn {
    margin: 0.5rem;
}

/* ========================================
   البطاقات (Cards)
   ======================================== */

.feature-card,
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    height: 100%;
}

.feature-card:hover,
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card .icon,
.stat-card .icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.feature-card .icon::before,
.stat-card .icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.feature-card .icon.icon-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.feature-card .icon.icon-success {
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: white;
}

.feature-card .icon.icon-warning {
    background: linear-gradient(135deg, var(--warning-color), #fee140);
    color: white;
}

.feature-card .icon.icon-info {
    background: linear-gradient(135deg, var(--info-color), #00f2fe);
    color: white;
}

.feature-card h3,
.stat-card h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card p,
.stat-card p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin: 1rem 0;
}

/* ========================================
   مقطع الدعوة لإجراء (CTA Section)
   ======================================== */

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    margin: 4rem 0;
    border-radius: var(--radius-xl);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* ========================================
   نموذج تسجيل الدخول
   ======================================== */

.login-container {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    width: 100%;
    max-width: 450px;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .logo i {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card h2 {
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
}

.login-card .form-control {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: all var(--transition-fast);
}

.login-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.login-card .btn-login {
    width: 100%;
    padding: 0.875rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    transition: all var(--transition-normal);
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   التذييل (Footer)
   ======================================== */

.footer {
    background: #64349e;
    color: rgba(255, 255, 255, 0.9);
    padding: 3rem 0 1.5rem;
    /* margin-top: 4rem; */
}

.footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: all var(--transition-fast);
}

.footer a:hover {
    color: white;
    padding-right: 0.5rem;
}

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.5rem;
    transition: all var(--transition-normal);
}

.footer .social-links a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-5px);
    padding: 0;
}

.footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   استجابة الشاشات الصغيرة
   ======================================== */

@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        border-radius: 0;
        box-shadow: none;
        background: rgba(102, 126, 234, 0.05);
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .cta-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
}

span.position-absolute.top-50.end-0.translate-middle-y.me-3.eye-icon {
    margin-top: 15px;
}
