/* ============================================================
   CIRCUIT UPGRADE THEME
   Adds PCB-trace visuals across the site: nav hover symbols,
   circuit-trace underlines, and current-flow arrow buttons.
   Palette matches existing brand colors (#d40000 red / #ff6600 orange).
   ============================================================ */

:root{
    --circuit-red: #d40000;
    --circuit-orange: #ff6600;
    --circuit-glow: rgba(212,0,0,0.65);
}

/* ------------------------------------------------------------
   0. SHARED RESISTOR TRACE
   The exact resistor symbol — flat lead, 4 sharp zigzag peaks, flat
   lead — used as a single shape (not tiled) under small headings/
   labels only. A soft current-glow pulse keeps it feeling "live".
   ------------------------------------------------------------ */
:root{
    --resistor-trace-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'%3E%3Cpath d='M0 20 H18 L33 36 L48 4 L63 36 L78 4 L93 20 H120' fill='none' stroke='%23d40000' stroke-width='4' stroke-linecap='butt' stroke-linejoin='miter'/%3E%3C/svg%3E");
}

.circuit-trace-line{
    background-image: var(--resistor-trace-red);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    animation: circuitResistorPulse 1.6s ease-in-out infinite;
}

@keyframes circuitResistorPulse{
    0%, 100% { filter: drop-shadow(0 0 0 rgba(212,0,0,0)) brightness(1); }
    50%      { filter: drop-shadow(0 0 8px rgba(212,0,0,.95)) brightness(1.35); }
}

/* ------------------------------------------------------------
   1. MAIN NAV — circuit node + running resistor-trace underline
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   1. MAIN NAV — resistor-trace underline only (no dots, no pads)
   ------------------------------------------------------------ */
.main-menu .navigation > li{
    position: relative;
    overflow: visible;
}

.main-menu .navigation > li > a{
    position: relative;
    z-index: 2;
}

.main-menu .navigation > li > a::after{
    content:'';
    position:absolute;
    left:0;
    top:50%;
    margin-top:6px;
    width:0;
    height:14px;
    background-image: var(--resistor-trace-red);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transition: width .35s ease;
    pointer-events:none;
    z-index:1;
}
.main-menu .navigation > li:hover > a::after{
    width:100%;
    animation: circuitResistorPulse 1.6s ease-in-out infinite;
}

.main-menu .navigation > li:hover > a{
    color: var(--circuit-red) !important;
}


/* ------------------------------------------------------------
   2. BUTTON ARROWS — current-flow circuit trace behind icons
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   2. BUTTON SWITCH ICON — open switch at rest, closes on hover
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   2. BUTTON CIRCLE — switch open/closed icon inside the round badge
   ------------------------------------------------------------ */
