/* NPC — gallery styles extracted from active Custom CSS RTF.
   Preserve loading, positioning, caption, and navigation behavior. */


/* NPC — Stage galleries 20% smaller
   on mobile landscape only */

@media screen and (orientation: landscape)
  and (max-height: 500px)
  and (max-width: 950px) {

  .post-gallery-wrap.stage {
    width: 80% !important;
    max-width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

}




/* NPC Desktop Stage Gallery H3 Titles Tighter Leading */

@media screen and (min-width: 1025px) {
  .post-gallery-wrap.stage
  .title.caption.skinset-main.nv-skin h3 {
    letter-spacing: 0px !important;
  }
}


/* =======PORTFOLIO GALLERIES ===== */

/* Caption Styling */

@media screen and (min-width: 1025px) {
  .post-gallery-wrap.stage
  .stage-slider > .panel.current
  .caption-wrap.caption-hover {
    position: fixed !important;
    top: auto !important;
    bottom: 100px !important;
    transform: none !important;
    z-index: 100 !important;
  }
}

/* Light gray caption backgrounds */
.post-gallery-wrap.stage
.title.caption.skinset-main.nv-skin,
.post-gallery-wrap.stage
.content.caption.skinset-main.nv-skin {
    background-color: #f8f8f8 !important;
}

/* Headline right spacing */
.post-gallery-wrap.stage
.title.caption.skinset-main.nv-skin h3 {
    padding-right: 30px !important;
    box-sizing: border-box;
}

/* Body copy right spacing */
.post-gallery-wrap.stage
.content.caption.skinset-main.nv-skin {
    padding-right: 30px !important;
    box-sizing: border-box;
}

/* Vertical Centering */

@media screen and (min-width: 1025px) {

  body:not(.home)
  .vc_row:has(.post-gallery-wrap.stage)
  > .wpb_column > .vc_column-inner {

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;

    min-height: calc(100vh - 50px) !important;
  }

  /* Preserve the wrapper's full width */
  body:not(.home)
  .vc_row:has(.post-gallery-wrap.stage)
  > .wpb_column > .vc_column-inner
  > .wpb_wrapper {

    width: 100% !important;
  }
}

/* Reserve gallery space immediately */
body:not(.home) .post-gallery-wrap.stage {
  width: 100%;
  aspect-ratio: 2600 / 1362;
}

/* Prevent the stage container from expanding or collapsing during loading */
body:not(.home)
.post-gallery-wrap.stage > .slider-inner-wrap {
  width: 100%;
  height: auto !important;
  aspect-ratio: 2600 / 1362;
  animation: none !important;
  transition: none !important;
}

/* Hide slides until ePix selects the active one */
body:not(.home)
.post-gallery-wrap.stage
.stage-slider:not(:has(> .panel.current)) {
  visibility: hidden !important;
}


/* Hide Stage gallery navigation arrows on mobile only */
@media screen and (max-width: 767px) {
    .post-gallery-wrap.stage .slidernav {
        display: none !important;
    }
}

/* Keep gallery rows above surrounding content */
.vc_row:has(.post-gallery-wrap.gallery-wrap) {
  position: relative !important;
  z-index: 100 !important;
  overflow: visible !important;
}

/* Prevent gallery from clipping navigation dots */
.post-gallery-wrap.gallery-wrap {
  position: relative !important;
  z-index: 101 !important;
  overflow: visible !important;
}

/* Move carousel dots up 43px */
.post-gallery-wrap.gallery-wrap > .control-wrap {
  transform: translateY(-43px) !important;
  z-index: 9999 !important;
  overflow: visible !important;
}

/* Preserve original dot alignment */
.post-gallery-wrap.gallery-wrap .control-panel {
  transform: none !important;
}

/* Keep slides contained */
.post-gallery-wrap.gallery-wrap > .slider-inner-wrap {
  overflow: hidden !important;
}

/* Carousel Dot Colors */

/* Unselected dots — Gray */
.gallery-wrap .control-panel ul li:not(.activeSlide) a,
.gallery-wrap .control-panel ul li:not(.activeSlide) a::before,
.gallery-wrap .control-panel ul li:not(.activeSlide) a:hover::before,
.gallery-wrap .control-panel ul li:not(.activeSlide) a:focus::before {
  color: #cccccc !important;
}

/* Selected dot — Nick Porter Creative Blue */
.gallery-wrap .control-panel ul li.activeSlide a,
.gallery-wrap .control-panel ul li.activeSlide a::before,
.gallery-wrap .control-panel ul li.activeSlide a:hover::before,
.gallery-wrap .control-panel ul li.activeSlide a:focus::before {
  color: #437fc1 !important;
}

/* No shadows on external-link overlays */
a.action-icons.link-icon,
a.action-icons.link-icon .fa,
a.action-icons.link-icon .fa::before {
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
}


/* Hide only the chain icon; keep the full-image external link clickable. */
a.action-icons.link-icon i.fa-link {
  display: none !important;
}

/* Make the otherwise invisible overlay discoverable when tabbing by keyboard. */
a.action-icons.link-icon:focus-visible {
  outline: 3px solid #437FC1 !important;
  outline-offset: -3px;
}


/* Only bottom-left 250px × 25px of gallery images clickable */
.title-wrap > a.action-icons.link-icon {
    -webkit-clip-path: inset(
        calc(100% - 25px)
        calc(100% - 250px)
        0
        0
    );
    clip-path: inset(
        calc(100% - 25px)
        calc(100% - 250px)
        0
        0
    );
}

/* NPC — Mobile Stage Gallery Top Spacing */

@media screen and (max-width: 767px) {
  body:not(.home) .post-gallery-wrap.stage {
    margin-top: 15px !important;
  }
}


/* ==========================================
   NPC MOBILE STAGE GALLERY CAPTIONS
   60% screen width
   Bottom-right positioning
   60px from bottom
   24px headline / 9px body copy
   Light gray background #F7F7F7
   ========================================== */

@media only screen and (max-width: 767px) {

  /* Caption positioning and width */
  .post-gallery-wrap.stage
  .stage-slider > .panel.current
  .caption-wrap.caption-hover {
    display: block !important;
    position: fixed !important;
    top: auto !important;
    bottom: 60px !important;
    left: auto !important;
    right: 16px !important;
    width: 60vw !important;
    max-width: calc(100vw - 32px) !important;
    height: auto !important;
    overflow: visible !important;
    transform: none;
    z-index: 100 !important;
  }

  /* Shared caption styling */
  .post-gallery-wrap.stage
  .title.caption.skinset-main.nv-skin,
  .post-gallery-wrap.stage
  .content.caption.skinset-main.nv-skin {
    display: block !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: break-word;
    box-sizing: border-box !important;
    background-color: #f7f7f7 !important;
    margin: 0 !important;
  }

  /* Heading — tight bottom spacing */
  .post-gallery-wrap.stage
  .title.caption.skinset-main.nv-skin {
    padding: 8px 12px 2px !important;
  }

  /* Headline text — 20px */
  .post-gallery-wrap.stage
  .title.caption.skinset-main.nv-skin h3 {
    font-size: 20px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Body copy — 8px, tighter line spacing */
  .post-gallery-wrap.stage
  .content.caption.skinset-main.nv-skin {
    font-size: 8px !important;
    line-height: 1.3 !important;
    padding: 0 12px 10px !important;
  }
}



/* ==========================================
   NPC STAGE GALLERIES
   Hide custom captions in mobile landscape
   ========================================== */

@media screen and (orientation: landscape)
       and (max-width: 1024px)
       and (max-height: 500px) {

  .post-gallery-wrap.stage
  .stage-slider > .panel.current
  .caption-wrap.caption-hover {
    display: none !important;
  }

}


/* =========================================================
   NPC — ALWAYS-VISIBLE DESKTOP CAROUSEL / STAGE ARROWS
   Only the left/right navigation is affected. Do not change
   the dots or hover-triggered captions / gallery overlays.
   Phones and tablets keep their existing behavior.
   ========================================================= */
@media screen and (min-width: 1025px) {
  .post-gallery-wrap.gallery-wrap .slidernav-left,
  .post-gallery-wrap.gallery-wrap .slidernav-right {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .post-gallery-wrap.gallery-wrap .slidernav-left .slidernav,
  .post-gallery-wrap.gallery-wrap .slidernav-right .slidernav,
  .post-gallery-wrap.gallery-wrap .slidernav-left a,
  .post-gallery-wrap.gallery-wrap .slidernav-right a {
    visibility: visible !important;
    opacity: 1 !important;
  }
}


/* NPC v1.1.18 — Move the entire Stage gallery 40px lower on tablets.
   Apply to the outer gallery so slides, navigation arrows and dots move together.
   Phone and non-touch desktop positions remain unchanged. */
@media screen and (min-width: 768px) and (max-width: 1024px),
       screen and (min-width: 1025px) and (max-width: 1366px) and (pointer: coarse) {
  body .post-gallery-wrap.stage {
    margin-top: 40px !important;
  }
}


/* ============================================================
   NPC v1.1.27 — About page, tablet tabs and introductory text.
   Twenty-pixel component side padding, with WPBakery offsets neutralized
   ONLY for the row containing .npc-about-tabs. The hero is untouched.
   ============================================================ */
@media screen and (min-width: 768px) and (max-width: 1024px),
       screen and (min-width: 1025px) and (max-width: 1366px) and (pointer: coarse) {
  /* WPBakery rows often use negative gutters; remove them locally. */
  body .vc_row:has(.vc_tta.npc-about-tabs) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  body .vc_row:has(.vc_tta.npc-about-tabs) > .wpb_column,
  body .vc_row:has(.vc_tta.npc-about-tabs) > .wpb_column > .vc_column-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  body .vc_tta.npc-about-tabs {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
  }
  body .vc_tta.npc-about-tabs > .vc_tta-tabs-container,
  body .vc_tta.npc-about-tabs > .vc_tta-panels-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  body .vc_tta.npc-about-tabs > .vc_tta-tabs-container > .vc_tta-tabs-list {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    column-gap: 10px !important;
    row-gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body .vc_tta.npc-about-tabs .vc_tta-tabs-list > .vc_tta-tab {
    float: none !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  body .vc_tta.npc-about-tabs .vc_tta-tabs-list > .vc_tta-tab a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 60px !important;
    padding: 12px 18px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  body .vc_tta.npc-about-tabs .vc_tta-tabs-list .vc_tta-title-text {
    font-size: 16px !important;
  }
  body .npc-about-tabs .npc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* Intro stays centered, with 20px on each side. */
  body:has(.npc-about-tabs) .wpb_text_column:has(h1),
  body:has(.npc-about-tabs) .wpb_text_column:has(h1) + .wpb_text_column {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
}


/* ============================================================
   NPC v1.1.28 — Tablet portrait stage gallery vertical centering.
   Keep mobile portrait, tablet landscape, and desktop unchanged.
   Works with the existing tablet gallery 40px margin-top rule.
   ============================================================ */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait),
       screen and (min-width: 1025px) and (max-width: 1366px) and (orientation: portrait) and (pointer: coarse) {

  body:not(.home)
  .vc_row:has(.post-gallery-wrap.stage)
  > .wpb_column > .vc_column-inner {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: clamp(450px, calc(100svh - 500px), 850px) !important;
  }

  body:not(.home)
  .vc_row:has(.post-gallery-wrap.stage)
  > .wpb_column > .vc_column-inner
  > .wpb_wrapper {
    width: 100% !important;
  }
}


/* NPC v1.1.29 — tablet portrait: lift entire stage gallery 20px.
   Overrides the existing 40px tablet offset with 20px, keeping
   slide images, dots, and arrows together. Landscape unchanged. */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait),
       screen and (min-width: 1025px) and (max-width: 1366px) and (orientation: portrait) and (pointer: coarse) {
  body .post-gallery-wrap.stage {
    margin-top: 20px !important;
  }
}

/* v1.1.134 — Stage captions on desktop: title and description
   share right alignment without changing their containers or animation. */
body .post-gallery-wrap.stage .caption-wrap.caption-hover > .title.caption,
body .post-gallery-wrap.stage .caption-wrap.caption-hover > .content.caption,
body .post-gallery-wrap.stage .caption-wrap.caption-hover > .title.caption *,
body .post-gallery-wrap.stage .caption-wrap.caption-hover > .content.caption * {
  text-align: right !important;
}
