/*
Theme Name:     CGN Optimized Theme - SEO Upgrade
Theme URI:      https://www.contractorgrowthnetwork.com/
Description:    Full-featured WordPress theme for contractors with analytics tracking, service locations, enhanced blog posts, and automatic updates.
Author:         Contractor Growth Network
Author URI:     https://www.contractorgrowthnetwork.com/
Template:       hello-elementor
Version:        2.42.0
Text Domain:    cgn-optimized-theme
*/

/* Parent styles load via the hello-elementor-style enqueue in inc/assets.php.
   Do NOT @import them here — that double-downloads the parent stylesheet as a
   serial render-blocking fetch (removed in 2.25.2). */

/* = Your custom CSS goes below = */

#zforms_iframe_id {
    min-height: 600px;
}

/* ---------------------------------------------------------------------------
   In-content link styling (THEME-30 / THEME-39)
   ---------------------------------------------------------------------------
   Lives here, not in a page-template stylesheet, because it is genuinely
   sitewide: style.css is the one sheet enqueued on every page. The four values
   come from inc/design-tokens.php as CSS vars driven by the Design tab
   (cgn_content_link_color / _hover_color / _style / _weight), so a client no
   longer needs per-site custom CSS to make links readable.

   Reach: blog posts (.article-content), service location pages
   (.elementor-content-area), and Elementor-built PAGES, which previously got
   no theme link styling at all and fell through to Elementor's own kit rule.

   Specificity: prefixed with `body` on purpose. Elementor's kit rule
   `.elementor-kit-N a` is (0,1,1); a bare `.elementor-widget-text-editor a`
   ties it and wins only on source order, which is not a guarantee. `body`
   takes these to (0,2,2). Do NOT reach for the kit ID instead — it changes on
   every kit rebuild.

   Scope: only body-copy widgets are listed. Nav menus, buttons, CTAs, icon
   lists, related-post grids, and the SLP location header/footer are sibling
   widgets with their own classes, so they are excluded structurally rather
   than by fighting these rules with overrides. .elementor-button is excluded
   explicitly because a text-editor widget can legitimately contain one.
   --------------------------------------------------------------------------- */
body .article-content a:not(.elementor-button),
body .elementor-content-area a:not(.elementor-button),
body .elementor-widget-text-editor a:not(.elementor-button),
body .elementor-widget-theme-post-content a:not(.elementor-button) {
    color: var(--cgn-content-link, currentColor);
    font-weight: var(--cgn-content-link-weight, bold);
    text-decoration: var(--cgn-content-link-decoration, none);
    text-underline-offset: 2px;
    /* currentColor so the mark always tracks the link color, including hover. */
    border-bottom: var(--cgn-content-link-border, 1px) solid currentColor;
}

body .article-content a:not(.elementor-button):hover,
body .article-content a:not(.elementor-button):focus-visible,
body .elementor-content-area a:not(.elementor-button):hover,
body .elementor-content-area a:not(.elementor-button):focus-visible,
body .elementor-widget-text-editor a:not(.elementor-button):hover,
body .elementor-widget-text-editor a:not(.elementor-button):focus-visible,
body .elementor-widget-theme-post-content a:not(.elementor-button):hover,
body .elementor-widget-theme-post-content a:not(.elementor-button):focus-visible {
    color: var(--cgn-content-link-hover, var(--cgn-content-link, currentColor));
}

/* Image links get no text affordance. Kept in its OWN rule deliberately: an
   unsupported :has() invalidates the ENTIRE rule it appears in, not just its
   own clause, so folding these selectors into the list above would drop
   in-content link styling wholesale on any browser without :has(). */
body .article-content a:has(img),
body .elementor-content-area a:has(img),
body .elementor-widget-text-editor a:has(img),
body .elementor-widget-theme-post-content a:has(img) {
    border-bottom: 0;
    text-decoration: none;
}
