/* Global chrome: utility bar, header, mobile drawer, footer, sticky action bar.
 * Present on every page, in this order.
 */

/* ---------- Utility bar ---------- */

.eh-utility {
  background: var(--eh-ink);
  color: var(--eh-white);
  height: 40px;
  display: flex;
  align-items: center;
}
.eh-utility__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.eh-utility__note {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--eh-on-dark-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eh-utility__note-short { display: none; }
.eh-utility__right { display: flex; align-items: center; gap: 22px; }
.eh-utility__rule { width: 1px; height: 16px; background: var(--eh-on-dark-border); }
.eh-utility__phone {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--eh-white);
  white-space: nowrap;
}
.eh-utility__phone:hover { color: var(--eh-on-dark-orange); }

/* Language switcher — real anchors to the locale roots. */
.eh-langs { display: flex; align-items: center; gap: 2px; }
.eh-lang {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--eh-on-dark-secondary);
  padding: 5px 9px;
  transition: color var(--eh-transition), background-color var(--eh-transition);
}
.eh-lang:hover { color: var(--eh-white); }
.eh-lang.is-active {
  font-weight: 700;
  color: var(--eh-white);
  background: var(--eh-orange);
}
.eh-lang.is-active:hover { color: var(--eh-white); background: var(--eh-orange-deep); }

@media (max-width: 767px) {
  .eh-utility { height: 32px; }
  .eh-utility__note { font-size: 9.5px; letter-spacing: 0.04em; }
  .eh-utility__note-full { display: none; }
  .eh-utility__note-short { display: inline; }
  .eh-utility__right { gap: 12px; }
  .eh-utility__phone { font-size: 10.5px; }
  .eh-lang { font-size: 9.5px; padding: 4px 6px; }
}

/* ---------- Header ---------- */

.eh-header {
  background: var(--eh-white);
  border-bottom: 1px solid var(--eh-line);
  position: relative;
  z-index: 30;
}
.eh-header__inner {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.eh-header__logo { display: block; line-height: 0; }
.eh-header__logo svg { width: 245px; height: auto; display: block; }

.eh-nav { display: flex; align-items: center; gap: 30px; }
.eh-nav__link {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--eh-navy);
  white-space: nowrap;
}
.eh-nav__link:hover { color: var(--eh-orange-deep); }
.eh-nav__cta {
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 15px 22px;
  white-space: nowrap;
}

/* Hamburger — three 22x2px navy bars. */
.eh-burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.eh-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--eh-navy);
}

@media (max-width: 1099px) {
  .eh-nav { gap: 20px; }
  .eh-nav__link { font-size: 11.5px; letter-spacing: 0.06em; }
  .eh-nav__cta { padding: 14px 16px; font-size: 11px; }
  .eh-header__logo svg { width: 215px; height: auto; }
}

@media (max-width: 899px) {
  .eh-header__inner { height: 62px; }
  .eh-header__logo svg { width: 150px; height: 18px; }
  .eh-nav { display: none; }
  .eh-burger { display: flex; }

  /* Below the desktop nav breakpoint the only route to another page is the
     burger, so the header follows the reader back up. Sticky rather than
     fixed: it keeps its space in the flow, so nothing jumps when it latches.
     Hidden on scroll down so it costs no reading height. */
  .eh-header {
    position: sticky;
    top: 0;
    z-index: 210;
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
  }
  .eh-header.is-stuck { box-shadow: 0 6px 18px rgba(1, 32, 78, 0.10); }
  .eh-header.is-hidden { transform: translateY(-101%); }

  /* In-page anchors must not land under the pinned header. */
  html { scroll-padding-top: 70px; }
}

/* ---------- Mobile drawer ---------- */
/* Not in the design bundle — built to the handoff spec: full-screen navy,
   20px/800 links, language switcher, then WhatsApp and Call. */

/* Layer order on mobile: map contents (isolated) < action bar 200 <
   pinned header 210 < drawer 300 < skip link 999. */
.eh-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--eh-navy);
  padding: 0 var(--eh-gutter) calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.eh-drawer[hidden] { display: none; }

.eh-drawer__top {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}
.eh-drawer__logo { line-height: 0; }
.eh-drawer__logo svg { width: 190px; height: 23px; display: block; }
.eh-drawer__close {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--eh-white);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.eh-drawer__nav { display: flex; flex-direction: column; gap: 4px; }
.eh-drawer__nav a {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--eh-white);
  padding: 12px 0;
  border-bottom: 1px solid var(--eh-on-dark-border);
}
.eh-drawer__nav a:hover { color: var(--eh-on-dark-orange); }

