/* Stability fallback: prevent template animated blocks from staying hidden */
.appear-animation,
.appear-animation-visible {
  opacity: 1 !important;
  visibility: visible !important;
}

.so-honeypot-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Keep content visible if owl init timing is delayed */
.owl-carousel {
  display: block;
  visibility: visible;
}

/* Make the homepage hero visible even before Owl initializes */
.owl-carousel.owl-carousel-light-init-fadeIn {
  opacity: 1 !important;
}

.owl-carousel.owl-carousel-light-init-fadeIn .owl-stage-outer,
.owl-carousel.owl-carousel-light-init-fadeIn .owl-stage,
.owl-carousel.owl-carousel-light-init-fadeIn .owl-item {
  display: block !important;
  width: 100% !important;
}

.owl-carousel.owl-carousel-light-init-fadeIn .owl-item {
  margin-bottom: 0 !important;
}

/* Site header: transparent overlay navbar across every page */
#header.so-site-header {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0));
  border-bottom: 0;
  box-shadow: none;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.so-nav-shell {
  /* NAV HEIGHT: this controls the transparent overlay navbar height. */
  align-items: center;
  display: flex;
  gap: 2rem;
  height: 92px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1320px;
  padding: 0 24px;
  width: 100%;
}

.so-brand {
  /* LOGO BOX: change width/height here when you want the logo larger or smaller. */
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 76px;
  margin-top: 20px;
  width: 184px;
}

.so-brand img {
  /* LOGO IMAGE: keep these matched to .so-brand so the image does not shrink. */
  display: block;
  height: 76px;
  object-fit: contain;
  width: 184px;
}

.so-main-nav {
  /* MENU LAYOUT: gap controls spacing between Home/Company/Services/etc. */
  align-items: center;
  display: flex;
  gap: 2.4rem;
  justify-content: center;
  margin-left: auto;
}

