header {
    background-color: #F5F5F7;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 24px 0;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    align-items: center;
}

.navbar-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0;
}

.navbar-item {
    display: flex;
    align-items: center;
    margin: 0 15px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-item a {
    text-decoration: none;
    color: #333;
    font-size: 17px;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-item a:hover {
    color: #007AFF;
}

.navbar-title a {
    font-size: 17px;
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-item span {
    text-decoration: none;
    color: #333;
    font-size: 17px;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-item span:hover {
    color: #007AFF;
}

.navbar-title span {
    font-size: 17px;
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-icon {
    width: 22px;
    height: 22px;
    margin-inline-end: 10px;
}

/* RTL: brand on the visual right; link cluster on the left */
[dir="rtl"] nav ul {
    flex-direction: row-reverse;
}

.spacer {
    flex-grow: 1;
}

@media (max-width: 768px) {

    .navbar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 60px;
        right: 20px;
        background-color: white;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .navbar-menu {
        flex-direction: column;
        gap: 10px;
    }

    .spacer {
        display: none;
    }

    header {
        position: static;
    }

}
