/* ============================================================
   TECP Smart Header — sticky header that hides on scroll-down,
   reveals on scroll-up. Paired with smart-header.js.
   ============================================================ */

/* Back-to-top button — replace Blocksy's thin arrow with our filled chevron
   (same look as slider / panel-toggle arrows). Site-wide standard arrow. */
.ct-back-to-top svg { display: none !important; }
.ct-back-to-top {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.25s !important;
}
.ct-back-to-top:hover { color: rgba(0, 0, 0, 0.85) !important; }   /* dark → darker on hover */
.ct-back-to-top::after {
    content: '';
    width: 0; height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 9px solid currentColor;   /* filled triangle up — wider, matches chevron weight */
}

header.ct-header.tecp-smart-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: transform 0.35s ease !important;
    will-change: transform;
}

/* Internal rows move rigidly with the bar. Blocksy puts `transition: all` on
   the header row, so during our translateY it animates its own properties at a
   different speed → text "drifts"/bounces below the bar. Kill it on the direct
   rows only; menu links keep their own hover transition (the ::after underline). */
header.ct-header.tecp-smart-header > * {
    transition: none !important;
}

/* offset under the WP admin bar when logged in */
body.admin-bar header.ct-header.tecp-smart-header { top: 32px !important; }
@media screen and (max-width: 782px) {
    body.admin-bar header.ct-header.tecp-smart-header { top: 46px !important; }
}

/* hidden state (scrolling down) */
header.ct-header.tecp-smart-header.tecp-header-hidden {
    transform: translateY(-100%) !important;
}
/* logged-in: also clear the admin-bar offset so it hides completely */
body.admin-bar header.ct-header.tecp-smart-header.tecp-header-hidden {
    transform: translateY(calc(-100% - 32px)) !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar header.ct-header.tecp-smart-header.tecp-header-hidden {
        transform: translateY(calc(-100% - 46px)) !important;
    }
}
