/* ==========================================================
   DevoEnv — Global Layout Styles
   ========================================================== */
:root {
    --primary: #0055EE;
    --primary-dark: #0040BB;
    --secondary: #00A878;
    --accent: #003ED9;
    --bg-dark: #FFFFFF;
    --bg-darker: #f9f9f9;
    --bg-card: #FFFFFF;
    --text-primary: #0C1A3A;
    --text-secondary: #52698A;
    --gradient-1: linear-gradient(135deg, #003ED9 0%, #0099EE 55%, #00A878 100%);
    --gradient-2: linear-gradient(135deg, #003ED9 0%, #0099EE 100%);
    --gradient-green: linear-gradient(135deg, #0099EE 0%, #00A878 100%);
    --gradient-3: linear-gradient(180deg, rgba(0, 62, 217, 0.06) 0%, transparent 100%);
    --glass: rgba(0, 62, 217, 0.04);
    --glass-border: rgba(0, 62, 217, 0.1);
    --shadow-sm: 0 2px 12px rgba(0, 30, 100, 0.08);
    --shadow-md: 0 8px 30px rgba(0, 30, 100, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 30, 100, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    overflow-x: hidden;
}

[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Outfit', sans-serif; }

/* Dot grid */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(0, 62, 217, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 62, 217, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    z-index: 0;
}

/* Floating orb */
body::after {
    content: '';
    position: fixed;
    top: 10%; right: -15%;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(0, 62, 217, 0.07) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: float-orb 20s ease-in-out infinite;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-100px, 100px) scale(1.1); }
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* Navbar */
nav {
    background: rgba(245, 248, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 62, 217, 0.1);
    padding: 1rem 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(245, 248, 255, 0.97);
    box-shadow: 0 2px 20px rgba(0, 30, 100, 0.1);
    padding: 0.8rem 0;
}

nav .container { display: flex; justify-content: space-between; align-items: center; }

nav .nav-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav .nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

nav .logo img {
    height: 46px;
    width: auto;
    display: block;
}

nav ul { display: flex; list-style: none; gap: 2.5rem; align-items: center; }

nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a:hover { color: var(--primary); }

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

nav ul li a:hover::after { width: 100%; }

/* Language switcher */
.lang-switch {
    display: flex;
    gap: 0.5rem;
    background: var(--glass);
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.lang-switch a {
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
}

.lang-switch a:hover,
.lang-switch a.active {
    background: var(--gradient-2);
    color: white !important;
}

.lang-switch a::after { display: none !important; }

/* Main */
main { min-height: 100vh; padding-top: 80px; position: relative; z-index: 1; }

/* Footer */
footer {
    background: #0C1730;
    color: #8EA4C4;
    padding: 5rem 0 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-1);
}

footer a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
footer a:hover { color: var(--secondary); }

footer .footer-brand a{
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 3rem; }

.footer-content h3, .footer-content h4 { color: #E8EFF8; margin-bottom: 1.5rem; font-weight: 600; font-size: 1.1rem; }

.footer-content ul { list-style: none; }
.footer-content ul li { margin-bottom: 0.8rem; }

.footer-content ul li a {
    color: #8EA4C4;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-content ul li a:hover { color: var(--primary); transform: translateX(5px); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #8EA4C4;
    font-size: 0.9rem;
}

.footer-bottom .code-tag { font-family: 'JetBrains Mono', monospace; color: var(--primary); }

/* RTL */
[dir="rtl"] { text-align: right; }
[dir="rtl"] nav .container { flex-direction: row; }
[dir="rtl"] nav .nav-right { flex-direction: row-reverse; }
[dir="rtl"] nav ul { flex-direction: row; }
[dir="rtl"] nav ul li a::after { left: auto; right: 0; }
[dir="rtl"] .footer-content ul li a:hover { transform: translateX(-5px); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-2);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before { left: 100%; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(0, 62, 217, 0.3); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover { background: var(--primary); color: #fff; }

/* Alerts */
.alert {
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #FFFFFF;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

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

.alert-success { border-color: #10B981; color: #10B981; }
.alert-error { border-color: #EF4444; color: #EF4444; }

.code-decoration { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-secondary); opacity: 0.5; }

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

html { scroll-behavior: smooth; }

::selection { background: var(--primary); color: #fff; }

select option { background: #FFFFFF; color: var(--text-primary); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { background: rgba(0, 62, 217, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 450px) {
    .lang-switch{
        display: none;
    }
}

@media (max-width: 900px) {
    .mobile-menu-btn { display: block; }
    nav ul {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(245, 248, 255, 0.99);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(0, 62, 217, 0.1);
        box-shadow: 0 8px 30px rgba(0, 30, 100, 0.12);
    }
    nav ul.active { display: flex; }
    [dir="rtl"] nav ul { flex-direction: column; }
}
