/* ==========================================================================
   iamanos.com — Single Post Design Consistency Override
   Target: body.single-post ONLY (does not affect pages, archives, home)
   Add via: Appearance > Customize > Additional CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FORCE FULL-WIDTH LAYOUT — Kill sidebar on ALL single posts
   -------------------------------------------------------------------------- */

/* Hide the sidebar widget area entirely */
body.single-post #secondary,
body.single-post .widget-area,
body.single-post aside.sidebar {
    display: none !important;
    width: 0 !important;
}

/* Override Astra's two-column / right-sidebar body classes */
body.single-post.ast-right-sidebar #primary,
body.single-post.ast-left-sidebar #primary,
body.single-post.ast-two-container #primary,
body.single-post #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    flex: 1 1 100% !important;
}

/* Force the content area to behave as single column */
body.single-post .ast-container,
body.single-post .site-content > .ast-container {
    display: block !important;
    max-width: 820px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Remove Astra's sidebar layout grid if present */
body.single-post #content .ast-container {
    grid-template-columns: 1fr !important;
}

/* --------------------------------------------------------------------------
   2. NEUTRALIZE ELEMENTOR CONTAINERS ON SINGLE POSTS
   -------------------------------------------------------------------------- */

/* Reset Elementor section/container widths to flow naturally */
body.single-post .elementor-section,
body.single-post .elementor-section-wrap,
body.single-post .elementor-top-section,
body.single-post .e-con,
body.single-post .e-con-inner,
body.single-post .elementor-container,
body.single-post .elementor-row,
body.single-post .elementor-column,
body.single-post .elementor-column-wrap,
body.single-post .elementor-widget-wrap,
body.single-post .elementor-element {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: block !important;
    flex-wrap: nowrap !important;
    position: static !important;
}

/* Kill Elementor flex/grid that breaks single-column flow */
body.single-post .elementor-section .elementor-container {
    flex-direction: column !important;
}

/* Remove Elementor background overlays and shape dividers */
body.single-post .elementor-background-overlay,
body.single-post .elementor-shape,
body.single-post .elementor-shape-top,
body.single-post .elementor-shape-bottom {
    display: none !important;
}

/* Kill Elementor's min-height / custom height settings */
body.single-post .elementor-section,
body.single-post .e-con {
    min-height: 0 !important;
    height: auto !important;
}

/* --------------------------------------------------------------------------
   3. RESET FONTS — Force system font stack on all single posts
   -------------------------------------------------------------------------- */

body.single-post .entry-content,
body.single-post .entry-content *,
body.single-post .elementor-widget-text-editor,
body.single-post .elementor-widget-text-editor *,
body.single-post .elementor-widget-heading *,
body.single-post .ai-article-wrapper,
body.single-post .ai-article-wrapper * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
                 sans-serif !important;
}

/* Specifically nuke the old Google Fonts declarations */
body.single-post .entry-content [style*="Space Grotesk"],
body.single-post .entry-content [style*="Sora"],
body.single-post .entry-content [style*="DM Sans"],
body.single-post .entry-content [style*="font-family"] {
    font-family: inherit !important;
}

/* --------------------------------------------------------------------------
   4. NEUTRALIZE INLINE ANIMATIONS & TRANSITIONS
   -------------------------------------------------------------------------- */

body.single-post .entry-content *,
body.single-post .elementor-element * {
    animation: none !important;
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    transition: none !important;
}

/* Override any inline opacity:0 left by animation setups */
body.single-post .entry-content [style*="opacity: 0"],
body.single-post .entry-content [style*="opacity:0"] {
    opacity: 1 !important;
}

/* Force visibility on elements hidden for animation entrance */
body.single-post .entry-content [style*="visibility: hidden"],
body.single-post .entry-content [style*="visibility:hidden"] {
    visibility: visible !important;
}

/* Override transforms used by animation initial states */
body.single-post .entry-content [style*="transform:"],
body.single-post .entry-content [style*="transform :"] {
    transform: none !important;
}

/* --------------------------------------------------------------------------
   5. CONSISTENT HEADING SIZES
   -------------------------------------------------------------------------- */

body.single-post .entry-content h1,
body.single-post .entry-content h1 * {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
    font-weight: 700 !important;
    color: var(--ast-global-color-2, #1e293b) !important;
}

body.single-post .entry-content h2,
body.single-post .entry-content h2 * {
    font-size: 2rem !important;
    line-height: 1.25 !important;
    margin-top: 2rem !important;
    margin-bottom: 0.75rem !important;
    font-weight: 700 !important;
    color: var(--ast-global-color-2, #1e293b) !important;
}

body.single-post .entry-content h3,
body.single-post .entry-content h3 * {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600 !important;
    color: var(--ast-global-color-2, #1e293b) !important;
}

body.single-post .entry-content h4,
body.single-post .entry-content h4 * {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600 !important;
    color: var(--ast-global-color-2, #1e293b) !important;
}

/* --------------------------------------------------------------------------
   6. BODY TEXT & PARAGRAPH CONSISTENCY
   -------------------------------------------------------------------------- */

body.single-post .entry-content p,
body.single-post .entry-content li,
body.single-post .entry-content td,
body.single-post .entry-content dd {
    font-size: 1.0625rem !important;  /* 17px */
    line-height: 1.75 !important;
    color: var(--ast-global-color-3, #334155) !important;
}

body.single-post .entry-content a {
    color: var(--ast-global-color-0, #046bd2) !important;
    text-decoration: underline !important;
}

body.single-post .entry-content a:hover {
    opacity: 0.8 !important;
}

/* --------------------------------------------------------------------------
   7. CLEAN UP OLD INLINE BACKGROUNDS & GRADIENTS
   -------------------------------------------------------------------------- */

/* Override inline background colors/gradients from old light theme */
body.single-post .entry-content [style*="background"],
body.single-post .entry-content [style*="Background"] {
    background: transparent !important;
    background-image: none !important;
}

/* Preserve images — re-allow background on specific media elements */
body.single-post .entry-content img,
body.single-post .entry-content figure,
body.single-post .entry-content .wp-block-image {
    background: transparent !important;
}

/* --------------------------------------------------------------------------
   8. OLD "AI-ARTICLE-WRAPPER" FULL-HTML POSTS — RESET
   -------------------------------------------------------------------------- */

/* These posts have a full document wrapper; force it to inherit layout */
body.single-post .ai-article-wrapper {
    all: unset !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    color: var(--ast-global-color-3, #334155) !important;
}

/* Kill any embedded <style> visual effects from old posts */
body.single-post .entry-content .ai-article-wrapper style {
    display: none !important;
}

/* --------------------------------------------------------------------------
   9. IMAGES — RESPONSIVE & CONSISTENT
   -------------------------------------------------------------------------- */

body.single-post .entry-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* --------------------------------------------------------------------------
   10. MOBILE ADJUSTMENTS
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    body.single-post .ast-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    body.single-post .entry-content h1,
    body.single-post .entry-content h1 * {
        font-size: 1.875rem !important;
    }

    body.single-post .entry-content h2,
    body.single-post .entry-content h2 * {
        font-size: 1.5rem !important;
    }

    body.single-post .entry-content h3,
    body.single-post .entry-content h3 * {
        font-size: 1.25rem !important;
    }

    body.single-post .entry-content p,
    body.single-post .entry-content li {
        font-size: 1rem !important;
    }
}
