/* WordPress-native interaction state only. Source layout and typography belong to the approved legacy stylesheets. */

body .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body .screen-reader-text:focus {
  top: 8px;
  left: 8px;
  z-index: 2147483647;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  clip: auto;
  color: #111;
  background: #fff;
}

[data-ladom-interaction="overlay"] .ba-overlay-section-backdrop[hidden] {
  display: none !important;
}

body.lightbox-open,
body.ladom-lightbox-open {
  overflow: hidden;
}

form[data-ladom-interaction] [data-form-status]:not(:empty) {
  margin: 12px 0 0;
}

form[data-ladom-interaction] .ba-form-submit-btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: .65;
}

/* Source catalog dropdowns must stay above the following project-card row. */
.ba-row.ladom-catalog-filter-layer-open {
  z-index: 30 !important;
}

.ba-row.ladom-catalog-filter-layer-open .ba-item-fields-filter,
.ba-row.ladom-catalog-filter-layer-open .ba-field-filter-value-wrapper {
  z-index: 31 !important;
}

/* Editor-created projects use canonical WordPress fields while imported projects keep source CSS/DOM. */
.editor-project {
  color: #172d31;
  background: #fff;
}

.editor-project__header,
.editor-project__overview,
.editor-project__section,
.editor-project__notice {
  box-sizing: border-box;
  width: min(1200px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.editor-project__header {
  padding: 54px 0 32px;
}

.editor-project__header > a {
  color: #657579;
  text-decoration: none;
}

.editor-project__header h1 {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
}

.editor-project__notice {
  padding: 14px 18px;
  margin-bottom: 24px;
  background: #fff6d8;
  border-left: 4px solid #d19a16;
}

.editor-project__overview {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 38px;
  align-items: start;
}

.editor-project__sidebar {
  position: sticky;
  top: 32px;
}

.editor-project__sidebar .lead-section {
  padding: 28px;
  background: #f2f6f5;
  border-radius: 4px;
}

.editor-project__sidebar .lead-form,
.editor-project__sidebar .lead-form__field {
  display: grid;
  gap: 8px;
}

.editor-project__sidebar .lead-form {
  gap: 16px;
}

.editor-project__sidebar input,
.editor-project__sidebar textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #c7d0ce;
}

.editor-project__sidebar .lead-form__submit {
  padding: 14px 20px;
  color: #fff;
  cursor: pointer;
  background: #ee6d45;
  border: 0;
}

.editor-project__sidebar .lead-form__honeypot {
  position: absolute;
  left: -10000px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-gallery__item {
  margin: 0;
  overflow: hidden;
  background: #eef2f1;
}

.project-gallery__item:first-child {
  grid-column: 1 / -1;
}

.project-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.project-gallery__item:first-child img {
  min-height: 420px;
}

.project-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1px 0 0;
  background: #dce4e2;
}

.project-specs__item {
  padding: 20px;
  background: #f6f8f7;
}

.project-specs dt {
  color: #6a7779;
}

.project-specs dd {
  margin: 5px 0 0;
  font-size: 22px;
  font-weight: 600;
}

.editor-project__section {
  padding: 72px 0 20px;
}

.editor-project__section > h2 {
  margin: 0 0 28px;
  font-size: clamp(28px, 4vw, 44px);
}

.editor-project__attributes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.editor-project__attributes > div {
  padding: 24px;
  background: #f2f6f5;
}

.editor-project__attributes h3,
.editor-project__attributes ul {
  margin-top: 0;
}

.editor-project__content {
  max-width: 850px;
  margin-top: 36px;
  font-size: 18px;
  line-height: 1.65;
}

@media (max-width: 767px) {
  .editor-project__header,
  .editor-project__overview,
  .editor-project__section,
  .editor-project__notice {
    width: min(100% - 28px, 1200px);
  }

  .editor-project__overview,
  .editor-project__attributes {
    grid-template-columns: 1fr;
  }

  .editor-project__sidebar {
    position: static;
  }

  .project-gallery__item:first-child img {
    min-height: 260px;
  }

  .project-specs {
    grid-template-columns: 1fr;
  }

  .editor-project__section {
    padding-top: 48px;
  }
}

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  header.header.ladom-desktop-menu-open {
    z-index: 2000000 !important;
  }

  header.header.ladom-desktop-menu-open .ba-row.ladom-desktop-menu-layer {
    z-index: 2000001 !important;
  }

  .ba-item-main-menu .tabs-content-wrapper.show-menu {
    box-sizing: border-box;
    margin-left: 0 !important;
    pointer-events: auto !important;
  }

  .ba-item-main-menu .tabs-content-wrapper.show-menu > .sk-dropdown-menu {
    visibility: visible !important;
    opacity: 1 !important;
    background: #fff !important;
    animation: none !important;
    transform: none !important;
  }
}

