/* ============================================
   المتغيرات العامة
============================================ */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #7c3aed;
    --warning: #fbbf24;
    --warning-dark: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
}

* {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    overflow-x: hidden;
    color: var(--dark);
    background: #fff;
}

a { text-decoration: none; }

/* ============================================
   NAVBAR — أبيض دائماً
============================================ */
#mainNavbar {
    background: #ffffff;
    padding: 15px 0;
    transition: all 0.4s;
    z-index: 1050;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

#mainNavbar.scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-brand i {
    color: var(--warning);
    font-size: 1.8rem;
}

.navbar-nav .nav-link {
    color: var(--dark) !important;
    font-weight: 600;
    padding: 8px 16px !important;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: rgba(79, 70, 229, 0.08);
}

.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(30,41,59,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   BUTTONS المشتركة
============================================ */
.btn-login,
.btn-start,
.btn-logout {
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-login {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-login:hover {
    background: var(--primary);
    color: #fff;
}

.btn-start {
    background: var(--primary);
    color: #fff;
    border: 1.5px solid var(--primary);
}

.btn-start:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-logout {
    border: 1.5px solid var(--danger);
    color: var(--danger);
    background: transparent;
}

.btn-logout:hover {
    background: var(--danger);
    color: #fff;
}

/* ============================================
   SECTION HEADERS المشتركة
============================================ */
.section-header { margin-bottom: 50px; }

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   TEXT GRADIENT المشترك
============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* في صفحة الباقات، gradient بنفسجي */
.pricing-page .text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   FOOTER المشترك
============================================ */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 70px 0 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 18px;
}

.footer-brand i {
    color: var(--warning);
    font-size: 1.8rem;
}

.footer-desc {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--warning);
    color: var(--dark);
    transform: translateY(-3px);
}

.footer-title {
    color: #fff;
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--warning);
    padding-right: 5px;
}

.footer-contact li {
    color: #94a3b8;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact li i {
    color: var(--warning);
    width: 16px;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #94a3b8;
    font-size: 0.88rem;
}

/* ============================================
   BACK TO TOP
============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.6);
}

/* ============================================
   RESPONSIVE مشترك
============================================ */
@media (max-width: 992px) {
    .navbar-collapse {
        background: #fff;
        padding: 20px;
        border-radius: 15px;
        margin-top: 15px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    }

    .navbar-nav .nav-link {
        padding: 12px 16px !important;
    }

    .footer { text-align: center; }
    .footer-social { justify-content: center; }
    .footer-contact li { justify-content: center; }
}

@media (max-width: 576px) {
    .section-title { font-size: 1.6rem; }

    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 42px;
        height: 42px;
    }
}