@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

/* ==========================================
   منصة باحثون - تنسيقات الصفحة الرئيسية المحسنة
   ========================================== */

:root {
    /* Brand Colors for a Perfect Academic Platform */
    --brand-primary: #1e3a8a; /* Deep Navy Blue (Trust & Professionalism) */
    --brand-secondary: #f59e0b; /* Amber/Gold (Excellence & Success) */
    --brand-accent: #3b82f6; /* Vibrant Royal Blue (Action & Highlight) */
    --brand-dark: #0f172a; /* Slate 900 for text */
    --brand-muted: #64748b; /* Slate 500 */
    --brand-bg: #ffffff; /* Pure white background */
    --brand-whatsapp: #25D366;

    /* Theme Mapping */
    --bg-color: var(--brand-bg);
    --text-color: var(--brand-dark);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-scrolled: rgba(255, 255, 255, 1);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    --text-muted: var(--brand-muted);
    --heading-color: var(--brand-dark);
    --footer-bg: var(--brand-dark);
    
    /* Using brand colors for gradients and accents */
    --primary-gradient: linear-gradient(135deg, var(--brand-accent), var(--brand-primary));
    --hover-bg: rgba(56, 202, 186, 0.1);
    --specialty-bg: linear-gradient(180deg, rgba(235, 209, 91, 0.1) 0%, var(--brand-bg) 100%);
    
    /* Modern UI Variables */
    --glass-blur: blur(12px);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
    --card-radius: 24px;
    --btn-radius: 50px; /* Pill shaped buttons like Bravome */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --nav-bg: rgba(15, 23, 42, 0.75);
    --nav-scrolled: rgba(15, 23, 42, 0.95);
    --card-bg: #1e293b;
    --card-border: rgba(99, 102, 241, 0.2);
    --text-muted: #94a3b8;
    --heading-color: #ffffff;
    --footer-bg: #020617;
    --hover-bg: rgba(99, 102, 241, 0.15);
    --specialty-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ─── 1. الأساسيات ─── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body.landing-body {
    background-color: #e5e7eb; /* Distinct light gray */
    font-family: 'Tajawal', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─── 2. Navbar ─── */
.landing-navbar {
    background: var(--nav-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.landing-navbar.scrolled {
    background: var(--nav-scrolled);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 20px;
    color: #1e3a8a;
    text-decoration: none;
    transition: transform 0.2s;
}

.logo-area:hover {
    transform: scale(1.02);
}

.logo-icon {
    background: var(--primary-gradient);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: #1e3a8a;
    background: rgba(30, 58, 138, 0.06);
}

.nav-link-icon {
    font-size: 16px;
}

.nav-auth {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-auth-mobile {
    display: none;
}

.btn-login {
    text-decoration: none;
    color: var(--brand-dark);
    padding: 8px 24px;
    border-radius: var(--btn-radius);
    font-size: 15px;
    font-weight: 800;
    border: none;
    transition: var(--transition);
    background: var(--brand-primary);
    box-shadow: 0 4px 15px rgba(56, 202, 186, 0.2);
}

.btn-login:hover {
    background: #34bcad;
    color: var(--brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 202, 186, 0.4);
}

.btn-register {
    text-decoration: none;
    background: var(--brand-secondary);
    color: var(--brand-dark);
    padding: 8px 24px;
    border-radius: var(--btn-radius);
    font-size: 15px;
    font-weight: 800;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 15px rgba(235, 209, 91, 0.3);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 209, 91, 0.5);
    background: #dfc552;
}

/* Dropdown */
.login-dropdown {
    position: relative;
    display: inline-block;
}

.login-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 8px;
    z-index: 1000;
    margin-top: 10px;
}

/* On mobile, it should be position relative so it pushes content down */
@media (max-width: 768px) {
    .login-dropdown .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background: #f1f5f9;
        margin-top: 5px;
        padding: 5px;
        width: 100%;
    }
}

.login-dropdown.active .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-menu a {
    color: #1e293b;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: block;
    transition: all 0.2s;
    text-align: right;
}

.dropdown-menu a:hover {
    background: #e2e8f0;
    color: var(--brand-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.menu-line {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #1e3a8a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── 3. Hero Section ─── */
.hero-section {
    padding: 160px 5% 100px;
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    text-align: right;
    z-index: 2;
    padding-right: 5%;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    line-height: 1.4;
    letter-spacing: -0.5px;
    color: var(--heading-color);
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 32px;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.btn-primary-hero {
    position: relative;
    background: var(--brand-secondary);
    color: var(--brand-dark);
    padding: 16px 36px;
    border-radius: var(--btn-radius);
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    box-shadow: 0 8px 25px rgba(235, 209, 91, 0.4);
}

.btn-primary-hero:hover {
    transform: translateY(-4px);
    background: #dfc552;
    box-shadow: 0 12px 35px rgba(235, 209, 91, 0.6);
}

.btn-secondary-hero {
    position: relative;
    background: var(--brand-primary);
    color: var(--brand-dark);
    padding: 16px 36px;
    border-radius: var(--btn-radius);
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    box-shadow: 0 8px 25px rgba(56, 202, 186, 0.4);
    z-index: 1;
}

.btn-secondary-hero:hover {
    transform: translateY(-4px);
    background: #34bcad;
    box-shadow: 0 12px 35px rgba(56, 202, 186, 0.6);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--brand-primary);
    display: block;
    line-height: 1;
}

.hero-stat .stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--card-border);
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    animation: bounce 2s infinite;
}

.mouse {
    width: 22px;
    height: 35px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 3px;
    height: 6px;
    background: var(--brand-primary);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ─── 4. Container & Section Headers ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    background: rgba(56, 202, 186, 0.15);
    color: var(--brand-primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
    border: 1px solid rgba(56, 202, 186, 0.2);
}

.section-header h2 {
    font-size: 34px;
    color: var(--heading-color);
    margin-bottom: 12px;
    font-weight: 900;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    max-width: 500px;
    margin: 0 auto;
}

/* ─── 5. Features Section ─── */
.features-section {
    background: transparent;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.1);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(30, 58, 138, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--brand-primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--brand-primary);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.feature-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* ─── 6. Specialties Section ─── */
.specialties-section {
    background: transparent;
    position: relative;
    padding-top: 80px;
    overflow: hidden; /* Hide horizontal overflow for marquee */
}

.specialties-grid {
    display: flex;
    gap: 24px;
    padding-bottom: 24px;
    width: max-content;
    animation: scroll-marquee 25s linear infinite;
}

.specialties-grid:hover {
    animation-play-state: paused;
}

@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); /* Positive 50% for RTL, so it scrolls correctly */ }
}

/* We don't need scrollbar hide for marquee anymore, but keep it clean */
.flip-card {
    flex: 0 0 300px;
    background-color: transparent;
    height: 280px;
    cursor: pointer;
    border-radius: 16px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    border-radius: 16px;
}

.flip-card.flipped .flip-card-inner {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--card-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.flip-card-front {
    background: var(--card-bg);
    color: var(--text-color);
    overflow: hidden;
    z-index: 2;
}

@media (max-width: 992px) {
    .flip-card {
        flex: 0 0 calc(50% - 12px);
    }
}

@media (max-width: 600px) {
    .flip-card {
        flex: 0 0 85%;
    }
}

.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 60%
    );
    transform: rotate(30deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.flip-card:hover .card-shine {
    opacity: 1;
    transform: rotate(30deg) translate(20%, 20%);
}

.flip-card-front .spec-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.flip-card-front h3 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 8px;
    font-weight: 700;
}

.flip-card-front p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.flip-hint {
    font-size: 11px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: auto;
}

.flip-card-back {
    background: var(--primary-gradient);
    color: white;
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    text-align: right;
    align-items: flex-start;
    border: none;
    z-index: 1;
}

.flip-card-back h3 {
    font-size: 17px;
    margin-bottom: 16px;
    color: #bfdbfe;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    width: 100%;
    font-weight: 700;
}

.flip-card-back ul {
    list-style: none;
    padding: 0;
    font-size: 14px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
}

.flip-card-back ul li {
    position: relative;
    padding-right: 18px;
}

.flip-card-back ul li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: #34d399;
    font-weight: bold;
}

