/* =================================================
   HEADER — New Layout: Two-row structure
================================================= */

.site-header {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1030;
    position: relative;
}

.site-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.navbar {
    padding: 0;
}

/* Top Row: Brand + Actions */
.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 991px) {
    .header-top-row {
        padding: 12px 0;
    }
}

.brand-new {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    user-select: none;
}

.brand-new:hover {
    text-decoration: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--ink-light);
    line-height: 1.2;
}

.brand-tagline-new {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    line-height: 1.2;
}

@media (max-width: 767px) {
    .brand-tagline-new {
        display: none;
    }
    .brand-name {
        font-size: 16px;
    }
    .header-top-row {
        padding: 10px 0;
    }
    .header-actions {
        gap: 8px;
    }
    .btn-cta-new {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--muted-light);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-icon-new::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--accent-soft), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-icon-new:hover::before {
    opacity: 1;
}

.btn-icon-new:hover {
    background: var(--bg-card);
    color: var(--ink-light);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.btn-icon-new svg {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}

.btn-cta-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    color: #0a0a0a;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-cta-new::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-cta-new:hover::before {
    opacity: 1;
}

.btn-cta-new:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    color: #0a0a0a;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-cta-new:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft), 0 4px 16px rgba(245, 158, 11, 0.3);
}

/* Bottom Row: Navigation */
.header-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    position: relative;
}

.navbar-toggler-new {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--muted-light);
    padding: 0;
}

@media (max-width: 991px) {
    .navbar-toggler-new {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.navbar-nav-new {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 991px) {
    .navbar-nav-new {
        flex-direction: column;
        width: 100%;
        gap: 8px;
        padding-top: 16px;
    }
}

.nav-item-new {
    list-style: none;
}

.nav-link-new {
    position: relative;
    padding: 10px 20px !important;
    font-weight: 600;
    font-size: 14px;
    color: var(--muted-light) !important;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: block;
}

.nav-link-new::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.nav-link-new:hover {
    color: var(--ink-light) !important;
    background: var(--accent-soft);
    text-decoration: none;
    padding-left: 28px !important;
}

.nav-link-new:hover::before {
    height: 60%;
}

.nav-link-new.is-active {
    color: var(--accent) !important;
    background: var(--accent-soft);
    padding-left: 28px !important;
}

.nav-link-new.is-active::before {
    height: 60%;
}

.nav-link-new.is-active::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

@media (max-width: 991px) {
    .nav-link-new {
        width: 100%;
        text-align: left;
    }
}

/* Search drawer — боковая панель справа */
.searchbar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.searchbar-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.searchbar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 1041;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

@media (max-width: 575px) {
    .searchbar {
        max-width: 100%;
        border-left: 0;
    }
}

.searchbar.is-open {
    transform: translateX(0);
}

.searchbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    border-left: 4px solid var(--accent);
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .searchbar-header {
        padding: 14px 16px;
        border-left: 0;
        border-top: 3px solid var(--accent);
    }
}

.searchbar-title {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink-light);
    margin: 0;
}

@media (max-width: 575px) {
    .searchbar-title {
        font-size: 1.1rem;
    }
}

.searchbar-close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--muted-light);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.searchbar-close:hover {
    background: var(--bg);
    color: var(--ink-light);
    border-color: var(--muted);
}

.searchbar-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-image: 
        radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 575px) {
    .searchbar-body {
        padding: 16px;
    }
}

.searchbar-field {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 24px;
    transition: border-color 0.2s ease;
}

@media (max-width: 575px) {
    .searchbar-field {
        padding: 14px 16px;
        margin-bottom: 20px;
    }
}

.searchbar-field:focus-within {
    border-color: var(--accent);
}

.searchbar-icon {
    color: var(--accent);
    flex: 0 0 auto;
    font-size: 20px;
}

.searchbar-input {
    border: 0;
    outline: 0;
    width: 100%;
    font-size: 16px;
    color: var(--ink-light);
    background: transparent;
    font-weight: 500;
}

.searchbar-input::placeholder {
    color: var(--muted);
}

.searchbar-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.searchbar-clear {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--muted-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.searchbar-clear:hover {
    background: var(--bg);
    color: var(--ink-light);
    border-color: var(--muted);
}

.searchbar-hint {
    padding: 16px 20px 16px 50px;
    background: var(--accent-soft);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--muted-light);
    line-height: 1.6;
    position: relative;
}

@media (max-width: 575px) {
    .searchbar-hint {
        padding: 14px 16px 14px 48px;
        font-size: 13px;
        border-left: 3px solid var(--accent);
    }
    .searchbar-hint::before {
        left: 16px;
        top: 14px;
        font-size: 16px;
    }
}

.searchbar-hint::before {
    content: "💡";
    position: absolute;
    left: 20px;
    top: 16px;
    font-size: 18px;
    opacity: 0.6;
}

@media (max-width: 575px) {
    .searchbar {
        max-width: 100%;
    }
}
