/* Safety fixes for Spectra/UAG icons when page CSS is incomplete */
.uagb-infobox-shape-circle svg,
.uagb-iconbox-icon-wrap svg,
.uagb-ifb-icon-wrap svg,
.uagb-icon-list__source-wrap svg,
.wp-block-uagb-icon-list-child svg {
    width: 1.25em !important;
    height: 1.25em !important;
    max-width: 48px !important;
    max-height: 48px !important;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.uagb-iconbox-icon-wrap,
.uagb-ifb-icon-wrap,
.uagb-icon-list__source-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hide Spectra static form status messages until JS shows them */
.uagb-forms-submit-message-hide,
[class*="uagb-forms-success-message-"],
[class*="uagb-forms-failed-message-"] {
    display: none !important;
}

.skip-link.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link.screen-reader-text:focus {
    position: static;
    left: auto;
    width: auto;
    height: auto;
    overflow: visible;
}

/* =========================================================
   HEADER / NAVBAR — force Visamo single-row layout sitewide
   ========================================================= */

/* Logo already contains brand text — hide duplicate title */
.site-header .ast-site-title-wrap {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.site-header .site-branding,
.site-header .ast-site-identity {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
}

.site-header .site-logo-img,
.site-header .custom-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 0 !important;
}

.site-header .custom-logo,
.site-header img.custom-logo {
    max-height: 70px !important;
    width: auto !important;
    height: auto !important;
    max-width: 112px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Critical: keep logo | menu | Donate on ONE horizontal row */
#ast-desktop-header .ast-builder-grid-row.ast-grid-center-col-layout,
#ast-desktop-header .ast-builder-grid-row {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    column-gap: 24px !important;
    width: 100% !important;
}

#ast-desktop-header .site-header-primary-section-left,
#ast-desktop-header .site-header-primary-section-center,
#ast-desktop-header .site-header-primary-section-right {
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
}

#ast-desktop-header .site-header-primary-section-center {
    justify-content: center !important;
}

#ast-desktop-header .site-header-primary-section-right {
    justify-content: flex-end !important;
}

#ast-desktop-header .main-header-menu,
#ast-desktop-header .main-navigation ul {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

#ast-desktop-header .main-header-menu .menu-item {
    display: flex !important;
    margin: 0 !important;
}

#ast-desktop-header .main-header-menu .menu-link {
    white-space: nowrap !important;
}

#ast-desktop-header .ast-header-button-1 .ast-custom-button {
    white-space: nowrap !important;
}

/* Undo broken Visamo "HEADER FULL LAYOUT" flex that stacks header */
.site-header.header-main-layout-1,
#masthead.site-header,
#ast-desktop-header .main-header-bar,
#ast-desktop-header .ast-primary-header-bar {
    display: block !important;
}

#ast-desktop-header .site-primary-header-wrap.ast-container {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
}

.site-header,
.ast-primary-header-bar {
    background-color: #fbeced !important;
}

@media (max-width: 921px) {
    .site-header .custom-logo,
    .site-header img.custom-logo {
        max-height: 55px !important;
        max-width: 90px !important;
    }
}

@media (max-width: 544px) {
    .site-header .custom-logo,
    .site-header img.custom-logo {
        max-height: 48px !important;
        max-width: 80px !important;
    }
}

/* Footer logo — original file at clear size */
.site-footer .footer-brand-logo,
.site-footer .wp-block-image.footer-brand-logo {
    margin: 0 0 12px 0 !important;
    line-height: 0 !important;
}

.site-footer .footer-brand-logo img.wp-image-29,
.site-footer img.wp-image-29 {
    width: 112px !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    object-fit: contain !important;
}
