/* EDP Header Widget v1.0.17 */

.ehw-root {
    --ehw-charcoal:     #2C2C2C;
    --ehw-terra:        #C0622F;
    --ehw-stone:        #F5F0E8;
    --ehw-cta-def-bg:   #F5F0E8;
    --ehw-cta-def-text: #2C2C2C;
    --ehw-cta-scr-bg:   #C0622F;
    --ehw-cta-scr-text: #ffffff;
    --ehw-heading: 'Cormorant Garamond', Georgia, serif;
    --ehw-body:    'Inter', system-ui, sans-serif;
}
.ehw-root *, .ehw-root *::before, .ehw-root *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ehw-root a { text-decoration: none; color: inherit; }

/* ── HEADER ── */
.ehw-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    font-family: var(--ehw-body);
    -webkit-font-smoothing: antialiased;
    transition: background .5s ease, box-shadow .5s ease, backdrop-filter .5s ease;
}
.ehw-header.is-scrolled {
    background: rgba(245,240,232,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(44,44,44,.09);
}
.ehw-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 2.5rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 96px;
}

/* FIX 1 — Tablet header height and padding.
   v1.0.10 only had a max-width:767px rule, so tablets (768–1023px)
   used the full 96px desktop height and 2.5rem padding. Added a
   dedicated 768–1023px band that drops height to 80px and tightens
   the side padding to match mobile-first best practice. */
@media (min-width: 768px) and (max-width: 1023px) {
    .ehw-inner { height: 80px; padding: 0 2rem; }
}
@media (max-width: 767px) {
    .ehw-inner { padding: 0 1.25rem; height: 72px; }
}

/* Logo */
.ehw-logo { display: flex; align-items: center; gap: 12px; }
.ehw-logo-badge {
    width: 32px; height: 32px; flex-shrink: 0;
    border: 1px solid var(--ehw-stone);
    display: flex; align-items: center; justify-content: center;
    transition: border-color .5s;
}
.ehw-logo-badge span { font-family: var(--ehw-body); font-size: 11px; font-weight: 700; color: var(--ehw-stone); transition: color .5s; }
.ehw-header.is-scrolled .ehw-logo-badge       { border-color: var(--ehw-terra); }
.ehw-header.is-scrolled .ehw-logo-badge span  { color: var(--ehw-terra); }
.ehw-logo-text { display: flex; flex-direction: column; }
.ehw-logo-name { font-size: 14px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ehw-stone); transition: color .5s; }
.ehw-logo-sub  { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: rgba(245,240,232,.4); transition: color .5s; }
.ehw-header.is-scrolled .ehw-logo-name { color: var(--ehw-charcoal); }
.ehw-header.is-scrolled .ehw-logo-sub  { color: rgba(44,44,44,.4); }

/* Desktop nav */
.ehw-desktop-nav { display: none; align-items: center; gap: 32px; }
@media (min-width: 1024px) { .ehw-desktop-nav { display: flex; } }
.ehw-desktop-nav a { font-size: 14px; font-weight: 500; letter-spacing: .04em; color: rgba(245,240,232,.75); transition: color .3s; }
.ehw-desktop-nav a:hover                           { color: var(--ehw-stone); }
.ehw-header.is-scrolled .ehw-desktop-nav a:not(.ehw-btn-quote),
.ehw-header.is-scrolled .ehw-desktop-menu > li > a { color: rgba(44,44,44,.72) !important; }
.ehw-header.is-scrolled .ehw-desktop-nav a:not(.ehw-btn-quote):hover,
.ehw-header.is-scrolled .ehw-desktop-menu > li > a:hover { color: var(--ehw-charcoal) !important; }
.ehw-desktop-nav a.active                          { color: var(--ehw-stone); }
.ehw-header.is-scrolled .ehw-desktop-nav a.active:not(.ehw-btn-quote),
.ehw-header.is-scrolled .ehw-desktop-menu .current-menu-item > a,
.ehw-header.is-scrolled .ehw-desktop-menu .current-menu-ancestor > a { color: var(--ehw-charcoal) !important; font-weight: 600; }

