/* ===== PCHP Site-Wide + Homepage — Responsive Styles ===== */

/* ===== Mobile-only header gradient + hamburger fix ===== */
@media (max-width: 1023px) {
    .ast-primary-header-bar,
    .ast-primary-header,
    .main-header-bar {
        background-color: #7C3AED !important;
        background-image: linear-gradient(90deg, #7C3AED, #6D28D9 50%, #4F46E5) !important;
    }
    .ast-mobile-header-wrap .ast-button-wrap .menu-toggle,
    .ast-mobile-header-wrap .ast-button-wrap .ast-mobile-menu-trigger-minimal {
        border: none !important;
        outline: none !important;
        background: transparent !important;
    }
}

/* ===== Mobile Menu Styling (all pages) ===== */
.ast-mobile-header-content {
    background: linear-gradient(180deg, #7C3AED 0%, #6D28D9 50%, #4F46E5 100%) !important;
    opacity: 1 !important;
}
.ast-mobile-header-content .ast-builder-menu-mobile ul {
    background: transparent !important;
}
.ast-mobile-header-content .ast-builder-menu-mobile .menu-item a {
    color: #fff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.12) !important;
}
.ast-mobile-header-content .ast-builder-menu-mobile .menu-item:last-child a {
    border-bottom: none !important;
}
.ast-mobile-header-content .ast-builder-menu-mobile .menu-item a:hover,
.ast-mobile-header-content .ast-builder-menu-mobile .menu-item a:focus {
    background: rgba(255,255,255,0.1) !important;
}
.ast-mobile-header-content .ast-builder-menu-mobile .menu-item.current-menu-item a {
    background: rgba(255,255,255,0.15) !important;
    font-weight: 600 !important;
}

/* ===== Footer (all pages) ===== */
.site-footer {
    background: #7C3AED !important;
}
.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright a {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8) !important;
}
.site-footer .site-below-footer-wrap {
    padding: 0 !important;
    background: transparent !important;
}
.site-footer .ast-builder-grid-row {
    min-height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.site-footer .ast-footer-copyright {
    text-align: center !important;
}
.site-footer .ast-builder-grid-row-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 80px !important;
}

/* Prevent horizontal overflow */
body.home {
    overflow-x: hidden;
}

/* Constrain images and embeds */
body.home img,
body.home iframe,
body.home video {
    max-width: 100%;
    height: auto;
}

/* ===== Tablet (640–1023px) ===== */
@media (max-width: 1023px) {
    /* Tighten section gutters */
    body.home .entry-content,
    body.home .ast-container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    /* Fluid headings */
    body.home h1 { font-size: clamp(28px, 5vw, 48px); }
    body.home h2 { font-size: clamp(22px, 4vw, 36px); }
    body.home h3 { font-size: clamp(18px, 3.5vw, 28px); }

    /* Stack columns that use WP block columns */
    body.home .wp-block-columns {
        flex-wrap: wrap;
    }
    body.home .wp-block-column {
        flex-basis: 100% !important;
    }

    /* Ensure buttons are tappable */
    body.home .wp-block-button__link,
    body.home .ast-button,
    body.home a.wp-block-button__link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 24px;
    }
}

/* ===== Mobile (≤639px) ===== */
@media (max-width: 639px) {
    /* Tighter gutters */
    body.home .entry-content,
    body.home .ast-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Reduce section vertical spacing */
    body.home .entry-content > * + * {
        margin-top: 24px;
    }

    /* Ensure cover blocks don't overflow */
    body.home .wp-block-cover {
        min-height: 200px !important;
        padding: 24px 16px !important;
    }

    /* Full-width buttons on mobile */
    body.home .wp-block-button {
        width: 100%;
    }
    body.home .wp-block-button__link,
    body.home .ast-button,
    body.home a.wp-block-button__link {
        width: 100%;
        text-align: center;
    }

    /* Stack any inline/flex groups */
    body.home .wp-block-group.is-layout-flex {
        flex-direction: column;
        gap: 12px;
    }
}
