/* ==========================================================================
   Cuts-N-Stuff — shared header/footer chrome additions
   Mirrors the About Us dropdown already defined in the header template's own
   CSS, but keyed to classes so any further dropdown works without new rules.
   ========================================================================== */

#cns-header-inner .cns-nav-drop{
  position:relative;display:block;width:auto;flex:0 0 auto;padding:0;margin:0;
}
#cns-header-inner .cns-nav-drop>p{margin:0;}
.cns-nav-drop>p>a::after{
  content:"";display:inline-block;width:6px;height:6px;margin:0 0 3px 8px;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);transition:transform .18s ease;
}
.cns-nav-drop:hover>p>a::after,
.cns-nav-drop:focus-within>p>a::after{transform:translateY(3px) rotate(225deg);}

#cns-header-inner .cns-nav-subnav{
  position:absolute;top:calc(100% + 12px);left:50%;z-index:50;
  display:block;width:auto;min-width:232px;margin:0;padding:8px 0;
  background:var(--cns-cream,#FFF8E9);
  border:1px solid rgba(102,0,51,.14);border-radius:14px;
  box-shadow:0 14px 30px rgba(102,0,51,.16);
  opacity:0;visibility:hidden;transform:translate(-50%,-6px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
}
/* Invisible bridge over the 12px gap so the menu stays open while the pointer
   crosses it. */
.cns-nav-subnav::before{content:"";position:absolute;left:0;right:0;top:-14px;height:14px;}
.cns-nav-drop:hover .cns-nav-subnav,
.cns-nav-drop:focus-within .cns-nav-subnav{opacity:1;visibility:visible;transform:translate(-50%,0);}

#cns-header-inner .cns-nav-subnav p{line-height:1.5;margin:0;white-space:nowrap;}
#cns-header-inner .cns-nav-subnav p a{display:block;padding:9px 22px;}
#cns-header-inner .cns-nav-subnav p a:hover{background:rgba(248,214,122,.45);}

/* "All Services" sits under a hairline as the way back to the full menu. */
#cns-header-inner .cns-nav-subnav-all{
  margin-top:6px;padding-top:6px;border-top:1px solid rgba(102,0,51,.14);
}
#cns-header-inner .cns-nav-subnav-all a{font-weight:600;}

@media(max-width:1024px){
  /* In the burger menu the children are simply listed, indented, under the parent. */
  #cns-header-inner .cns-nav-drop{width:100%;}
  .cns-nav-drop>p>a::after{display:none;}
  #cns-header-inner .cns-nav-subnav{
    position:static;min-width:0;margin:0 0 6px 2px;padding:0 0 0 16px;
    background:none;border:0;border-left:1px solid rgba(102,0,51,.28);
    border-radius:0;box-shadow:none;opacity:1;visibility:visible;
    transform:none;transition:none;white-space:normal;
  }
  .cns-nav-subnav::before{display:none;}
  #cns-header-inner .cns-nav-subnav p{font-size:15px;line-height:38px;}
  #cns-header-inner .cns-nav-subnav p a{display:inline;padding:0;}
  #cns-header-inner .cns-nav-subnav p a:hover{background:none;}
  #cns-header-inner .cns-nav-subnav-all{border-top:0;margin-top:0;padding-top:0;}
}

/* ------------------------------------------------------------ footer credit */

/* The bottom bar's own text is coloured by Elementor's per-element styles,
   which a raw HTML widget cannot inherit — hence the explicit colour here, and
   the class+id selector so it outranks any `#id p` rule from the template. */
.cns-chrome-footer #cns-foot-credit{
  margin:0;
  font-family:var(--cns-sans,"Helvetica Now Display","Helvetica Neue",Arial,sans-serif);
  font-size:15px;line-height:1.5;letter-spacing:.01em;
  color:rgba(255,255,255,.6);
}
.cns-chrome-footer #cns-foot-credit a{
  color:rgba(255,255,255,.82);
  text-decoration:none;border-bottom:0;padding:0;
  transition:color .18s ease;
}
.cns-chrome-footer #cns-foot-credit a:hover,
.cns-chrome-footer #cns-foot-credit a:focus-visible{
  color:var(--cns-gold,#F8D67A);
  text-decoration:underline;text-underline-offset:3px;
}

