/* ==========================================================
   ELENA ELECTRONICS — SHARED PUBLIC HEADER
   Matches the approved homepage header.
   Loaded after style.css.
   ========================================================== */

.elena-shared-header{
    --elena-header-navy:#071a2d;
    --elena-header-green:#0f9b72;
    --elena-header-blue:#1479eb;

    position:relative;
    z-index:1100;
    width:100%;
    background:#fff;
    border-bottom:1px solid #e8edf2;
    box-shadow:0 7px 22px rgba(7,26,45,.055);
}

.elena-shared-header *,
.elena-shared-header *::before,
.elena-shared-header *::after{
    box-sizing:border-box;
}


/* ==========================================================
   INNER LAYOUT
   ========================================================== */

.elena-shared-header .header-inner{
    display:flex;
    align-items:center;
    width:min(1180px,calc(100% - 56px));
    height:82px;
    margin:0 auto;
    gap:24px;
}


/* ==========================================================
   LOGO
   ========================================================== */

.elena-shared-header
.brand.brand-real-logo{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex:0 0 205px;
    width:205px;
    min-width:205px;
    max-width:205px;
    height:64px;
    padding:0;
    margin:0;
    overflow:hidden;
    text-decoration:none;
}

.elena-shared-header
.brand-logo-image{
    display:block;
    width:auto;
    height:auto;
    max-width:190px;
    max-height:58px;
    margin:0;
    object-fit:contain;
    object-position:left center;
}


/* ==========================================================
   DESKTOP NAVIGATION
   ========================================================== */

.elena-header-navigation{
    display:flex;
    align-items:center;
    flex:1 1 auto;
    min-width:0;
    margin-left:auto;
    gap:25px;
}

.elena-shared-header .nav{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex:1 1 auto;
    min-width:0;
    margin:0;
    padding:0;
    gap:27px;
    font-size:14px;
}

.elena-shared-header .nav a{
    position:relative;
    display:inline-flex;
    align-items:center;
    min-height:42px;
    padding:9px 0;
    color:#243647;
    font-size:14px;
    font-weight:700;
    line-height:1;
    text-decoration:none;
    white-space:nowrap;
    transition:color .2s ease;
}

.elena-shared-header .nav a::after{
    content:"";
    position:absolute;
    right:0;
    bottom:3px;
    left:0;
    height:2px;
    background:linear-gradient(
        90deg,
        var(--elena-header-green),
        var(--elena-header-blue)
    );
    transform:scaleX(0);
    transform-origin:center;
    transition:transform .22s ease;
}

.elena-shared-header .nav a:hover,
.elena-shared-header .nav a.is-active{
    color:var(--elena-header-green);
}

.elena-shared-header .nav a:hover::after,
.elena-shared-header .nav a.is-active::after{
    transform:scaleX(1);
}


/* ==========================================================
   GET A QUOTE
   ========================================================== */

.elena-shared-header
.quote.elena-header-quote{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    min-height:43px;
    padding:12px 20px;
    margin:0;
    color:#fff;
    font-size:13px;
    font-weight:800;
    line-height:1;
    text-decoration:none;
    white-space:nowrap;
    background:linear-gradient(
        90deg,
        var(--elena-header-green),
        var(--elena-header-blue)
    );
    border:0;
    border-radius:25px;
    box-shadow:
        0 8px 20px
        rgba(20,121,235,.15);
    transition:
        transform .22s ease,
        box-shadow .22s ease;
}

.elena-shared-header
.quote.elena-header-quote:hover{
    color:#fff;
    transform:translateY(-2px);
    box-shadow:
        0 12px 25px
        rgba(20,121,235,.21);
}


/* ==========================================================
   MOBILE TOGGLE
   ========================================================== */

.elena-header-toggle{
    display:none;
    position:relative;
    flex:0 0 44px;
    width:44px;
    height:44px;
    padding:0;
    margin-left:auto;
    cursor:pointer;
    background:#fff;
    border:1px solid #dce3e9;
    border-radius:10px;
    box-shadow:none;
}

