/**
 * Home Builder — Astra Theme Compatibility CSS
 *
 * Contains CSS rules that use Astra-specific selectors (.ast-*)
 * Only loaded when Astra is the active theme.
 *
 * Source: design-system.css lines 1296-1464 + style.css lines 297-305
 * @package Home_Builder
 */

/* ═══ FIX: Page Builder full-width centering (Astra) ═══ */
.ast-page-builder-template .site-content > .ast-container {
    max-width: 100% !important;
    width: 100% !important;
}
.ast-page-builder-template #primary {
    width: 100% !important;
    max-width: 100% !important;
}


/* ─── A2: ASTRA-SPECIFIC SIDEBAR OVERRIDES ──────────────── */
/* Injected via Astra hooks (astra_primary_content_top/bottom).
   These rules clean Astra's layout when the RM sidebar is active. */

/* ── 1. NEUTRALIZE ASTRA'S CONTAINER BOX ─────────────────── */
.has-rm-global-sidebar.ast-separate-container .ast-article-single,
.has-rm-global-sidebar.ast-separate-container .ast-article-post {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

.has-rm-global-sidebar.ast-separate-container #primary {
    padding: 0;
    margin: 0;
}

.has-rm-global-sidebar.ast-separate-container .ast-container {
    background: transparent;
    padding: 0;
}

.has-rm-global-sidebar .site-content > .ast-container {
    max-width: 100%;
    padding: 0;
}

.has-rm-global-sidebar .entry-content {
    max-width: none;
    padding: 0;
}

/* ── 3. ARTICLE CARD INSIDE MAIN COLUMN ──────────────────── */
.has-rm-global-sidebar .rm-content-main .ast-article-single {
    background: #fff;
    border-radius: var(--rm-radius-lg, 16px);
    padding: 32px 36px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ── 4. ARTICLE HEADER (title, meta, thumbnail) ──────────── */
.has-rm-global-sidebar .entry-title {
    font-family: 'Montserrat', 'Inter', -apple-system, sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 900;
    color: var(--rm-navy, #1a3a5c);
    line-height: 1.2;
    margin-bottom: 12px;
}

.has-rm-global-sidebar .entry-meta {
    font-size: var(--rm-text-small, 0.875rem);
    color: var(--rm-text-muted, #6a6860);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rm-border, #e8e6e0);
}

/* Featured image */
.has-rm-global-sidebar .post-thumb-img-content,
.has-rm-global-sidebar .ast-article-image-container {
    border-radius: var(--rm-radius, 12px);
    overflow: hidden;
    margin-bottom: 24px;
}

.has-rm-global-sidebar .ast-article-single figure,
.has-rm-global-sidebar .ast-article-single img:not(figure img) {
    box-shadow: none;
}

/* ── 5. POST NAVIGATION ──────────────────────────────────── */
.has-rm-global-sidebar .post-navigation {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rm-border, #e8e6e0);
}

/* ── 6. COMMENTS SECTION ─────────────────────────────────── */
.has-rm-global-sidebar .comments-area {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rm-border, #e8e6e0);
}

.has-rm-global-sidebar.ast-separate-container .comments-title {
    padding: 0;
    margin-bottom: 16px;
}

.has-rm-global-sidebar.ast-separate-container .ast-comment-list li.depth-1 {
    padding: 0;
    margin-bottom: 1em;
}

/* ── 8. RESPONSIVE: ASTRA-SPECIFIC OVERRIDES ─────────────── */
@media (max-width: 920px) {
    .has-rm-global-sidebar .rm-content-main .ast-article-single {
        padding: 20px;
    }
}

@media (max-width: 544px) {
    .has-rm-global-sidebar .rm-content-main .ast-article-single {
        padding: 16px 14px;
        border-radius: var(--rm-radius, 12px);
    }
}
