/* MEGA Tech Lab — enterprise engineering testing capability page
   Desktop-first, dark navy theme, wide 1440px max-width. */

:root {
  --lab-ink: #07111f;
  --lab-ink-soft: #0b1020;
  --lab-muted: #8fa3b8;
  --lab-line: rgba(149, 184, 220, 0.18);
  --lab-blue: #1677ff;
  --lab-blue-hover: #4096ff;
  --lab-soft: #f5f7fb;
  --lab-white: #ffffff;
  --lab-radius: 12px;
  --lab-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

/* Page base */
.lab-page {
  background: var(--lab-soft);
  color: var(--lab-ink);
}

.lab-page .site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  min-height: 62px;
  padding: 11px max(5.5%, 54px);
  border: 0;
  border-bottom: 1px solid var(--lab-line);
  border-radius: 0;
  background: var(--lab-ink);
}

.lab-page .main-nav a {
  color: rgba(255, 255, 255, 0.82);
}

.lab-page .main-nav a:hover {
  color: var(--lab-white);
}

.lab-page .main-nav .is-active::after {
  background: var(--lab-blue);
}

/* Shell */
.lab-shell {
  width: min(1480px, 92%);
  margin: 0 auto;
}

/* Buttons */
.lab-page .button-primary {
  background: var(--lab-blue);
  border-color: var(--lab-blue);
  color: var(--lab-white);
}

.lab-page .button-primary:hover {
  background: var(--lab-blue-hover);
  border-color: var(--lab-blue-hover);
}

.lab-page .button-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--lab-white);
}

.lab-page .button-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   1. HERO
   ========================================================= */
.lab-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding-top: 62px;
  overflow: hidden;
  background: var(--lab-ink);
  color: var(--lab-white);
}

.lab-hero-bg,
.lab-hero-bg img,
.lab-hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lab-hero-bg img {
  object-fit: cover;
  object-position: center right;
}

.lab-hero-overlay {
  background: linear-gradient(105deg, rgba(7, 17, 31, 0.96) 0%, rgba(7, 17, 31, 0.88) 42%, rgba(7, 17, 31, 0.42) 72%, rgba(7, 17, 31, 0.15) 100%);
}

.lab-hero-inner {
  position: relative;
  z-index: 3;
  padding: 64px 0 72px;
}

