/**
 * Stretch Ceilings Malta — page-scoped portfolio styles.
 * All rules scoped under .mg-stretch-page (viewer is body-level).
 */

/* Let the portfolio page own the full content width (Divi containment). */
body.page-template-page-stretch-ceilings #main-content,
body.page-template-stretch-ceilings #main-content {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
}

body.page-template-page-stretch-ceilings #main-content .entry-content,
body.page-template-stretch-ceilings #main-content .entry-content,
body.page-template-page-stretch-ceilings .et_pb_section,
body.page-template-stretch-ceilings .et_pb_section {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mg-stretch-page {
  --mg-navy: #0c3d6e;
  --mg-navy-dark: #061f37;
  --mg-cyan: #18c6df;
  --mg-wash: #f3f7f9;
  --mg-ink: #102536;
  --mg-muted: #4d6275;
  --mg-max: 1180px;
  --mg-gutter: 40px;
  --mg-section: clamp(78px, 10vw, 150px);
  color: var(--mg-ink);
  background: #fff;
  font-family: inherit;
  line-height: 1.65;
  overflow-x: clip;
}

@media (max-width: 767px) {
  .mg-stretch-page {
    --mg-gutter: 20px;
  }
}

.mg-stretch-page *,
.mg-stretch-page *::before,
.mg-stretch-page *::after {
  box-sizing: border-box;
}

.mg-stretch-wrap {
  width: min(100% - (var(--mg-gutter) * 2), var(--mg-max));
  margin-inline: auto;
}

.mg-stretch-page,
.mg-stretch-page h1,
.mg-stretch-page h2,
.mg-stretch-page h3,
.mg-stretch-page p,
.mg-stretch-page a,
.mg-stretch-page button {
  font-family: inherit !important;
}

.mg-stretch-page h1,
.mg-stretch-page h2,
.mg-stretch-page h3 {
  margin: 0;
  color: #0a2944;
}

.mg-stretch-page h1 {
  font-size: clamp(3rem, 5.8vw, 5.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 14ch;
}

.mg-stretch-page h2 {
  font-size: clamp(2.15rem, 3.8vw, 3.8rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.mg-stretch-page h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 650;
  line-height: 1.15;
}

.mg-stretch-page .mg-video-hero h1 {
  color: #ffffff;
}

.mg-stretch-page p {
  margin: 0 0 1em;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.65;
  max-width: 65ch;
  text-align: left;
}

.mg-editorial-section {
  padding-block: clamp(72px, 8vw, 120px);
}

.mg-stretch-page p:last-child {
  margin-bottom: 0;
}

.mg-stretch-eyebrow {
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mg-cyan);
}

.mg-stretch-accent {
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 28px;
  background: var(--mg-cyan);
}

.mg-stretch-lead {
  max-width: 62ch;
  color: var(--mg-muted);
}

.mg-stretch-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.mg-stretch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 44px;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mg-stretch-btn:focus-visible {
  outline: 3px solid var(--mg-cyan);
  outline-offset: 3px;
}

.mg-stretch-btn--cyan {
  background: var(--mg-cyan);
  color: var(--mg-navy-dark);
}

.mg-stretch-btn--cyan:hover {
  background: #3ad3e8;
  color: var(--mg-navy-dark);
}

.mg-stretch-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.mg-stretch-btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mg-stretch-btn--video {
  background: rgba(6, 31, 55, 0.55);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  min-width: 96px;
}

/* —— Hero —— */
.mg-stretch-hero {
  position: relative;
  width: 100%;
  min-height: min(82vh, 820px);
  color: #fff;
  overflow: hidden;
  background: var(--mg-navy-dark);
}

.mg-stretch-hero__media,
.mg-stretch-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mg-stretch-hero__video {
  object-fit: cover;
  object-position: center 35%;
}

.mg-stretch-hero__overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  min-height: inherit;
  padding: 72px 0 64px;
  background: linear-gradient(
    90deg,
    rgba(6, 31, 55, 0.92) 0%,
    rgba(6, 31, 55, 0.72) 42%,
    rgba(6, 31, 55, 0.28) 72%,
    rgba(6, 31, 55, 0.12) 100%
  );
}

.mg-stretch-hero__copy {
  width: min(100% - (var(--mg-gutter) * 2), var(--mg-max));
}

.mg-stretch-hero .mg-stretch-eyebrow {
  color: var(--mg-cyan);
}

.mg-stretch-hero h1,
.mg-stretch-hero__intro,
.mg-stretch-hero__proof {
  color: #fff;
}

.mg-stretch-hero__intro {
  margin-top: 22px;
  max-width: 38ch;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
}

.mg-stretch-hero__proof {
  margin-top: 14px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.mg-stretch-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 1024px) {
  .mg-stretch-hero {
    min-height: 680px;
  }
}

@media (max-width: 767px) {
  .mg-stretch-hero {
    min-height: 720px;
  }

  .mg-stretch-hero__overlay {
    align-items: flex-end;
    background: linear-gradient(
      180deg,
      rgba(6, 31, 55, 0.35) 0%,
      rgba(6, 31, 55, 0.78) 48%,
      rgba(6, 31, 55, 0.94) 100%
    );
    padding-bottom: 48px;
  }

  .mg-stretch-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* —— Intro —— */
.mg-stretch-intro {
  background: #fff;
}

.mg-stretch-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.mg-stretch-intro__text {
  color: var(--mg-muted);
  padding-top: 8px;
}

@media (max-width: 900px) {
  .mg-stretch-intro__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* —— Airport —— */
.mg-stretch-airport {
  background: var(--mg-wash);
  scroll-margin-top: 120px;
}

.mg-stretch-airport h2 {
  max-width: 16ch;
  margin-bottom: 18px;
}

.mg-stretch-collage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.7fr);
  grid-template-areas: "main facts";
  gap: 18px;
  margin-top: 42px;
}

.mg-airport-primary {
  grid-area: main;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #d7e2ea;
}

.mg-airport-primary img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 18%;
}