/* ─── 7. IT Section ─── */
.it-specialized-section {
    background: white;
    position: relative;
}

.it-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.it-card {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    padding: 36px 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.it-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    transition: height 0.4s ease;
    z-index: 0;
}

.it-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.12);
    border-color: #bfdbfe;
}

.it-card:hover::after {
    height: 4px;
}

.it-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.it-badge {
    font-size: 44px;
    position: relative;
    z-index: 2;
    display: block;
}

.it-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.4s ease;
}

.it-card:hover .it-particles {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.6;
}

.it-card h3 {
    font-size: 17px;
    color: #0f172a;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.it-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ─── 8. How It Works ─── */
.how-it-works-section {
    background: transparent;
    position: relative;
    padding-top: 80px;
}

.steps-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.steps-line {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand-primary), var(--brand-secondary), transparent);
    border-radius: 3px;
    z-index: 0;
    opacity: 0.5;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

.step-card {
    background: white;
    padding: 32px 24px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-primary);
}

.step-num {
    background: var(--primary-gradient);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 18px;
    box-shadow: 0 6px 16px rgba(56, 202, 186, 0.4);
    position: relative;
    z-index: 2;
}

.step-content h3 {
    font-size: 19px;
    color: #0f172a;
    margin-bottom: 12px;
    font-weight: 700;
}

