/* =====================================================================
   TARC — custom header (overrides the theme's Elementor header)
   Scoped under .tarc-header ; classes prefixed .th- .
   Fixed/sticky header + spacer; off-canvas mobile menu.
===================================================================== */

.tarc-header {
  --th-brand: var(--bs-clr-pr-1, #f16319);
  --th-brand-2: #d34e0c;
  --th-fd: var(--bs-font-2, "Space Grotesk", sans-serif);
  --th-ink: #14161a;
  --th-ink-2: #5c616a;
  --th-line: #ececec;

  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--th-line);
  font-family: var(--bs-font-1, "Albert Sans", sans-serif);
  transition: box-shadow .25s ease;
}
.tarc-header.is-stuck { box-shadow: 0 10px 30px -18px rgba(12,13,14,.28); }
.tarc-header * { box-sizing: border-box; }
.tarc-header a { text-decoration: none; color: inherit; }

.tarc-header .th-wrap { max-width: 1320px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 48px); display: flex; align-items: center; gap: 24px; height: 92px; }

/* logo */
.tarc-header .th-logo { flex: none; display: inline-flex; align-items: center; }
.tarc-header .th-logo img { max-height: 56px; width: auto; display: block; }

/* nav */
.tarc-header .th-nav { flex: 1; display: flex; justify-content: center; align-items: center; }
.tarc-header .th-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.tarc-header .th-menu li { position: relative; }
.tarc-header .th-menu a { font-family: var(--th-fd); font-weight: 500; font-size: 15px; color: var(--th-ink); padding: 12px 0; display: inline-flex; align-items: center; gap: 6px; transition: color .2s ease; white-space: nowrap; }
.tarc-header .th-menu a:hover { color: var(--th-brand); }
.tarc-header .th-menu .current-menu-item > a,
.tarc-header .th-menu .current-menu-ancestor > a,
.tarc-header .th-menu .current_page_item > a { color: var(--th-brand); }
.tarc-header .th-menu .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 4px; margin-top: -3px; opacity: .6; transition: transform .2s ease; }

/* dropdown (desktop hover) */
.tarc-header .th-menu .sub-menu { position: absolute; top: 100%; left: -18px; min-width: 250px; background: #fff; border: 1px solid var(--th-line); border-radius: 6px; box-shadow: 0 24px 50px -24px rgba(12,13,14,.35); padding: 10px; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 5; }
.tarc-header .th-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tarc-header .th-menu .sub-menu li { width: 100%; }
.tarc-header .th-menu .sub-menu a { display: block; width: 100%; padding: 11px 14px; border-radius: 4px; font-weight: 500; font-size: 14px; color: var(--th-ink-2); white-space: normal; }
.tarc-header .th-menu .sub-menu a:hover { background: #f6f4f0; color: var(--th-brand); }

/* right side */
.tarc-header .th-right { flex: none; display: flex; align-items: center; gap: 14px; }
.tarc-header .th-btn { font-family: var(--th-fd); font-weight: 600; font-size: 15px; color: #fff; background: var(--th-brand); padding: 14px 28px; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: background .2s ease; white-space: nowrap; }
.tarc-header .th-btn:hover { background: var(--th-brand-2); color: #fff; }
.tarc-header .th-btn .th-arw { transition: transform .2s ease; }
.tarc-header .th-btn:hover .th-arw { transform: translateX(3px); }
.tarc-header .th-btn--block { display: none; }

/* mobile toggle + close + overlay (hidden on desktop) */
.tarc-header .th-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--th-line); border-radius: 4px; background: #fff; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.tarc-header .th-toggle span { display: block; width: 22px; height: 2px; background: var(--th-ink); border-radius: 2px; }
.tarc-header .th-close { display: none; }
.tarc-header .th-overlay { display: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1150px) { .tarc-header .th-menu a { font-size: 14.5px; } }

@media (max-width: 991px) {
  .tarc-header .th-wrap { height: 76px; gap: 14px; }
  .tarc-header .th-logo { flex: 1; }
  .tarc-header .th-toggle { display: flex; }
  .tarc-header .th-right .th-btn { display: none; }   /* no Contact button in the mobile bar */

  /* off-canvas drawer */
  .tarc-header .th-nav { position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(340px, 86vw); background: #fff; z-index: 1002; display: block; flex: none; padding: 78px 26px 30px; overflow-y: auto; transform: translateX(105%); transition: transform .35s cubic-bezier(.4,0,.2,1); box-shadow: -20px 0 50px -30px rgba(12,13,14,.5); }
  .tarc-header.is-open .th-nav { transform: none; }

  .tarc-header .th-close { display: grid; place-items: center; position: absolute; top: 20px; right: 22px; width: 42px; height: 42px; border: 1px solid var(--th-line); border-radius: 100px; background: #fff; font-size: 26px; line-height: 1; color: var(--th-ink); cursor: pointer; }
  .tarc-header .th-close:hover { color: var(--th-brand); border-color: var(--th-brand); }

  .tarc-header .th-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .tarc-header .th-menu > li { border-bottom: 1px solid var(--th-line); }
  .tarc-header .th-menu a { padding: 15px 0; font-size: 16px; justify-content: space-between; }
  .tarc-header .th-menu .menu-item-has-children.is-expanded > a::after { transform: rotate(-135deg); margin-top: 3px; }
  .tarc-header .th-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-radius: 0; min-width: 0; padding: 0 0 8px 12px; display: none; }
  .tarc-header .th-menu .menu-item-has-children.is-expanded > .sub-menu { display: flex; }
  .tarc-header .th-menu .sub-menu a { padding: 10px 12px; font-size: 15px; }

  .tarc-header .th-btn--block { display: flex; width: 100%; margin-top: 24px; padding: 15px 24px; }

  /* backdrop */
  .tarc-header .th-overlay { display: block; position: fixed; inset: 0; background: rgba(8,9,10,.55); z-index: 1001; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
  .tarc-header.is-open .th-overlay { opacity: 1; visibility: visible; }
}
@media (max-width: 480px) { .tarc-header .th-logo img { max-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .tarc-header *, .tarc-header .th-nav, .tarc-header .th-overlay { transition: none !important; } }