.mg-stretch-facts {
  grid-area: facts;
  align-self: stretch;
  padding: 28px 24px;
  background: #fff;
  border-left: 3px solid var(--mg-cyan);
}

.mg-stretch-facts dl {
  margin: 0;
  display: grid;
  gap: 22px;
}

.mg-stretch-facts dt {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mg-cyan);
}

.mg-stretch-facts dd {
  margin: 0;
  color: var(--mg-navy-dark);
  font-size: 1.02rem;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .mg-stretch-collage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "facts";
  }

  .mg-airport-primary {
    max-height: 380px;
  }
}

.mg-stretch-album {
  margin-top: 48px;
  max-width: 100%;
}

.mg-stretch-album__title {
  margin-bottom: 8px;
}

.mg-stretch-album__help {
  color: var(--mg-muted);
  margin-bottom: 18px;
}

.mg-stretch-album__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.mg-stretch-album__grid li {
  min-width: 0;
}

.mg-stretch-album__thumb {
  position: relative;
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(12, 61, 110, 0.12);
  border-radius: 12px;
  background: #e9eef2;
  cursor: zoom-in;
  box-shadow: 0 8px 24px rgba(7, 30, 52, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.mg-stretch-album__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.mg-stretch-album__num {
  position: absolute;
  right: 6px;
  bottom: 5px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(6, 31, 55, 0.72);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.3;
  pointer-events: none;
}

.mg-stretch-album__thumb:hover,
.mg-stretch-album__thumb:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(18, 191, 203, 0.6);
  box-shadow: 0 14px 32px rgba(7, 30, 52, 0.15);
}

.mg-stretch-album__thumb:hover img {
  transform: scale(1.035);
}

.mg-stretch-album__thumb:focus-visible {
  outline: 3px solid #12bfcb;
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .mg-stretch-album__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .mg-stretch-album__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* —— Product stories —— */
.mg-stretch-story {
  background: #fff;
}

.mg-stretch-story--b {
  background: var(--mg-wash);
}

.mg-stretch-story__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr);
  gap: clamp(28px, 8%, 96px);
  align-items: center;
}

.mg-stretch-story__grid--flip .mg-stretch-story__copy {
  order: -1;
}

.mg-stretch-story__media {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: #d7e2ea;
  max-height: 560px;
}

.mg-stretch-story__copy p {
  color: var(--mg-muted);
  max-width: 500px;
}

.mg-stretch-story__copy h2 {
  margin-bottom: 18px;
  max-width: 12ch;
}

@media (max-width: 900px) {
  .mg-stretch-story__grid,
  .mg-stretch-story__grid--flip {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mg-stretch-story__grid--flip .mg-stretch-story__copy {
    order: 0;
  }

  .mg-stretch-story__media {
    max-height: 420px;
  }
}

/* —— Vecta —— */
.mg-stretch-vecta {
  background: var(--mg-navy-dark);
  color: #fff;
}

.mg-stretch-vecta h2,
.mg-stretch-vecta h3,
.mg-stretch-vecta p {
  color: #fff !important;
}

.mg-stretch-cta h2,
.mg-stretch-cta h3 {
  color: #fff !important;
}

.mg-stretch-vecta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.mg-stretch-vecta__copy p {
  color: rgba(255, 255, 255, 0.84);
  margin-top: 18px;
}

.mg-stretch-vecta__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mg-stretch-vecta__rows li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.35;
}

.mg-stretch-vecta__num {
  color: var(--mg-cyan);
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .mg-stretch-vecta__grid {
    grid-template-columns: 1fr;
  }
}

/* —— Process —— */
.mg-stretch-process {
  background: #fff;
}

.mg-stretch-process h2 {
  margin-bottom: 42px;
}

.mg-stretch-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  position: relative;
}

.mg-stretch-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgba(12, 61, 110, 0.18);
}