@media (max-width: 1024px) {
  body.ba-opened-menu {
    overflow: hidden !important;
    touch-action: none;
  }

  body.ba-opened-menu header.header {
    z-index: 2000000 !important;
  }

  .ba-item-main-menu > .ba-menu-wrapper > .main-menu:not(.hide-menu) {
    right: calc(-100vw + var(--ladom-drawer-viewport-offset, 0px)) !important;
    left: auto !important;
    z-index: 2000001 !important;
    box-sizing: border-box;
    width: min(360px, 100vw) !important;
    max-width: 100vw !important;
    overflow-x: hidden;
    overflow-y: auto;
    visibility: hidden;
    opacity: 1 !important;
    pointer-events: none;
    background: #fff !important;
    transform: none !important;
    transition: none !important;
    overscroll-behavior: contain;
  }

  .ba-item-main-menu > .ba-menu-wrapper > .main-menu.visible-menu:not(.hide-menu) {
    right: var(--ladom-drawer-viewport-offset, 0px) !important;
    left: auto !important;
    visibility: visible;
    pointer-events: auto;
  }

  .ba-item-main-menu > .ba-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000000;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, .46);
    transition: none;
  }

  .ba-item-main-menu > .ba-menu-backdrop.ba-visible-menu-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .main-menu.visible-menu .deeper.parent {
    position: relative;
  }

  .main-menu.visible-menu .deeper.parent > a {
    box-sizing: border-box;
    padding-right: 58px !important;
  }

  .main-menu.visible-menu .deeper.parent > a > .ba-icon-caret-right {
    display: none !important;
  }

  .main-menu.visible-menu .ladom-menu-disclosure {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-height: 48px;
    padding: 0;
    color: inherit;
    font: 28px/1 Arial, sans-serif;
    cursor: pointer;
    background: transparent;
    border: 0;
  }

  .main-menu.visible-menu .ladom-menu-disclosure[aria-expanded="true"] span {
    transform: rotate(90deg);
  }

  .main-menu.visible-menu .deeper.parent > .tabs-content-wrapper,
  .main-menu.visible-menu .deeper.parent > ul {
    display: none !important;
  }

  .main-menu.visible-menu .deeper.parent.visible-nav-child > .tabs-content-wrapper,
  .main-menu.visible-menu .deeper.parent.visible-nav-child > ul {
    position: static !important;
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #fff !important;
    animation: none !important;
    transform: none !important;
  }

  .main-menu.visible-menu .deeper.parent.visible-nav-child > .tabs-content-wrapper > .sk-dropdown-menu {
    opacity: 1 !important;
    background: #fff !important;
    animation: none !important;
    transform: none !important;
  }

  .ladom-mobile-managed-links {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 25px 25px;
    margin: 0;
    list-style: none;
  }

  .ladom-mobile-managed-links a {
    display: block;
    padding: 10px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ba-item-main-menu > .ba-menu-wrapper > .main-menu,
  .ba-item-main-menu > .ba-menu-backdrop {
    transition: none !important;
  }
}

[data-static-gallery-image] {
  cursor: zoom-in;
}

.ladom-lightbox {
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 24px;
  overflow: hidden;
  background: rgba(7, 18, 20, .94);
  border: 0;
}

.ladom-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ladom-lightbox::backdrop {
  background: rgba(7, 18, 20, .94);
}

.ladom-lightbox img {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
}

.ladom-lightbox__close,
.ladom-lightbox__nav {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
  background: rgba(255, 255, 255, .14);
  border: 0;
  border-radius: 50%;
}

.ladom-lightbox__close {
  top: 18px;
  right: 18px;
}

.ladom-lightbox__prev {
  top: calc(50% - 24px);
  left: 18px;
}

.ladom-lightbox__next {
  top: calc(50% - 24px);
  right: 18px;
}

@media (max-width: 767px) {
  .ladom-lightbox {
    padding: 12px;
  }

  .ladom-lightbox__prev {
    left: 8px;
  }

  .ladom-lightbox__next {
    right: 8px;
  }
}
