/* =====================================================================
   EAGLE GPS — Experimental WOW slider (standalone)
   Self-contained, no dependencies on tiny-slider, Slider.css, jQuery or
   any other module. All selectors use the "wow-slider-" prefix so it
   cannot collide with any other styling on the site.

   Animation strategy:
     - Each slide's image, title, and details default to an "offscreen"
       state (translated right, scaled up, blurred, opacity 0).
     - When a slide gains .is-active, CSS transitions carry each element
       back to its natural state, staggered by transition-delay so the
       image leads, title follows, details trail.
     - The outgoing slide's .is-active is removed, so its inner elements
       transition back to the initial state for next time.

   This runs entirely in CSS. The JS only toggles .is-active per cycle.
   ===================================================================== */

/* ---------- CONTAINER ---------- */
.wow-slider {
    position: relative;
    width: 100%;
    height: 13em;
    overflow: hidden;
    background: #ffffff;
    border-radius: 0.5em;
    box-shadow: 0 6px 22px rgba(0, 65, 112, 0.18);
    margin: 0;
    /* Subtle idle breathing glow so the frame has presence even between slides */
    isolation: isolate;
    /* Swipe support:
       - pan-y lets the browser keep vertical page scrolling while we claim
         horizontal gestures for prev/next navigation.
       - user-select prevents accidental text selection during mouse drag.
       - grab cursor signals draggability on desktop. */
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.wow-slider.is-dragging {
    cursor: grabbing;
}

/* Suppress the browser's native image-drag ghost while the user is
   click-dragging across the slide image. */
.wow-slider-img {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

.wow-slider::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at 20% 30%,
        rgba(0, 153, 221, 0.08) 0%,
        rgba(0, 153, 221, 0) 60%
    );
    z-index: 1;
}

.wow-slider-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ---------- SLIDE ---------- */
.wow-slider-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    background: #ffffff;
    visibility: hidden;
    transform: translateX(100%);   /* waiting on the right */
    pointer-events: none;
    z-index: 1;
}

/* The slide that comes in slides from the right to the left, the one that goes out slides out to the left (the classes are set by WowSlider.js, the
   animations play only while the class is on, so a slide is back on the right, unseen, when it is off). Swipe right (back) = the other way. */
.wow-slider-slide.is-active {
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 3;
    animation: wow-slide-in var(--wow-slide-ms, 750ms) cubic-bezier(0.4, 0, 0.2, 1) both;
}

.wow-slider-slide.is-leaving {
    visibility: visible;
    z-index: 2;
    animation: wow-slide-out var(--wow-slide-ms, 750ms) cubic-bezier(0.4, 0, 0.2, 1) both;
}

.wow-slider.is-back .wow-slider-slide.is-active { animation-name: wow-slide-in-back; }
.wow-slider.is-back .wow-slider-slide.is-leaving { animation-name: wow-slide-out-back; }

