/* ============================================================
   OYW Header — top bar + sticky nav + mobile menu + call FAB.
   Source: .topbar / .head / .nav / .burger / .callfab in
   young-home-care-homepage.html. Values are verbatim.

   Sticky note: the source .head uses position:sticky against
   <body>. Inside an Elementor widget the sticky containing block
   is only the widget's own height (zero travel), so we pin the
   whole header with position:fixed on the FRONTEND and reserve
   its height with a JS-sized spacer. In the editor the header
   falls back to in-flow position so it stays visible/editable
   (failure mode 15).
   ============================================================ */

.oyw-header{position:relative;width:100%}

/* Sticky mode: use position:sticky (no fixed, no spacer, no gap above the bar). */
.oyw-header.oyw-is-sticky{position:-webkit-sticky;position:sticky;top:0;z-index:60}

/* Spacer no longer needed with position:sticky; kept collapsed for back-compat. */
.oyw-header-spacer{display:none!important;height:0!important}

/* ---------- top bar ---------- */
.oyw-topbar{background:var(--oyw-ink);color:rgba(255,255,255,.82);font-size:.82rem}
.oyw-topbar .oyw-wrap{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-block:.6rem}
.oyw-topbar .oyw-meta{display:flex;gap:1.6rem;align-items:center;flex-wrap:wrap}
.oyw-topbar a:hover{color:#fff}
.oyw-topbar .oyw-soc{display:flex;gap:.9rem;align-items:center}
.oyw-topbar .oyw-follow{letter-spacing:.14em;text-transform:uppercase;font-size:.72rem}
.oyw-topbar svg{width:15px;height:15px;vertical-align:-2px;margin-right:.4rem;color:var(--oyw-brass)}
.oyw-topbar .oyw-soc svg{margin:0;color:inherit;width:16px;height:16px}

/* ---------- header bar ---------- */
.oyw-head{background:rgba(255,255,255,.94);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--oyw-line);transition:box-shadow .3s ease}
.oyw-head.oyw-stuck{box-shadow:0 10px 30px -22px rgba(11,42,66,.6)}
.oyw-head .oyw-wrap{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding-block:.85rem}
.oyw-brand img{height:56px;width:auto;transition:height .3s ease}
.oyw-head.oyw-stuck .oyw-brand img{height:46px}

.oyw-nav{display:flex;align-items:center;gap:2rem}
.oyw-nav a{font-size:.93rem;font-weight:600;color:var(--oyw-ink-2);position:relative;padding-block:.4rem}
.oyw-nav .oyw-navcta{display:none}
.oyw-nav .oyw-navcta::after{display:none}
.oyw-nav a::after{content:"";position:absolute;left:0;bottom:0;height:2px;width:0;background:var(--oyw-brass);transition:width .28s ease}
.oyw-nav a:hover::after,.oyw-nav a[aria-current="page"]::after{width:100%}

.oyw-head .oyw-cta{display:flex;align-items:center;gap:1rem}

.oyw-burger{display:none;width:46px;height:46px;border:1px solid var(--oyw-line);background:#fff;border-radius:12px;align-items:center;justify-content:center;cursor:pointer}
.oyw-burger span{display:block;width:20px;height:2px;background:var(--oyw-ink);position:relative;transition:.3s}
.oyw-burger span::before,.oyw-burger span::after{content:"";position:absolute;left:0;width:20px;height:2px;background:var(--oyw-ink);transition:.3s}
.oyw-burger span::before{top:-6px}.oyw-burger span::after{top:6px}
.oyw-burger[aria-expanded="true"] span{background:transparent}
.oyw-burger[aria-expanded="true"] span::before{top:0;transform:rotate(45deg)}
.oyw-burger[aria-expanded="true"] span::after{top:0;transform:rotate(-45deg)}

/* ---------- floating call button (mobile) ---------- */
.oyw-callfab{position:fixed;right:16px;bottom:16px;z-index:70;display:none;align-items:center;gap:.5rem;background:var(--oyw-blue);color:#fff;padding:.9rem 1.25rem;border-radius:999px;font-weight:700;font-size:.9rem;box-shadow:0 16px 34px -14px rgba(30,123,196,.9)}
.oyw-callfab svg{width:17px;height:17px;flex:none}

/* ---------- responsive (source breakpoint: 860px, verbatim) ---------- */
@media (max-width:860px){
  .oyw-head .oyw-wrap{position:relative}
  .oyw-nav{position:absolute;left:0;right:0;top:100%;padding:1rem var(--oyw-gutter) 1.6rem;background:#fff;flex-direction:column;align-items:stretch;gap:.2rem;
    transform:translateY(-8px);opacity:0;visibility:hidden;
    transition:transform .32s cubic-bezier(.2,.7,.3,1),opacity .28s ease,visibility 0s linear .32s;
    box-shadow:var(--oyw-shadow);border-top:1px solid var(--oyw-line);z-index:59}
  .oyw-nav.oyw-open{transform:translateY(0);opacity:1;visibility:visible;transition:transform .32s cubic-bezier(.2,.7,.3,1),opacity .28s ease}
  .oyw-nav a{font-size:1.15rem;width:100%;padding-block:.85rem;border-bottom:1px solid var(--oyw-line)}
  .oyw-nav .oyw-navcta{display:inline-flex;width:auto;margin-top:1.4rem;border-bottom:0;color:#fff;font-size:.95rem;padding:.95rem 1.6rem}
  .oyw-burger{display:flex}
  .oyw-head .oyw-cta .oyw-btn{display:none}
  .oyw-topbar .oyw-meta .oyw-addr{display:none}
  .oyw-callfab{display:inline-flex}
}

/* ---------- editor safety (failure mode 15) ----------
   position:fixed resolves against Elementor's TRANSFORMED editing canvas,
   not the viewport — a fixed header would detach and hide the editing panel.
   In edit mode, fall back to in-flow so the header stays visible/editable.
   The real frontend (no elementor-editor-active) keeps the fixed behaviour. */
body.elementor-editor-active .oyw-header.oyw-is-sticky{position:relative;top:auto;left:auto;right:auto}
body.elementor-editor-active .oyw-header-spacer{display:none}
body.elementor-editor-active .oyw-nav{position:static;transform:none;box-shadow:none;padding:0;z-index:auto}
body.elementor-editor-active .oyw-callfab{position:static;display:inline-flex;right:auto;bottom:auto}
