/* Triple S Solar 1.0.9 – brand bridge for content built with Elementor and older page builders.
 * 1) The old yellow (#FBCA03 in the Elementor kit, and a few other gold values in content) becomes the theme's sun orange.
 *    Text: #C44715 in light mode (4.93:1 on white), #FD8943 in dark mode (7.54:1 on #16171B).
 *    Fills: the lead-button gradient #C81E12 → #C44715 with white text (5.75:1 / 4.93:1), in both modes.
 *    assets/js/ts-brand.js swaps the two text oranges where the real background behind the text is the other kind
 *    (e.g. a dark Elementor section in light mode).
 * 2) Headings site-wide use Heebo (self-hosted, ts-fonts.css); Elementor's global fonts point to it too.
 * Nothing in the Elementor data or the database is changed – remove the theme and the original look returns. */

:root {
  --ts-font-head: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ts-font-body: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ts-y-text: #C44715;
  --ts-y-line: #FD8943;
  --ts-y-fill-solid: #C44715;
  --ts-y-fill: linear-gradient(120deg, #C81E12, #C44715 70%);
  --ts-y-on-fill: #FFFFFF;
}
html[data-theme="dark"] { --ts-y-text: #FD8943; }

/* ---------- Elementor global colors + fonts (any kit; beats `.elementor-kit-N{…}` by specificity, whatever the load order) ---------- */
html body[class*="elementor-kit-"],
html body .elementor[class*="elementor-kit-"] {
  --e-global-color-primary: var(--ts-y-text);
  --e-global-color-accent: var(--ts-y-text);
  --e-global-typography-primary-font-family: var(--ts-font-head);
  --e-global-typography-primary-font-weight: 700;
  --e-global-typography-secondary-font-family: var(--ts-font-head);
  --e-global-typography-text-font-family: var(--ts-font-body);
  --e-global-typography-accent-font-family: var(--ts-font-body);
}
html[data-theme="dark"] body[class*="elementor-kit-"] {
  --e-global-color-primary: #FD8943;
  --e-global-color-accent: #FD8943;
}

/* Elementor widgets that paint the primary/accent color as a background: solid lead orange + white text (AA in both modes). */
html body .elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap,
html body .elementor-widget-icon.elementor-view-stacked .elementor-icon,
html body .elementor-widget-posts .elementor-button,
html body .elementor-widget-posts .elementor-post__card .elementor-post__badge {
  background-color: var(--ts-y-fill-solid);
  color: var(--ts-y-on-fill);
}
html body .elementor-widget-icon.elementor-view-stacked .elementor-icon svg { fill: var(--ts-y-on-fill); }

/* Live content found with the old yellow as a background or a line (Elementor CSS of posts 2280 and 60). */
html body .elementor-2280 .elementor-element.elementor-element-6e403b5:not(.elementor-motion-effects-element-type-background) > .elementor-widget-wrap,
html body .elementor-2280 .elementor-element.elementor-element-6e403b5 > .elementor-widget-wrap > .elementor-motion-effects-container > .elementor-motion-effects-layer,
html body .elementor-60 .elementor-element.elementor-element-23b1d4d5:not(.elementor-motion-effects-element-type-background),
html body .elementor-60 .elementor-element.elementor-element-23b1d4d5 > .elementor-motion-effects-container > .elementor-motion-effects-layer,
html body .elementor-60 .elementor-element.elementor-element-87e9362 .elementor-nav-menu--dropdown {
  background-color: var(--ts-y-fill-solid);
  background-image: var(--ts-y-fill);
}
html body .elementor-2280 .elementor-element.elementor-element-6e403b5 .elementor-element,
html body .elementor-2280 .elementor-element.elementor-element-6e403b5 .elementor-element :is(p, span, strong, b, em, li, h1, h2, h3, h4, h5, h6, .elementor-heading-title),
html body .elementor-60 .elementor-element.elementor-element-23b1d4d5 .elementor-element,
html body .elementor-60 .elementor-element.elementor-element-87e9362 .elementor-nav-menu--dropdown a {
  color: var(--ts-y-on-fill);
}
html body .elementor-2280 .elementor-element.elementor-element-6e403b5 a { color: var(--ts-y-on-fill); text-decoration: underline; }
html body .elementor-60 .elementor-element.elementor-element-5b66efe8 { --divider-color: rgba(253, 137, 67, .44); }

/* Inline styles in content that still carry an old yellow/gold (#FBCA03, #F5CA3D, #B8860B, #E8C951). */
:is([style*="color:#fbca03" i], [style*="color: #fbca03" i], [style*="color:rgb(251, 202, 3)" i], [style*="color: rgb(251, 202, 3)" i], [style*="color:rgb(251,202,3)" i],
    [style*="color:#f5ca3d" i], [style*="color: #f5ca3d" i], [style*="color:#b8860b" i], [style*="color: #b8860b" i],
    [style*="color:#e8c951" i], [style*="color: #e8c951" i]) {
  color: var(--ts-y-text) !important;
}
:is([style*="background:#fbca03" i], [style*="background: #fbca03" i], [style*="background-color:#fbca03" i], [style*="background-color: #fbca03" i],
    [style*="background-color:rgb(251, 202, 3)" i], [style*="background-color: rgb(251, 202, 3)" i], [style*="background:rgb(251, 202, 3)" i],
    [style*="background:#f5ca3d" i], [style*="background: #f5ca3d" i], [style*="background-color:#f5ca3d" i], [style*="background-color: #f5ca3d" i],
    [style*="background:#b8860b" i], [style*="background: #b8860b" i], [style*="background-color:#b8860b" i], [style*="background-color: #b8860b" i],
    [style*="background:#e8c951" i], [style*="background: #e8c951" i], [style*="background-color:#e8c951" i], [style*="background-color: #e8c951" i])[style] {
  background-color: var(--ts-y-fill-solid) !important;
  background-image: var(--ts-y-fill) !important;
  color: var(--ts-y-on-fill) !important;
}
:is([style*="solid #fbca03" i], [style*="solid #f5ca3d" i], [style*="solid #b8860b" i], [style*="solid #e8c951" i], [style*="solid rgb(251, 202, 3)" i]):is([style*="border-top:" i], [style*="border-top :" i]) { border-top-color: var(--ts-y-line) !important; }
:is([style*="solid #fbca03" i], [style*="solid #f5ca3d" i], [style*="solid #b8860b" i], [style*="solid #e8c951" i], [style*="solid rgb(251, 202, 3)" i]):is([style*="border-bottom:" i], [style*="border-bottom :" i]) { border-bottom-color: var(--ts-y-line) !important; }
:is([style*="solid #fbca03" i], [style*="solid #f5ca3d" i], [style*="solid #b8860b" i], [style*="solid #e8c951" i], [style*="solid rgb(251, 202, 3)" i]):is([style*="border-right:" i], [style*="border-left:" i], [style*="border:" i], [style*="border-color:" i]):not([style*="border-top:" i]):not([style*="border-bottom:" i]) { border-color: var(--ts-y-line) !important; }

/* Promo popup on live (#tso-overlay, navy box with gold): gold → sun orange; button text stays navy (6.4:1). */
#tso-overlay .tso-box { border-color: var(--ts-y-line); }
#tso-overlay .tso-form input:focus { border-color: var(--ts-y-line); }
#tso-overlay .tso-whatsapp-btn { background: var(--ts-y-line); color: #02254F; }

/* ---------- Headings: Heebo, clear line-height, no letter-spacing, balanced wrapping ---------- */
h1, h2, h3, h4, h5, h6, .elementor-heading-title {
  font-family: var(--ts-font-head) !important;
  letter-spacing: normal;
  text-wrap: balance;
}
h1, h2, h3, h4, h5, h6 { line-height: 1.2; }
body .elementor-heading-title { line-height: 1.2; }
/* Text inside Elementor posts shown in the theme article column: same family as the theme text. */
#ts-main .ts-article-el .elementor-element,
#ts-main .ts-article-el .elementor-widget-text-editor { font-family: var(--ts-font-body); }
/* Hebrew reads best without negative tracking. */
:is(h1, h2, h3, h4, h5, h6)[class*="tracking-"] { letter-spacing: normal; }
/* Tailwind size utilities on theme headings carry body line-heights (1.5+); headings stay tight. */
:is(h1, h2, h3, h4, h5, h6):is(.text-xs, .text-sm, .text-base, .text-lg, .text-xl) { line-height: 1.3; }
/* Elementor posts widget texts inside the theme article column follow the theme text font. */
#ts-main .ts-article-el :is(.elementor-post__read-more, .elementor-post__excerpt, .elementor-post__meta-data, .elementor-button) { font-family: var(--ts-font-body); }
/* Set by ts-brand.js from the real background behind the text (keeps AA on dark sections / light cards). */
html body .ts-or-lt { color: #C44715 !important; }
html body .ts-or-dk { color: #FD8943 !important; }
/* Headings inside Elementor posts shown in the theme article column: clear bold weight (some were set to 400 in Elementor). */
#ts-main .ts-article-el :is(h1, h2, h3, h4, h5, h6),
#ts-main .ts-article-el .elementor-heading-title { font-weight: 700; }
