/* =====================================================================
   Appslin — shared components for Homepage Design 1 & 2
   Header, mega menu, buttons, forms, modals, footer, WhatsApp button.
   Brand palette is unchanged: navy / blue / green with the logo gold.
   Each design file (home-design-1.css / home-design-2.css) re-tunes the
   --hx-* tokens below to change the look without touching markup.
   ===================================================================== */
:root {
  --navy-950: #061430;
  --navy-900: #0a1f44;
  --navy-800: #102c5e;
  --blue-600: #1c4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-100: #e0ecff;
  --blue-50: #f2f7ff;
  --green-700: #067a52;
  --green-600: #0a9d68;
  --green-500: #10b981;
  --green-100: #d8f6ea;
  --gold-600: #a5803a;
  --gold-400: #d4b26a;
  --ink: #0b1524;
  --body: #475872;
  --muted: #6c7f9c;
  --line: #dfe7f3;
  --paper: #ffffff;
  --surface: #f5f8fd;

  --grad-brand: linear-gradient(115deg, #1c4ed8 0%, #2563eb 45%, #10b981 100%);

  --f-display: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1240px;
  --gutter: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* header tokens (overridden per design) */
  --hx-top-bg: var(--navy-900);
  --hx-top-fg: rgba(255, 255, 255, .82);
  --hx-head-bg: rgba(255, 255, 255, .92);
  --hx-head-fg: var(--ink);
  --hx-head-line: var(--line);
  --hx-accent: var(--blue-500);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--f-body); font-size: 16.5px; line-height: 1.7; color: var(--body); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-500); text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-display); color: var(--ink); margin: 0; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--green-500); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.i { width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: middle; }

.hx-wrap {
  width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.hx-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--navy-900); color: #fff; padding: 12px 18px; }
.hx-skip:focus { left: 0; }