@keyframes wow-slide-in       { from { transform: translateX(100%); }  to { transform: translateX(0); } }
@keyframes wow-slide-out      { from { transform: translateX(0); }     to { transform: translateX(-100%); } }
@keyframes wow-slide-in-back  { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes wow-slide-out-back { from { transform: translateX(0); }     to { transform: translateX(100%); } }

/* ---------- MEDIA (IMAGE COLUMN) ---------- */
.wow-slider-media {
    flex: 0 0 auto;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

.wow-slider-img {
    display: block;
    height: 100%;
    width: auto;
    backface-visibility: hidden;
}

/* ---------- COPY (TEXT COLUMN) ---------- */
.wow-slider-copy {
    flex: 1 1 auto;
    padding: 0.6em 0.8em 0.6em 1.6em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.wow-slider-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #004170;
    margin: 0 0 0.25em 0;
    line-height: 1.15em;
}

.wow-slider-details {
    font-size: 1.15em;
    font-weight: 500;
    line-height: 1.5em;
    color: #222222;
    margin: 0;
}

/* ---------- WAIT SYMBOL (top-right badge; replaced the progress bar of the bottom edge) ----------
   A battery that charges in the time the slide stays (6.5 s); WowSlider.js puts it in the badge on each slide change. */
.wow-slider-progress {
    position: absolute;
    top: 0.6em;
    right: 0.7em;
    width: 1.6em;
    height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
}

.wow-slider-progress > * {
    flex: 0 0 auto;
}

/* the battery: charges (empty, red - orange - green, full) in the time the slide stays (6.5 s; --wi-dur is set by the script) */
.wait-battery { position: relative; display: block; width: 1.667em; height: 1.5em; }
.wait-battery svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wait-battery .bd { fill: #fff; stroke: #004170; stroke-width: 2.4; }
.wait-battery .nub { fill: #004170; }
/* the fill (the group .chg grows from left to right, the color changes red - orange - green), with a light band that sweeps over it from left to right again and again */
.wait-battery .chg { transform-origin: 4.2px 0; transform-box: view-box; transform: scaleX(0); animation: wsCharge var(--wi-dur, 6.5s) linear forwards; }
.wait-battery .lv { fill: #2bb673; animation: wsBattery var(--wi-dur, 6.5s) linear forwards; }
.wait-battery .shine { animation: wsShine 1.5s ease-in-out infinite; }
@keyframes wsCharge { to { transform: scaleX(1); } }
@keyframes wsBattery {
    0%   { fill: #e5484d; }
    35%  { fill: #f5a524; }
    70%  { fill: #2bb673; }
    100% { fill: #2bb673; }
}
@keyframes wsShine {
    0%        { transform: translateX(0); }
    60%, 100% { transform: translateX(44px); }
}


/* ---------- DOT NAV (clickable indicators) ---------- */
.wow-slider-dots {
    position: absolute;
    right: 1em;
    bottom: 0.9em;
    display: flex;
    gap: 0.45em;
    z-index: 11;
    /* Clickable — individual dots receive the pointer events. */
}

.wow-slider-dot {
    /* 10% larger than the original 7px base → 7.7px. */
    width: 7.7px;
    height: 7.7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 65, 112, 0.28);
    cursor: pointer;
    transition: background 300ms ease, transform 300ms ease;
    /* Make the actual click target a bit larger than the visible dot
       without changing its painted size — improves usability on touch. */
    box-sizing: content-box;
    outline: none;
}

.wow-slider-dot:hover,
.wow-slider-dot:focus-visible {
    background: #004170;
    /* Match the active dot's visual size on hover. */
    transform: scale(1.45);
}

.wow-slider-dot.is-active {
    background: #0099dd;
    transform: scale(1.45);
    /* Turn-signal style blink: hold fully ON, then fully OFF (invisible),
       with near-instant edges between — same rhythm as a car indicator. */
    animation: wow-dot-flash 700ms linear infinite;
}

.wow-slider-dot.is-active:hover,
.wow-slider-dot.is-active:focus-visible {
    background: #004170;
}

@keyframes wow-dot-flash {
    0%,  49% { opacity: 1; }
    50%, 99% { opacity: 0; }
    100%     { opacity: 1; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .wow-slider { height: 12em; }
    .wow-slider-title { font-size: 1.5em; }
    .wow-slider-details { font-size: 1em; line-height: 1.35em; }
    .wow-slider-copy { padding: 0.4em 0.6em 0.4em 1em; }
}

@media (max-width: 600px) {
    /* Phones: the picture on top, the text below it, so the text has the full width (side by side it was squeezed into a column of 60 - 190 px and overflowed). */
    .wow-slider { height: 17.5em; }
    .wow-slider-slide { flex-direction: column; }
    .wow-slider-media { width: 100%; height: 8.6em; display: flex; justify-content: flex-start; }
    .wow-slider-copy { flex: 1 1 auto; padding: 0.4em 1em 1.9em 1em; justify-content: flex-start; }
    .wow-slider-title { font-size: 1.2em; }
    .wow-slider-details { font-size: 0.85em; line-height: 1.3em; }
    /* many slides: the dots wrap inside the slider (one row of 26 was wider than the phone) */
    .wow-slider-dots { left: 0.6em; right: 0.6em; justify-content: flex-end; flex-wrap: wrap; gap: 0.2em; }
}

/* ---------- ACCESSIBILITY: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    /* no sliding: the slide just appears, the old one is gone at once */
    .wow-slider-slide,
    .wow-slider-slide.is-active,
    .wow-slider-slide.is-leaving {
        animation: none !important;
        transform: none !important;
    }
    .wow-slider-slide.is-leaving { visibility: hidden !important; }
    .wow-slider-progress { display: none; }
    /* Also disable the turn-signal blink on the active dot under
       reduced-motion — the dot will simply sit at full opacity. */
    .wow-slider-dot.is-active {
        animation: none !important;
        opacity: 1 !important;
    }
}

