/* O-10 isolated preview: Commercial #serve — editorial sector gallery.
   Exact live sector titles/captions/photos. No invented clients/stats.
   Not deployed. */

html body.g5 #serve.o10-on .o10-stage {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.72fr) !important;
  gap: 18px !important;
  margin-top: 22px !important;
  align-items: stretch !important;
}

html body.g5 #serve.o10-on .serve {
  display: none !important;
}

/* ---- Main editorial panel ---- */
html body.g5 #serve.o10-on .o10-main {
  position: relative !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: #0a1630 !important;
  border: 1px solid rgba(0, 5, 62, 0.10) !important;
  min-height: 420px !important;
  box-shadow: 0 14px 36px rgba(0, 5, 62, 0.10) !important;
}

html body.g5 #serve.o10-on .o10-frame {
  position: absolute !important;
  inset: 0 !important;
}

html body.g5 #serve.o10-on .o10-frame img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 45% !important;
  display: block !important;
}

/* Caption overlay — calm gradient, readable type, no face crop assumed (exteriors) */
html body.g5 #serve.o10-on .o10-cap {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 2 !important;
  padding: 56px 22px 18px !important;
  background: linear-gradient(180deg, rgba(0, 5, 62, 0) 0%, rgba(0, 5, 62, 0.55) 38%, rgba(0, 5, 62, 0.88) 100%) !important;
  color: #fff !important;
}

html body.g5 #serve.o10-on .o10-cap .o10-count {
  margin: 0 0 6px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #FED14D !important;
}

html body.g5 #serve.o10-on .o10-cap h3 {
  margin: 0 0 6px !important;
  color: #fff !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

html body.g5 #serve.o10-on .o10-cap .o10-blurb {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  max-width: 38em !important;
}

/* Real prev/next — only rendered controls that work */
html body.g5 #serve.o10-on .o10-nav {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 3 !important;
  display: flex !important;
  gap: 8px !important;
}

html body.g5 #serve.o10-on .o10-nav button {
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  background: rgba(0, 5, 62, 0.45) !important;
  color: #fff !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  backdrop-filter: blur(6px) !important;
  font-size: 18px !important;
  line-height: 1 !important;
  padding: 0 !important;
}

html body.g5 #serve.o10-on .o10-nav button:hover,
html body.g5 #serve.o10-on .o10-nav button:focus-visible {
  background: rgba(0, 70, 140, 0.85) !important;
  outline: 2px solid #FED14D !important;
  outline-offset: 2px !important;
}

/* ---- Side thumbnail list (other 3 sectors) ---- */
html body.g5 #serve.o10-on .o10-thumbs {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  min-width: 0 !important;
}

html body.g5 #serve.o10-on .o10-thumb {
  display: grid !important;
  grid-template-columns: 88px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  text-align: left !important;
  padding: 8px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(0, 5, 62, 0.10) !important;
  background: #fff !important;
  cursor: pointer !important;
  box-shadow: 0 6px 18px rgba(0, 5, 62, 0.05) !important;
  color: inherit !important;
  font: inherit !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
}

html body.g5 #serve.o10-on .o10-thumb:hover,
html body.g5 #serve.o10-on .o10-thumb:focus-visible {
  border-color: rgba(0, 70, 140, 0.35) !important;
  outline: 2px solid #00468C !important;
  outline-offset: 1px !important;
}

html body.g5 #serve.o10-on .o10-thumb .ph {
  width: 88px !important;
  height: 72px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #c5d5e8 !important;
}

html body.g5 #serve.o10-on .o10-thumb .ph img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

html body.g5 #serve.o10-on .o10-thumb .meta {
  min-width: 0 !important;
}

html body.g5 #serve.o10-on .o10-thumb .meta strong {
  display: block !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--ink, #00053E) !important;
  line-height: 1.25 !important;
  margin: 0 0 2px !important;
}

html body.g5 #serve.o10-on .o10-thumb .meta span {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  color: #4a5568 !important;
}

/* Desktop: side list shows the other three sectors only */
@media (min-width: 1180px) {
  html body.g5 #serve.o10-on .o10-thumb.is-active {
    display: none !important;
  }
}

/* ---- Tablet: main then 2x2 thumb selector of all 4 ---- */
@media (max-width: 1179px) and (min-width: 700px) {
  html body.g5 #serve.o10-on .o10-stage {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  html body.g5 #serve.o10-on .o10-main {
    min-height: 360px !important;
    aspect-ratio: 16 / 10 !important;
  }

  html body.g5 #serve.o10-on .o10-thumbs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    flex-direction: unset !important;
  }

  html body.g5 #serve.o10-on .o10-thumb {
    flex: none !important;
  }

  html body.g5 #serve.o10-on .o10-thumb.is-active {
    border-color: #00468C !important;
    box-shadow: 0 0 0 2px rgba(0, 70, 140, 0.20) !important;
  }
}

/* ---- Phone ---- */
@media (max-width: 699px) {
  html body.g5 #serve.o10-on .o10-stage {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  html body.g5 #serve.o10-on .o10-main {
    min-height: 280px !important;
    aspect-ratio: 4 / 3 !important;
  }

  html body.g5 #serve.o10-on .o10-cap {
    padding: 40px 14px 14px !important;
  }

  html body.g5 #serve.o10-on .o10-cap h3 {
    font-size: 18px !important;
  }

  html body.g5 #serve.o10-on .o10-cap .o10-blurb {
    font-size: 13px !important;
  }

  html body.g5 #serve.o10-on .o10-nav {
    top: 10px !important;
    right: 10px !important;
  }

  html body.g5 #serve.o10-on .o10-nav button {
    width: 36px !important;
    height: 36px !important;
  }

  /* 2x2 labeled thumbs — all sectors discoverable, no horizontal overflow */
  html body.g5 #serve.o10-on .o10-thumbs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  html body.g5 #serve.o10-on .o10-thumb {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    flex: none !important;
  }

  html body.g5 #serve.o10-on .o10-thumb .ph {
    width: 100% !important;
    height: 72px !important;
  }

  html body.g5 #serve.o10-on .o10-thumb .meta span {
    display: none !important; /* title only on phone to keep type ≥12 and calm */
  }

  html body.g5 #serve.o10-on .o10-thumb .meta strong {
    font-size: 12px !important;
  }

  html body.g5 #serve.o10-on .o10-thumb.is-active {
    border-color: #00468C !important;
  }
}

/* rollout aopt1 fix: phone overflow guard (aspect-ratio + min-height widened .o10-main past its column) */
@media (max-width: 699px){html body.g5 #serve.o10-on .o10-stage{grid-template-columns:minmax(0,1fr) !important}html body.g5 #serve.o10-on .o10-main{width:100% !important;min-width:0 !important}}