/* CTA button */
.ehw-btn-quote {
    padding: 10px 20px; border-radius: 10px; white-space: nowrap;
    font-size: 14px; font-weight: 500;
    background: var(--ehw-cta-def-bg);
    color: var(--ehw-cta-def-text) !important;
    border: 0 solid transparent;
    transition: opacity .3s, background .3s, color .3s, border-color .3s;
}
.ehw-btn-quote:hover                         { opacity: .85; }
.ehw-header.is-scrolled .ehw-btn-quote       { background: var(--ehw-cta-scr-bg); color: var(--ehw-cta-scr-text) !important; }
.ehw-header.is-scrolled .ehw-btn-quote:hover { opacity: .88; }

/* Hamburger */
.ehw-hamburger { display: flex; align-items: center; justify-content: center; padding: 8px; background: none; border: none; cursor: pointer; color: var(--ehw-stone); transition: color .5s; }
.ehw-hamburger:focus-visible { outline: 2px solid var(--ehw-terra); outline-offset: 4px; }
.ehw-header.is-scrolled .ehw-hamburger { color: var(--ehw-charcoal); }
.ehw-hamburger svg { width: 24px; height: 24px; }
@media (min-width: 1024px) { .ehw-hamburger { display: none; } }

/* ── FULLSCREEN MOBILE NAV ── */
.ehw-fnav {
    display: none;
    position: fixed !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    width: 100vw;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
    z-index: 2147483000;
    background: var(--ehw-charcoal);
    flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .4s ease, visibility .4s ease;
    font-family: var(--ehw-body);
}
.ehw-fnav:not(.is-open),
.ehw-fnav.ehw-fnav--portal:not(.is-open) {
    display: none !important; opacity: 0 !important; visibility: hidden !important;
    pointer-events: none !important; height: 0 !important; min-height: 0 !important;
    overflow: hidden !important;
}
.ehw-fnav.is-open,
.ehw-fnav.ehw-fnav--portal.is-open {
    display: flex !important; position: fixed !important; inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important; height: -webkit-fill-available !important; height: 100dvh !important;
    min-height: 100vh !important; min-height: -webkit-fill-available !important; min-height: 100dvh !important;
    max-width: none !important;
    opacity: 1 !important; visibility: visible !important; pointer-events: all !important;
    background: var(--ehw-charcoal) !important;
    overflow-y: auto !important; -webkit-overflow-scrolling: touch;
}
body.ehw-mobile-nav-open { overflow: hidden !important; }

.ehw-fnav-logo { position: absolute; z-index: 3; top: 24px; left: 24px; display: flex; align-items: center; gap: 12px; }
@media (min-width: 768px) { .ehw-fnav-logo { top: 32px; left: 40px; } }
.ehw-fnav-badge { width: 32px; height: 32px; border: 1px solid var(--ehw-terra); display: flex; align-items: center; justify-content: center; }
.ehw-fnav-badge span { font-size: 11px; font-weight: 700; color: var(--ehw-terra); }
.ehw-fnav-name { display: block; font-size: 14px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ehw-stone); }
.ehw-fnav-sub  { display: block; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: rgba(245,240,232,.4); }
.ehw-fnav-close { position: fixed; z-index: 2147483001; top: 24px; right: 24px; background: none; border: none; cursor: pointer; color: var(--ehw-stone); padding: 12px; transition: color .3s; }
.ehw-fnav-close:hover { color: var(--ehw-terra); }
@media (min-width: 768px) { .ehw-fnav-close { top: 32px; right: 40px; } }
.ehw-fnav-close svg { width: 32px; height: 32px; }