/* ------------------------------------------------------- hero star twinkle
   The sparkles are painted as pseudo-element background layers by the home
   page's own CSS, so nothing here changes the markup.
   Selectors double the id so they outrank post-4131.css whatever the load
   order; the keyframes themselves always win over normal declarations.
   Everything is wrapped in prefers-reduced-motion so a visitor who has asked
   their system for less movement still gets the static composition. */

@media (prefers-reduced-motion: no-preference){

  /* The grid texture is left exactly as the page's own CSS paints it — moving it
     meant resizing its layer, which changed how the lines read. */

  /* --- the four-point stars: each of the three background layers pulses on its
     own beat. Desktop positions are absolute, so the position list is nudged in
     step with the size list to keep every star pulsing about its own centre. --- */
  @media (min-width:1025px){
    #cns-hero-inner#cns-hero-inner::before{
      will-change:background-size;
      animation:cns-twinkle 9s ease-in-out infinite;
    }
    @keyframes cns-twinkle{
      0%,100%{
        background-size:calc(74*var(--u)) calc(74*var(--u)),calc(52*var(--u)) calc(52*var(--u)),calc(50*var(--u)) calc(50*var(--u));
        background-position:calc(1206*var(--u)) calc(74*var(--u)),calc(1254*var(--u)) calc(564*var(--u)),calc(768*var(--u)) calc(216*var(--u));
      }
      18%{
        background-size:calc(56*var(--u)) calc(56*var(--u)),calc(52*var(--u)) calc(52*var(--u)),calc(50*var(--u)) calc(50*var(--u));
        background-position:calc(1215*var(--u)) calc(83*var(--u)),calc(1254*var(--u)) calc(564*var(--u)),calc(768*var(--u)) calc(216*var(--u));
      }
      40%{
        background-size:calc(74*var(--u)) calc(74*var(--u)),calc(52*var(--u)) calc(52*var(--u)),calc(38*var(--u)) calc(38*var(--u));
        background-position:calc(1206*var(--u)) calc(74*var(--u)),calc(1254*var(--u)) calc(564*var(--u)),calc(774*var(--u)) calc(222*var(--u));
      }
      60%{
        background-size:calc(74*var(--u)) calc(74*var(--u)),calc(52*var(--u)) calc(52*var(--u)),calc(50*var(--u)) calc(50*var(--u));
        background-position:calc(1206*var(--u)) calc(74*var(--u)),calc(1254*var(--u)) calc(564*var(--u)),calc(768*var(--u)) calc(216*var(--u));
      }
      78%{
        background-size:calc(74*var(--u)) calc(74*var(--u)),calc(39*var(--u)) calc(39*var(--u)),calc(50*var(--u)) calc(50*var(--u));
        background-position:calc(1206*var(--u)) calc(74*var(--u)),calc(1260*var(--u)) calc(570*var(--u)),calc(768*var(--u)) calc(216*var(--u));
      }
    }
  }

  /* Below 1025px the stars are positioned in percentages against a square
     overlay, so the percentages re-centre them on their own and only the size
     list needs to move. */
  @media (max-width:1024px){
    #cns-hero-inner#cns-hero-inner::before{
      will-change:background-size;
      animation:cns-twinkle-fluid 9s ease-in-out infinite;
    }
    @keyframes cns-twinkle-fluid{
      0%,100%{ background-size:10.08% auto,7.08% auto,6.81% auto; }
      18%    { background-size:7.60%  auto,7.08% auto,6.81% auto; }
      40%    { background-size:10.08% auto,7.08% auto,5.20% auto; }
      60%    { background-size:10.08% auto,7.08% auto,6.81% auto; }
      78%    { background-size:10.08% auto,5.40% auto,6.81% auto; }
    }
  }
}
