/* ==========================================================================
   KLUKVA GLOBAL HEADER — WARM EDITORIAL / BRAND IDENTITY
   Consistent across every page of the website
   ========================================================================== */

.site-header {
    --header-top: 0px;
    --header-h: 66px;
    position: fixed;
    top: var(--header-top, 0px);
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 14px 40px;
    background-color: #171918;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                padding 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s ease, 
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    box-sizing: border-box;
}

/* Scrolled state: slight glass blur + elevated shadow */
.site-header.scrolled {
    --header-h: 58px;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: rgba(23, 25, 24, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* Offset fixed header below the WordPress admin bar */
body.admin-bar .site-header {
    --header-top: 32px;
    top: var(--header-top, 32px);
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        --header-top: 46px;
        top: var(--header-top, 46px);
    }
    body.admin-bar .site-header.scrolled {
        --header-top: 0px !important;
        top: 0 !important;
    }
}

.header-container {
    max-width: 1366px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
}

/* Brand Logo */
.site-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 12px rgba(254, 2, 67, 0.25));
}

/* Navigation Menu */
.site-nav {
    display: flex;
    justify-content: center;
    flex: 1;
    margin: 0 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    list-style: none;
}

.nav-link {
    color: #f5f7fa;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.01em;
    padding: 0.5rem 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.25s ease, text-shadow 0.25s ease;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    color: #ff2a6d;
    text-shadow: 0 0 14px rgba(254, 2, 67, 0.65);
}

/* Active State: Warm Cranberry */
.nav-link.nav-link-active,
.nav-item.current-menu-item > .nav-link {
    color: #fe0243 !important;
    font-weight: 600;
    text-shadow: 0 0 16px rgba(254, 2, 67, 0.8);
}

.nav-link.nav-link-active::after,
.nav-item.current-menu-item > .nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0.25rem;
    right: 0.25rem;
    height: 2px;
    background: #fe0243;
    border-radius: 2px;
    box-shadow: 0 0 10px #ff2a6d;
}

/* Contacts inside mobile menu (hidden on desktop) */
.nav-contacts-mobile {
    display: none;
}

/* Header Right Cluster */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 4px;
}

.header-contact-phone {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s, background 0.2s;
}

.header-contact-phone:hover {
    border-color: rgba(254, 2, 67, 0.5);
    background: rgba(254, 2, 67, 0.08);
}

.header-contact-phone svg {
    color: #fe0243;
    flex-shrink: 0;
}

.header-contact-phone-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.header-contact-phone-label {
    font-family: 'Onest', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #a3a79c;
}

.header-contact-phone-number {
    font-family: 'Onest', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #f6f1eb;
    white-space: nowrap;
    transition: color 0.2s;
}

.header-contact-phone:hover .header-contact-phone-number {
    color: #fff;
}

.header-contact-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-contact-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: #c9c4b8;
    text-decoration: none;
    transition: color .2s, background .2s, border-color .2s, transform .2s;
}

.header-contact-icon:hover {
    background: #b52e49;
    border-color: #b52e49;
    color: #fff;
    transform: translateY(-1px);
}

.header-contact-icon svg {
    width: 16px;
    height: 16px;
}

/* CTA Discuss Project Button */
.header-project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #b52e49;
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Onest', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(181, 46, 73, 0.3);
}

.header-project-link:hover {
    background: #cd3a57;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(181, 46, 73, 0.5);
}

.header-project-link span {
    font-size: 14px;
    line-height: 1;
}

/* Mobile Toggle Hamburger */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 4px;
    padding: 12px 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
    border-color: #fe0243;
    background: rgba(254, 2, 67, 0.08);
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: #f4f0e8;
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s;
}

/* Responsive Adaptive */
@media (max-width: 1300px) {
    .header-contacts { gap: 8px; margin-right: 8px; }
    .header-contact-phone-label { display: none; }
    .header-contact-phone-number { font-size: 12.5px; }
    .nav-links { gap: 1.2rem; }
}

@media (max-width: 1120px) {
    .header-contact-phone-text { display: none; }
    .header-contact-phone { padding: 8px 10px; }
    .header-contact-icon-mail { display: none; }
    .site-nav { margin: 0 1rem; }
}

@media (max-width: 960px) {
    .site-header { padding: 12px 20px; }
    .nav-toggle { display: flex; }
    .header-contacts { display: none; }
    
    .site-nav {
        display: none;
    }

    .site-nav.is-open {
        display: block;
        position: fixed;
        top: calc(var(--header-top, 0px) + var(--header-h, 62px));
        left: 0;
        right: 0;
        margin: 0;
        padding: 24px 28px 36px;
        background: #191c1a;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
        max-height: calc(100svh - var(--header-top, 0px) - var(--header-h, 62px));
        overflow-y: auto;
        z-index: 999;
        transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .site-nav.is-open .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .site-nav.is-open .nav-link {
        display: block;
        font-size: 17px;
        padding: 12px 0;
        color: #f3eee7;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .site-nav.is-open .nav-contacts-mobile {
        display: block;
        margin-top: 20px;
        padding-top: 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-contacts-mobile-phone {
        display: flex;
        flex-direction: column;
        gap: 3px;
        text-decoration: none;
    }

    .nav-contacts-mobile-label {
        font-family: 'Onest', sans-serif;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: .16em;
        text-transform: uppercase;
        color: #8a8f83;
    }

    .nav-contacts-mobile-number {
        font-family: 'Onest', sans-serif;
        font-size: 20px;
        font-weight: 600;
        color: #f6f1eb;
        letter-spacing: .01em;
    }

    .nav-contacts-mobile-phone:hover .nav-contacts-mobile-number {
        color: #e2688a;
    }

    .nav-contacts-mobile-icons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 14px;
    }

    .nav-contacts-mobile-icons a {
        font-family: 'Onest', sans-serif;
        font-size: 13px;
        font-weight: 500;
        color: #c9c4b8;
        text-decoration: none;
        padding: 8px 14px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 4px;
        transition: color .2s, border-color .2s, background .2s;
    }

    .nav-contacts-mobile-icons a:hover {
        color: #fff;
        border-color: #b52e49;
        background: rgba(181, 46, 73, 0.2);
    }
}

@media (max-width: 600px) {
    .header-project-link { display: none; }
}
