/* =========================================
   SITE HEADER
========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--nnc-white);
}

/* =========================================
   TOP BAR
========================================= */

.top-bar {
    position: relative;
    max-height: 42px;
    overflow: hidden;
    color: var(--nnc-white);
    background-color: var(--nnc-primary);
    opacity: 1;
    transform: translateY(0);
    transition:
        max-height 0.3s ease,
        opacity 0.25s ease,
        transform 0.3s ease;
}

.top-bar__inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.top-bar__message {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.top-bar__status-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #61d6ad;
    box-shadow: 0 0 0 4px rgba(97, 214, 173, 0.15);
}

.top-bar__contact {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

.top-bar__link:hover {
    color: #9be7df;
}

/* Hide top bar after scrolling */

.site-header.is-scrolled .top-bar {
    max-height: 0;
    opacity: 0;
    transform: translateY(-100%);
}

/* =========================================
   MAIN HEADER
========================================= */

.main-header {
    position: relative;
    background-color: var(--nnc-white);
    border-bottom: 1px solid var(--nnc-border);
    box-shadow: 0 5px 22px rgba(5, 38, 91, 0.06);
    transition: box-shadow 0.3s ease;
}

/*
Wider header container moves the logo slightly left
without affecting the containers used on other sections.
*/

.main-header__inner.site-container {
    width: min(1240px, calc(100% - 24px));
}

.main-header__inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    transition: min-height 0.3s ease;
}

.site-header.is-scrolled .main-header {
    box-shadow: 0 8px 28px rgba(5, 38, 91, 0.12);
}

.site-header.is-scrolled .main-header__inner {
    min-height: 76px;
}

/* =========================================
   BRANDING
========================================= */

.site-branding {
    min-width: 295px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.site-branding__logo {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 68px;
    transition:
        width 0.3s ease,
        height 0.3s ease,
        flex-basis 0.3s ease;
}

.site-branding__logo .custom-logo-link {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        width 0.3s ease,
        height 0.3s ease;
}

.site-branding__logo .custom-logo {
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
    object-fit: contain;
    transition:
        width 0.3s ease,
        height 0.3s ease,
        max-width 0.3s ease,
        max-height 0.3s ease;
}

.site-branding__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.site-branding__name {
    color: var(--nnc-primary);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    transition: font-size 0.3s ease;
}

.site-branding__tagline {
    margin-top: 5px;
    color: var(--nnc-secondary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.25px;
    transition:
        margin-top 0.3s ease,
        font-size 0.3s ease;
}

/* Smaller branding while sticky */

.site-header.is-scrolled .site-branding__logo,
.site-header.is-scrolled .site-branding__logo .custom-logo-link {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
}

.site-header.is-scrolled .site-branding__logo .custom-logo {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
}

.site-header.is-scrolled .site-branding__name {
    font-size: 20px;
}

.site-header.is-scrolled .site-branding__tagline {
    margin-top: 3px;
    font-size: 11px;
}

/* =========================================
   NAVIGATION WRAPPER
========================================= */

.main-header__navigation-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    flex: 1;
}

.primary-navigation {
    display: flex;
    align-items: center;
}

.primary-menu {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 23px;
    list-style: none;
}

.primary-menu li {
    position: relative;
    margin: 0;
}

.primary-menu a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 92px;
    color: var(--nnc-primary);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition:
        min-height 0.3s ease,
        color 0.25s ease;
}

.primary-menu a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 23px;
    left: 0;
    height: 2px;
    border-radius: 20px;
    background-color: var(--nnc-secondary);
    transform: scaleX(0);
    transform-origin: center;
    transition:
        bottom 0.3s ease,
        transform 0.25s ease;
}

.site-header.is-scrolled .primary-menu a {
    min-height: 76px;
}

.site-header.is-scrolled .primary-menu a::after {
    bottom: 17px;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    color: var(--nnc-secondary);
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after,
.primary-menu .current_page_item > a::after {
    transform: scaleX(1);
}

/* =========================================
   HEADER ACTIONS
========================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.header-whatsapp-button {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--nnc-white);
    background-color: #25d366;
    border: 1px solid #25d366;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.25);
    transition:
        width 0.3s ease,
        height 0.3s ease,
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.header-whatsapp-button:hover {
    color: var(--nnc-white);
    background-color: #1ebe5d;
    border-color: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 11px 23px rgba(37, 211, 102, 0.3);
}

/* =========================================
   HEADER CONTACT BUTTON
========================================= */

.header-contact-button {
    min-height: 48px;
    padding: 0 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--nnc-white);
    background-color: var(--nnc-secondary);
    border: 1px solid var(--nnc-secondary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 9px 20px rgba(4, 125, 120, 0.2);
    transition:
        min-height 0.3s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.header-contact-button:hover {
    color: var(--nnc-white);
    background-color: var(--nnc-primary);
    border-color: var(--nnc-primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(5, 38, 91, 0.2);
}

.site-header.is-scrolled .header-whatsapp-button {
    width: 44px;
    height: 44px;
}

.site-header.is-scrolled .header-contact-button {
    min-height: 44px;
}

/* =========================================
   MOBILE MENU BUTTON
========================================= */

.mobile-menu-toggle {
    width: 46px;
    height: 46px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: var(--nnc-primary);
    background-color: var(--nnc-background);
    border: 1px solid var(--nnc-border);
    border-radius: 8px;
}

.mobile-menu-toggle span {
    width: 21px;
    height: 2px;
    display: block;
    border-radius: 4px;
    background-color: currentColor;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}