.step-content p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.7;
}

/* ─── 9. CTA Section ─── */
.cta-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 60%, var(--brand-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.cta-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
}

.cta-content h2 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 14px;
    line-height: 1.4;
}

.cta-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: var(--brand-accent);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.5);
    background: #d97706; /* slightly darker accent */
}

.btn-cta-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* ─── 10. Footer ─── */
.landing-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 24px 30px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: white;
    margin-bottom: 14px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
    max-width: 300px;
}

.footer-col h4 {
    color: white;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: all 0.2s;
}

.footer-col a:hover {
    color: #60a5fa;
    padding-right: 4px;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 20px 24px;
    text-align: center;
    font-size: 13px;
    color: #475569;
}

/* ─── 11. WhatsApp Float ─── */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: var(--brand-whatsapp);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    font-size: 26px;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.wa-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    animation: waPulse 2s infinite;
    z-index: -1;
}

@keyframes waPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ─── 12. Back to Top ─── */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

/* ─── 13. Scroll Animations ─── */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-down"] {
    transform: translateY(-30px);
}

[data-animate="fade-right"] {
    transform: translateX(-40px);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate="zoom-in"] {
    transform: scale(0.9);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ─── 14. Responsive ─── */
@media (max-width: 768px) {
    .desktop-auth {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 24px 24px;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 6px;
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-link {
        padding: 14px 18px;
        border-radius: 12px;
        font-size: 15px;
        color: #0f172a !important;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        font-weight: 600;
    }

    .nav-link:hover {
        background: #eff6ff;
        color: #1e3a8a !important;
        border-color: #bfdbfe;
    }

    .nav-auth-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: auto;
        padding-top: 20px;
        border-top: 2px dashed #e2e8f0;
    }

    .nav-auth-mobile a {
        text-align: center;
        justify-content: center;
        padding: 14px;
        border-radius: 10px;
        font-weight: 700;
        font-size: 14px;
        text-decoration: none;
    }

    .nav-auth-mobile .btn-register {
        background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
    }

    .nav-auth-mobile .btn-login {
        background: #ffffff !important;
        color: #1e3a8a !important;
        border: 1.5px solid #1e3a8a !important;
    }

    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat-divider {
        display: none;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .steps-line {
        display: none;
    }

    .specialties-grid {
        grid-template-columns: 1fr;
    }

    .flip-card {
        height: 220px;
    }

    .cta-content h2 {
        font-size: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .whatsapp-float {
        bottom: 80px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .container {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons a {
        width: 100%;
        justify-content: center;
    }

    .features-grid,
    .it-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons a {
        width: 100%;
        justify-content: center;
    }
}

/* ─── 15. أجزاء إضافية (Marquee, Stats, Testimonials, FAQ) ─── */

/* Dropdown Navbar */
.login-dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}
.dropdown-menu a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background 0.2s;
}
.dropdown-menu a:hover {
    background-color: var(--hover-bg);
}
.login-dropdown.open .dropdown-menu {
    display: block;
}

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-left: 10px;
    color: var(--text-color);
    transition: transform 0.3s;
}
.theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* Marquee */
.marquee-section {
    background: var(--card-bg);
    padding: 20px 0;
    overflow: hidden;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}
.marquee-container {
    width: 100%;
    overflow: hidden;
}
.marquee-content {
    display: flex;
    width: 200%;
    animation: marquee 20s linear infinite;
}
.uni-card {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    padding: 0 20px;
    white-space: nowrap;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* Stats */
.stats-section {
    padding: 60px 0;
    background: var(--bg-color);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}
.stat-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}
.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #3b82f6;
}
.stat-label {
    font-size: 16px;
    color: var(--text-muted);
}

/* Testimonials */
.testimonials-section {
    padding: 80px 0;
    background: var(--card-bg);
}
.testimonials-wrapper {
    position: relative;
    overflow: hidden;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    transition: transform 0.5s ease;
}
.testimonial-card {
    background: var(--bg-color);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    text-align: right;
}
.stars {
    margin-bottom: 10px;
}
.testi-text {
    font-size: 15px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
}
.testi-author h4 {
    color: var(--heading-color);
    font-size: 16px;
}
.testi-author span {
    font-size: 13px;
    color: var(--text-muted);
}
.carousel-controls {
    display: none;
    text-align: center;
    margin-top: 20px;
}
.carousel-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 5px;
}
@media (max-width: 768px) {
    .testimonials-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 20px;
    }
    .testimonial-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
}