.ehw-fnav-links { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; }
@media (min-width: 768px) { .ehw-fnav-links { gap: 24px; } }
.ehw-fnav-links a {
    font-family: var(--ehw-heading);
    font-size: clamp(2.4rem, 8vw, 4.8rem);
    font-weight: 300; letter-spacing: -.01em;
    color: var(--ehw-stone);
    opacity: 0; transform: translateY(24px);
    transition: color .3s, opacity .4s ease, transform .4s ease;
}
.ehw-fnav-links a:hover { color: var(--ehw-terra); }
.ehw-fnav.is-open .ehw-fnav-links a {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(var(--ehw-link-index, 1) * .05s);
}
.ehw-fnav-links .sub-menu a { transition-delay: 0s; }
.ehw-fnav-footer { position: absolute; z-index: 3; bottom: 32px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: rgba(192,98,47,.5); opacity: 0; transition: opacity .4s .5s ease; }
.ehw-fnav.is-open .ehw-fnav-footer { opacity: 1; }

.ehw-fnav.ehw-fnav--portal { max-width: none !important; max-height: none !important; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ehw-fnav.ehw-fnav--portal .ehw-fnav-links { width: 100%; padding: 0 24px; }
.ehw-fnav .ehw-fnav-links a { pointer-events: auto; }

/* ── Elementor editor: keep header static and visible ── */
.elementor-editor-active .ehw-header {
    position: relative !important;
    background: var(--ehw-charcoal) !important;
    box-shadow: none !important;
}

/* ── Image logo ── */
.ehw-logo-image, .ehw-fnav-logo-image { display: inline-flex; align-items: center; line-height: 0; }
.ehw-logo-img, .ehw-fnav-logo-img { display: block; width: auto; height: 42px; max-width: 240px; object-fit: contain; }
@media (max-width: 767px) {
    .ehw-logo-img, .ehw-fnav-logo-img { height: 36px; max-width: 200px; }
}

/* ── WordPress menu / dropdown ── */
.ehw-wp-menu, .ehw-wp-menu ul { list-style: none; margin: 0; padding: 0; }
.ehw-desktop-nav .ehw-desktop-menu { display: flex; align-items: center; gap: 32px; }
.ehw-desktop-menu > li { position: relative; display: flex; align-items: center; }
.ehw-desktop-menu a { display: inline-flex; align-items: center; gap: 6px; }
.ehw-desktop-menu > .menu-item-has-children > a::after {
    content: ''; width: 6px; height: 6px;
    border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-2px); opacity: .65;
}
.ehw-desktop-menu .sub-menu {
    position: absolute; top: calc(100% + 12px); left: 50%; z-index: 10001;
    min-width: 220px; padding: 12px;
    background: rgba(245,240,232,.98);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(44,44,44,.08); border-radius: 14px;
    box-shadow: 0 18px 40px rgba(44,44,44,.16);
    opacity: 0; pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity .22s ease, transform .22s ease;
}
.ehw-desktop-menu .sub-menu::before {
    content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; background: transparent;
}
.ehw-desktop-menu li:hover > .sub-menu,
.ehw-desktop-menu li:focus-within > .sub-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.ehw-desktop-menu > li:nth-last-child(-n+2) > .sub-menu,
.ehw-desktop-menu > li.ehw-submenu-align-right > .sub-menu { left: auto; right: 0; transform: translate(0, 10px); }
.ehw-desktop-menu > li:nth-last-child(-n+2):hover > .sub-menu,
.ehw-desktop-menu > li:nth-last-child(-n+2):focus-within > .sub-menu,
.ehw-desktop-menu > li.ehw-submenu-align-right:hover > .sub-menu,
.ehw-desktop-menu > li.ehw-submenu-align-right:focus-within > .sub-menu { transform: translate(0, 0); }
.ehw-desktop-menu .sub-menu .sub-menu { top: 0; left: calc(100% + 10px); transform: translate(10px, 0); }
.ehw-desktop-menu .sub-menu li.ehw-submenu-align-right > .sub-menu { left: auto; right: calc(100% + 10px); transform: translate(-10px, 0); }
.ehw-desktop-menu .sub-menu .sub-menu::before { left: -12px; right: auto; top: 0; width: 12px; height: 100%; }
.ehw-desktop-menu .sub-menu li.ehw-submenu-align-right > .sub-menu::before { left: auto; right: -12px; }
.ehw-desktop-menu .sub-menu li:hover > .sub-menu,
.ehw-desktop-menu .sub-menu li:focus-within > .sub-menu { transform: translate(0, 0); }
.ehw-desktop-menu .sub-menu li.ehw-submenu-align-right:hover > .sub-menu,
.ehw-desktop-menu .sub-menu li.ehw-submenu-align-right:focus-within > .sub-menu { transform: translate(0, 0); }
.ehw-desktop-menu .sub-menu a,
.ehw-header.is-scrolled .ehw-desktop-menu .sub-menu a {
    width: 100%; justify-content: space-between; padding: 10px 12px; border-radius: 9px;
    color: rgba(44,44,44,.74) !important; white-space: nowrap;
}
.ehw-desktop-menu .sub-menu a:hover,
.ehw-header.is-scrolled .ehw-desktop-menu .sub-menu a:hover,
.ehw-desktop-menu .sub-menu a.active,
.ehw-desktop-menu .sub-menu .current-menu-item > a { color: var(--ehw-charcoal) !important; background: rgba(44,44,44,.07); }
.ehw-desktop-menu .current-menu-item > a,
.ehw-desktop-menu .current-menu-ancestor > a { color: var(--ehw-stone); }
.ehw-header.is-scrolled .ehw-desktop-menu .current-menu-item > a,
.ehw-header.is-scrolled .ehw-desktop-menu .current-menu-ancestor > a { color: var(--ehw-charcoal); font-weight: 600; }

