/*!
 * site.css — the small amount of CSS the rebuild needs on top of the original
 * stylesheets. Everything that the theme already styles is left alone; this file
 * only covers what used to come from the jQuery plugins (Revolution Slider's
 * generated DOM, Cube Portfolio's modal, Owl Carousel's stage, the mobile menu).
 *
 * Load order: original.css -> site.css -> tailwind.css
 */

/* ===========================================================================
   1. Hero slider (replaces Revolution Slider's runtime-generated markup)
   ---------------------------------------------------------------------------
   The captured markup is <div class="fullscreenbanner"><ul><li>…</li></ul></div>
   inside .mainblock, which screen.css already sizes to 100vh.
   =========================================================================== */

.fullscreenbanner-container,
.fullscreenbanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.fullscreenbanner > ul {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fullscreenbanner > ul > li {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  /* the theme sets visibility:hidden on these list items; the slider toggles
     the class below, so restore normal visibility */
  visibility: visible;
  opacity: 0;
  z-index: 1;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity var(--rs-duration, 700ms) ease-in-out;
  pointer-events: none;
}

.fullscreenbanner > ul > li.rs-slide-active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

/* the <img> that acted as Revolution's cover background must not render as an
   inline image on top of the slide */
.fullscreenbanner > ul > li > .rs-bg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

/* Revolution's "twoxtwo" dotted overlay, kept as a subtle dark scrim so the
   white headline copy over the slider keeps the same contrast as the original */
#OpeningMediaBlock .sliderMedia::after,
.mainblock > .main-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 3;
}

.fullscreenbanner > ul > li.rs-slide-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  border: 0;
}

/* --- navigation: preview4 arrows + uranus bullets (from the inline config) --- */

.rs-nav {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.rs-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
}

.rs-arrow {
  position: absolute;
  top: 0;
  display: block;
  width: 30px;
  height: 110px;
  cursor: pointer;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease-in-out;
  font-family: "revicons";
  font-size: 20px;
  line-height: 110px;
  text-align: center;
  color: #fff;
  text-decoration: none;
}

.rs-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

.rs-prev {
  left: 0;
}

.rs-next {
  right: 0;
}

/* revicons glyphs used by preview4: \e824 = left, \e825 = right */
.rs-prev::after {
  content: "\e824";
}

.rs-next::after {
  content: "\e825";
}

/* uranus bullets: vertical stack on the left, 30px offset, in the original
   config h_align:left / v_align:center / h_offset:30 / direction:vertical */
.rs-bullets {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
}

.rs-bullet {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.rs-bullet:hover,
.rs-bullet-active {
  background: #fff;
}

/* the theme's .tp-bullets rule also targets the bottom-left 20px position on
   small screens; mirror that with our own class so the two agree */
@media screen and (max-width: 991px) {
  .rs-bullets {
    left: auto;
    right: 50px;
    top: 190px;
    transform: none;
  }
  .rs-arrow {
    display: none;
  }
}

/* the banner timer element stays hidden: the original config disables it */
.tp-bannertimer {
  display: none !important;
}

/* ===========================================================================
   2. Gallery lightbox (Cube Portfolio opened a zoomed image)
   =========================================================================== */
.rs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.88);
}

.rs-lightbox.is-open {
  display: flex;
}

.lightbox-open,
.mobile-nav-open {
  overflow: hidden;
}

.rs-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  text-align: center;
}

.rs-lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
}

.rs-lightbox-figure figcaption {
  color: #fff;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-top: 15px;
}

.rs-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

/* filtered-out gallery items */
.cbp-item.cbp-item-hidden {
  display: none;
}

/* Cube Portfolio normally puts a .cbp class on the grid wrapper; the captured
   markup only has .cube-portfolio > #grid-container.cbp-l-grid-agency, so the
   plugin's own image/overflow rules never matched. Restore them here:
     .cbp img { display:block; width:100%; height:auto }
     .cbp .cbp-item { overflow:hidden }
*/
.cube-portfolio #grid-container img {
  display: block;
  width: 100%;
  height: auto;
}

.cube-portfolio #grid-container .cbp-item {
  overflow: hidden;
}