/* FAQ */
.faq-section {
    padding: 80px 0;
    background: var(--bg-color);
}
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: right;
    padding: 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--heading-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-icon {
    font-size: 20px;
    transition: transform 0.3s;
}
.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
}
.faq-item.open .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* Dark mode overrides for existing sections */
body.dark-mode .landing-navbar {
    background: var(--nav-bg);
}
body.dark-mode .landing-navbar.scrolled {
    background: var(--nav-scrolled);
}
body.dark-mode .section-header h2 {
    color: var(--heading-color);
}
body.dark-mode .feature-card,
body.dark-mode .it-card,
body.dark-mode .step-card {
    background: var(--card-bg);
    border-color: var(--card-border);
}
body.dark-mode .feature-card h3,
body.dark-mode .it-card h3,
body.dark-mode .step-card h3 {
    color: var(--heading-color);
}
body.dark-mode .feature-card p,
body.dark-mode .it-card p,
body.dark-mode .step-card p {
    color: var(--text-muted);
}
body.dark-mode .flip-card-front {
    background: var(--card-bg);
    color: var(--text-color);
}
body.dark-mode .flip-card-front h3 {
    color: var(--heading-color);
}
body.dark-mode .how-it-works-section,
body.dark-mode .features-section,
body.dark-mode .it-specialized-section,
body.dark-mode .specialties-section {
    background: var(--specialty-bg);
}
body.dark-mode .nav-link {
    color: var(--text-muted);
}
body.dark-mode .nav-link:hover {
    color: #60a5fa;
}
body.dark-mode .btn-login {
    color: #60a5fa;
    border-color: #60a5fa;
}
body.dark-mode .btn-login:hover {
    background: #60a5fa;
    color: var(--bg-color);
}
body.dark-mode .landing-footer {
    background: var(--footer-bg);
}

/* Universities Marquee */
.universities-section {
    padding: 30px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
}
body.dark-mode .universities-section {
    background: var(--specialty-bg);
    border-color: var(--card-border);
}
.uni-title {
    text-align: center;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 14px;
}
.uni-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    direction: ltr; /* LTR for consistent marquee logic */
}
.uni-marquee::before, .uni-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
}
.uni-marquee::before {
    left: 0;
    background: linear-gradient(to right, #f8fafc, transparent);
}
.uni-marquee::after {
    right: 0;
    background: linear-gradient(to left, #f8fafc, transparent);
}
body.dark-mode .uni-marquee::before { background: linear-gradient(to right, var(--specialty-bg), transparent); }
body.dark-mode .uni-marquee::after { background: linear-gradient(to left, var(--specialty-bg), transparent); }
.uni-marquee-track {
    display: inline-block;
    animation: marquee 30s linear infinite;
}
.uni-marquee-track:hover {
    animation-play-state: paused;
}
.uni-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: white;
    margin: 0 15px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    color: #1e293b;
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    direction: rtl; /* Reset direction inside */
}
.uni-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
body.dark-mode .uni-logo {
    background: var(--card-bg);
    color: var(--heading-color);
    box-shadow: none;
    border: 1px solid var(--card-border);
}
.uni-icon {
    font-size: 26px;
}
.uni-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Added Animations */
@keyframes floatUpDown {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(2deg); }
}
.hero-bg-shapes .shape {
    animation: floatUpDown 7s ease-in-out infinite;
}
.hero-bg-shapes .shape-2 { animation-delay: -2s; animation-duration: 8s; }
.hero-bg-shapes .shape-3 { animation-delay: -4s; animation-duration: 6s; }

.feat-icon, .spec-icon {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.feature-card:hover .feat-icon, .flip-card-front:hover .spec-icon {
    transform: scale(1.15) rotate(-5deg);
}

/* ==========================================
   Animations (Local Replacement for animate.css)
   ========================================== */
.animate__animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

/* Fix mobile menu close button */
.close-menu {
  width: auto !important;
  height: auto !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.animate__fadeInUp { animation-name: fadeInUp; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translate3d(0, -40px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.animate__fadeInDown { animation-name: fadeInDown; }

@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-40px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.animate__fadeInLeft { animation-name: fadeInLeft; }

@keyframes fadeInRight {
  from { opacity: 0; transform: translate3d(40px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.animate__fadeInRight { animation-name: fadeInRight; }

@keyframes zoomIn {
  from { opacity: 0; transform: scale3d(0.8, 0.8, 0.8); }
  50% { opacity: 1; }
}
.animate__zoomIn { animation-name: zoomIn; }