:root {
    --bg-main: #0a0a0c;       /* Deep Onyx Black */
    --bg-card: #141418;       /* Lighter Onyx for cards */
    --bg-glass: rgba(20, 20, 24, 0.6);
    --border-glass: rgba(255, 255, 255, 0.05);

    --text-main: #ffffff;
    --text-muted: #a0a0a8;

    --accent-gold: #D4AF37;   /* Metallic Gold for primary actions */
    --accent-gold-hover: #b5952f;
    --accent-blue: #0E2954;   /* Deep corporate blue accent */

    --nav-height: 80px;
    --font-en: 'Montserrat', sans-serif;
    --font-ar: 'Cairo', sans-serif;
    
    --transition-speed: 0.3s;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.02em;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Language Typography Logic */
html[dir="ltr"] body {
    font-family: var(--font-en);
}
html[dir="rtl"] body {
    font-family: var(--font-ar);
}

/* Base Elements */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    line-height: 1.6;
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    background: var(--accent-gold);
    color: #000;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-primary:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    padding: 12px 28px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-gold);
}

/* Glassmorphism Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand img {
    height: 40px;
    width: auto;
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-gold);
    transition: width var(--transition-speed);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}
html[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

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

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: all var(--transition-speed);
}
.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Global Container & Layout */
main {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height) - 100px);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* Footer Element */
.footer {
    border-top: 1px solid var(--border-glass);
    background: var(--bg-card);
    padding: 40px 24px 20px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand p {
    margin-top: 10px;
    max-width: 300px;
    font-size: 0.9rem;
}

.footer-links-group h4 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-group a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links-group a:hover {
    color: var(--text-main);
    padding-left: 4px; /* subtle shift on LTR */
}
html[dir="rtl"] .footer-links-group a:hover {
    padding-left: 0;
    padding-right: 4px; /* subtle shift on RTL */
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 15px;
}

.footer-legal-links {
    display: flex;
    gap: 20px;
}

.footer-legal-links a:hover {
    color: var(--text-main);
}

/* Responsive Rules */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border-glass);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.mobile-open {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .lang-toggle {
        margin-left: auto;
        margin-right: 20px;
    }
    html[dir="rtl"] .lang-toggle {
        margin-left: 20px;
        margin-right: auto;
    }
}
