/* ======================================================
   EW Services LLC HEADER
   2-tier: info bar (contact + social) / nav bar (logo + menu).
   Loaded on index.html only, after css/style.css.
====================================================== */

.ew-header {
    position: relative;
    z-index: 1000;
    font-family: var(--font-1);

    /* clean light / white header palette (overrides the dark theme tokens) */
    --ew-head-ink: #171a1c;
    --ew-head-muted: #5b6167;
    --ew-head-line: rgba(23, 26, 28, 0.12);
}

.ew-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Tier 1: info bar ---------- */
.ew-topbar {
    background-color: #f2f3f4;
    padding: 9px 0;
    border-bottom: 1px solid var(--ew-head-line);
}

.ew-topbar__wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    flex-wrap: wrap;
}

.ew-topbar__contact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 26px;
}

.ew-topbar__contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ew-head-muted);
    line-height: 1;
    transition: color 0.3s ease;
}

.ew-topbar__contact a i {
    color: var(--color-main);
    font-size: 13px;
}

.ew-topbar__contact a:hover {
    color: var(--ew-head-ink);
}

.ew-topbar__social {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.ew-topbar__social a {
    color: var(--ew-head-muted);
    font-size: 14px;
    line-height: 1;
    transition: color 0.3s ease;
}

.ew-topbar__social a:hover {
    color: var(--color-main);
}

/* hide the info bar (contact + social) on phones */
@media (max-width: 767px) {
    .ew-topbar {
        display: none;
    }
}

/* ---------- Tier 2: nav bar ---------- */
.ew-menu {
    position: relative;
    z-index: 20;
    background-color: #ffffff;
    border-bottom: 1px solid var(--ew-head-line);
}

.ew-menu__wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 6px 0;
}

.ew-menu__logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.ew-menu__logo img {
    max-height: 148px;
    width: auto;
    display: block;
}

/* nav */
.ew-menu__nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.ew-menu__list {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ew-menu__list > li > a {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: var(--ew-head-ink);
    padding: 6px 0;
    transition: color 0.3s ease;
}

.ew-menu__list > li > a:hover {
    color: var(--color-main);
}

/* right side */
.ew-menu__right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.ew-burger {
    display: none;
    background: none;
    border: none;
    padding: 0;
    font-size: 24px;
    color: var(--ew-head-ink);
    cursor: pointer;
    line-height: 1;
}

.ew-burger:hover {
    color: var(--color-main);
}

.ew-menu__right .ew-cta i {
    margin-left: 8px;
    font-size: 13px;
}

/* sticky state (toggled by js/header.js) — same dimensions as the resting bar
   so the spacer matches exactly and there is no height jump / doubling */
.ew-menu.is-stuck {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    animation: ewHeaderDrop 0.45s ease both;
    box-shadow: 0 10px 28px -12px rgba(23, 26, 28, 0.22);
}

.ew-menu__spacer {
    display: none;
}

@keyframes ewHeaderDrop {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

@media (max-width: 1099px) {
    .ew-menu__nav {
        display: none;
    }

    .ew-burger {
        display: inline-block;
    }

    .ew-menu__logo img {
        max-height: 118px;
    }
}

@media (max-width: 575px) {
    .ew-menu__right .ew-cta {
        display: none;
    }

    .ew-menu__logo img {
        max-height: 100px;
    }
}

@media (max-width: 380px) {
    .ew-menu__logo img {
        max-height: 88px;
    }
}

/* ---------- Mobile drawer ---------- */
.ew-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 84%;
    max-width: 380px;
    height: 100%;
    background-color: #ffffff;
    border-left: 1px solid var(--ew-head-line);
    padding: 22px;
    z-index: 1100;
    overflow-y: auto;
    transition: right 0.35s ease;

    --ew-head-ink: #171a1c;
    --ew-head-muted: #5b6167;
    --ew-head-line: rgba(23, 26, 28, 0.12);
}

.ew-drawer.is-open {
    right: 0;
}

.ew-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.ew-drawer__head img {
    max-height: 56px;
    width: auto;
}

.ew-drawer__close {
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--ew-head-line);
    border-radius: 4px;
    color: var(--ew-head-ink);
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.ew-drawer__close:hover {
    color: var(--color-main);
    border-color: var(--color-main);
}

.ew-drawer__cta {
    display: block;
    text-align: center;
    margin-bottom: 24px;
}

.ew-drawer__nav {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    border-top: 1px solid var(--ew-head-line);
}

.ew-drawer__nav > li {
    border-bottom: 1px solid var(--ew-head-line);
}

.ew-drawer__link {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 15px 4px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-1);
    color: var(--ew-head-ink);
    text-align: left;
    cursor: pointer;
    transition: color 0.3s ease;
}

.ew-drawer__link:hover {
    color: var(--color-main);
}

.ew-drawer__contact {
    margin-bottom: 20px;
}

.ew-drawer__contact a {
    display: block;
    font-size: 15px;
    color: var(--ew-head-muted);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.ew-drawer__contact a:hover {
    color: var(--color-main);
}

.ew-drawer__contact i {
    color: var(--color-main);
    width: 20px;
}

.ew-drawer__social {
    display: flex;
    gap: 10px;
}

.ew-drawer__social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f2f3f4;
    border: 1px solid var(--ew-head-line);
    color: var(--ew-head-ink);
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.ew-drawer__social a:hover {
    background-color: var(--color-main);
    border-color: var(--color-main);
    color: #fff;
}

.ew-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    z-index: 1050;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

body.ew-no-scroll {
    overflow: hidden;
}