.lab-breadcrumb {
  display: flex;
  gap: 9px;
  margin-bottom: 28px;
  color: var(--lab-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lab-breadcrumb a {
  color: var(--lab-muted);
  text-decoration: none;
}

.lab-breadcrumb a:hover {
  color: var(--lab-blue-hover);
}

.lab-breadcrumb strong {
  color: var(--lab-white);
  font-weight: 600;
}

.lab-eyebrow {
  margin: 0 0 10px;
  color: var(--lab-blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lab-hero h1 {
  margin: 0;
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.lab-hero-lead {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  line-height: 1.45;
}

.lab-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.lab-hero-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--lab-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.lab-hero-tags svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--lab-blue);
}

.lab-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.lab-hero-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

/* =========================================================
   2. SECTIONS
   ========================================================= */
.lab-section {
  padding: 86px 0;
  background: var(--lab-white);
  color: var(--lab-ink);
}

.lab-section-dark {
  background: var(--lab-ink);
  color: var(--lab-white);
}

.lab-section-header {
  max-width: 820px;
  margin-bottom: 48px;
}

.lab-section-header .lab-kicker {
  margin: 0 0 10px;
}

.lab-section-header h2 {
  margin: 0;
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lab-section-dark .lab-section-header h2 {
  color: var(--lab-white);
}

/* Secondary section subtitle — smaller, lighter, supports the kicker */
.lab-section-header h2.lab-section-lead {
  max-width: 720px;
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.lab-panel-header {
  margin-bottom: 30px;
}

.lab-panel-header .lab-kicker {
  margin: 0 0 8px;
}

.lab-panel-header h2 {
  margin: 0;
  font-size: clamp(22px, 1.9vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lab-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--lab-blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.lab-text-link:hover {
  color: var(--lab-blue-hover);
}

/* =========================================================
   3. LAB IN ACTION + TEST EQUIPMENT
   ========================================================= */
.lab-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.lab-split-left,
.lab-split-right {
  min-width: 0;
}

/* Video grid */
.lab-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.lab-video-card {
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--lab-radius);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.lab-video-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--lab-radius);
  background: var(--lab-ink-soft);
}

.lab-video-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.lab-video-card:hover .lab-video-media img {
  transform: scale(1.05);
}

.lab-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 17, 31, 0.22);
  transition: background 0.25s ease;
}

.lab-video-card:hover .lab-video-play {
  background: rgba(7, 17, 31, 0.12);
}

.lab-video-play svg {
  width: 44px;
  height: 44px;
  color: var(--lab-white);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
  transition: transform 0.25s ease;
}

.lab-video-card:hover .lab-video-play svg {
  transform: scale(1.08);
}

/* Equipment grid */
.lab-equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lab-equipment-card {
  overflow: hidden;
  border: 1px solid var(--lab-line);
  border-radius: var(--lab-radius);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.lab-equipment-card:hover {
  border-color: rgba(22, 119, 255, 0.45);
  background: rgba(22, 119, 255, 0.07);
  transform: translateY(-4px);
}

.lab-section-dark .lab-equipment-card {
  background: rgba(255, 255, 255, 0.03);
}

.lab-equipment-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 12px;
  background: #0d1726;
}

.lab-equipment-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.lab-equipment-card:hover .lab-equipment-media img {
  transform: scale(1.04);
}

.lab-equipment-card strong {
  display: block;
  padding: 0 12px;
  margin-top: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.lab-equipment-card small {
  display: block;
  padding: 0 12px 14px;
  margin-top: 0;
  color: var(--lab-muted);
  font-size: 11px;
  line-height: 1.45;
}

/* =========================================================
   4. WHAT WE TEST
   ========================================================= */
.lab-capabilities-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.lab-capability-card {
  overflow: hidden;
  border: 1px solid #dce6f2;
  border-radius: var(--lab-radius);
  background: var(--lab-white);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lab-capability-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--lab-shadow);
  border-color: #d0d8e2;
}

.lab-capability-icon {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.62);
  backdrop-filter: blur(8px);
  color: var(--lab-blue);
}

.lab-capability-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--lab-ink-soft);
}

.lab-capability-media::after,
.lab-validation-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.04) 35%, rgba(7, 17, 31, 0.74) 100%);
  content: "";
  pointer-events: none;
}

.lab-capability-media img,
.lab-validation-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.lab-capability-card:hover .lab-capability-media img,
.lab-validation-step:hover .lab-validation-media img {
  transform: scale(1.05);
}

.lab-capability-icon svg {
  width: 100%;
  height: 100%;
}

.lab-capability-body {
  padding: 16px 16px 18px;
}

.lab-capability-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.lab-capability-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-capability-card li {
  position: relative;
  padding-left: 12px;
  color: var(--lab-muted);
  font-size: 12px;
  line-height: 1.55;
}

.lab-capability-card li::before {
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lab-blue);
  content: "";
}

/* =========================================================
   5. ENGINEERING VALIDATION
   ========================================================= */
.lab-validation-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.lab-validation-step {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--lab-radius);
  background: #102237;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.lab-validation-step:hover {
  border-color: rgba(22, 119, 255, 0.45);
  background: #132d49;
  transform: translateY(-4px);
}

.lab-validation-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.62);
  backdrop-filter: blur(8px);
  color: var(--lab-blue);
}

.lab-validation-icon svg {
  width: 22px;
  height: 22px;
}

.lab-validation-media {
  position: relative;
  aspect-ratio: 16 / 7;
  background: var(--lab-ink-soft);
}

.lab-validation-copy {
  padding: 14px 18px 16px;
}

.lab-validation-step h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.lab-validation-step p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--lab-muted);
  font-size: 11px;
  line-height: 1.5;
}

/* =========================================================
   6. INSIDE THE LAB
   ========================================================= */
.lab-inside-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.lab-inside-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--lab-radius);
  aspect-ratio: 3 / 2;
  background: var(--lab-ink-soft);
}

.lab-inside-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.lab-inside-card:hover img {
  transform: scale(1.05);
}

.lab-inside-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 18px 16px;
  background: linear-gradient(transparent, rgba(7, 17, 31, 0.85));
  color: var(--lab-white);
}

.lab-inside-caption h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.lab-inside-caption p {
  margin: 4px 0 0;
  color: var(--lab-muted);
  font-size: 12px;
}

