/* ===== MRO PAGE ===== */
#page-hero,
#mro-intro,
#mro-services,
#cta-band {
  scroll-margin-top: var(--scroll-anchor-offset);
}

/* ===== INTRO ===== */
#mro-intro {
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}

.mro-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 52px;
}

/* ===== STACKED SERVICE CARDS ===== */
#mro-services {
  background: var(--bg);
  position: relative;
  overflow: visible;
}

#mro-services .sec {
  overflow: visible;
}

.mro-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 48px;
}

.mro-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: stretch;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
  scroll-margin-top: var(--scroll-anchor-offset);
}

.mro-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px;
  min-width: 0;
}

.mro-card-num {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 12px;
}

.mro-card-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 16px;
}

.mro-card-desc {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text2);
}

#mro-intro .sec-sub,
#page-hero .page-hero-desc {
  line-height: 1.35;
}

.mro-read-more {
  display: none;
}

.mro-card-media {
  position: relative;
  min-height: 320px;
  background: var(--iron3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mro-card-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.mro-card--reverse .mro-card-media {
  order: -1;
}

/* Large screens — equal-height cards for clean stack overlap */
@media (min-width: 769px) {
  .mro-card {
    height: 80vh;
    min-height: 80vh;
    max-height: 80vh;
    background: rgb(26, 26, 30);
  }

  [data-theme="light"] .mro-card {
    background: #f2f0ec;
  }

  .mro-card-body {
    height: 100%;
    overflow-y: auto;
    justify-content: flex-start;
  }

  .mro-card-body::before,
  .mro-card-body::after {
    content: "";
    flex: 1 1 0;
    min-height: 0;
  }

  .mro-card-copy {
    flex: 0 0 auto;
    display: block;
  }

  .mro-card-desc {
    overflow: visible;
    padding-right: 0;
  }

  .mro-card-media {
    height: 100%;
    min-height: 0;
    padding: 28px 24px;
  }

  .card-stack-active[data-card-stack-desktop] .mro-card.card-stack-item {
    height: 80vh;
    min-height: 80vh;
    max-height: 80vh;
    background: rgb(26, 26, 30);
    isolation: isolate;
  }

  [data-theme="light"]
    .card-stack-active[data-card-stack-desktop]
    .mro-card.card-stack-item {
    background: #f2f0ec;
  }

  .card-stack-active[data-card-stack-desktop] .mro-card.card-stack-item .mro-card-body,
  .card-stack-active[data-card-stack-desktop] .mro-card.card-stack-item .mro-card-media {
    background: inherit;
  }
}

@media (max-width: 1100px) {
  #mro-intro .sec,
  #mro-services .sec {
    padding-left: 24px;
    padding-right: 24px;
  }

  .mro-intro-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mro-card {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    max-height: none;
    background: var(--card-bg);
  }

  [data-theme="light"] .mro-card {
    background: var(--card-bg);
  }

  .mro-card-body {
    height: auto;
    overflow: visible;
    justify-content: center;
  }

  .mro-card-body::before,
  .mro-card-body::after {
    content: none;
  }

  .mro-card-copy {
    display: block;
    flex: none;
    min-height: 0;
  }

  .mro-card-desc {
    flex: none;
    min-height: 0;
    overflow: visible;
  }

  .mro-card--reverse .mro-card-media {
    order: 0;
  }

  .mro-card-media {
    min-height: 280px;
  }

  .mro-card-media img {
    object-fit: contain;
    object-position: center;
  }

  .mro-card-body {
    padding: 28px 32px;
  }

  .mro-read-more {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 0;
    border: none;
    background: none;
    font-family: "Space Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red-accent);
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .mro-read-more:hover,
  .mro-read-more:focus-visible {
    opacity: 0.85;
    outline: none;
  }

  .mro-read-more:focus-visible {
    text-decoration: underline;
  }

  .mro-card-copy:not(.is-expanded) .mro-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  #mro-intro .sec,
  #mro-services .sec {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mro-stack {
    width: calc(100% + 16px);
    margin-left: -8px;
    margin-right: -8px;
  }

  .mro-card {
    clip-path: polygon(
      0 0,
      calc(100% - 12px) 0,
      100% 12px,
      100% 100%,
      12px 100%,
      0 calc(100% - 12px)
    );
    gap: 0;
  }

  .mro-card-body {
    padding: 20px 18px;
  }

  .mro-card-media {
    min-height: 240px;
    padding: 10px 6px;
  }

  .mro-card-media img {
    object-fit: contain;
    object-position: center;
  }
}
