/* ============================================================
   ENEKTRI shared mega-menu header (GoodWe-style)
   Self-contained — linked on every page (incl. pages that do
   not use styles.css). Brand colours are inlined so it never
   depends on external CSS variables.
   ============================================================ */
:root { --enk-h: 104px; }   /* at-top header height: 14px margin + 86px row + border */

/* Reserve space so the fixed header NEVER overlaps page content.
   Scoped to pages that opt in via <body class="enk-fixed-header">
   so legacy (sticky) header pages are unaffected. */
body.enk-fixed-header { padding-top: var(--enk-h); }
/* Full-bleed heroes slide back up behind the floating bar so the image
   stays edge-to-edge, but the inner content is top-aligned with a header-
   sized offset so the text can NEVER sit under the bar, at any height. */
body.enk-fixed-header .hero-cine {
  margin-top: calc(-1 * var(--enk-h));
  height: auto;                                   /* grow with content instead of clipping */
  min-height: clamp(640px, 88vh, 860px);
}
body.enk-fixed-header .hero-cine-inner {
  height: auto;
  min-height: clamp(640px, 88vh, 860px);
  justify-content: center;                        /* centred in the band between header and spec bar */
  padding-top: calc(var(--enk-h) + 34px);         /* always clears the fixed header */
  /* padding-bottom (188px from base) reserves space for the spec bar; with
     min-height + auto growth the content can never overlap either edge */
}

.enk-header { position: fixed; top: 0; left: 0; right: 0; z-index: 900; }
/* Opt-in auto-hide (pages with their own sticky subnav below the header — e.g. products,
   ENEKTRI Cloud — add "enk-autohide" via a small page-scoped script). Slides the header
   off-screen on scroll-down and drops the subnav's sticky offset to 0 so it fills the
   reclaimed space instead of leaving a blank gap where the header used to be. */
.enk-header.enk-autohide { transition: transform .28s cubic-bezier(.4,0,.2,1); }
body.enk-header-hidden .enk-header.enk-autohide { transform: translateY(-100%); }
body.enk-header-hidden .subnav { top: 0; }
.subnav { transition: top .28s cubic-bezier(.4,0,.2,1); }
.enk-bar {
  margin: 14px auto 0; max-width: min(1360px, calc(100% - 32px)); border-radius: 18px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(14,42,78,.20); border: 1px solid rgba(255,255,255,.7);
  transition: all .38s cubic-bezier(.4,0,.2,1);
}
.enk-header[data-state="scrolled"] .enk-bar {
  margin: 0 auto; max-width: 100%; border-radius: 0;
  background: #fff; box-shadow: 0 2px 18px rgba(14,42,78,.10);
  border: 0; border-bottom: 1px solid #eef2f6;
}
.enk-row {
  max-width: 1360px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 0 22px; height: 86px; transition: height .38s cubic-bezier(.4,0,.2,1);
}
.enk-header[data-state="scrolled"] .enk-row { height: 68px; }

.enk-logo { flex: none; display: flex; align-items: center; margin-right: 6px; transform: translateY(-3px); }
.enk-logo img { height: 50px; display: block; transition: height .38s cubic-bezier(.4,0,.2,1); }
.enk-header[data-state="scrolled"] .enk-logo img { height: 40px; }

/* Desktop nav — fills the middle, links spread out symmetrically.
   Nudged down 3px to sit level with the logo wordmark (leaf raises the
   logo's optical centre). */
