/*
Theme Name:   Kadence Child
Template:     kadence
*/

/* ── Kadence sticky header positioning ──────────────────────────────────────
   .kadence-sticky-header is the position:fixed element inside #masthead.
   Targeting it directly (not #masthead) moves the bar without fighting
   Kadence's scroll-reveal animation (which uses transform:translateY, not top).
   The transparent-header body class (set by Kadence customizer) makes the
   header position:absolute and background:transparent natively — no overrides
   needed from us. We only control top positioning.
────────────────────────────────────────────────────────────────────────────── */

.kadence-sticky-header {
    top: var(--wd-bar-height, 0px) !important;
    transition: top 0.35s ease, background-color 0.3s ease;
    border: none !important;
    box-shadow: none !important;
}

.admin-bar .kadence-sticky-header {
    top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--wd-bar-height, 0px)) !important;
}

/* ── Sticky header: force transparent when back at top ──────────────────────
   Kadence's item-is-fixed class can persist when the user scrolls back to y=0
   (reveal-scroll-up behaviour), leaving the dark sticky background visible.
   JS adds body.wd-at-top when scrollY ≤ 5px; this resets it cleanly.
────────────────────────────────────────────────────────────────────────────── */

body.wd-at-top .kadence-sticky-header,
body.wd-at-top .kadence-sticky-header .site-header-row-container-inner {
    background: transparent !important;
}

/* ── Body padding transition ────────────────────────────────────────────────
   wdUpdateBarHeight sets body.style.paddingTop = our bars height only.
   The Kadence header is transparent-header / position:absolute and floats
   over the hero — it does not push content down.
   Transition is temporarily disabled during expand/collapse so the page
   body follows the bar in real-time (no second animation lag).
────────────────────────────────────────────────────────────────────────────── */

body {
    transition: padding-top 0.35s ease;
}

/* ── Ken Burns hero animation ───────────────────────────────────────────────
   Targets the active Smart Slider slide only via :not([aria-hidden]).
────────────────────────────────────────────────────────────────────────────── */

@keyframes kenburns {
    0%   { transform: scale(1);    }
    100% { transform: scale(1.08); }
}

.n2-ss-slide-background .n2-ss-slide-background-image {
    animation: none;
    transform: scale(1);
}

.n2-ss-slide-background:not([aria-hidden]) .n2-ss-slide-background-image {
    animation: kenburns 8s ease-in-out forwards;
}
