/* === COMPREHENSIVE TEXT VISIBILITY FIX === */

/* 1. Footer: has-base-color on has-base-background-color */
.has-base-color.has-base-background-color,
section.has-base-color.has-base-background-color,
div.has-base-color.has-base-background-color {
    color: #1c1b19 !important;
    background-color: #ffffff !important;
}
.has-base-color.has-base-background-color p,
.has-base-color.has-base-background-color h1,
.has-base-color.has-base-background-color h2,
.has-base-color.has-base-background-color h3,
.has-base-color.has-base-background-color h4,
.has-base-color.has-base-background-color h5,
.has-base-color.has-base-background-color h6,
.has-base-color.has-base-background-color span,
.has-base-color.has-base-background-color li,
.has-base-color.has-base-background-color div,
.has-base-color.has-base-background-color nav,
.has-base-color.has-base-background-color ul,
.has-base-color.has-base-background-color .wp-block-site-title,
.has-base-color.has-base-background-color .wp-block-site-tagline,
.has-base-color.has-base-background-color .wp-block-paragraph {
    color: #1c1b19 !important;
}
.has-base-color.has-base-background-color a:not(.wp-element-button) {
    color: #494846 !important;
}

/* 2. Dark sections */
.has-contrast-background-color,
.has-secondary-950-background-color,
.has-secondary-900-background-color,
.has-secondary-background-color,
.has-black-background-color {
    color: #ffffff !important;
}
.has-contrast-background-color p, .has-contrast-background-color h1,
.has-contrast-background-color h2, .has-contrast-background-color h3,
.has-contrast-background-color h4, .has-contrast-background-color h5,
.has-contrast-background-color h6, .has-contrast-background-color li,
.has-contrast-background-color span, .has-contrast-background-color div,
.has-secondary-950-background-color p, .has-secondary-950-background-color h1,
.has-secondary-950-background-color h2, .has-secondary-950-background-color h3,
.has-secondary-950-background-color h4, .has-secondary-900-background-color p,
.has-secondary-900-background-color h1, .has-secondary-900-background-color h2,
.has-secondary-900-background-color h3, .has-secondary-900-background-color h4 {
    color: #ffffff !important;
}
.has-contrast-background-color a:not(.wp-element-button),
.has-secondary-950-background-color a:not(.wp-element-button),
.has-secondary-900-background-color a:not(.wp-element-button) {
    color: #d4a84b !important;
}

/* 3. White background mandatory */
body, .wp-site-blocks, .wp-block-post-content {
    background-color: #ffffff !important;
}
.wp-block-group:not(.has-contrast-background-color):not(.has-secondary-950-background-color):not(.has-secondary-900-background-color):not(.has-secondary-background-color):not(.has-black-background-color):not(.wp-block-cover) {
    background-color: #ffffff !important;
}

/* 4. Body text and headings */
body { color: #31302f !important; }
h1, h2, h3, h4, h5, h6 { color: #1c1b19 !important; }

/* 5. Cover section */
.wp-block-cover { background-color: #1c1b19 !important; }
.wp-block-cover h1, .wp-block-cover h2, .wp-block-cover h3 { color: #ffffff !important; }
.wp-block-cover p, .wp-block-cover span, .wp-block-cover div { color: #e0e0e0 !important; }

/* 6. NAVIGATION LINKS - force visible */
.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-navigation a,
.wp-block-navigation-item__content,
nav a,
.wp-block-navigation .wp-block-navigation-item a {
    color: #1c1b19 !important;
}
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation a:hover,
nav a:hover {
    color: #b8860b !important;
}

/* 7. TAG/LABEL SECTIONS */
.is-style-section-2 {
    background-color: #faf8f5 !important;
    color: #1c1b19 !important;
}
.is-style-section-2 p, .is-style-section-2 a, .is-style-section-2 span {
    color: #1c1b19 !important;
}
.is-style-text-note-3 { color: #1c1b19 !important; }

/* 8. Links */
a:not(.wp-element-button):not(.has-text-color):not(.wp-block-navigation-item__content) {
    color: #b8860b !important;
}
a:not(.wp-element-button):not(.has-text-color):not(.wp-block-navigation-item__content):hover {
    color: #906a08 !important;
}

/* 9. Buttons */
.wp-block-button__link, .wp-element-button.has-primary-background-color {
    background-color: #b8860b !important; color: #ffffff !important;
}

/* 10. Social links */
.wp-block-social-links a, .wp-block-social-link a { color: #b8860b !important; }

/* 11. Borders */
.wp-block-group[style*="border-top-color"], .wp-block-group[style*="border-bottom-color"] {
    border-color: #f0e6d2 !important;
}

/* 12. Accent backgrounds */
.has-accent-background-color { background-color: #f0e6d2 !important; }

/* 13. Light color on light bg */
.has-light-color:not(.has-contrast-background-color):not(.has-secondary-950-background-color):not(.has-secondary-900-background-color):not(.has-black-background-color) {
    color: #666 !important;
}

/* 14. Tagline text */
.wp-block-site-tagline.has-text-color { color: #494846 !important; }
.wp-block-site-tagline.has-contrast-color { color: #1c1b19 !important; }
.wp-block-site-tagline.has-secondary-900-color { color: #31302f !important; }
.wp-block-site-tagline.has-secondary-800-color { color: #494846 !important; }

/* 15. Override theme base-color */
.has-base-color { color: #1c1b19 !important; }

/* 16. Fix undefined contrast-0 variable */
:root { --wp--preset--color--contrast-0: #1c1b19; }