.enk-nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; transform: translateY(3px); }
.enk-link {
  display: inline-flex; align-items: center; gap: 6px; color: #143a5e; font-weight: 700;
  font-size: 13.5px; letter-spacing: 0; text-transform: uppercase; padding: 10px 11px;
  border-radius: 9px; cursor: pointer; background: none; border: none; font-family: inherit;
  white-space: nowrap; transition: color .15s, background .15s;
}
.enk-link:hover { color: #0e96ae; background: #f2f7fa; }
.enk-chev { width: 11px; height: 11px; transition: transform .25s; }
.enk-navitem { position: relative; }
.enk-header[data-active="products"] .enk-navitem[data-menu="products"] .enk-chev,
.enk-header[data-active="cloud"] .enk-navitem[data-menu="cloud"] .enk-chev { transform: rotate(180deg); }
.enk-header[data-active="products"] .enk-navitem[data-menu="products"] .enk-trigger,
.enk-header[data-active="cloud"] .enk-navitem[data-menu="cloud"] .enk-trigger { color: #0e96ae; background: #f2f7fa; }

/* Right actions */
.enk-actions { flex: none; display: flex; align-items: center; gap: 10px; transform: translateY(3px); }
.enk-icon-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #e4ebf1; background: #fff; border-radius: 999px; color: #143a5e; cursor: pointer;
  transition: all .15s;
}
.enk-icon-btn svg { width: 18px; height: 18px; }
.enk-icon-btn:hover { border-color: #0e96ae; color: #0e96ae; }

.enk-lang { position: relative; }
.enk-lang-btn {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 10px;
  border: 1px solid #e4ebf1; background: #fff; border-radius: 999px; color: #143a5e; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 13px; transition: all .15s;
}
.enk-lang-btn:hover { border-color: #0e96ae; color: #0e96ae; }
.enk-globe { width: 17px; height: 17px; }
.enk-lang-btn .enk-chev { transition: transform .25s; }
.enk-lang.is-open .enk-chev { transform: rotate(180deg); }
.enk-lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; background: #fff;
  border: 1px solid #eef2f6; border-radius: 14px; box-shadow: 0 20px 50px rgba(14,42,78,.18);
  padding: 6px; min-width: 184px; z-index: 30; display: none;
}
.enk-lang.is-open .enk-lang-menu { display: block; animation: enkPop .18s ease; }
.enk-lang-menu a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; color: #143a5e; font-weight: 600;
}
.enk-lang-menu a:hover { background: #f4f8fb; }
.enk-lang-menu a.is-active { background: #eef6f8; color: #0e96ae; font-weight: 700; }
.enk-lang-code { font: 600 11px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .06em; width: 22px; }

.enk-cta {
  text-decoration: none; background: #0e96ae; color: #fff; font-weight: 700; font-size: 13.5px;
  letter-spacing: .01em; padding: 11px 16px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(14,150,174,.25); transition: transform .15s, box-shadow .15s;
}
.enk-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(14,150,174,.34); }

.enk-burger {
  display: none; width: 42px; height: 42px; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; border: 1px solid #e4ebf1; background: #fff; border-radius: 11px; cursor: pointer;
}
.enk-burger span { width: 18px; height: 2px; background: #143a5e; border-radius: 2px; display: block; }

/* Mega panels */
.enk-mega { position: absolute; left: 0; right: 0; top: 100%; padding-top: 12px; }
.enk-mega:not([hidden]) { animation: enkMega .22s ease; }
.enk-mega-inner {
  max-width: min(880px, calc(100% - 32px)); margin: 0 auto; background: #fff; border: 1px solid #eef2f6; border-radius: 18px;
  box-shadow: 0 26px 64px rgba(14,42,78,.18); padding: 26px 28px 30px; display: block;
}
.enk-mega-col { flex: 1; }
.enk-mega-eyebrow { font: 600 11px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .16em; color: #0e96ae; padding: 4px 8px 12px; }
/* GoodWe-style product tiles inside the mega panels */
.enk-mega-head {
  display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800;
  letter-spacing: -.01em; color: #0E2A4E; text-decoration: none;
  padding-bottom: 8px; border-bottom: 2px solid #0e96ae; margin-bottom: 22px; transition: color .15s;
}
.enk-mega-head:hover { color: #0e96ae; }
.enk-mega-head svg { width: 18px; height: 18px; }
.enk-mega-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.enk-mega-tile { display: flex; flex-direction: column; text-align: center; text-decoration: none; border-radius: 16px; padding: 10px 10px 14px; transition: background .16s; }
.enk-mega-tile:hover { background: #f5f9fc; }
.enk-mega-tile-img {
  position: relative; height: 188px; border-radius: 12px; overflow: hidden;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.enk-mega-tile-img img { max-width: 86%; max-height: 86%; object-fit: contain; display: block; }
.enk-mega-tile-ph { position: absolute; font: 500 11px "IBM Plex Mono", ui-monospace, monospace; color: #9fb1bf; letter-spacing: .02em; }
.enk-mega-tile-title { margin-top: 14px; font-size: 16px; font-weight: 700; color: #0E2A4E; transition: color .15s; }
.enk-mega-tile:hover .enk-mega-tile-title { color: #0e96ae; }
.enk-mega-tile-sub { margin-top: 5px; font-size: 12.5px; color: #5a6b7b; line-height: 1.45; }

/* Search overlay */
.enk-search { position: absolute; left: 0; right: 0; top: 100%; padding-top: 12px; }
.enk-search:not([hidden]) { animation: enkMega .2s ease; }
.enk-search-inner { max-width: min(1360px, calc(100% - 32px)); margin: 0 auto; background: #fff; border: 1px solid #eef2f6; border-radius: 18px; box-shadow: 0 26px 64px rgba(14,42,78,.18); padding: 18px; }
.enk-search-field { display: flex; align-items: center; gap: 12px; border: 1.5px solid #e4ebf1; border-radius: 13px; padding: 0 16px; height: 54px; }
.enk-search-field svg { width: 20px; height: 20px; flex: none; }
.enk-search-field input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 16px; color: #0E2A4E; background: transparent; }
.enk-search-close { border: none; background: #f1f5f8; color: #5a6b7b; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 16px; }
.enk-search-pop { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.enk-search-poplabel { font: 600 11px "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .12em; color: #9aa8b4; margin-right: 4px; }
.enk-search-pop a { text-decoration: none; font-size: 13px; font-weight: 600; color: #143a5e; background: #f1f6fb; padding: 7px 13px; border-radius: 999px; }
.enk-search-pop a:hover { background: #d7eef2; color: #0a7e93; }
.enk-search-results:empty { display: none; }
.enk-search-results { margin-top: 14px; display: grid; gap: 6px; max-height: 56vh; overflow-y: auto; }
.enk-search-results a { display: block; padding: 11px 13px; border-radius: 11px; text-decoration: none; background: #fafcfd; border: 1px solid #eef2f6; }
.enk-search-results a:hover { background: #f1f6fb; }
.enk-search-results b { display: block; font-size: 14.5px; color: #0E2A4E; }
.enk-search-results span { font-size: 12.5px; color: #5a6b7b; }
.enk-search-empty { padding: 12px 4px; color: #5a6b7b; font-size: 14px; }

@keyframes enkMega { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes enkPop  { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes enkDrawer { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

/* Mobile drawer */
.enk-drawer { position: fixed; inset: 0; z-index: 950; }
.enk-drawer-scrim { position: absolute; inset: 0; background: rgba(14,42,78,.45); backdrop-filter: blur(2px); }
.enk-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw,360px); background: #fff;
  box-shadow: -12px 0 40px rgba(14,42,78,.22); padding: 20px; display: flex; flex-direction: column;
  gap: 4px; overflow-y: auto; animation: enkDrawer .25s ease;
}
.enk-drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.enk-drawer-top img { height: 28px; }
.enk-drawer-x { border: 1px solid #e4ebf1; background: #fff; color: #143a5e; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 17px; }
.enk-drawer-link { text-decoration: none; color: #0E2A4E; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; padding: 14px 6px; border-bottom: 1px solid #f0f3f6; }
.enk-drawer-sec { padding: 12px 6px 6px; border-bottom: 1px solid #f0f3f6; }
.enk-drawer-eyebrow { font: 600 11px "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .14em; color: #0e96ae; margin-bottom: 8px; }
.enk-drawer-sec a { display: block; text-decoration: none; padding: 9px 0; }
.enk-drawer-sec a b { color: #0E2A4E; font-size: 14.5px; display: block; }
.enk-drawer-sec a span { color: #5a6b7b; font-size: 12.5px; }
.enk-drawer-langs { padding: 16px 6px 4px; }
.enk-drawer-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.enk-drawer-chips a { text-decoration: none; border: none; cursor: pointer; font-weight: 700; font-size: 13px; padding: 9px 15px; border-radius: 999px; background: #f1f6fb; color: #143a5e; }
.enk-drawer-chips a.is-active { background: #0e96ae; color: #fff; }
.enk-drawer-cta { text-decoration: none; background: #0e96ae; color: #fff; font-weight: 700; font-size: 15px; text-align: center; padding: 15px; border-radius: 999px; margin-top: 18px; box-shadow: 0 8px 22px rgba(14,150,174,.25); }

/* Below this, the desktop nav can't fit the longest-language labels without
   overflowing the bar — switch to the burger/drawer nav instead. Greek needs
   the wider 1280px threshold; the other languages fit comfortably narrower,
   so they keep the desktop nav visible down to 1100px. */
@media (max-width: 1280px) {
  html[lang="el"] .enk-nav { display: none; }
  html[lang="el"] .enk-lang { display: none; }
  html[lang="el"] .enk-cta { display: none; }
  html[lang="el"] .enk-burger { display: inline-flex; }
  html[lang="el"] .enk-actions { margin-left: auto; }
}
/* Between 1046-1100px the nav's natural width (unmodified) no longer fits next to
   search+lang+CTA — it was overflowing off the right edge (CTA button pushed off
   screen), not just visually tight. Tighten link padding/gaps only in this band so
   it keeps fitting at the lower 1045px threshold, without touching the roomier
   spacing used above 1100px. Measured: tightened layout's CTA needs 1035-1036px to
   fully fit — 1045px keeps a small safety margin. */
@media (max-width: 1100px) and (min-width: 1046px) {
  html:not([lang="el"]) .enk-link { padding: 10px 7px; }
  html:not([lang="el"]) .enk-nav { gap: 0; }
  html:not([lang="el"]) .enk-actions { gap: 6px; }
}
@media (max-width: 1045px) {
  html:not([lang="el"]) .enk-nav { display: none; }
  html:not([lang="el"]) .enk-lang { display: none; }
  html:not([lang="el"]) .enk-cta { display: none; }
  html:not([lang="el"]) .enk-burger { display: inline-flex; }
  html:not([lang="el"]) .enk-actions { margin-left: auto; }
}
/* Phones: a clean full-width compact bar (not the floating desktop pill) */
@media (max-width: 640px) {
  :root { --enk-h: 62px; }
  .enk-bar {
    margin: 0; max-width: 100%; border-radius: 0;
    background: #fff; border: 0; border-bottom: 1px solid #eef2f6;
    box-shadow: 0 2px 14px rgba(14,42,78,.08); backdrop-filter: none;
  }
  .enk-header[data-state="scrolled"] .enk-bar { box-shadow: 0 2px 16px rgba(14,42,78,.12); }
  .enk-row { height: 62px; padding: 0 16px; }
  .enk-header[data-state="scrolled"] .enk-row { height: 62px; }
  .enk-logo { transform: none; }
  .enk-logo img,
  .enk-header[data-state="scrolled"] .enk-logo img { height: 30px; }
  .enk-actions { gap: 8px; }
  .enk-icon-btn, .enk-burger { width: 40px; height: 40px; }
  /* drawer: a touch wider + comfier tap targets */
  .enk-drawer-panel { width: min(90vw, 380px); padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .enk-drawer-link { padding: 15px 6px; font-size: 16px; }
  .enk-drawer-sec a b { font-size: 15.5px; }
}

/* ---- first-visit language suggestion bar ---- */
.enk-langbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 14px; background: #0f2c4f; color: #fff; padding: 11px 16px 11px 20px; border-radius: 100px; box-shadow: 0 10px 30px rgba(15, 44, 79, .35); font-size: 14.5px; max-width: 92vw; }
.enk-langbar a { color: #7fe3f2; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.enk-langbar button { background: none; border: 0; color: rgba(255, 255, 255, .7); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.enk-langbar button:hover { color: #fff; }
