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

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Tahoma, sans-serif;
    background: #080d16;
    color: #f8fafc;
}

nav {
    background: #0b1120;
    border-bottom: 1px solid #1e293b;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1800px;
    width: 96%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #38bdf8;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: bold;
    letter-spacing: -0.01em;
}

nav ul.nav-links { list-style: none; display: flex; gap: 20px; align-items: center; margin: 0; padding: 0; }
nav ul.nav-links > li { position: relative; }
nav ul.nav-links > li > a { color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; display: inline-flex; align-items: center; }
nav ul.nav-links > li > a:hover { color: #38bdf8; }

/* Keep backwards compatibility for any other nav ul */
nav ul:not(.dropdown-menu) { list-style: none; display: flex; gap: 20px; align-items: center; }
nav ul:not(.dropdown-menu) > li > a { color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
nav ul:not(.dropdown-menu) > li > a:hover { color: #38bdf8; }

/* Dropdown Menu Component */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 0;
}

.dropdown-caret {
    font-size: 0.6rem;
    margin-left: 3px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    display: inline-block;
    color: #64748b;
}

[dir="rtl"] .dropdown-caret {
    margin-left: 0;
    margin-right: 3px;
}

.nav-dropdown:hover .dropdown-caret,
.nav-dropdown.show .dropdown-caret {
    transform: rotate(180deg);
    color: #38bdf8;
}

/* Invisible bridge so mouse hover doesn't break when moving over the gap */
.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    display: block;
}

/* Dropdown Menu Box */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 320px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(56, 189, 248, 0.15);
    padding: 8px;
    margin-top: 8px;
    list-style: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

/* Trigger on hover and click/focus */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    color: #e2e8f0 !important;
    text-decoration: none !important;
    transition: all 0.18s ease !important;
    background: transparent !important;
    font-size: 0.88rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dropdown-item:hover {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #38bdf8 !important;
    transform: translateX(3px);
}

[dir="rtl"] .dropdown-item:hover {
    transform: translateX(-3px);
}

.dropdown-item-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1;
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

[dir="rtl"] .dropdown-item-content {
    text-align: right;
}

.dropdown-item-title {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.88rem;
    line-height: 1.3;
    transition: color 0.18s ease;
}

.dropdown-item:hover .dropdown-item-title {
    color: #38bdf8;
}

.dropdown-item-desc {
    font-size: 0.74rem;
    color: #94a3b8;
    line-height: 1.25;
}

footer {
    text-align: center;
    padding: 28px;
    color: #64748b;
    background: #080d16;
    border-top: 1px solid #1e293b;
    margin-top: 60px;
    font-size: 0.85rem;
}

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 4px 8px;
}
.lang-icon { font-size: 0.95rem; user-select: none; line-height: 1; }
.lang-dropdown {
    background: transparent;
    color: #00d4ff;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
.lang-dropdown option {
    background: #151b28;
    color: #e6edf3;
    font-family: sans-serif;
}
[dir="rtl"] body {
    direction: rtl;
    font-family: Tahoma, "Segoe UI", sans-serif;
}
[dir="rtl"] .hero {
    text-align: center;
}

