/*
 * GreenGo Roofing — Divi structure base layer.
 * Loaded BEFORE gg-source.css. Uses #page-container :where() (specificity 1,0,0)
 * so it beats Divi's defaults but loses to the scoped source design rules.
 */

/* Page canvas */
body, #page-container, #main-content, #et-main-area { background-color: #fbf9f4; }
#main-content .container:before { display: none; }
#page-container { padding-top: 0 !important; overflow: visible; }
#main-content .entry-content { padding: 0; }

/* Typography defaults (Divi sets 14px Open Sans / #666) */
body, body #page-container { font-size: 16px; }
#page-container :where(h1, h2, h3, h4, h5, h6) { font-family: inherit; font-weight: 700; color: inherit; padding: 0; margin: 0; line-height: 1.2; }
#page-container :where(p) { margin: 1em 0; padding: 0; line-height: inherit; }
#page-container :where(ul, ol) { margin: 1em 0; padding: 0 0 0 40px; line-height: inherit; }
#page-container :where(li) { line-height: inherit; }
#page-container :where(a) { color: inherit; }
#page-container :where(strong, b) { font-weight: 700; }
#page-container :where(h1, h2, h3, h4, h5, h6, p, a, li, span, input, select, textarea, button, label, blockquote, cite, small, strong) { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

/* Divi sections / rows / columns / modules → neutral wrappers */
#page-container :where(.gg-sec) { padding: 0; background-color: transparent; background-size: cover; background-position: center; }
#page-container :where(.gg-sec .et_pb_row) { width: auto; max-width: none; padding: 0; margin: 0; }
#page-container :where(.gg-sec .et_pb_row)::after,
#page-container :where(.gg-sec .et_pb_column)::after { display: none; content: none; }
#page-container :where(.gg-sec .et_pb_column) { float: none; width: auto; margin: 0; padding: 0; }
#page-container :where(.gg-sec .et_pb_module) { margin: 0; }
#page-container :where(.gg-sec .et_pb_column) > .et_pb_module:first-child :where(.et_pb_text_inner, .et_pb_code_inner) > :first-child { margin-top: 0; }
#page-container :where(.gg-sec .et_pb_column) > .et_pb_module:last-child :where(.et_pb_text_inner, .et_pb_code_inner) > :last-child { margin-bottom: 0; }

/* Section intros that end with a paragraph keep the source's 1em gap before the grid below */
#page-container .gg-sec .page-heading > .et_pb_module:last-child :where(.et_pb_text_inner, .et_pb_code_inner) > p:last-child { margin-bottom: 1em; }

/* Empty paragraphs left behind by Divi's auto-formatting */
#page-container .gg-sec .et_pb_text_inner p:empty,
#page-container .gg-sec .et_pb_code_inner p:empty { display: none; }

/* No Divi entrance animations — the source design is static */
#page-container .gg-sec .et_animated, #page-container .gg-sec .et-animated { opacity: 1 !important; animation: none !important; transform: none !important; }

/* Item grids: Divi wrappers disappear so the original cards become the grid items */
#page-container .gg-sec .gg-items > .et_pb_module,
#page-container .gg-sec .gg-items .et_pb_text_inner,
#page-container .gg-sec .gg-items .et_pb_code_inner { display: contents !important; }
#page-container :where(.gg-sec .et_pb_code) { margin: 0; }
#page-container .gg-sec .gg-items > .et_pb_module,
#page-container .gg-sec .gg-contents { display: contents !important; }

/* Images */
#page-container :where(.gg-sec .et_pb_image) { line-height: 0; margin: 0; }
#page-container :where(.gg-sec .et_pb_image .et_pb_image_wrap) { display: block; width: 100%; }
#page-container :where(.gg-sec .et_pb_image img) { width: 100%; }

/* Reveal animation from the source site: always visible */
#page-container .reveal { opacity: 1; transform: none; }
