/*
 Theme Name:   St. Jean Child
 Theme URI:    https://stjean.org
 Description:  Hello Elementor child theme for the St. Jean enrollment microsite.
 Author:       Creative Tinder
 Author URI:   https://creativetinder.com
 Template:     hello-elementor
 Version:      1.2.0
 Text Domain:  stjean-child
*/

/* ==========================================================================
   Link state system — dark / light background aware
   --------------------------------------------------------------------------
   Four tokens drive content-link colours. The page defaults to the LIGHT
   treatment. Any element carrying `.on-dark` (added manually in Elementor's
   Advanced > CSS Classes, or automatically by assets/link-states.js) flips
   its descendants to the DARK treatment. `.on-light` forces light back on,
   e.g. for a pale card sitting inside a dark section.

   Contrast (WCAG AA, 4.5:1 min):
     navy  #1e2a5e on white/cream/soft-blue = 11–13.5:1  ✓
     gold  #f5b81c on navy #1e2a5e          = 7.6:1      ✓
     cream #f8f5ec on navy #1e2a5e          = 12.4:1     ✓
   (Gold text on light backgrounds fails at ~1.8:1, so gold is used only as
    the underline accent on light, never as light-background link text.)
   ========================================================================== */

:root {
    /* light background */
    --sj-link:          #1e2a5e; /* standard text  : navy                    */
    --sj-link-ul:       #1e2a5e; /* standard underline : navy (visible on light) */
    --sj-link-hover:    #16204a; /* hover text     : deep navy               */
    --sj-link-hover-ul: #f5b81c; /* hover underline: gold (navy->gold shift) */
}

/* flip tokens to the dark-background treatment */
.on-dark {
    --sj-link:          #f5b81c; /* standard text  : gold  */
    --sj-link-ul:       #f5b81c; /* standard underline     */
    --sj-link-hover:    #f8f5ec; /* hover text     : cream */
    --sj-link-hover-ul: #f8f5ec; /* hover underline        */
}

/* explicit override back to light (for light cards inside dark sections) */
.on-light {
    --sj-link:          #1e2a5e;
    --sj-link-ul:       #1e2a5e;
    --sj-link-hover:    #16204a;
    --sj-link-hover-ul: #f5b81c;
}

/* Apply to body-copy links in PAGE/POST content only — the Theme Builder
   header and footer keep their own link styling. Buttons are excluded too. */
:is([data-elementor-type="wp-page"], [data-elementor-type="wp-post"])
:is(.elementor-widget-text-editor,
    .elementor-widget-theme-post-content,
    .elementor-widget-icon-list) a:not(.elementor-button) {
    color: var(--sj-link);
    text-decoration: underline;
    text-decoration-color: var(--sj-link-ul);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    transition: color .15s ease,
                text-decoration-color .15s ease,
                text-decoration-thickness .15s ease;
}

:is([data-elementor-type="wp-page"], [data-elementor-type="wp-post"])
:is(.elementor-widget-text-editor,
    .elementor-widget-theme-post-content,
    .elementor-widget-icon-list) a:not(.elementor-button):hover {
    color: var(--sj-link-hover);
    text-decoration-color: var(--sj-link-hover-ul);
}

/* ==========================================================================
   Video overlay play icon — hover feedback
   On hover of the video, the play icon shifts to brand gold and scales up.
   Scaling the icon (svg/i) rather than the centred .elementor-custom-embed-play
   wrapper avoids disturbing Elementor's translate(-50%,-50%) centring.
   ========================================================================== */
.elementor-widget-video .elementor-custom-embed-play svg,
.elementor-widget-video .elementor-custom-embed-play i {
    transform-origin: center;
    transition: transform .2s ease, fill .2s ease, color .2s ease;
}
/* Keep the icon navy (gold washes out on the video's light backdrop) — the
   hover cue is a scale-up only. */
.elementor-widget-video:hover .elementor-custom-embed-play svg,
.elementor-widget-video:hover .elementor-custom-embed-play i {
    transform: scale(1.12);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

/* Reusable hide helper — add the class `hidden` to any element's
   CSS Classes (Advanced tab) to remove it. */
.hidden { display: none !important; }

/* Accordion items expose only a CSS ID (no CSS Classes field), so the
   "miss the December deadline" FAQ is hidden by its ID instead. To reveal it,
   clear the CSS ID `faq-dec-hold` on that item, or delete this rule. */
#faq-dec-hold { display: none !important; }