.cube-portfolio #grid-container .cbp-caption,
.cube-portfolio #grid-container .cbp-caption-defaultWrap {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* the plugin wrote inline left/top per item; make the transition match */
.cube-portfolio #grid-container .cbp-item {
  transition: left 0.35s ease, top 0.35s ease, width 0.35s ease;
}

.cbp-item-animate {
  animation: cbp-fade-in 0.35s ease;
}

@keyframes cbp-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* ===========================================================================
   3. Services carousel (Owl Carousel 2 stage, rebuilt in vanilla JS)
   =========================================================================== */
.our-services-list.owl-loaded {
  position: relative;
}

.our-services-list .owl-stage-outer {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.our-services-list .owl-stage {
  position: relative;
  display: block;
  will-change: transform;
}

.our-services-list .owl-stage::after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

.our-services-list .owl-item {
  float: left;
  box-sizing: border-box;
}

.our-services-list .owl-controls {
  position: relative;
  /* the original Owl instance exposes no controls on this slider (nav:true,
     dots:false, but the arrows are repositioned by screen.css and collapse to
     0px). A 20px top margin here grew the whole section by 20px. */
  margin-top: 0;
}

.our-services-list .owl-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.our-services-list .owl-prev,
.our-services-list .owl-next {
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: #332927;
  color: #fff;
  text-align: center;
  line-height: 40px;
  font-family: "revicons";
  font-size: 16px;
  transition: background 0.3s ease;
}

.our-services-list .owl-prev:hover,
.our-services-list .owl-next:hover {
  background: #f8991c;
}

.our-services-list .owl-prev::after {
  content: "\e824";
}

.our-services-list .owl-next::after {
  content: "\e825";
}

/* ===========================================================================
   4. Mobile menu (the original used Bootstrap's collapse inside
   .superMenuHide; below 992px it is now driven by our own panel)
   =========================================================================== */
.mobile-nav-toggle {
  display: none;
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 34px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 20;
}

.mobile-nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  margin-bottom: 6px;
  background: #fff;
  transition: background 0.2s ease;
}

.mobile-nav-toggle span:last-child {
  margin-bottom: 0;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 86vw;
  padding: 24px 18px;
  background: #332927;
  overflow-y: auto;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  visibility: hidden;
}

.mobile-nav-panel.is-open {
  transform: none;
  visibility: visible;
}

.mobile-nav-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-panel li {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav-panel a {
  display: block;
  padding: 12px 0;
  color: #fff;
  text-decoration: none;
}

.mobile-nav-panel a span {
  color: inherit;
}

.mobile-nav-panel li > ul {
  display: none;
  padding-left: 14px;
}

.mobile-nav-panel li.is-expanded > ul {
  display: block;
}

.mobile-nav-close {
  display: block;
  margin-left: auto;
  padding: 0 4px 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.submenu-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.submenu-toggle::before {
  content: "+";
  font-size: 18px;
  line-height: 44px;
}

li.is-expanded > .submenu-toggle::before {
  content: "\2013";
}

@media screen and (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
  }
}

/* ===========================================================================
   5. Back to top (the original used the theme's #topcontrol button)
   =========================================================================== */
.js-back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  background: #332927;
  color: #fff;
  border-radius: 3px;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
}

.js-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.js-back-to-top:hover {
  background: #f8991c;
  color: #fff;
}

/* ===========================================================================
   6. Contact triggers (the original revealed the number on hover; keep the
   hover reveal, and allow it to stay open on touch after a tap)
   =========================================================================== */
@media (hover: none) {
  #contactTrig_s li.is-revealed span.contact_to_Trigger {
    left: 0;
    top: 40px;
    opacity: 1;
    letter-spacing: 1px;
  }
}

/* ===========================================================================
   7. Form feedback (Sky Forms markup, validated by our own script)
   =========================================================================== */
.sky-form .state-error input,
.sky-form .state-error textarea {
  border-color: #e74c3c;
}

.sky-form .error-message {
  display: block;
  color: #e74c3c;
  font-size: 12px;
  padding-top: 4px;
}

.sky-form .message {
  display: none;
}

.sky-form .message.is-visible {
  display: block;
}