:root{
    --switch-open-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16'%3E%3Cline x1='0' y1='10' x2='6' y2='10' stroke='%23d40000' stroke-width='2.8' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='10' r='3' stroke='%23d40000' stroke-width='2.8' fill='none'/%3E%3Cline x1='7.5' y1='8.5' x2='21' y2='2' stroke='%23d40000' stroke-width='2.8' stroke-linecap='round'/%3E%3Ccircle cx='30' cy='10' r='3' stroke='%23d40000' stroke-width='2.8' fill='none'/%3E%3Cline x1='33' y1='10' x2='40' y2='10' stroke='%23d40000' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E");
    --switch-closed-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16'%3E%3Cline x1='0' y1='10' x2='6' y2='10' stroke='%23d40000' stroke-width='2.8' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='10' r='3' stroke='%23d40000' stroke-width='2.8' fill='none'/%3E%3Cline x1='8.5' y1='9.3' x2='28' y2='9.7' stroke='%23d40000' stroke-width='2.8' stroke-linecap='round'/%3E%3Ccircle cx='30' cy='10' r='3' stroke='%23d40000' stroke-width='2.8' fill='none'/%3E%3Cline x1='33' y1='10' x2='40' y2='10' stroke='%23d40000' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.theme-btn.btn-one::after,
.btn-box > a::after{
    content:'' !important;
    position:absolute !important;
    right:6px;
    top:50%;
    width:58px;
    height:32px;
    border-radius:0;
    background-color: transparent;
    background-image: var(--switch-open-dark);
    background-repeat:no-repeat;
    background-position:center;
    background-size:32px auto;
    transform: translateY(-50%) scale(1);
    box-shadow: none;
    transition: transform .25s ease;
    pointer-events:none;
}

.theme-btn.btn-one::before,
.theme-btn.btn-one::after{
    content:'' !important;
}

.theme-btn.btn-one{
    position: relative;
}

.theme-btn.btn-one::after{
    content:'' !important;
    position:absolute !important;
    right:6px;
    top:50%;
    width:48px;
    height:22px;
    border-radius:0;
    background-color: transparent;
    background-image: var(--switch-open-dark);
    background-repeat:no-repeat;
    background-position:center;
    background-size:32px auto;
    transform: translateY(-50%) scale(1);
    box-shadow: none;
    transition: transform .25s ease, filter .25s ease;
    pointer-events:none;
}

.theme-btn.btn-one:hover::after{
    background-image: var(--switch-closed-dark);
    transform: translateY(-50%) scale(1.15);
    filter: brightness(0) invert(1);
}

/* Explicit safety net: guarantee every non-pill "circle-arrow" button
   across the site never gets the switch icon, regardless of any
   residual .btn-box > a specificity elsewhere in the stylesheet. */
.btn-box > a::before,
.btn-box > a::after{
    content: none !important;
}

/* Re-apply the icon ONLY where the parent is also .theme-btn.btn-one
   (covers cases where markup is <div class="btn-box"><a class="theme-btn btn-one">) */
.btn-box > a.theme-btn.btn-one::before,
.btn-box > a.theme-btn.btn-one::after{
    content:'' !important;
}
.btn-box > a.theme-btn.btn-one::after{
    position:absolute !important;
    right:6px;
    top:50%;
    width:48px;
    height:22px;
    background-color: transparent;
    background-image: var(--switch-open-dark);
    background-repeat:no-repeat;
    background-position:center;
    background-size:32px auto;
    transform: translateY(-50%) scale(1);
    transition: transform .25s ease, filter .25s ease;
    pointer-events:none;
}
.btn-box > a.theme-btn.btn-one:hover::after{
    background-image: var(--switch-closed-dark);
    transform: translateY(-50%) scale(1.15);
    filter: brightness(0) invert(1);
}
/* ------------------------------------------------------------
   3. SMALL HEADING UNDERLINE — sub-title kicker labels only
   (big h2 section titles are left untouched, no trace)
   ------------------------------------------------------------ */
.sec-title h2::after{
    content: none !important;
}

.sec-title .sub-title{
    display:inline-block !important;
    position:relative !important;
    padding-bottom:14px !important;
    border:none !important;
    border-bottom:none !important;
    box-shadow:none !important;
    background:none !important;
    text-decoration:none !important;
}
.sec-title .sub-title::before{
    content:none !important;
}
.sec-title .sub-title::after{
    content:'' !important;
    position:absolute !important;
    left:0 !important;
    bottom:0 !important;
    width:100% !important;
    height:14px !important;
    background-image: var(--resistor-trace-red) !important;
    background-repeat:no-repeat !important;
    background-size:100% 100% !important;
    background-color:transparent !important;
    border:none !important;
    box-shadow:none !important;
    animation: circuitResistorPulse 1.6s ease-in-out infinite !important;
}
.sec-title.centred .sub-title::after{
    left:50% !important;
    transform: translateX(-50%) !important;
}

/* ------------------------------------------------------------
   4. LINKS LIST — animated trace dot (footer / quick links)
   ------------------------------------------------------------ */
.hhe-links-list li a::before{
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease !important;
}
.hhe-links-list li a:hover::before{
    background: var(--circuit-orange);
    box-shadow: 0 0 8px 2px rgba(255,102,0,.8);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce){
    .circuit-trace-line,
    .main-menu .navigation > li > a::after,
    .sec-title .sub-title::after,
    .main-menu .navigation > li:hover > a,
    .theme-btn:hover i,
    .btn-box a:hover i{
        animation: none !important;
    }
}
/* ------------------------------------------------------------
   5. ABOUT SECTION — animated circuit-style frame around image
   ------------------------------------------------------------ */
.about-section .image-box .image{
    position: relative;
}

/* Glowing corner nodes on the black image frame */
.about-section .image-box .image::before,
.about-section .image-box .image::after{
    content:'';
    position:absolute;
    width:9px;
    height:9px;
    border-radius:50%;
    background: var(--circuit-red);
    box-shadow: 0 0 8px 2px var(--circuit-glow);
    animation: circuitNodePulse 2s ease-in-out infinite;
    z-index: 3;
}
.about-section .image-box .image::before{
    top:-5px;
    left:-5px;
}
.about-section .image-box .image::after{
    bottom:-5px;
    right:-5px;
    animation-delay: 1s;
}

/* Soft pulsing glow ring around the frame — replaces the broken rotating border */
/* Scanning inspection beam sweeping over the product — reads as
   "diagnostic/testing", not a glow. Fully contained by the frame's
   existing overflow:hidden, so it can never spill outside the box. */
.about-section .image-box .image{
    background-color: #000000;
    background-image: linear-gradient(180deg,
        transparent 0%,
        transparent 40%,
        rgba(212,0,0,0.30) 48%,
        rgba(255,102,0,0.45) 50%,
        rgba(212,0,0,0.30) 52%,
        transparent 60%,
        transparent 100%
    );
    background-repeat: no-repeat;
    background-size: 100% 220%;
    background-position: 0 -60%;
    animation: circuitScanSweep 3.5s ease-in-out infinite;
}

@keyframes circuitScanSweep{
    0%   { background-position: 0 -60%; }
    100% { background-position: 0 160%; }
}

/* Animate the existing red dot next to "41+ Years Experience" */

/* ------------------------------------------------------------
   6. ABOUT SECTION — content divider only (subtle)
   ------------------------------------------------------------ */
.about-section .content-box .text{
    position: relative;
    padding-bottom: 20px;
}
.about-section .content-box .text::after{
    content:'';
    position:absolute;
    left:0;
    bottom:0;
    width:100%;
    height:2px;
    background-color: rgba(212,0,0,0.12);
    background-image: linear-gradient(90deg,
        transparent 0%,
        var(--circuit-red) 42%,
        var(--circuit-orange) 50%,
        var(--circuit-red) 58%,
        transparent 100%);
    background-repeat: no-repeat;
    background-size: 45% 100%;
    background-position: -45% 0;
    animation: circuitCurrentFlow 2.4s linear infinite;
}
/* ------------------------------------------------------------
   7. QUALITY & INFRASTRUCTURE BOX — two dots traveling the
   border, one full lap opposite each other, slower + fading
   at corners.
   ------------------------------------------------------------ */
.quality-box{
    position: relative !important;
    border: 1px solid rgba(212,0,0,0.15) !important;
}

.quality-box::before,
.quality-box::after{
    content:'' !important;
    position:absolute !important;
    top:0; left:0;
    width:10px;
    height:10px;
    margin:-5px 0 0 -5px;
    border-radius:50%;
    background: var(--circuit-red) !important;
    box-shadow: 0 0 10px 3px var(--circuit-glow) !important;
    offset-path: inset(0 round 12px) !important;
    z-index: 5 !important;
    pointer-events: none !important;
}

/* DOT 1 */
.quality-box::before{
    animation: circuitDotTravel1 16s linear infinite,
               circuitDotFade 4s ease-in-out infinite !important;
}

/* DOT 2 — starts on the opposite side of the box */
.quality-box::after{
    animation: circuitDotTravel2 16s linear infinite,
               circuitDotFade 4s ease-in-out infinite !important;
}

@keyframes circuitDotTravel1{
    0%   { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

@keyframes circuitDotTravel2{
    0%   { offset-distance: 50%; }
    100% { offset-distance: 150%; }
}

@keyframes circuitDotFade{
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.2; }
}
/* ------------------------------------------------------------
   8. MANUFACTURING PROCESS TABS — single dot traveling down
   each vertical divider, staggered so they don't move together.
   ------------------------------------------------------------ */
.tab-btns.tab-buttons{
    position: relative;
}

.tab-btns.tab-buttons > li{
    position: relative;
}

/* Static vertical line on the right edge of each tab */
.tab-btns.tab-buttons > li::before{
    content:'' !important;
    position:absolute !important;
    top:0;
    right:0;
    width:1px;
    height:100%;
    background: rgba(212,0,0,0.15) !important;
    z-index: 1;
    pointer-events: none;
}

/* Traveling dot on that same line */
.tab-btns.tab-buttons > li::after{
    content:'' !important;
    position:absolute !important;
    right:-4px;
    top:0;
    width:9px;
    height:9px;
    border-radius:50%;
    background: rgb(250, 92, 92) !important;
    box-shadow: rgb(241, 149, 149) !important;
    animation: circuitDotVertical 3s linear infinite !important;
    z-index: 2;
    pointer-events: none;
}

/* Stagger each tab's dot so they travel out of sync */
.tab-btns.tab-buttons > li:nth-child(1)::after{ animation-delay: 0s !important; }
.tab-btns.tab-buttons > li:nth-child(2)::after{ animation-delay: .6s !important; }
.tab-btns.tab-buttons > li:nth-child(3)::after{ animation-delay: 1.2s !important; }
.tab-btns.tab-buttons > li:nth-child(4)::after{ animation-delay: 1.8s !important; }
.tab-btns.tab-buttons > li:nth-child(5)::after{ animation-delay: 2.4s !important; }

/* Explicitly kill both line and dot on the LAST tab specifically,
   using the same selector weight + order as the rules that create
   them, so this actually wins instead of being silently overridden */
.tab-btns.tab-buttons > li:last-child::before{
    content: none !important;
    background: none !important;
}
.tab-btns.tab-buttons > li:last-child::after{
    content: none !important;
    animation: none !important;
    background: none !important;
    box-shadow: none !important;
}

@keyframes circuitDotVertical{
    0%   { top: 0%; }
    100% { top: 100%; }
}
/* ------------------------------------------------------------
   9. SERVICES SECTION — dot orbiting the OUTER circle ring
   ------------------------------------------------------------ */
.service-block-one .image-box{
    position: relative;
}

.service-block-one .image-box .orbit-dot-wrap{
    position: absolute;
    inset: -18px !important;   /* pushes the orbit out to the outer ring */
    animation: circuitOrbitSpin 4s linear infinite;
    pointer-events: none;
    z-index: 3;
}

.service-block-one .image-box .orbit-dot-wrap::after{
    content:'';
    position: absolute;
    top: 0;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: var(--circuit-red);
    box-shadow: 0 0 8px 2px var(--circuit-glow);
    animation: circuitOrbitFade 4s ease-in-out infinite;
}

/* Stagger the 3 service circles so they don't spin in sync */
.service-block:nth-child(1) .orbit-dot-wrap{ animation-delay: 0s; }
.service-block:nth-child(2) .orbit-dot-wrap{ animation-delay: 1.3s; }
.service-block:nth-child(3) .orbit-dot-wrap{ animation-delay: 2.6s; }
.service-block:nth-child(1) .orbit-dot-wrap::after{ animation-delay: 0s; }
.service-block:nth-child(2) .orbit-dot-wrap::after{ animation-delay: 1.3s; }
.service-block:nth-child(3) .orbit-dot-wrap::after{ animation-delay: 2.6s; }

@keyframes circuitOrbitSpin{
    to { transform: rotate(360deg); }
}

@keyframes circuitOrbitFade{
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; }
}
/* ------------------------------------------------------------
   10. VIDEO SECTION — faded red overlay on background image
   Applied via ::before on .video-section itself (NOT .bg-layer,
   which must keep its original position:absolute + inset:0 to
   stay full-bleed — touching it collapses the section to 0 height).
   ------------------------------------------------------------ */
.video-section{
    position: relative;
}

.video-section::before{
    content:'';
    position:absolute;
    inset:0;
    background: linear-gradient(
        135deg,
        rgba(248, 53, 53, 0.55) 0%,
        rgba(248, 67, 67, 0.35) 45%,
        rgba(0,0,0,0.55) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.video-section .auto-container{
    position: relative;
    z-index: 2;
}