/* SafeRx Navbar - Fixed navigation component */

/* Reset and base */
.saferx-navbar * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Main navbar container - fixed at top */
.saferx-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #068466 0%, #047857 100%);
    height: 60px;
    box-shadow: 0 2px 12px rgba(6, 132, 102, 0.25);
    font-family: 'DM Sans', 'Poppins', 'Segoe UI', -apple-system, sans-serif;
}

/* Inner container with max-width */
.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-logo img {
    height: 36px;
    width: auto;
}

/* Navigation links */
.navbar-links {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.navbar-links li {
    margin: 0;
}

.navbar-links a {
    display: block;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.navbar-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.navbar-links a.active {
    background: rgba(178, 235, 242, 0.25);
    color: #B2EBF2;
}

/* Language toggle */
.navbar-lang {
    flex-shrink: 0;
}

.navbar-lang .lang-btn {
    display: inline-block;
    padding: 8px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navbar-lang .lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hamburger menu button (hidden on desktop) */
.navbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.navbar-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu overlay */
.navbar-mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 132, 102, 0.98);
    z-index: 9998;
    padding: 20px;
    overflow-y: auto;
}

.navbar-mobile-menu.open {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.navbar-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar-mobile-menu li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-mobile-menu a {
    display: block;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-mobile-menu a:hover,
.navbar-mobile-menu a.active {
    background: rgba(178, 235, 242, 0.2);
    color: #B2EBF2;
}

.navbar-mobile-lang {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-mobile-lang .lang-btn {
    display: block;
    padding: 16px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* Body padding to account for fixed navbar */
body.has-navbar {
    padding-top: 60px;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .navbar-links a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }

    .navbar-lang {
        display: none;
    }

    .navbar-hamburger {
        display: block;
    }

    .navbar-container {
        padding: 0 16px;
    }
}

/* ========================================
   RTL SUPPORT (Arabic)
   ======================================== */

[dir="rtl"] .navbar-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-mobile-menu {
    text-align: right;
}

[dir="rtl"] .navbar-mobile-menu a {
    text-align: right;
}

/* Arabic font support */
[lang="ar"] .saferx-navbar,
[dir="rtl"] .saferx-navbar {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', -apple-system, sans-serif;
}
