/* ==========================================================================
   CTV header v4: utility strip, sticky bar, sliding indicator, mega menu,
   full-screen mobile panel. Self-contained (all classes are new).
   ========================================================================== */
:root {
  --hdr-h: 76px;
  --hdr-h-stuck: 66px;
  --nav-ink: #0b1630;
  --nav-muted: #5b6782;
  --nav-line: #e6ebf3;
  --nav-accent: #2251d6;
  --nav-accent-tint: #eef3fe;
  --nav-navy: #06122e;
  --header-h: var(--hdr-h);
}

/* The header now sits in the page flow (sticky), so heroes no longer need extra top space */
.hero { padding-top: clamp(40px, 6vw, 72px) !important; }
.page-hero { padding-top: clamp(44px, 6vw, 80px) !important; }
.notfound { padding-top: clamp(60px, 10vw, 120px) !important; }
html { scroll-padding-top: calc(var(--hdr-h-stuck) + 16px); }
.jump-nav { top: var(--hdr-h-stuck); }

/* ---------- Utility strip ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--nav-line); font-size: .86rem; color: var(--nav-muted); position: relative; z-index: 1031; }
.topbar__inner { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 22px; min-width: 0; }
.topbar a { color: var(--nav-muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: color .2s; }
.topbar a:hover { color: var(--nav-accent); }
.topbar .icon { width: 15px; height: 15px; }
.topbar__promo { color: var(--nav-ink) !important; font-weight: 500; }
.topbar__promo .icon { color: var(--nav-accent); }
.topbar__promo strong { color: var(--nav-accent); font-weight: 700; margin-right: 2px; }
.topbar__promo:hover span { text-decoration: underline; text-underline-offset: 3px; }
.topbar__wa .icon { color: #1aa557; }
.topbar__sep { width: 1px; height: 16px; background: var(--nav-line); }
.topbar__social { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.topbar__social a { width: 28px; height: 28px; justify-content: center; border-radius: 8px; }
.topbar__social a:hover { background: var(--nav-accent-tint); }
.topbar__social .icon { width: 15px; height: 15px; }
@media (max-width: 1199.98px) { .topbar .topbar__email { display: none; } }
@media (max-width: 991.98px) { .topbar__sep, .topbar__social { display: none; } }
@media (max-width: 767.98px) { .topbar { display: none; } }

/* ---------- Sticky bar ---------- */
.hdr {
  position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--nav-line); transition: box-shadow .3s ease, background-color .3s ease;
}
.hdr.is-stuck { background: rgba(255, 255, 255, .92); box-shadow: 0 10px 30px -18px rgba(11, 22, 48, .28); }
.hdr__bar { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: var(--hdr-h); display: flex; align-items: center; gap: 28px; transition: height .3s ease; }
.hdr.is-stuck .hdr__bar { height: var(--hdr-h-stuck); }
.hdr__logo { display: block; flex: none; line-height: 0; border-radius: 8px; }
.hdr__logo img { height: 46px; width: auto; transition: height .3s ease; }
.hdr.is-stuck .hdr__logo img { height: 40px; }

/* Desktop menu with a sliding indicator */
.hdr__nav { position: relative; margin-left: auto; display: none; }
.hdr__menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.hdr__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border: 0; background: none; font: inherit; font-size: .98rem; font-weight: 500; color: var(--nav-ink); border-radius: 10px;
  cursor: pointer; transition: color .2s ease, background-color .2s ease;
}
.hdr__link:hover, .hdr__link[aria-expanded="true"] { color: var(--nav-accent); background: var(--nav-accent-tint); }
.hdr__link[aria-current="page"], .hdr__link.is-current { color: var(--nav-accent); font-weight: 600; }
.hdr__chev { width: 16px; height: 16px; transition: transform .25s ease; }
.hdr__link[aria-expanded="true"] .hdr__chev { transform: rotate(180deg); }
.hdr__indicator {
  position: absolute; left: 0; bottom: -15px; height: 3px; width: 0; border-radius: 3px 3px 0 0; background: var(--nav-accent);
  opacity: 0; transition: transform .35s cubic-bezier(.16, 1, .3, 1), width .35s cubic-bezier(.16, 1, .3, 1), opacity .25s ease, bottom .3s ease;
}
.hdr.is-stuck .hdr__indicator { bottom: -10px; }
.hdr__indicator.is-on { opacity: 1; }

/* Actions */
.hdr__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.hdr__cta {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 22px; border-radius: 12px;
  background: var(--nav-navy); color: #fff; font-weight: 600; font-size: .96rem; white-space: nowrap;
  box-shadow: 0 10px 22px -12px rgba(6, 18, 46, .7); transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.hdr__cta:hover { color: #fff; background: var(--nav-accent); transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(34, 81, 214, .7); }
.hdr__cta-icon { width: 17px; height: 17px; transition: transform .25s ease; }
.hdr__cta:hover .hdr__cta-icon { transform: translateX(3px); }
.hdr__cta-short { display: none; }
.hdr__burger {
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--nav-line); background: #fff; display: inline-flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.hdr__burger:hover { border-color: #cdd7e8; background: #f7f9fd; }
.hdr__burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--nav-ink); transition: transform .3s ease, opacity .2s ease, width .3s ease; }
.hdr__burger span:nth-child(2) { width: 14px; align-self: center; transform: translateX(3px); }
.hdr__burger:hover span:nth-child(2) { width: 20px; transform: none; }