.so-menu-toggle {
  /* MOBILE HAMBURGER: hidden on desktop, shown on tablet/phone below. */
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.so-menu-toggle span {
  background: #ffffff;
  border-radius: 999px;
  display: block;
  height: 3px;
  transition: transform 180ms ease, opacity 180ms ease;
  width: 25px;
}

.so-main-nav a {
  /* MENU TEXT: color and font size for the nav links. */
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.so-main-nav a:hover,
.so-main-nav a:focus,
.so-main-nav a.active {
  color: #d94e2f;
}

.so-nav-cta {
  /* NAV CTA BUTTON: header "Get a Quote" button style. */
  align-items: center;
  background: #d94e2f;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(217, 78, 47, 0.22);
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 0.75rem 1.35rem;
  text-decoration: none;
  white-space: nowrap;
}

.so-nav-cta:hover,
.so-nav-cta:focus {
  background: #c84428;
  color: #ffffff;
}

@media (max-width: 991px) {
  .so-nav-shell {
    flex-wrap: wrap;
    gap: 0.75rem;
    height: auto;
    min-height: 74px;
    padding-bottom: 10px;
    padding-top: 10px;
  }

  .so-brand,
  .so-brand img {
    height: 56px;
    width: 136px;
  }

  .so-brand {
    margin-top: 10px;
  }

  .so-menu-toggle {
    display: inline-flex;
  }

  .so-main-nav {
    /* MOBILE MENU PANEL: closed by default; opens when hamburger adds .is-menu-open. */
    background: rgba(17, 17, 17, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: none;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    order: 3;
    padding: 8px 0 4px;
    width: 100%;
  }

  .so-site-header.is-menu-open .so-main-nav {
    display: flex;
  }

  .so-main-nav a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    display: block;
    font-size: 16px;
    padding: 16px 4px;
    width: 100%;
  }

  .so-nav-cta {
    display: none;
  }

  .so-site-header.is-menu-open .so-menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .so-site-header.is-menu-open .so-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .so-site-header.is-menu-open .so-menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (min-width: 992px) {
  .so-site-header .so-main-nav {
    display: flex !important;
  }

  .so-site-header .so-menu-toggle {
    display: none !important;
  }
}

@media (min-width: 992px) and (max-width: 1180px) {
  .so-nav-shell {
    gap: 1.25rem;
  }

  .so-main-nav {
    gap: 1.45rem;
  }

  .so-nav-cta {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 575px) {
  .so-nav-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .so-brand,
  .so-brand img {
    height: 48px;
    width: 118px;
  }
}

@media (max-width: 380px) {
  .so-brand,
  .so-brand img {
    height: 44px;
    width: 108px;
  }
}

/* Compact site spacing: global controls for the large template gaps */
.main > .container,
.main > .section:not(.home-hero-carousel) > .container,
.main > div.container {
  /* SECTION INNER SPACE: top/bottom padding for most main content blocks. */
  padding-bottom: 2.75rem !important;
  padding-top: 2.75rem !important;
}

.main .section:not(.home-hero-carousel) {
  /* SECTION OUTER SPACE: top/bottom padding for Porto section blocks. */
  padding-bottom: 2.75rem !important;
  padding-top: 2.75rem !important;
}

.main .section-height-3 {
  /* INNER PAGE HERO HEIGHT: controls Company/Services/Projects/Contact page title bands. */
  min-height: 220px !important;
}

.main .section-height-3 .container {
  margin-bottom: 1.5rem !important;
  margin-top: 1.5rem !important;
  padding-bottom: 1.75rem !important;
  padding-top: 1.75rem !important;
}

.main .so-page-hero {
  background-color: #f3f3f3;
  background-position: center;
  background-size: cover;
  min-height: 320px !important;
  position: relative;
}

.main .so-page-hero::before {
  background: rgba(255, 255, 255, 0.2);
  content: "";
  inset: 0;
  position: absolute;
  z-index: 0;
}

.main .so-page-hero-services {
  background-image: url("/img/1.jpg");
}

.main .so-page-hero-company {
  background-image: url("/img/2.jpg");
}

.main .so-page-hero-projects {
  background-image: url("/img/3.jpg");
}

.main .so-page-hero-contact {
  background-image: url("/img/placeholderso.jpeg");
}

.main .so-page-hero-service-detail {
  background-image: url("/img/img3.jpg");
}

.main .so-page-hero {
  overflow: hidden;
  position: relative;
}

.main .so-page-hero::before {
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.68) 0%, rgba(17, 17, 17, 0.44) 38%, rgba(17, 17, 17, 0.18) 100%);
  content: "";
  inset: 0;
  position: absolute;
  z-index: 0;
}

.main .so-page-hero .container {
  position: relative;
  z-index: 1;
}

.main .so-page-hero .so-page-hero-inner {
  align-items: flex-end;
  display: flex;
  min-height: 320px;
  padding-bottom: 3.5rem;
  padding-top: 8.5rem;
}

.main .so-page-hero .so-page-hero-heading {
  margin: 0;
  max-width: 32rem;
  text-align: left;
  width: 100%;
}

.main .so-page-hero .so-page-hero-title-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  position: relative;
  text-align: left;
  width: 100%;
  z-index: 2;
}

.main .so-page-hero .so-page-hero-title-group::before {
  content: none;
}

.main .so-page-hero .so-page-hero-title {
  display: block;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 0.96;
  text-wrap: balance;
}

.main .custom-margin-1 {
  /* TEMPLATE TOP GAP: reduces the old Porto large gap after page title bands. */
  margin-top: 2.25rem !important;
}

.main .my-5,
.main .my-5-5 {
  /* LARGE VERTICAL MARGINS: tightens Bootstrap/Porto my-5 utility spacing. */
  margin-bottom: 2.5rem !important;
  margin-top: 2.5rem !important;
}

.main .mt-5,
.main .mt-5-5 {
  margin-top: 2rem !important;
}

.main .mb-5,
.main .mb-5-5 {
  margin-bottom: 2rem !important;
}

.main .pt-5,
.main .pt-5-5 {
  padding-top: 2.25rem !important;
}

.main .pb-5,
.main .pb-5-5 {
  padding-bottom: 2.25rem !important;
}

.main .row.mb-5-5,
.main .row.mb-5 {
  margin-bottom: 1.75rem !important;
}

.main .col-md-6.mb-5,
.main .portfolio-item .mb-3-5 {
  margin-bottom: 1.5rem !important;
}

.so-project-intro-title {
  margin-left: auto;
  margin-right: auto;
  max-width: 16ch;
  text-align: center;
  text-wrap: balance;
}

.so-project-intro-copy {
  max-width: 42rem;
  text-align: center;
}

.main h1,
.main h2,
.main h3 {
  margin-bottom: 1rem !important;
}

.main p {
  margin-bottom: 1rem;
}

footer .container {
  padding-bottom: 2rem !important;
  padding-top: 2rem !important;
}

.so-service-item {
  gap: 1.65rem;
}

.so-service-icon {
  align-items: center;
  background: rgba(255, 68, 31, 0.1);
  border: 1px solid rgba(255, 68, 31, 0.18);
  border-radius: 18px;
  color: #ff441f;
  display: inline-flex;
  flex: 0 0 72px;
  font-size: 34px;
  height: 72px;
  justify-content: center;
  line-height: 1;
  margin-top: 0.25rem;
  width: 72px;
}

.so-service-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.so-service-copy p {
  color: #626262;
  max-width: 620px;
}

.so-services-aside {
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(30, 19, 15, 0.14);
  overflow: hidden;
}

.so-services-aside img {
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  width: 100%;
}

.so-services-aside-card {
  background: #ff441f;
  padding: 2rem;
}

.so-services-aside-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

.so-before-after-card {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(30, 19, 15, 0.12);
  overflow: hidden;
}

.so-project-gallery-block + .so-project-gallery-block {
  margin-top: 3.5rem;
}

.so-project-intro-copy {
  max-width: 760px;
}

.so-project-gallery-split .so-project-gallery-block {
  margin-top: 0;
}

.so-project-gallery-block-before,
.so-project-gallery-block-after {
  border-radius: 28px;
  padding: 1.5rem;
}

.so-project-gallery-block-before {
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(30, 19, 15, 0.12);
}

.so-project-gallery-block-after {
  background: #ff441f;
  box-shadow: 0 24px 70px rgba(148, 44, 18, 0.22);
}

.so-project-gallery-tile {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(30, 19, 15, 0.1);
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.so-project-gallery-tile img {
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}

.so-project-gallery-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.so-project-gallery-link:hover .so-project-gallery-tile {
  box-shadow: 0 24px 60px rgba(30, 19, 15, 0.18);
  transform: translateY(-2px);
}

.so-lightbox {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 2000;
}

.so-lightbox-backdrop {
  background: rgba(10, 10, 10, 0.72);
  border: 0;
  inset: 0;
  position: absolute;
}

.so-lightbox-panel {
  background: #111111;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  color: #ffffff;
  max-height: calc(100vh - 2rem);
  max-width: min(1120px, calc(100vw - 2rem));
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

.so-lightbox-toolbar {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
}

.so-lightbox-tag {
  color: rgba(255, 255, 255, 0.68);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.so-lightbox-title {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.so-lightbox-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 2rem;
  height: 44px;
  justify-content: center;
  line-height: 1;
  width: 44px;
}

.so-lightbox-frame {
  display: flex;
  justify-content: center;
  max-height: calc(100vh - 12rem);
  padding: 1.25rem 1.5rem;
}

.so-lightbox-frame img {
  border-radius: 18px;
  display: block;
  max-height: calc(100vh - 12rem);
  max-width: 100%;
  object-fit: contain;
}

.so-lightbox-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0 1.5rem 1.5rem;
}

.so-lightbox-controls button {
  background: #ff441f;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  min-width: 120px;
  padding: 0.85rem 1.25rem;
}

.so-lightbox-controls button:disabled {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 767px) {
  .so-project-gallery-split > .col-lg-6 + .col-lg-6 {
    margin-top: 2rem;
  }

  .so-lightbox-panel {
    border-radius: 18px;
    max-width: calc(100vw - 1rem);
  }

  .so-lightbox-toolbar,
  .so-lightbox-frame,
  .so-lightbox-controls {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .so-lightbox-controls button {
    min-width: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 48%;
  }
}

.so-project-empty-state {
  background: #f7f7f7;
  border: 1px dashed rgba(30, 19, 15, 0.18);
  border-radius: 22px;
  color: #626262;
  padding: 2rem;
}

.so-project-gallery-block-after .so-project-empty-state {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

.so-project-empty-state code {
  background: rgba(255, 68, 31, 0.1);
  border-radius: 999px;
  color: #ff441f;
  padding: 0.15rem 0.45rem;
}

.main .portfolio-item {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(30, 19, 15, 0.1);
  overflow: visible;
}

.main .portfolio-item .thumb-info {
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}

.main .portfolio-item .thumb-info-wrapper img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.main .portfolio-item > span,
.main .portfolio-item > h2 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.main .portfolio-item > span {
  padding-top: 1.25rem;
}

.main .portfolio-item > h2 {
  padding-bottom: 1.35rem;
}

.main .sort-destination-loader {
  padding-bottom: 4rem;
}

.main .so-projects-grid-shell {
  /* PROJECTS LIST WRAP: gives the bottom row enough room without inflating the whole site. */
  padding-bottom: 6rem !important;
}

.main .so-projects-grid-shell .sort-destination-loader {
  /* Keep the loader padding tame inside the page-specific shell. */
  padding-bottom: 1rem;
}

.so-before-after-panel {
  background: #161616;
  height: 100%;
  margin: 0;
  min-height: 320px;
  position: relative;
}

.so-before-after-panel span {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  color: #232323;
  font-size: 0.75rem;
  font-weight: 800;
  left: 1rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.9rem;
  position: absolute;
  text-transform: uppercase;
  top: 1rem;
  z-index: 1;
}

.so-before-after-panel-after span {
  background: #ff441f;
  color: #ffffff;
}

.so-before-after-panel img {
  display: block;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  width: 100%;
}

.so-quote-panel {
  background: #ff441f;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(30, 19, 15, 0.14);
  color: #ffffff;
  padding: 2rem;
}

.so-quote-panel h3 {
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
}

.so-quote-panel p {
  color: rgba(255, 255, 255, 0.84);
}

.so-service-detail-hero-title {
  max-width: min(46rem, 100%);
}

.so-service-detail-visual {
  width: 100%;
}

.so-service-detail-image {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 767px) {
  .main > .container,
  .main > .section:not(.home-hero-carousel) > .container,
  .main > div.container {
    padding-bottom: 2rem !important;
    padding-top: 2rem !important;
  }

  .main .section:not(.home-hero-carousel) {
    padding-bottom: 2rem !important;
    padding-top: 2rem !important;
  }

  .main .section-height-3 {
    min-height: 180px !important;
  }

  .main .so-page-hero {
    min-height: 260px !important;
  }

  .main .so-page-hero .so-page-hero-inner {
    min-height: 260px;
    padding-bottom: 2rem;
    padding-top: 6.5rem;
  }

  .main .my-5,
  .main .my-5-5 {
    margin-bottom: 1.75rem !important;
    margin-top: 1.75rem !important;
  }

  .so-service-item {
    align-items: center !important;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .so-service-icon {
    flex-basis: 64px;
    font-size: 30px;
    height: 64px;
    margin-top: 0;
    width: 64px;
  }

  .so-service-copy p {
    max-width: none;
  }

  .main .so-page-hero .so-page-hero-title {
    font-size: clamp(1.5rem, 7vw, 2.15rem);
    line-height: 1;
  }

  .so-service-detail-image {
    aspect-ratio: 5 / 6;
  }

}
