/* ============================================================
   OpsTree Hero Slider — Optimized
   ------------------------------------------------------------
   Changes from original:
   • will-change applied dynamically (JS) instead of always-on
   • orb blur reduced 70px → 50px (cheap, still soft)
   • particles paused by default; only active slide animates
   • beam paused on inactive slides
   • content-visibility: auto on inactive slides (skips paint)
   ============================================================ */

.ops-wrap * { box-sizing: border-box; margin: 0; padding: 0; }

.ops-wrap {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    background: #050810;
    aspect-ratio: 16/7;
    min-height: 560px;
    /* Pause everything while off-screen (JS toggles --ops-on) */
    contain: layout paint;
}

.ops-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(126,179,255,.10) 1.5px, transparent 1.5px);
    background-size: 42px 42px;
    z-index: 1;
    pointer-events: none;
}

.ops-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0s linear 1s;
    z-index: 1;
    /* Skip painting fully hidden slides */
    content-visibility: auto;
    contain-intrinsic-size: 800px 400px;
}

.ops-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: visibility 0s linear 0s;
    z-index: 2;
    content-visibility: visible;
}

.ops-slide.is-prev {
    opacity: 1;
    visibility: visible;
    transition: visibility 0s linear 0s;
    z-index: 1;
    content-visibility: visible;
}

.ops-bg {
    position: absolute;
    inset: -10%;
    background-size: cover;
    background-position: center;
    /* will-change is added by JS only to the active slide */
}

.ops-slide-1 .ops-bg { background-image: url('https://opstree.com/wp-content/uploads/2026/05/banner_1-scaled.webp'); }
.ops-slide-2 .ops-bg { background-image: url('https://opstree.com/wp-content/uploads/2026/05/banner_2-op.webp'); }
.ops-slide-3 .ops-bg { background-image: url('https://opstree.com/wp-content/uploads/2026/05/banner_2-op.webp'); }

.ops-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(108deg,
            rgba(5,8,16,.93) 0%,
            rgba(5,8,16,.78) 32%,
            rgba(5,8,16,.32) 60%,
            rgba(5,8,16,.06) 100%),
        linear-gradient(0deg,
            rgba(5,8,16,.65) 0%,
            transparent 38%,
            transparent 72%,
            rgba(5,8,16,.28) 100%);
    z-index: 1;
}

/* ── Beam (paused unless slide is active) ── */
.ops-beam {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.ops-beam::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -30%;
    width: 55%;
    height: 140%;
    background: linear-gradient(125deg,
        transparent 0%,
        rgba(126,179,255,.03) 40%,
        rgba(167,139,250,.05) 50%,
        rgba(126,179,255,.03) 60%,
        transparent 100%);
    animation: ops-beam 9s ease-in-out infinite alternate;
    animation-play-state: paused;
    transform: skewX(-15deg);
}

.ops-slide.is-active .ops-beam::before { animation-play-state: running; }

@keyframes ops-beam {
    0%   { transform: skewX(-15deg) translateX(0);    opacity: .5; }
    100% { transform: skewX(-15deg) translateX(55%);  opacity: 1; }
}

/* ── Orbs — softer blur ── */
.ops-orbs {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.ops-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px); /* was 70px */
}

/* ── Particles (paused unless slide is active) ── */
.ops-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.ops-particle {
    position: absolute;
    border-radius: 50%;
    animation: ops-float linear infinite;
    animation-play-state: paused;
}

.ops-slide.is-active .ops-particle { animation-play-state: running; }

@keyframes ops-float {
    0%   { transform: translateY(0) translateX(0) scale(1);          opacity: 0; }
    8%   { opacity: 1; }
    50%  { transform: translateY(-55px) translateX(12px) scale(.85); }
    92%  { opacity: .4; }
    100% { transform: translateY(-130px) translateX(-8px) scale(.2); opacity: 0; }
}

/* ── Vertical accent line ── */
.ops-accent-line {
    position: absolute;
    left: calc(7% - 1px);
    top: 50%;
    width: 3px;
    height: 90px;
    background: linear-gradient(180deg, transparent 0%, #7eb3ff 30%, #a78bfa 70%, transparent 100%);
    border-radius: 2px;
    z-index: 6;
    opacity: 0;
    transform: translateY(-50%) scaleY(0);
    transform-origin: center center;
}

/* ── Content ── */
.ops-content {
    position: relative;
    z-index: 5;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 7% 40px 9%;
    max-width: 64%;
}

.ops-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    margin-bottom: 14px;
    opacity: 0;
}

