/* Majestic project pages: one stable editorial layout for case studies,
 * category galleries and the project archive. Only presentation is changed. */
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy {
  --mg36-project-width: 1280px;
  --mg36-project-gap: clamp(28px, 4vw, 56px);
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy :is(.mg-ui-shell,.mg36-gallery-shell) {
  width: min(var(--mg36-project-width), calc(100% - 80px)) !important;
  max-width: var(--mg36-project-width) !important;
  margin-inline: auto !important;
  --container-max-width: var(--mg36-project-width);
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy > :is(.mg-ui-section:not(.mg-ui-hero),.mg36-gallery-section) {
  padding-block: clamp(48px, 5vw, 72px) !important;
  min-height: 0 !important;
}
/* Old Elementor perspective and entrance effects are inappropriate for
 * straight architectural photography. The global glass animation remains. */
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .e-transform,
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .e-transform:hover {
  transform: none !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
  perspective: none !important;
  transform-style: flat !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .animated {
  animation: none !important;
}

/* Consistent top alignment stops the quote form moving down the page as
 * the adjacent introduction grows. Text stays at a comfortable measure. */
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) !important;
  align-items: start !important;
  column-gap: var(--mg36-project-gap) !important;
  padding-block: 48px 56px !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-copy {
  align-self: start !important;
  gap: 20px !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-copy h1.mg-ui-heading {
  max-width: 100% !important;
  font-size: clamp(38px, 4vw, 56px) !important;
  line-height: 1.13 !important;
  letter-spacing: -.045em !important;
  text-wrap: balance;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-copy .elementor-widget-text-editor {
  max-width: 64ch !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-form {
  align-self: start !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 32px !important;
}

/* Two explicit columns replace template-specific flex widths and offsets. */
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--mg36-project-gap) !important;
  align-items: start !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-row:not(.mg-ui-shell) {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-row > .e-con,
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-photo-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: initial !important;
  align-self: start !important;
  transform: none !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-photo-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-copy {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 20px !important;
  text-align: left !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-copy > .elementor-widget {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-copy :is(h2,h3) {
  text-align: left !important;
  margin: 0 !important;
  text-wrap: balance;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-image {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 4 / 3;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px !important;
  background: #e3ebe5;
  box-shadow: 0 10px 28px rgba(13, 35, 28, .09) !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-image > :is(.elementor-widget-container,a,picture) {
  display: block;
  width: 100%;
  height: 100%;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-image img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  object-position: center;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Gallery thumbnails use one clean ratio and regular rows. Original media
 * URLs and Elementor lightbox attributes are retained, so the full portrait
 * or landscape photograph remains available when the thumbnail is opened. */
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery:not(.mg36-gallery-shell) {
  width: 100% !important;
  max-width: 100% !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery :is(.e-gallery-container,.elementor-gallery__container) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row;
  gap: 20px !important;
  position: relative;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery .e-gallery-item {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  aspect-ratio: 3 / 2 !important;
  transform: none !important;
  overflow: hidden;
  border-radius: 10px;
  background: #dfe7e1;
  box-shadow: 0 4px 16px rgba(13, 35, 28, .07);
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery .e-gallery-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  transform: none !important;
  background-size: cover !important;
  background-position: center !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery .e-gallery-item:focus-visible {
  outline: 3px solid #4e845a;
  outline-offset: 4px;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery-section .e-con {
  min-height: 0 !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery-section :is(.elementor-widget-heading,.elementor-widget-text-editor) {
  width: 100% !important;
  max-width: 860px !important;
  align-self: flex-start !important;
  text-align: left !important;
  padding: 0 !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery-section :is(h2,p) {
  text-align: left !important;
}
html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-faq-section .mg-ui-shell {
  max-width: 960px !important;
}

@media (max-width: 1024px) {
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy :is(.mg-ui-shell,.mg36-gallery-shell) { width: calc(100% - 48px) !important; }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 32px !important;
    padding-block: 36px 44px !important;
  }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-form { max-width: 680px !important; }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery :is(.e-gallery-container,.elementor-gallery__container) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}
@media (max-width: 767px) {
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-copy { order: 0; }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-story-media { order: 1; }
}
@media (max-width: 600px) {
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy :is(.mg-ui-shell,.mg36-gallery-shell) { width: calc(100% - 40px) !important; }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-grid { padding-block: 28px 36px !important; }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-copy h1.mg-ui-heading {
    font-size: clamp(32px, 8.4vw, 42px) !important;
    line-height: 1.16 !important;
  }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg-ui-hero-form { padding: 24px !important; }
  html:root body.mg36-project-layout .mg36-project-page.mg-ui-legacy .mg36-gallery :is(.e-gallery-container,.elementor-gallery__container) { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Majestic Glass — stable project cards.
 * Preview gate supplied by the project-layout component. This fragment does
 * not change the archive grid columns, photographs, gradients, copy or links.
 * The existing two/two/one column layout remains owned by the loop widget.
 */

/* Stretch the existing card to its grid row, including rows whose captions
 * contain different amounts of copy. No excerpt is line-clamped. Restrict
 * wrapper sizing to loop grids so carousel/swiper slide widths stay native.
 */
html:root body.mg36-project-layout .elementor-widget-loop-grid .elementor-13445.e-loop-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element.elementor-element-94d81c9,
html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element.elementor-element-94d81c9:hover {
  --e-con-transform-scale: 1 !important;
  --e-con-transform-transition-duration: 0ms !important;
  flex: 1 1 auto !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transform: none !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
  perspective: none !important;
  transform-style: flat !important;
  will-change: auto !important;
  border-color: rgba(200, 225, 211, .3);
  box-shadow: 0 12px 28px rgba(7, 26, 29, .14) !important;
  transition: border-color .18s ease, box-shadow .18s ease !important;
}

/* Elementor may create a separate background layer when its mouse-effects
 * module starts. Only this card's own layer is neutralised; carousel/swiper
 * ancestors and other image widgets remain outside these selectors.
 */
html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element-94d81c9 > .elementor-motion-effects-layer,
html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element-94d81c9 > .elementor-motion-effects-container > .elementor-motion-effects-layer {
  transform: none !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
  perspective: none !important;
  transform-style: flat !important;
  will-change: auto !important;
  transition: none !important;
}

/* Use the existing caption wrapper and positions. Its normal padding and
 * background overlay remain intact; only type and wrapping are unified.
 */
html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element-cc14582 {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element-8240428 .elementor-heading-title {
  margin: 0 !important;
  color: #f7faf8 !important;
  font-family: 'Plus Jakarta Sans', Inter, Arial, sans-serif;
  font-size: clamp(21px, 1.65vw, 27px) !important;
  font-weight: 650;
  line-height: 1.28 !important;
  letter-spacing: -.025em !important;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: normal;
}

html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-widget-theme-post-excerpt {
  color: #e4ede9 !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  overflow-wrap: break-word;
  word-break: normal;
}

@media (hover: hover) and (pointer: fine) {
  html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element.elementor-element-94d81c9:hover {
    border-color: rgba(191, 221, 201, .72);
    box-shadow: 0 16px 32px rgba(7, 26, 29, .22) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element.elementor-element-94d81c9,
  html:root body.mg36-project-layout .elementor-13445.e-loop-item .elementor-element.elementor-element-94d81c9:hover {
    transition: none !important;
  }
}