/* ---------------- Buttons ---------------- */
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-display); font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: 15px 26px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s, color .3s, border-color .3s;
  white-space: nowrap; text-align: center;
}
.hx-btn .i { transition: transform .3s var(--ease); }
.hx-btn:hover .i { transform: translateX(3px); }
.hx-btn--primary { background: var(--grad-brand); background-size: 150% 100%; color: #fff; box-shadow: 0 12px 28px rgba(37, 99, 235, .28); }
.hx-btn--primary:hover { color: #fff; background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 18px 36px rgba(16, 185, 129, .3); }
.hx-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.hx-btn--ghost:hover { border-color: var(--blue-400); color: var(--blue-600); }
.hx-btn--sm { padding: 11px 18px; font-size: .88rem; }
.hx-btn--block { width: 100%; }
.hx-btn:disabled { opacity: .65; cursor: progress; transform: none; }

/* ---------------- Top bar ---------------- */
.hx-topbar { background: var(--hx-top-bg); color: var(--hx-top-fg); font-size: .84rem; }
.hx-topbar .hx-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.hx-topbar-info { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hx-topbar-info a, .hx-topbar-info li { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.hx-topbar a:hover { color: #fff; }
.hx-topbar .i { color: var(--green-500); }
.hx-social { display: flex; gap: 8px; }
.hx-social a { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: inherit; background: rgba(255, 255, 255, .08); transition: background-color .25s, color .25s; }
.hx-social a:hover { background: var(--green-500); color: #fff; }
.hx-social .i { color: currentColor; width: 15px; height: 15px; }
@media (max-width: 900px) { .hx-topbar-note { display: none !important; } }
@media (max-width: 560px) { .hx-topbar .hx-social { display: none; } .hx-topbar-info { justify-content: center; width: 100%; font-size: .8rem; } }

/* ---------------- Header ---------------- */
.hx-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  color: var(--hx-head-fg); isolation: isolate;
  border-bottom: 1px solid var(--hx-head-line);
  transition: box-shadow .3s, background-color .3s;
}
.hx-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hx-head-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.hx-header.is-scrolled { box-shadow: 0 10px 30px rgba(10, 31, 68, .1); }
.hx-header-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.hx-brand { flex: none; }
.hx-brand img { height: 46px; width: auto; }
.hx-nav { margin-left: auto; }
.hx-nav > ul { display: flex; align-items: center; gap: 4px; }
.hx-nav > ul > li { position: relative; }
.hx-nav > ul > li > a {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px;
  font-family: var(--f-display); font-weight: 600; font-size: .93rem; color: var(--hx-head-fg);
  transition: color .2s, background-color .2s;
}
.hx-nav > ul > li > a:hover, .hx-nav > ul > li.is-open > a { color: var(--hx-accent); }
.hx-nav > ul > li.is-active > a { color: var(--hx-accent); }
.hx-nav .caret { width: 14px; height: 14px; transition: transform .25s; }
.hx-nav-toggle { display: none; }
.hx-nav-mobile-cta { display: none; }

.hx-mega, .hx-dropdown {
  position: absolute; top: calc(100% + 10px); background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 30px 70px rgba(10, 31, 68, .16);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .22s, transform .22s var(--ease), visibility .22s;
}
.hx-mega::before, .hx-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.hx-dropdown { left: 0; min-width: 220px; padding: 10px; display: grid; }
.hx-mega { left: 50%; translate: -50% 0; width: min(980px, calc(100vw - 40px)); padding: 26px; display: grid; grid-template-columns: repeat(3, 1fr) 1.1fr; gap: 22px; }
.hx-mega h6 { font-family: var(--f-body); font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; padding: 0 10px; }
.hx-mega .hx-mega-sub { margin-top: 14px; }
.hx-dropdown--products { min-width: 330px; }
.hx-dropdown--products a { display: grid; gap: 1px; padding: 10px 12px; }
.hx-dropdown--products b { font-family: var(--f-display); font-weight: 600; font-size: .94rem; }
.hx-dropdown--products small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.hx-nav > ul > li.is-active > a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad-brand); }
.hx-nav > ul > li > a { position: relative; }
.hx-mega-col { display: grid; align-content: start; }
.hx-mega-col a, .hx-dropdown a { color: var(--ink); font-size: .92rem; font-weight: 500; padding: 7px 10px; border-radius: 8px; transition: background-color .2s, color .2s; }
.hx-mega-col a:hover, .hx-dropdown a:hover { background: var(--blue-50); color: var(--blue-600); }
.hx-mega-promo { background: var(--navy-900); color: rgba(255, 255, 255, .78); border-radius: 14px; padding: 22px; display: grid; align-content: start; gap: 10px; font-size: .9rem; }
.hx-mega-promo strong { color: #fff; font-family: var(--f-display); font-size: 1.05rem; line-height: 1.3; }
.hx-mega-promo a { color: var(--green-500); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

@media (min-width: 1200px) {
  .hx-nav .has-sub:hover > .hx-mega, .hx-nav .has-sub:hover > .hx-dropdown,
  .hx-nav .has-sub:focus-within > .hx-mega, .hx-nav .has-sub:focus-within > .hx-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
  .hx-nav .has-sub:hover .caret { transform: rotate(180deg); }
}

@media (max-width: 1199px) {
  .hx-header-row { min-height: 66px; gap: 12px; }
  .hx-brand img { height: 38px; }
  .hx-header-cta { margin-left: auto; }
  .hx-nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
    background: transparent; border: 1px solid var(--hx-head-line); color: var(--hx-head-fg);
  }
  .hx-nav-toggle .i { width: 22px; height: 22px; }
  .hx-nav-toggle .i-close { display: none; }
  .hx-nav-open .hx-nav-toggle .i-close { display: block; }
  .hx-nav-open .hx-nav-toggle .i-open { display: none; }
  .hx-nav {
    position: fixed; left: 0; right: 0; top: calc(var(--hx-offset, 108px)); bottom: 0; margin: 0;
    background: #fff; overflow-y: auto; overscroll-behavior: contain;
    padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .3s var(--ease), visibility .25s; visibility: hidden;
  }
  .hx-nav-open { overflow: hidden; }
  .hx-nav-open .hx-nav { transform: none; opacity: 1; visibility: visible; }
  .hx-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .hx-nav > ul > li { border-bottom: 1px solid var(--line); }
  .hx-nav > ul > li > a { color: var(--ink); justify-content: space-between; width: 100%; padding: 16px 4px; font-size: 1.02rem; }
  .hx-nav .has-sub.is-open .caret { transform: rotate(180deg); }
  .hx-mega, .hx-dropdown {
    position: static; translate: none; width: auto; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; border-radius: 0;
    display: none; padding: 0 0 14px; min-width: 0;
  }
  .hx-mega::before, .hx-dropdown::before { display: none; }
  .has-sub.is-open > .hx-mega { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .has-sub.is-open > .hx-dropdown { display: grid; }
  .hx-mega-promo { display: none; }
  .hx-nav-mobile-cta { display: flex; margin-top: 22px; width: 100%; }
}
@media (max-width: 560px) { .hx-header-cta { display: none; } .hx-nav-toggle { margin-left: auto; } }

/* ---------------- Forms ---------------- */
.hx-field { display: grid; gap: 6px; min-width: 0; }
.hx-field label { font-size: .84rem; font-weight: 600; color: var(--ink); }
.hx-field input, .hx-field select, .hx-field textarea, .hx-phone select {
  width: 100%; min-width: 0; font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid #cfdaea; border-radius: 10px; padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.hx-field textarea { resize: vertical; min-height: 96px; }
.hx-field input:focus, .hx-field select:focus, .hx-field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.hx-phone { display: grid; grid-template-columns: minmax(0, 118px) minmax(0, 1fr); gap: 8px; }
.hx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form[data-secure-form] { display: grid; gap: 14px; }
.hx-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.hx-form-status { font-size: .9rem; padding: 10px 14px; border-radius: 10px; }
.hx-form-status.is-error { background: #fdecec; color: #a32020; }
.hx-form-status.is-ok { background: var(--green-100); color: var(--green-700); }
.hx-form-legal { display: flex; gap: 8px; align-items: flex-start; font-size: .78rem; color: var(--muted); line-height: 1.5; }
.hx-form-legal .i { color: var(--green-600); margin-top: 1px; }
.hx-form-legal a { color: inherit; text-decoration: underline; }
@media (max-width: 600px) { .hx-grid2 { grid-template-columns: 1fr; } }

/* Hide Google's floating reCAPTCHA badge (legal text is shown under each form instead) */
.grecaptcha-badge { visibility: hidden !important; }

/* ---------------- Modals ---------------- */
.hx-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.hx-modal-backdrop { position: absolute; inset: 0; background: rgba(6, 20, 48, .62); backdrop-filter: blur(4px); }
.hx-modal-dialog {
  position: relative; width: min(920px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; border-radius: 22px;
  display: grid; grid-template-columns: 300px 1fr; box-shadow: 0 40px 90px rgba(0, 0, 0, .35); animation: hx-pop .35s var(--ease);
}
.hx-modal-dialog--slim { width: min(560px, 100%); grid-template-columns: 1fr; }
@keyframes hx-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.hx-modal-aside { background: var(--navy-900); color: rgba(255, 255, 255, .8); padding: 26px; display: grid; align-content: center; gap: 16px; }
.hx-modal-aside img { border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; }
.hx-modal-aside h3 { color: #fff; font-size: 1.25rem; }
.hx-modal-aside ul { display: grid; gap: 10px; font-size: .92rem; }
.hx-modal-aside li { display: flex; gap: 10px; align-items: flex-start; }
.hx-modal-aside .i { color: var(--green-500); margin-top: 4px; }
.hx-modal-main { padding: 26px 28px 28px; min-width: 0; }
.hx-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.hx-modal-head h3 { font-size: 1.4rem; }
.hx-modal-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.hx-modal-close:hover { background: var(--blue-50); }
.hx-modal-open { overflow: hidden; }
@media (max-width: 760px) { .hx-modal-dialog { grid-template-columns: 1fr; } .hx-modal-aside { display: none; } .hx-modal-main { padding: 22px 18px; } }

/* ---------------- Footer ---------------- */
.hx-footer { background: var(--navy-950); color: rgba(255, 255, 255, .7); font-size: .93rem; line-height: 1.6; padding-top: 48px; }
.hx-footer-top { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 28px; padding-bottom: 30px; }
.hx-footer-brand img { height: 46px; width: auto; margin-bottom: 14px; }
.hx-footer-brand p { max-width: 36ch; margin-bottom: 14px; }
.hx-footer-seals { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hx-footer-seals span { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: #fff; border: 1px solid rgba(255, 255, 255, .16); padding: 6px 11px; border-radius: 8px; }
.hx-footer-seals .i { color: var(--gold-400); }
.hx-footer .hx-social a { background: rgba(255, 255, 255, .08); color: #fff; }
.hx-footer-col { display: grid; align-content: start; gap: 6px; }
.hx-footer-col h5 { color: #fff; font-size: .98rem; margin-bottom: 4px; }
.hx-footer-col .hx-footer-sub { margin-top: 12px; }
.hx-footer-col a { color: rgba(255, 255, 255, .7); transition: color .2s; }
.hx-footer-col a:hover { color: var(--green-500); }
.hx-footer-offices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.hx-footer-offices > div { display: flex; gap: 12px; }
.hx-footer-offices .i { color: var(--green-500); margin-top: 4px; }
.hx-footer-offices strong { display: block; color: #fff; font-family: var(--f-display); font-weight: 600; }
.hx-footer-offices a { color: rgba(255, 255, 255, .85); }
.hx-footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.hx-footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hx-footer-bottom a { color: rgba(255, 255, 255, .7); }
.hx-footer-bottom a:hover { color: #fff; }
@media (max-width: 1080px) { .hx-footer-top { grid-template-columns: repeat(2, 1fr); } .hx-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 760px) { .hx-footer-offices { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .hx-footer-top { grid-template-columns: 1fr 1fr; gap: 22px 18px; } .hx-footer-brand { grid-column: 1 / -1; } .hx-footer { padding-top: 36px; } .hx-footer-offices { gap: 14px; } .hx-footer-bottom { justify-content: center; text-align: center; } }

/* ---------------- WhatsApp fallback (shown only if the Elfsight widget does not load) ---------------- */
.hx-wa {
  position: fixed; z-index: 90; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: none; align-items: center; gap: 10px; background: #25d366; color: #fff; font-weight: 700; font-size: .9rem;
  padding: 12px 18px 12px 14px; border-radius: 100px; box-shadow: 0 14px 30px rgba(18, 140, 70, .35);
}
.hx-wa .i { width: 24px; height: 24px; }
.hx-wa:hover { color: #fff; transform: translateY(-2px); }
.hx-wa.is-visible { display: inline-flex; }
@media (max-width: 560px) { .hx-wa span { display: none; } .hx-wa { padding: 14px; } }

/* ---------------- Mobile quick-action bar ---------------- */
.hx-mbar { display: none; }
@media (max-width: 760px) {
  .hx-mbar {
    position: fixed; z-index: 80; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center;
    padding: 10px calc(84px + env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(10, 31, 68, .08);
  }
  .hx-mbar a { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: .86rem; }
  .hx-mbar a .i { color: var(--blue-600); }
  .hx-mbar .hx-mbar-cta { background: var(--grad-brand); color: #fff; border: 0; }
  /* room for the quick-action bar, inside the dark footer so no white strip shows below it */
  .hx-footer { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .hx-wa { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); }
  .hx-modal-open .hx-mbar, .hx-nav-open .hx-mbar { display: none; }
}

/* ---------------- Back to top ---------------- */
.hx-top {
  position: fixed; z-index: 85; right: calc(26px + env(safe-area-inset-right, 0px)); bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--navy-900); color: #fff; box-shadow: 0 14px 30px rgba(10, 31, 68, .3);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none; transition: opacity .3s, transform .35s var(--ease), background-color .25s;
}
.hx-top[hidden] { display: grid !important; }
.hx-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.hx-top:hover { background: var(--blue-600); }
.hx-top .i { width: 20px; height: 20px; position: relative; transition: transform .25s var(--ease); }
.hx-top:hover .i { transform: translateY(-2px); }
.hx-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hx-top-ring circle { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 3; }
.hx-top-ring .hx-top-prog { stroke: var(--green-500); stroke-linecap: round; stroke-dasharray: 132; stroke-dashoffset: 132; transition: stroke-dashoffset .1s linear; }
@media (max-width: 760px) {
  .hx-top { width: 46px; height: 46px; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}

/* Keep the last footer row clear of the floating WhatsApp button (bottom-right) */
/* Keep the last footer row clear of the floating WhatsApp button (bottom-right) without a big empty band */
.hx-footer-bottom, .footer-bottom { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important; }
@media (min-width: 761px) { .hx-footer-bottom { padding-right: 270px; } }
@media (max-width: 760px) { .hx-footer-bottom ul { justify-content: center; } .hx-footer-col { gap: 4px; } .hx-footer-col a { font-size: .88rem; } }
@media (max-width: 1199px) { .hx-nav > ul > li.is-active > a::after { display: none; } }