.ops-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7eb3ff;
    flex-shrink: 0;
    animation: ops-blink 2.4s ease-in-out infinite;
    animation-play-state: paused;
}
.ops-slide.is-active .ops-tag-dot { animation-play-state: running; }

@keyframes ops-blink {
    0%,100% { opacity: 1;  box-shadow: 0 0 0 0 rgba(126,179,255,0); }
    50%     { opacity: .4; box-shadow: 0 0 8px 3px rgba(126,179,255,.5); }
}

.ops-headline {
    font-size: clamp(22px, 3vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -.03em;
    margin-bottom: 16px;
    opacity: 0;
}

.ops-headline em {
    font-style: normal;
    background: linear-gradient(90deg, #7eb3ff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ops-para {
    font-size: clamp(13px, 1.15vw, 15px);
    line-height: 1.78;
    color: rgba(255,255,255,.6);
    margin-bottom: 32px;
    max-width: 480px;
    opacity: 0;
}

.ops-ctas {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    opacity: 0;
}

/* Glass CTA button */
.ops-wrap .ops-qodef-btn,
.ops-wrap a.qodef-shortcode.qodef-button {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 13px 26px !important;
    background: rgba(255,255,255,.1) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.28) !important;
    border-radius: 40px !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .03em;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
    transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}

.ops-wrap .ops-qodef-btn:hover,
.ops-wrap a.qodef-shortcode.qodef-button:hover {
    background: rgba(255,255,255,.2) !important;
    border-color: rgba(255,255,255,.5) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.2);
}

.ops-wrap .ops-qodef-btn .qodef-m-text,
.ops-wrap a.qodef-shortcode.qodef-button .qodef-m-text { color: #fff !important; }

.ops-wrap .ops-qodef-btn .qodef-m-arrow,
.ops-wrap a.qodef-shortcode.qodef-button .qodef-m-arrow {
    display: flex;
    align-items: center;
}

.ops-wrap .qodef-svg--button-arrow path {
    stroke: #fff !important;
    fill: none;
    stroke-width: 1.2;
}

/* Ghost button */
.ops-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: opacity .2s;
}

.ops-btn-ghost:hover { opacity: .75; }

.ops-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s, transform .2s;
}

.ops-btn-ghost:hover .ops-play {
    border-color: #fff;
    background: rgba(255,255,255,.12);
    transform: scale(1.08);
}

.ops-play svg { width: 14px; height: 14px; margin-left: 2px; }

/* ── Bottom-right nav lines ── */
.ops-nav-lines {
    position: absolute;
    right: 36px;
    bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    z-index: 20;
}

.ops-nav-line {
    position: relative;
    width: 48px;
    height: 3px;
    background: rgba(255,255,255,.18);
    border-radius: 2px;
    cursor: pointer;
    transition: background .3s, width .4s cubic-bezier(.25,1,.5,1);
    overflow: hidden;
}

.ops-nav-line:hover  { background: rgba(255,255,255,.35); }
.ops-nav-line.active { width: 72px; background: rgba(255,255,255,.25); }

.ops-nav-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7eb3ff, #fff);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(126,179,255,.7);
}

@media (max-width: 768px) {
    .ops-wrap {
        aspect-ratio: unset;
        min-height: unset;
        height: 100svh;
        max-height: 620px;
    }
    .ops-content { padding: 0 6% 60px 6%; max-width: 100%; justify-content: flex-end; }
    .ops-headline { font-size: clamp(22px, 6.5vw, 36px); margin-bottom: 12px; }
    .ops-para { font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
    .ops-ctas { gap: 14px; }
    .ops-wrap .ops-qodef-btn,
    .ops-wrap a.qodef-shortcode.qodef-button { padding: 11px 20px !important; font-size: 13px; }
    .ops-nav-lines { right: 20px; bottom: 20px; }
    .ops-nav-line { width: 36px; }
    .ops-nav-line.active { width: 54px; }
    .ops-accent-line { display: none; }
}

@media (max-width: 480px) {
    .ops-wrap { max-height: 560px; }
    .ops-content { padding: 0 5% 56px 5%; }
    .ops-headline { font-size: clamp(20px, 7.5vw, 28px); }
    .ops-btn-ghost { font-size: 11px; }
}

/* Respect user's motion preference */
@media (prefers-reduced-motion: reduce) {
    .ops-beam::before,
    .ops-particle,
    .ops-tag-dot,
    .ops-orb { animation: none !important; }
}