/* Mobile menu list */
.ehw-fnav-links .ehw-mobile-menu { display: flex; flex-direction: column; align-items: center; gap: 16px; list-style: none; margin: 0; padding: 0; }
.ehw-fnav-links .ehw-mobile-menu li { text-align: center; }
/* Mobile submenu — hidden by default, toggled open by JS */
.ehw-fnav-links .ehw-mobile-menu .sub-menu { display: none; flex-direction: column; align-items: center; gap: 16px; margin-top: 12px; }
.ehw-fnav-links .ehw-mobile-menu .sub-menu.is-open { display: flex; }
.ehw-fnav-links .ehw-mobile-menu .sub-menu a { font-size: clamp(1rem, 3.5vw, 1.25rem) !important; opacity: 1; color: rgba(245,240,232,.6); }
.ehw-fnav-links .ehw-mobile-menu .sub-menu a:hover { color: var(--ehw-terra); }
/* Chevron on parent — rotates when open */
.ehw-fnav-links .menu-item-has-children > a .ehw-chevron {
    display: inline-block; width: .18em; height: .18em; margin-left: .35em;
    border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-.15em);
    transition: transform .3s ease; opacity: .6; vertical-align: middle;
}
.ehw-fnav-links .menu-item-has-children.is-open > a .ehw-chevron {
    transform: rotate(225deg) translateY(.1em);
}
.ehw-fnav.is-open .ehw-mobile-menu a { opacity: 1; transform: translateY(0); }

/* Custom dropdown active states */
.ehw-custom-menu > li > a.active,
.ehw-custom-menu .current-menu-item > a,
.ehw-custom-menu .current-menu-ancestor > a { color: var(--ehw-stone); }
.ehw-header.is-scrolled .ehw-custom-menu > li > a.active,
.ehw-header.is-scrolled .ehw-custom-menu .current-menu-item > a,
.ehw-header.is-scrolled .ehw-custom-menu .current-menu-ancestor > a { color: var(--ehw-charcoal) !important; font-weight: 600; }

/* Mobile dropdown chevron — rendered as .ehw-chevron span by JS; suppress ::after to avoid duplicate arrows */
.ehw-fnav-links .menu-item-has-children > a::after { display: none !important; }
.ehw-fnav-links .sub-menu, .ehw-fnav-links .sub-menu ul { list-style: none; margin-left: 0; padding-left: 0; }

