/* ============================================================
 * Magenest Header
 * - Per-page transparent header (body.magenest-transparent-header)
 * - Auto sticky on scroll (JS toggles .magenest-header--sticky)
 *
 * Targets the Elementor header template generically via its
 * `.elementor-location-header` wrapper so it works for any header
 * template / language variant.
 * ============================================================ */

/* ------------------------------------------------------------
 * Auto sticky ( all pages ) — applied by JS on scroll.
 * ------------------------------------------------------------ */
.elementor-location-header.magenest-header--sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background-color: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    animation: magenestHeaderSlideDown .35s ease;
}

@keyframes magenestHeaderSlideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

/* Reserve the header's height so non-transparent pages do not jump
   when the header switches to fixed positioning. */
.magenest-header-spacer {
    display: none;
}
.magenest-header-spacer.is-active {
    display: block;
}

/* ------------------------------------------------------------
 * Admin bar offset ( logged-in users ) so the sticky header is
 * not hidden behind #wpadminbar.
 * ------------------------------------------------------------ */
.admin-bar .elementor-location-header.magenest-header--sticky {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .elementor-location-header.magenest-header--sticky {
        top: 46px;
    }
}
@media screen and (max-width: 600px) {
    /* The WP admin bar is no longer fixed below 600px. */
    .admin-bar .elementor-location-header.magenest-header--sticky {
        top: 0;
    }
}

/* ------------------------------------------------------------
 * Transparent header ( per-page ) — overlays the first section.
 * Only while NOT stuck; once sticky it reverts to the solid look.
 * ------------------------------------------------------------ */
.magenest-transparent-header .elementor-location-header:not(.magenest-header--sticky) {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    background-color: transparent;
}

.admin-bar.magenest-transparent-header .elementor-location-header:not(.magenest-header--sticky) {
    top: 32px;
}
@media screen and (max-width: 600px) {
    .admin-bar.magenest-transparent-header .elementor-location-header:not(.magenest-header--sticky) {
        top: 0;
    }
}

/* Strip the header template's own background / shadow while overlaying. */
.magenest-transparent-header .elementor-location-header:not(.magenest-header--sticky) .e-con.e-parent,
.magenest-transparent-header .elementor-location-header:not(.magenest-header--sticky) .elementor-section {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}