.elena-header-toggle span{
    position:absolute;
    left:12px;
    width:20px;
    height:2px;
    background:var(--elena-header-navy);
    border-radius:2px;
    transition:
        transform .24s ease,
        opacity .2s ease,
        top .24s ease;
}

.elena-header-toggle span:nth-child(1){
    top:14px;
}

.elena-header-toggle span:nth-child(2){
    top:21px;
}

.elena-header-toggle span:nth-child(3){
    top:28px;
}

.elena-shared-header.is-menu-open
.elena-header-toggle span:nth-child(1){
    top:21px;
    transform:rotate(45deg);
}

.elena-shared-header.is-menu-open
.elena-header-toggle span:nth-child(2){
    opacity:0;
}

.elena-shared-header.is-menu-open
.elena-header-toggle span:nth-child(3){
    top:21px;
    transform:rotate(-45deg);
}


/* ==========================================================
   RESPONSIVE — COMPACT DESKTOP
   ========================================================== */

@media(max-width:1050px){

    .elena-shared-header .header-inner{
        width:calc(100% - 42px);
        gap:18px;
    }

    .elena-shared-header
    .brand.brand-real-logo{
        flex-basis:180px;
        width:180px;
        min-width:180px;
        max-width:180px;
    }

    .elena-shared-header
    .brand-logo-image{
        max-width:170px;
        max-height:52px;
    }

    .elena-header-navigation{
        gap:17px;
    }

    .elena-shared-header .nav{
        gap:19px;
    }

    .elena-shared-header .nav a{
        font-size:13px;
    }

    .elena-shared-header
    .quote.elena-header-quote{
        padding:12px 17px;
        font-size:12px;
    }

}


/* ==========================================================
   RESPONSIVE — MOBILE / TABLET MENU
   ========================================================== */

@media(max-width:900px){

    .elena-shared-header{
        position:relative;
    }

    .elena-shared-header .header-inner{
        position:relative;
        height:76px;
    }

    .elena-shared-header
    .brand.brand-real-logo{
        flex-basis:175px;
        width:175px;
        min-width:175px;
        max-width:175px;
        height:56px;
    }

    .elena-shared-header
    .brand-logo-image{
        max-width:165px;
        max-height:50px;
    }

    .elena-header-toggle{
        display:block;
    }

    .elena-header-navigation{
        position:absolute;
        top:calc(100% + 1px);
        right:0;
        left:0;
        z-index:1200;
        display:block;
        margin:0;
        padding:14px;
        visibility:hidden;
        background:#fff;
        border:1px solid #e2e8ed;
        border-top:0;
        box-shadow:
            0 20px 35px
            rgba(7,26,45,.13);
        opacity:0;
        transform:translateY(-8px);
        pointer-events:none;
        transition:
            opacity .22s ease,
            transform .22s ease,
            visibility .22s ease;
    }

    .elena-shared-header.is-menu-open
    .elena-header-navigation{
        visibility:visible;
        opacity:1;
        transform:translateY(0);
        pointer-events:auto;
    }

    .elena-shared-header .nav{
        align-items:stretch;
        flex-direction:column;
        gap:0;
    }

    .elena-shared-header .nav a{
        justify-content:space-between;
        width:100%;
        min-height:47px;
        padding:0 11px;
        font-size:13px;
        border-bottom:1px solid #edf1f4;
    }

    .elena-shared-header .nav a::after{
        top:0;
        right:auto;
        bottom:0;
        left:0;
        width:3px;
        height:auto;
        background:linear-gradient(
            180deg,
            var(--elena-header-green),
            var(--elena-header-blue)
        );
        transform:scaleY(0);
    }

    .elena-shared-header .nav a:hover::after,
    .elena-shared-header .nav a.is-active::after{
        transform:scaleY(1);
    }

    .elena-shared-header
    .quote.elena-header-quote{
        width:100%;
        min-height:44px;
        margin-top:13px;
        border-radius:8px;
    }

}


