/* Main Header Styles */
.demo-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(3, 17, 74, 0.96), rgba(7, 31, 111, 0.92));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(3, 17, 74, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.demo-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    color: #ffffff;
}

.demo-header__logo {
    width: 74px;
    height: 74px;
    object-fit: contain;
}

.demo-header__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    max-width: 280px;
}

.demo-header__nav {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: visible;
}

.nav-divider {
    display: inline-block;
    flex-shrink: 0;
    align-self: center;
    opacity: 0.35;
}

.demo-header__link {
    font-weight: 500;
    white-space: nowrap;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: #ffffff;
    font-size: 20px;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.demo-header__link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffcb10;
    transform: translateY(-1px);
}

.demo-header__dropdown {
    position: relative;
}

.demo-header__dropdown>summary {
    list-style: none;
    cursor: pointer;
}

.demo-header__dropdown>summary::-webkit-details-marker {
    display: none;
}

.demo-header__dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(3, 17, 74, 0.12);
    border-radius: 18px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
    padding: 10px;
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 240px;
    z-index: 1010;
}

.demo-header__dropdown[open] .demo-header__dropdown-menu {
    display: grid;
}

.demo-header__dropdown-item {
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 16px;
    color: #05134b;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #e6ecf2;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.demo-header__dropdown-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

@media (min-width: 1025px) {
    .demo-header__dropdown:hover>.demo-header__dropdown-menu {
        display: grid !important;
    }
}

.demo-lang {
    position: relative;
    flex-shrink: 0;
}

.demo-lang>summary {
    list-style: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.demo-lang__icon {
    width: 19px;
    height: 19px;
    fill: #ffffff;
}

.demo-lang__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 145px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(3, 17, 74, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
    padding: 8px;
    display: none;
    gap: 6px;
    z-index: 1010;
}

.demo-lang[open] .demo-lang__menu {
    display: grid;
}

.demo-lang__item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    text-decoration: none;
    border: 1px solid #e6ecf2;
    background: #f8fafc;
    text-align: left;
}

/* Mobile styles */
@media (max-width: 1024px) {
    .demo-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 10px 12px;
        padding: 12px 14px;
    }

    .demo-header__logo {
        width: 40px;
        height: 40px;
    }

    .demo-header__nav {
        display: none;
    }
}