/* Dependency-free replacements for the four OxyExtras components in use. */

/* Keep the recovered header in document flow while it sticks to the viewport.
 * Oxygen's fixed-position script is removed server-side to avoid margin jumps. */
#_header-2-11.oxy-header-wrapper {
  position: sticky !important;
  z-index: 2147483640;
  top: 0;
  background-color: var(--text-light, #fff);
  box-shadow: 0 0 10px rgb(0 0 0 / 30%);
}

.eccoreno-mega-menu,
.eccoreno-mega-menu__items {
  min-width: 0;
}

.eccoreno-mega-menu__items {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.25rem, 0.8vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.eccoreno-mega-menu__item {
  position: static;
  margin: 0;
  padding: 0;
}

.eccoreno-mega-menu__link {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem clamp(0.55rem, 1vw, 1.15rem);
  border: 0;
  background: transparent;
  color: var(--secondary, #092c50);
  font: inherit;
  font-size: clamp(0.86rem, 1vw, 1rem);
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.eccoreno-mega-menu__link:hover,
.eccoreno-mega-menu__link:focus-visible,
.eccoreno-mega-menu__link.is-current,
.eccoreno-mega-menu__toggle[aria-expanded="true"] {
  color: var(--primary, #ff7108);
}

.eccoreno-mega-menu__link:focus-visible,
.oxy-burger-trigger:focus-visible {
  outline: 3px solid var(--primary, #ff7108);
  outline-offset: 3px;
}

.eccoreno-mega-menu__chevron {
  display: block;
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  overflow: visible;
  transform-origin: center;
  transition: transform 180ms ease;
}

.eccoreno-mega-menu__toggle[aria-expanded="true"] .eccoreno-mega-menu__chevron {
  transform: rotate(180deg);
}

.eccoreno-mega-menu__panel {
  position: absolute;
  z-index: 1000;
  top: 100%;
  right: 0;
  left: 0;
  width: 100%;
  max-height: min(72vh, 48rem);
  overflow: auto;
  padding: var(--space-s, 1.5rem) max(1.5rem, calc((100vw - 1280px) / 2));
  border-radius: 0 0 var(--radius-m, 0.5rem) var(--radius-m, 0.5rem);
  background: #fff;
  box-shadow: 0 8px 18px rgb(0 0 0 / 14%);
}

.eccoreno-services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.eccoreno-services-card {
  display: flex;
  min-height: 6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgb(9 44 80 / 14%);
  border-radius: var(--radius-m, 0.5rem);
  background: #fff;
  color: var(--secondary, #092c50);
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.eccoreno-services-card:hover,
.eccoreno-services-card:focus-visible {
  border-color: var(--primary, #ff7108);
  color: var(--primary, #ff7108);
  transform: translateY(-2px);
}

.eccoreno-mega-menu--mobile {
  display: none;
}

.oxy-burger-trigger {
  cursor: pointer;
}

.eccoreno-carousel {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.eccoreno-carousel__track {
  display: flex;
  width: 100%;
  gap: var(--eccoreno-slide-gap, 24px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--primary, #ff7108) transparent;
}

.eccoreno-carousel__track > * {
  flex: 0 0 var(--eccoreno-slide-width, 45%);
  min-width: 0;
  scroll-snap-align: start;
}

.eccoreno-carousel__track img {
  max-width: 100%;
  height: auto;
}

/* Existing Oxygen gallery items become slides; the grid remains usable if JS fails. */
.oxy-gallery.eccoreno-recovered-carousel,
#div_block-119-26.eccoreno-recovered-carousel {
  display: flex !important;
  flex-direction: row !important;
  width: 100%;
  max-width: 100%;
  gap: var(--eccoreno-slide-gap, 24px) !important;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--primary, #ff7108) transparent;
}

.oxy-gallery.eccoreno-recovered-carousel > .oxy-gallery-item,
#div_block-119-26.eccoreno-recovered-carousel > * {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 var(--eccoreno-slide-width, 45%) !important;
  width: auto !important;
  min-width: 0;
  scroll-snap-align: start;
  transform: none !important;
}

.oxy-gallery.eccoreno-recovered-carousel .oxy-gallery-item-contents {
  aspect-ratio: 4 / 3;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius-m, 0.5rem);
}

.oxy-gallery.eccoreno-recovered-carousel .oxy-gallery-item-contents img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eccoreno-contact-form {
  width: 100%;
}

.eccoreno-contact-form .ff-el-form-control {
  width: 100%;
  max-width: 100%;
}

/* Standalone fallback for the 404 body missing from the recovered Oxygen data. */
.eccoreno-404-header {
  position: relative;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 14px rgb(9 44 80 / 10%);
  font-family: "Raleway", sans-serif;
}

.eccoreno-404-header__inner {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) 1fr auto;
  min-height: 7.75rem;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  width: min(100% - 3rem, 80rem);
  margin-inline: auto;
}

.eccoreno-404-logo {
  display: block;
  width: clamp(8rem, 13vw, 11rem);
}

.eccoreno-404-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.eccoreno-404-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.eccoreno-404-header__contact,
.eccoreno-404-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--primary, #ff7108);
  border-radius: 0.25rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.eccoreno-404-header__contact,
.eccoreno-404-button--primary {
  background: var(--primary, #ff7108);
  color: #fff;
}

.eccoreno-404-burger {
  display: none;
  width: 3rem;
  height: 3rem;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem;
  border: 0;
  background: transparent;
}

.eccoreno-404-burger span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--secondary, #092c50);
}

.eccoreno-404-main {
  display: grid;
  min-height: calc(100vh - 15rem);
  place-items: center;
  padding: clamp(4rem, 10vw, 8rem) 1.5rem;
  background:
    radial-gradient(circle at 80% 20%, rgb(255 113 8 / 14%), transparent 24rem),
    var(--secondary, #092c50);
  color: #fff;
  font-family: "Raleway", sans-serif;
  text-align: center;
}

.eccoreno-404-main__content {
  width: min(100%, 48rem);
}

.eccoreno-404-code {
  margin: 0 0 0.5rem;
  color: var(--primary, #ff7108);
  font-size: clamp(5rem, 16vw, 10rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.eccoreno-404-main h1 {
  margin: 0;
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.eccoreno-404-main__content > p:not(.eccoreno-404-code) {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}

.eccoreno-404-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.eccoreno-404-button--secondary {
  background: transparent;
  color: #fff;
}

.eccoreno-404-button:hover,
.eccoreno-404-button:focus-visible,
.eccoreno-404-header__contact:hover,
.eccoreno-404-header__contact:focus-visible {
  border-color: #fff;
  background: #fff;
  color: var(--secondary, #092c50);
}

.eccoreno-404-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem max(1.5rem, calc((100vw - 1280px) / 2));
  background: #071f39;
  color: #fff;
  font-family: "Raleway", sans-serif;
}

.eccoreno-404-footer p {
  margin: 0;
}

.eccoreno-404-footer nav {
  display: flex;
  gap: 1.25rem;
}

.eccoreno-404-footer a {
  color: #fff;
}

@media (max-width: 1100px) {
  #link_button-12-11 {
    display: none !important;
  }

  .oxy-burger-trigger {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .eccoreno-404-header__inner {
    grid-template-columns: 1fr auto;
    min-height: 5.75rem;
  }

  .eccoreno-404-navigation,
  .eccoreno-404-header__contact {
    display: none;
  }

  .eccoreno-404-burger {
    display: flex !important;
  }

  /* The recovered home cards kept four fixed 200px columns from OxyExtras. */
  #div_block-3-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #div_block-3-2 > .megamenu-services {
    width: 100% !important;
    max-width: none !important;
  }

  #section-8-11 > .ct-section-inner-wrap {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: clamp(1rem, 4vw, 2rem) !important;
  }

  #section-8-11 > .ct-section-inner-wrap > .ct-div-block {
    width: 100% !important;
    max-width: 100% !important;
  }

  .eccoreno-mega-menu--desktop {
    display: none !important;
  }

  .eccoreno-mega-menu--mobile.is-open {
    position: absolute;
    z-index: 1200;
    top: 100%;
    right: 0;
    left: 0;
    display: block !important;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    background: var(--primary, #ff7108);
    box-shadow: 0 10px 22px rgb(0 0 0 / 18%);
  }

  .eccoreno-mega-menu--mobile .eccoreno-mega-menu__items {
    display: block;
  }

  .eccoreno-mega-menu--mobile .eccoreno-mega-menu__link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem max(1.25rem, 5vw);
    color: #fff;
  }

  .eccoreno-mega-menu--mobile .eccoreno-mega-menu__link:hover,
  .eccoreno-mega-menu--mobile .eccoreno-mega-menu__link:focus-visible,
  .eccoreno-mega-menu--mobile .eccoreno-mega-menu__link.is-current,
  .eccoreno-mega-menu--mobile .eccoreno-mega-menu__toggle[aria-expanded="true"] {
    color: #fff;
    background: rgb(0 0 0 / 14%);
  }

  .eccoreno-mega-menu--mobile .eccoreno-mega-menu__panel {
    position: static;
    width: 100%;
    max-height: none;
    padding: 1rem;
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%);
  }

  .eccoreno-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #section-68-18,
  #section-50-20,
  #section-62-22,
  #section-59-24 {
    display: block !important;
  }

  #section-68-18 > .ct-section-inner-wrap,
  #section-50-20 > .ct-section-inner-wrap,
  #section-62-22 > .ct-section-inner-wrap,
  #section-59-24 > .ct-section-inner-wrap {
    display: flex !important;
  }

  #div_block-3-2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #section-8-11 > .ct-section-inner-wrap {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 2rem !important;
  }

  .eccoreno-carousel__track > * {
    flex-basis: min(86%, 32rem);
  }

  .oxy-gallery.eccoreno-recovered-carousel > .oxy-gallery-item,
  #div_block-119-26.eccoreno-recovered-carousel > * {
    flex-basis: min(86%, 32rem) !important;
  }

  .eccoreno-services-grid {
    grid-template-columns: 1fr;
  }

  .eccoreno-404-header__inner {
    width: min(100% - 2rem, 80rem);
  }

  .eccoreno-404-main {
    min-height: calc(100vh - 12rem);
    padding-block: 4rem;
  }

  .eccoreno-404-actions {
    display: grid;
  }

  .eccoreno-404-footer {
    display: grid;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eccoreno-mega-menu__chevron,
  .eccoreno-carousel__track,
  .eccoreno-recovered-carousel {
    scroll-behavior: auto;
    transition: none;
  }
}