.mg-stretch-timeline li {
  position: relative;
  padding-top: 36px;
}

.mg-stretch-timeline__num {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--mg-cyan);
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  background: #fff;
  padding-right: 10px;
}

.mg-stretch-timeline h3 {
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
}

.mg-stretch-timeline p {
  color: var(--mg-muted);
  max-width: 28ch;
}

.mg-process-note {
  width: 100%;
  max-width: 820px;
  margin: 30px 0 0;
  padding-left: 16px;
  border-left: 3px solid #18c6df;
  color: #536271;
  font-size: 0.95rem;
  clear: both;
}

@media (max-width: 900px) {
  .mg-stretch-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 28px;
  }

  .mg-stretch-timeline::before {
    top: 8px;
    bottom: 8px;
    left: 7px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .mg-stretch-timeline li {
    padding: 0 0 28px 18px;
  }

  .mg-stretch-timeline__num {
    left: -28px;
    top: 2px;
    padding: 0;
    background: transparent;
  }
}

/* —— FAQ —— */
.mg-stretch-faq {
  background: var(--mg-wash);
  scroll-margin-top: 120px;
}

.mg-stretch-faq__inner {
  max-width: 860px;
}

.mg-stretch-faq__list {
  margin-top: 28px;
  border-top: 1px solid rgba(12, 61, 110, 0.18);
}

.mg-stretch-faq__item {
  border-bottom: 1px solid rgba(12, 61, 110, 0.18);
}

.mg-stretch-faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 42px 18px 0;
  position: relative;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 600;
  color: var(--mg-navy-dark);
}

.mg-stretch-faq__item summary::-webkit-details-marker {
  display: none;
}

.mg-stretch-faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mg-cyan);
  font-size: 1.4rem;
  line-height: 1;
}

.mg-stretch-faq__item[open] summary::after {
  content: "–";
}

.mg-stretch-faq__item summary:focus-visible {
  outline: 3px solid var(--mg-cyan);
  outline-offset: 3px;
}

.mg-stretch-faq__answer {
  padding: 0 0 18px;
  color: var(--mg-muted);
}

/* —— CTA —— */
.mg-stretch-cta {
  background: var(--mg-navy);
  color: #fff;
}

.mg-stretch-cta h2,
.mg-stretch-cta p {
  color: #fff;
}

.mg-stretch-cta .mg-stretch-accent {
  margin: 0 0 28px;
}

.mg-stretch-cta p {
  margin-top: 16px;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.88);
}

.mg-stretch-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  align-items: center;
}

.mg-cta-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 44px;
  padding: 0.85rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 650;
}

.mg-cta-email:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mg-cta-email:focus-visible {
  outline: 3px solid var(--mg-cyan);
  outline-offset: 3px;
}

/* Nesli clearance */
.mg-stretch-page {
  padding-bottom: 96px;
}

/* —— Premium body-level photograph viewer —— */
.mg-stretch-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
  overflow: hidden;
}

.mg-stretch-viewer[hidden] {
  display: none !important;
}

.mg-stretch-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 20, 35, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mg-stretch-viewer__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(86dvh, 780px);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  grid-template-areas:
    "close close close"
    "prev figure next"
    "counter counter counter";
  align-items: center;
  gap: 8px 10px;
  padding: 16px 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 24, 40, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.mg-stretch-viewer__close {
  grid-area: close;
  justify-self: end;
  align-self: start;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.mg-stretch-viewer__previous {
  grid-area: prev;
}

.mg-stretch-viewer__next {
  grid-area: next;
}

.mg-stretch-viewer__previous,
.mg-stretch-viewer__next {
  display: grid;
  place-items: center;
  width: 44px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.mg-stretch-viewer__figure {
  grid-area: figure;
  margin: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mg-stretch-viewer__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(62dvh, 560px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 10px;
  background: #020b12;
}

.mg-stretch-viewer__caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.mg-stretch-viewer__counter {
  grid-area: counter;
  justify-self: center;
  color: #12bfcb;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.mg-stretch-viewer__close:focus-visible,
.mg-stretch-viewer__previous:focus-visible,
.mg-stretch-viewer__next:focus-visible {
  outline: 3px solid #12bfcb;
  outline-offset: 3px;
}

html.mg-viewer-open,
html.mg-viewer-open body {
  overflow: hidden !important;
}

@media (max-width: 700px) {
  .mg-stretch-viewer {
    padding: 10px;
  }

  .mg-stretch-viewer__panel {
    width: 100%;
    max-height: 94dvh;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 12px 10px 14px;
    border-radius: 14px;
  }

  .mg-stretch-viewer__image {
    max-height: min(58dvh, 480px);
  }

  .mg-stretch-viewer__previous,
  .mg-stretch-viewer__next {
    height: 48px;
    font-size: 1.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mg-stretch-btn,
  .mg-stretch-hero__video,
  .mg-stretch-album__thumb,
  .mg-stretch-album__thumb img {
    transition: none;
  }
}