/* ── Responsive breakpoint controls ── */
@media (min-width: 768px) {
    .ehw-root.ehw-breakpoint-tablet .ehw-desktop-nav { display: flex; }
    .ehw-root.ehw-breakpoint-tablet .ehw-hamburger { display: none; }
}
@media (max-width: 767px) {
    .ehw-root.ehw-breakpoint-tablet .ehw-desktop-nav { display: none; }
    .ehw-root.ehw-breakpoint-tablet .ehw-hamburger { display: flex; }
}
.ehw-root.ehw-breakpoint-mobile .ehw-desktop-nav { display: none !important; }
.ehw-root.ehw-breakpoint-mobile .ehw-hamburger { display: flex !important; }

/* ══════════════════════════════════════════════
   FIX 2 — Tablet fullscreen nav (768–1023px)
   v1.0.10 kept justify-content:center on tablet
   so links were centred both horizontally AND
   vertically — fine on landscape tablets but
   links could clip off screen on smaller 768px
   portrait tablets. Now uses flex-start + safe
   padding-top so it mirrors the mobile layout
   but with larger type.
══════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {
    .ehw-fnav.is-open,
    .ehw-fnav.ehw-fnav--portal.is-open {
        justify-content: flex-start !important;
        padding-top: clamp(100px, 18vh, 160px) !important;
        padding-bottom: 80px !important;
    }
    .ehw-fnav-links a {
        font-size: clamp(2.2rem, 5vw, 3.2rem);
        line-height: 1.1;
    }
    .ehw-fnav-links,
    .ehw-fnav-links .ehw-mobile-menu { gap: 20px; }
    .ehw-fnav-footer {
        left: 40px; right: 40px; bottom: 32px;
        text-align: left; font-size: 12px; letter-spacing: .24em;
    }
}

/* ══════════════════════════════════════════════
   FIX 3 — Mobile fullscreen nav (<768px)
   v1.0.10 padding-top used clamp(170px,27vh,220px).
   On a 667px-tall iPhone SE that's ~180px which
   pushed 5 links off the bottom of the screen.
   Reduced to clamp(110px,20vh,170px) so all 5
   nav items + CTA link fit without scrolling on
   the smallest supported phones (375×667px).
   Also corrected logo/close absolute positions
   to match the tighter top offset.
══════════════════════════════════════════════ */
@media (max-width: 767px) {
    .ehw-fnav.is-open,
    .ehw-fnav.ehw-fnav--portal.is-open {
        justify-content: flex-start !important;
        padding-top: clamp(110px, 20vh, 170px) !important;
        padding-bottom: 80px !important;
    }
    .ehw-fnav-logo { top: 24px; left: 20px; }
    .ehw-fnav-close { top: 20px; right: 20px; }
    .ehw-fnav-links a {
        font-size: clamp(1.75rem, 7.5vw, 2.2rem);
        line-height: 1.12;
    }
    .ehw-fnav-links,
    .ehw-fnav-links .ehw-mobile-menu { gap: 14px; }
    .ehw-fnav-links .ehw-mobile-menu .sub-menu { gap: 12px; margin-top: 12px; }
    .ehw-fnav-footer {
        left: 20px; right: 20px; bottom: 28px;
        text-align: left; font-size: 11px; letter-spacing: .24em; white-space: normal;
    }
}

/* ══════════════════════════════════════════════
   FIX 4 — Elementor editor guards
   Unchanged from v1.0.10 — kept as-is.
══════════════════════════════════════════════ */
.elementor-editor-active .ehw-fnav:not(.is-open),
.elementor-editor-active .ehw-fnav.ehw-fnav--portal:not(.is-open) {
    display: none !important; visibility: hidden !important; opacity: 0 !important;
    height: 0 !important; min-height: 0 !important; overflow: hidden !important;
}
.elementor-editor-active .ehw-fnav.is-open,
.elementor-editor-active .ehw-fnav.ehw-fnav--portal.is-open {
    display: flex !important; position: fixed !important; inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important; height: -webkit-fill-available !important; height: 100dvh !important;
    min-height: 100vh !important; min-height: -webkit-fill-available !important; min-height: 100dvh !important;
    background: var(--ehw-charcoal) !important; z-index: 2147483000 !important;
}

.ehw-portal-shell, .ehw-portal-scope { display: contents; }