/* ==========================================================
   RESPONSIVE — SMALL PHONE
   ========================================================== */

@media(max-width:575px){

    .elena-shared-header .header-inner{
        width:calc(100% - 28px);
        height:72px;
        gap:12px;
    }

    .elena-shared-header
    .brand.brand-real-logo{
        flex:1 1 auto;
        width:auto;
        min-width:0;
        max-width:155px;
        height:52px;
    }

    .elena-shared-header
    .brand-logo-image{
        max-width:150px;
        max-height:46px;
    }

    .elena-header-toggle{
        flex-basis:42px;
        width:42px;
        height:42px;
    }

    .elena-header-toggle span{
        left:11px;
    }

}


/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

.elena-shared-header a:focus-visible,
.elena-header-toggle:focus-visible{
    outline:3px solid rgba(20,121,235,.28);
    outline-offset:3px;
}

@media(prefers-reduced-motion:reduce){

    .elena-shared-header *,
    .elena-shared-header *::before,
    .elena-shared-header *::after{
        transition:none !important;
        animation:none !important;
    }

}


/* ==========================================================
   DESKTOP CONFLICT HARDENING — V2
   Prevent Bootstrap/global legacy header rules from wrapping
   or repositioning the approved shared header.
   ========================================================== */

@media(min-width:901px){

    .elena-shared-header .header-inner{
        display:flex !important;
        align-items:center !important;
        justify-content:flex-start !important;
        flex-wrap:nowrap !important;
    }

    .elena-shared-header .elena-header-toggle{
        display:none !important;
        visibility:hidden !important;
        width:0 !important;
        height:0 !important;
        min-width:0 !important;
        flex:0 0 0 !important;
        margin:0 !important;
        padding:0 !important;
        border:0 !important;
        overflow:hidden !important;
    }

    .elena-shared-header .elena-header-navigation{
        position:static !important;
        display:flex !important;
        align-items:center !important;
        justify-content:flex-end !important;
        flex:1 1 auto !important;
        flex-wrap:nowrap !important;
        width:auto !important;
        min-width:0 !important;
        margin:0 0 0 auto !important;
        padding:0 !important;
        visibility:visible !important;
        opacity:1 !important;
        transform:none !important;
        pointer-events:auto !important;
        background:transparent !important;
        border:0 !important;
        box-shadow:none !important;
    }

    .elena-shared-header .nav{
        position:static !important;
        display:flex !important;
        align-items:center !important;
        justify-content:flex-end !important;
        flex:1 1 auto !important;
        flex-direction:row !important;
        flex-wrap:nowrap !important;
        width:auto !important;
        min-width:0 !important;
        margin:0 !important;
        padding:0 !important;
        gap:27px !important;
        background:transparent !important;
    }

    .elena-shared-header .nav a{
        position:relative !important;
        flex:0 0 auto !important;
        width:auto !important;
        margin:0 !important;
        white-space:nowrap !important;
    }

    .elena-shared-header .quote.elena-header-quote{
        position:static !important;
        top:auto !important;
        right:auto !important;
        bottom:auto !important;
        left:auto !important;
        display:inline-flex !important;
        flex:0 0 auto !important;
        width:auto !important;
        margin:0 !important;
        transform:none;
    }

    .elena-shared-header .quote.elena-header-quote:hover{
        transform:translateY(-2px) !important;
    }
}

@media(min-width:901px) and (max-width:1050px){

    .elena-shared-header .nav{
        gap:19px !important;
    }
}


/* ==========================================================
   ELENA SHARED HEADER LOGO ALIGNMENT — 2026-08-18
   Desktop only: keep public-page logo aligned with homepage.
   Navigation and quote button remain unchanged.
   ========================================================== */
@media(min-width:901px){
    .elena-shared-header .brand.brand-real-logo{
        position:relative;
        left:-15px;
    }
}