@media (min-width: 1140px) {
  .hdr__nav { display: block; }
  .hdr__nav ~ .hdr__actions { margin-left: 0; }
  .hdr__burger { display: none; }
}
@media (max-width: 767.98px) {
  :root { --hdr-h: 64px; --hdr-h-stuck: 60px; }
  .hdr__bar { padding: 0 16px; gap: 12px; }
  .hdr__logo img, .hdr.is-stuck .hdr__logo img { height: 38px; }
  .hdr__cta { height: 42px; padding: 0 12px 0 16px; font-size: .92rem; border-radius: 11px; }
  .hdr__burger { width: 42px; height: 42px; }
}
@media (max-width: 413.98px) { .hdr__cta-full { display: none; } .hdr__cta-short { display: inline; } }
@media (max-width: 359.98px) { .hdr__cta { display: none; } }

/* ---------- Mega menu ---------- */
.mega2 {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--nav-line);
  box-shadow: 0 30px 60px -30px rgba(11, 22, 48, .35); opacity: 0; transform: translateY(-8px);
  transition: opacity .22s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
}
.mega2.is-open { opacity: 1; transform: none; }
.mega2__inner { max-width: 1320px; margin: 0 auto; padding: 26px 24px 30px; display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.mega2__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mega2__title { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--nav-muted); }
.mega2__all { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .92rem; color: var(--nav-accent); }
.mega2__all .icon { width: 16px; height: 16px; transition: transform .2s; }
.mega2__all:hover .icon { transform: translateX(3px); }
.mega2__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; }
.mega2__item { display: flex; gap: 14px; padding: 13px 14px; border-radius: 14px; color: var(--nav-muted); border: 1px solid transparent; transition: background-color .2s, border-color .2s, transform .25s cubic-bezier(.16, 1, .3, 1); }
.mega2__item:hover, .mega2__item:focus-visible { background: #f7f9fe; border-color: var(--nav-line); color: var(--nav-muted); transform: translateX(3px); }
.mega2__item.is-current { background: var(--nav-accent-tint); }
.mega2__icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--nav-accent-tint); color: var(--nav-accent); transition: background-color .2s, color .2s; }
.mega2__item:hover .mega2__icon { background: var(--nav-accent); color: #fff; }
.mega2__icon .icon { width: 20px; height: 20px; }
.mega2__text strong { display: block; font-weight: 600; font-size: .96rem; color: var(--nav-ink); margin-bottom: 2px; }
.mega2__text small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .84rem; line-height: 1.45; }
.mega2__side { display: grid; gap: 14px; align-content: start; }
.mega2__promo { position: relative; overflow: hidden; padding: 22px; border-radius: 18px; color: #fff; background: radial-gradient(260px 200px at 100% 0%, rgba(141, 187, 255, .35), transparent 60%), linear-gradient(150deg, var(--nav-navy), #1c3a7a); }
.mega2__promo img { position: absolute; top: 18px; right: 18px; width: 50px; height: 50px; object-fit: contain; padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.mega2__promo-label { margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9fc0ff; }
.mega2__promo-title { margin: 0 0 14px; padding-right: 54px; font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.mega2__promo-link { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-weight: 600; font-size: .9rem; }
.mega2__promo-link .icon { width: 16px; height: 16px; transition: transform .2s; }
.mega2__promo-link:hover { color: #fff; }
.mega2__promo-link:hover .icon { transform: translateX(3px); }
.mega2__help { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--nav-line); display: grid; gap: 8px; }
.mega2__help p { margin: 0 0 2px; font-weight: 600; color: var(--nav-ink); font-size: .92rem; }
.mega2__help a { display: inline-flex; align-items: center; gap: 8px; color: var(--nav-muted); font-size: .9rem; }
.mega2__help a:hover { color: var(--nav-accent); }
.mega2__help .icon { width: 16px; height: 16px; color: var(--nav-accent); }
@media (max-width: 1139.98px) { .mega2 { display: none !important; } }

/* ---------- Mobile / tablet panel ---------- */
.mnav {
  position: fixed; inset: 0 0 0 auto; z-index: 1060; width: min(440px, 100%); background: #fff; display: flex; flex-direction: column;
  box-shadow: -30px 0 60px -30px rgba(11, 22, 48, .4); transform: translateX(100%); transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}
.mnav.is-open { transform: none; }
.mnav-backdrop { position: fixed; inset: 0; z-index: 1059; background: rgba(6, 18, 46, .45); opacity: 0; transition: opacity .3s ease; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.mnav-backdrop.is-open { opacity: 1; }
html.mnav-lock, html.mnav-lock body { overflow: hidden; }
.mnav__head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--nav-line); flex: none; }
.mnav__head .hdr__logo { display: flex; align-items: center; min-height: 48px; }
.mnav__head img { height: 38px; width: auto; }
.mnav__close { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--nav-line); background: #fff; display: grid; place-items: center; color: var(--nav-ink); }
.mnav__close .icon { width: 20px; height: 20px; }
.mnav__body { flex: 1; overflow-y: auto; padding: 8px 20px; overscroll-behavior: contain; }
.mnav__list { list-style: none; margin: 0; padding: 0; }
.mnav__list > li { border-bottom: 1px solid var(--nav-line); }
.mnav__link {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 58px; padding: 0 4px;
  border: 0; background: none; font: inherit; font-size: 1.15rem; font-weight: 600; color: var(--nav-ink); text-align: left;
}
.mnav__link[aria-current="page"], .mnav__link.is-current { color: var(--nav-accent); }
.mnav__link[aria-current="page"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--nav-accent); }
.mnav__chev { width: 20px; height: 20px; transition: transform .3s ease; }
.mnav__link[aria-expanded="true"] .mnav__chev { transform: rotate(180deg); }
.mnav__sub { list-style: none; margin: 0 0 12px; padding: 4px; border-radius: 16px; background: #f7f9fe; }
.mnav__sub a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 12px; color: var(--nav-ink); font-weight: 500; font-size: .98rem; }
.mnav__sub a:hover, .mnav__sub a[aria-current="page"] { background: #fff; color: var(--nav-accent); }
.mnav__sub-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--nav-accent); box-shadow: 0 2px 8px -4px rgba(11, 22, 48, .25); }
.mnav__sub-icon .icon { width: 17px; height: 17px; }
.mnav__sub-all { color: var(--nav-accent) !important; font-weight: 600 !important; }
.mnav__sub-all .icon { width: 16px; height: 16px; }
.mnav__foot { flex: none; padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--nav-line); display: grid; gap: 12px; background: #fff; }
.mnav__quote { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 14px; background: var(--nav-navy); color: #fff; font-weight: 600; font-size: 1.02rem; }
.mnav__quote:hover { color: #fff; background: var(--nav-accent); }
.mnav__quote .icon { width: 18px; height: 18px; }
.mnav__contact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mnav__contact a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 14px; border: 1px solid var(--nav-line); color: var(--nav-ink); font-weight: 600; }
.mnav__contact .icon { width: 18px; height: 18px; color: var(--nav-accent); }
.mnav__contact .mnav__wa { background: #effaf3; border-color: #cdeedb; color: #0f6b39; }
.mnav__contact .mnav__wa .icon { color: #1aa557; }
.mnav__email { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: var(--nav-muted); font-size: .92rem; }
.mnav__email .icon { width: 16px; height: 16px; }
.mnav__social { display: flex; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.mnav__social a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--nav-line); color: var(--nav-ink); }
.mnav__social a:hover { background: var(--nav-accent); border-color: var(--nav-accent); color: #fff; }
.mnav__social .icon { width: 17px; height: 17px; }
@media (min-width: 1140px) { .mnav, .mnav-backdrop { display: none !important; } }

/* Staggered links when the panel opens */
.mnav.is-open .mnav__list > li { animation: mnav-in .45s cubic-bezier(.16, 1, .3, 1) both; }
.mnav.is-open .mnav__list > li:nth-child(2) { animation-delay: .04s; }
.mnav.is-open .mnav__list > li:nth-child(3) { animation-delay: .08s; }
.mnav.is-open .mnav__list > li:nth-child(4) { animation-delay: .12s; }
.mnav.is-open .mnav__list > li:nth-child(5) { animation-delay: .16s; }
.mnav.is-open .mnav__list > li:nth-child(6) { animation-delay: .2s; }
@keyframes mnav-in { from { opacity: 0; transform: translateX(18px); } }

/* Focus styles for keyboard users */
.hdr a:focus-visible, .hdr button:focus-visible, .topbar a:focus-visible, .mnav a:focus-visible, .mnav button:focus-visible {
  outline: 2px solid var(--nav-accent); outline-offset: 2px;
}

/* The scroll progress bar sits along the bottom edge of the bar */
.hdr .scroll-progress { top: auto; bottom: -1px; height: 2px; }
.hdr .scroll-progress span { background: linear-gradient(90deg, var(--nav-navy), var(--nav-accent)); }

@media (prefers-reduced-motion: reduce) {
  .hdr, .hdr__bar, .hdr__logo img, .hdr__indicator, .mega2, .mnav, .mnav-backdrop { transition: none !important; }
  .mnav.is-open .mnav__list > li { animation: none; }
}

/* Larger logo (bar height unchanged: the logo grows inside the existing bar) */
.hdr__logo img { height: 58px; }
.hdr.is-stuck .hdr__logo img { height: 50px; }
.mnav__head img { height: 46px; }
@media (max-width: 767.98px) {
  .hdr__logo img, .hdr.is-stuck .hdr__logo img { height: 48px; }
}
