/* סרגל ניווט עליון משותף לכל דפי האתר - נטען דרך assets/header.js
   כולל לוגו ותפריט המבורגר למובייל */

header {
    background-color: rgba(26, 54, 93, 0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    gap: 12px;
}
.nav-side-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo {
    height: 42px;
    width: auto;
}
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
}
.nav-item {
    position: relative;
}
.nav-item a, .dropdown-toggle {
    color: #f7fafc;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-item.active a {
    background-color: #2b6cb0;
    color: white;
}
.nav-item.active .dropdown-toggle {
    background-color: #2b6cb0;
    color: white;
}
.nav-item a:hover, .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1a365d;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    min-width: 160px;
    z-index: 1000;
    margin: 0;
    padding: 5px 0;
    list-style: none;
}
.dropdown-menu li a {
    color: #f7fafc;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    text-align: right;
    border-radius: 0;
    transition: background-color 0.15s ease;
}
.dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.18);
}
/* הצגת התפריט בריחוף (Desktop) */
.nav-item:hover .dropdown-menu {
    display: block;
}

/* המבורגר */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}
.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: 0.3s;
}
.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #1a365d;
        padding: 15px 0;
        box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-item {
        text-align: center;
        width: 100%;
    }
    .nav-item a, .dropdown-toggle {
        padding: 12px 0;
        border-radius: 0;
        width: 100%;
        text-align: center;
    }
    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none;
    }
    .nav-item.open-dropdown .dropdown-menu {
        display: block;
    }
}

@media (max-width: 480px) {
    .nav-logo { height: 34px; }
    .nav-container { padding: 8px 12px; gap: 8px; }
}