/* =========================================================
   7. TEST OUTPUT
   ========================================================= */
.lab-reports-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.lab-report-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--lab-white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  color: var(--lab-ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  appearance: none;
}

.lab-report-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.lab-report-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e3e8ee;
}

.lab-report-header svg {
  width: 18px;
  height: 18px;
  color: var(--lab-blue);
}

.lab-report-header span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lab-report-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.lab-report-media {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin: 0 0 12px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f7fb;
}

.lab-report-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
}

.lab-report-card:hover .lab-report-media img {
  transform: scale(1.04);
}

.lab-report-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(7, 17, 31, 0.7);
  color: var(--lab-white);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.lab-report-zoom svg {
  width: 14px;
  height: 14px;
}

.lab-report-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 120px;
  padding: 10px;
  border-radius: 6px;
  background: #f5f7fb;
}

.lab-report-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: #d8e0e9;
}

.lab-report-bar:nth-child(1) {
  width: 70%;
}

.lab-report-bar:nth-child(2) {
  width: 52%;
}

.lab-report-bar:nth-child(3) {
  width: 84%;
}

.lab-report-dialog {
  width: min(760px, 92%);
  padding: 0;
  border: 1px solid var(--lab-line);
  border-radius: var(--lab-radius);
  background: var(--lab-ink);
  color: var(--lab-white);
}

.lab-report-dialog::backdrop {
  background: rgba(7, 17, 31, 0.88);
}

.lab-report-dialog [data-lab-report-content] {
  padding: 32px;
}

.lab-report-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
}

.lab-report-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--lab-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lab-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lab-report-dialog-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   8. VIDEO DIALOG
   ========================================================= */
.lab-video-dialog {
  width: min(980px, 92%);
  padding: 0;
  border: 1px solid var(--lab-line);
  border-radius: var(--lab-radius);
  background: var(--lab-ink);
  color: var(--lab-white);
}

.lab-video-dialog::backdrop {
  background: rgba(7, 17, 31, 0.82);
}

.lab-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--lab-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lab-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lab-dialog-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lab-dialog-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  padding: 20px 28px 28px;
}

.lab-dialog-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.lab-dialog-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lab-dialog-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lab-dialog-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  aspect-ratio: 16 / 9;
  padding: 24px;
  border-radius: 8px;
  background: #0d1726;
  text-align: center;
}

.lab-dialog-pending img {
  max-width: 180px;
  border-radius: 8px;
  opacity: 0.6;
}

.lab-dialog-pending b {
  font-size: 15px;
}

.lab-dialog-pending span {
  color: var(--lab-muted);
  font-size: 13px;
}

.lab-dialog-layout aside h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.lab-dialog-layout aside > p {
  margin: 0 0 16px;
  color: var(--lab-muted);
  font-size: 13px;
}

.lab-dialog-layout aside dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
}

.lab-dialog-layout aside dt {
  color: var(--lab-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lab-dialog-layout aside dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.lab-dialog-method {
  padding: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--lab-muted);
  font-size: 12px;
  line-height: 1.55;
}

/* =========================================================
   11. RESPONSIVE
   ========================================================= */
@media (max-width: 1200px) {
  .lab-split-layout {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .lab-capabilities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lab-inside-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-reports-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lab-validation-flow {
    grid-template-columns: repeat(3, 1fr);
  }

}

@media (max-width: 900px) {
  .lab-hero {
    min-height: 520px;
  }

  .lab-hero-overlay {
    background: linear-gradient(105deg, rgba(7, 17, 31, 0.97) 0%, rgba(7, 17, 31, 0.92) 60%, rgba(7, 17, 31, 0.7) 100%);
  }

  .lab-hero-inner {
    padding: 48px 0 56px;
  }
}

@media (max-width: 720px) {
  .lab-section {
    padding: 56px 0;
  }

  .lab-video-grid {
    grid-template-columns: 1fr;
  }

  .lab-equipment-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-reports-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-validation-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-inside-grid {
    grid-template-columns: 1fr;
  }

  .lab-dialog-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .lab-hero-tags {
    gap: 8px;
  }

  .lab-hero-tags > span {
    padding: 8px 12px;
    font-size: 12px;
  }

  .lab-capabilities-grid,
  .lab-reports-grid {
    grid-template-columns: 1fr;
  }

  .lab-validation-flow {
    grid-template-columns: 1fr;
  }

}