.eh-drawer__langs .eh-langs--drawer { gap: 6px; }
.eh-drawer__langs .eh-lang { font-size: 11px; padding: 8px 12px; border: 1px solid var(--eh-on-dark-border); }
.eh-drawer__langs .eh-lang.is-active { border-color: var(--eh-orange); }

.eh-drawer__actions { display: grid; gap: 10px; margin-top: auto; padding-top: 8px; }

body.eh-drawer-open { overflow: hidden; }

/* ---------- Footer ---------- */

.eh-footer {
  background: var(--eh-ink);
  padding-top: 56px;
  color: var(--eh-on-dark-body);
}
.eh-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.eh-footer__brand { display: flex; flex-direction: column; gap: 18px; }
.eh-footer__brand svg { width: 190px; height: 23px; display: block; }
.eh-footer__blurb {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--eh-on-dark-meta);
  max-width: 280px;
  margin: 0;
}
.eh-footer__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.eh-footer__tag {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--eh-on-dark-secondary);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
}

.eh-footer__col { display: flex; flex-direction: column; gap: 11px; }
.eh-footer__head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--eh-orange);
  margin: 0;
  line-height: 1.4;
}
.eh-footer__col a,
.eh-footer__col span { font-size: 12.5px; font-weight: 500; color: var(--eh-on-dark-body); }
.eh-footer__col a:hover { color: var(--eh-white); }
.eh-footer__phone { font-size: 16px !important; font-weight: 800 !important; color: var(--eh-white) !important; }
.eh-footer__wa { font-weight: 600 !important; }
.eh-footer__hours { color: var(--eh-on-dark-meta) !important; line-height: 1.6; }

.eh-footer__bottom {
  padding: 20px 0 26px;
  margin-top: 44px;
  border-top: 1px solid var(--eh-on-dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.eh-footer__copy { font-size: 11.5px; font-weight: 500; color: var(--eh-steel); }
.eh-footer__legal { display: flex; gap: 20px; }
.eh-footer__legal a { font-size: 11.5px; font-weight: 500; color: var(--eh-steel); }
.eh-footer__legal a:hover { color: var(--eh-on-dark-body); }

@media (max-width: 979px) {
  .eh-footer__cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .eh-footer { padding-top: 34px; }
  .eh-footer__cols { gap: 26px; }
  .eh-footer__bottom { margin-top: 28px; flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---------- Mobile sticky action bar ---------- */

.eh-actionbar { display: none; }

@media (max-width: 767px) {
  .eh-actionbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: grid;
    /* Two columns became one when the Call button was removed on 3 Aug 2026.
       --single is set in footer.php; the two-column rule is kept so restoring
       a second action needs no CSS change. */
    grid-template-columns: 1.35fr 1fr;
    gap: 8px;
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
    background: var(--eh-white);
    border-top: 1px solid var(--eh-line);
    box-shadow: 0 -8px 24px rgba(1, 32, 78, 0.12);
  }
  .eh-actionbar--single { grid-template-columns: 1fr; }
  .eh-actionbar .eh-btn {
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
  }

  /* The hero carries its own WhatsApp and Call buttons, so the bar stays out
     of the way until they have scrolled off. --auto is set by JS: without it
     the bar is simply always on, which is the correct no-JS behaviour. */
  .eh-actionbar--auto {
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 220ms ease-out, visibility 220ms;
  }
  .eh-actionbar--auto.is-visible { transform: none; visibility: visible; }
}

/* At 390px the utility bar's three items compete for width and the location
   note gets clipped mid-word. Tighten the switcher and gutter so the short
   note ("Pula · Trieste–Poreč") fits whole. */
@media (max-width: 480px) {
  .eh-utility .eh-pad { padding-left: 12px; padding-right: 12px; }
  .eh-utility__right { gap: 8px; }
  .eh-lang { padding: 4px 5px; letter-spacing: 0.08em; }
  .eh-utility__phone { font-size: 10px; letter-spacing: 0.02em; }
  .eh-utility__note { font-size: 9px; }
}

/* Both scroll behaviours are slides. Reduced motion gets the same states,
   arrived at instantly. */
@media (prefers-reduced-motion: reduce) {
  .eh-header,
  .eh-actionbar--auto { transition: none; }
}

/* Language not yet available: rendered as a span, not an empty anchor. Muted
   and non-interactive so it reads as "not translated" rather than "broken". */
.eh-lang.is-unavailable { opacity: 0.38; cursor: default; }
