/* --- IFAG MAGIC STICKY HEADER --- */
#masthead {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    width: 100%;
}

/* State: STICKY ACTIVE */
.ifag-is-sticky #masthead {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.4s ease-out forwards;
}

/* Admin Bar handling */
.admin-bar.ifag-is-sticky #masthead {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar.ifag-is-sticky #masthead {
        top: 46px;
    }
}

/* Shrink Effect for Logo and Bars */
.ifag-is-sticky .ast-main-header-bar {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.ifag-is-sticky .site-logo-img img,
.ifag-is-sticky .custom-logo-link img {
    max-height: 45px !important;
    width: auto !important;
    transition: max-height 0.3s ease;
    filter: none !important;
}

/* Hide Above Header Bar on Sticky for cleaner look */
.ifag-is-sticky .ast-above-header-bar-wrap,
.ifag-is-sticky #ast-above-header {
    display: none !important;
}

/* Prevent content jump */
body.ifag-is-sticky {
    padding-top: var(--ifag-header-height, 100px);
}

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

/* Styling for Menu in Sticky Mode */
.ifag-is-sticky .main-header-menu > .menu-item > a {
    color: #1a1a1a !important;
}
