/* ==========================================
   ZIOSOFT - STICKY APPLICATION NAVIGATION
   ========================================== */

/* Normal navigation appearance */
.zs-sticky-app-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: transparent;
    padding: 8px 0;
    isolation: isolate;

    transition: background-color 0.25s ease,
                padding 0.25s ease;
}

/* Offset for logged-in WordPress admin bar */
body.admin-bar .zs-sticky-app-nav {
    top: 32px;
}

/* ==========================================
   STICKY STATE
   ========================================== */

/* Compact toolbar appearance */
.zs-sticky-app-nav.zs-is-stuck {
    background-color: #071A40;
    padding-top: 0;
    padding-bottom: 0;
}

/* Full-width dark background and shadow */
.zs-sticky-app-nav.zs-is-stuck::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);

    background-color: #071A40;

    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.85);

    z-index: -1;
    pointer-events: none;
}

/* ==========================================
   HEXAGON IMAGE SIZING
   ========================================== */

/* Smooth resizing */
.zs-sticky-app-nav .elementor-widget-image img {
    transition: width 0.25s ease;
}

/* Reduce icons to 45px when sticky */
.zs-sticky-app-nav.zs-is-stuck
.elementor-widget-image img {
    width: 45px !important;
}

/* ==========================================
   STICKY HEXAGON SPACING
   ========================================== */

/* Narrow columns while sticky */
.zs-sticky-app-nav.zs-is-stuck
.elementor-column {
    width: 55px !important;
    flex: 0 0 55px !important;
}

/* Keep hexagons grouped on the left */
.zs-sticky-app-nav.zs-is-stuck
.elementor-container {
    justify-content: flex-start;
}

/* ==========================================
   APPLICATION ANCHOR OFFSETS
   ========================================== */

/* Prevent sticky navigation from covering
   the first row of product buttons */
#cardiac,
#all-around {
    scroll-margin-top: 80px;
}

/* Additional clearance for WordPress admin bar */
body.admin-bar #cardiac,
body.admin-bar #all-around {
    scroll-margin-top: 112px;
}

/* Smooth resizing of hexagon columns */
.zs-sticky-app-nav .elementor-column {
    transition: width 0.3s ease,
                flex-basis 0.3s ease;
}

/* Smooth image resizing */
.zs-sticky-app-nav .elementor-widget-image img {
    transition: width 0.3s ease-in-out;
}

/* Prevent scroll-position adjustments during sticky resizing */
.zs-sticky-parent {
    overflow-anchor: none;
}

/* ==========================================
   ZIOSOFT - MOBILE APPLICATION NAVIGATION
   ========================================== */

@media (max-width: 767px) {

    /* Four application columns per row */
    .zs-sticky-app-nav .elementor-column,
    .zs-sticky-app-nav.zs-is-stuck .elementor-column {
        width: 25% !important;
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }

    /* Allow the eight icons to form two rows */
    .zs-sticky-app-nav .elementor-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    /* Maintain identical icon sizes in both states */
    .zs-sticky-app-nav .elementor-widget-image img,
    .zs-sticky-app-nav.zs-is-stuck .elementor-widget-image img {
        width: 70px !important;
        max-width: 100%;
        height: auto;
        transition: none !important;
    }

    /* Compact sticky navigation */
    .zs-sticky-app-nav.zs-is-stuck {
        padding-top: 4px;
        padding-bottom: 4px;
    }

}

/* Remove admin-bar offset when the bar is hidden on mobile */
@media (max-width: 600px) {
    body.admin-bar .zs-sticky-app-nav {
        top: 0;
    }
}

/* Ziosoft clinical product popup - responsive video */

.zs-popup-video {
    width: 100%;
}

.zs-popup-video iframe {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border: 0;
}