﻿/* Keep the supplied Bootstrap project page, with responsive media sizing. */
body,
#page_container {
  min-width: 0;
}

#page_container {
  width: 100%;
}

#page_container section h2,
#page_container section h3 {
  margin-top: 2.5rem;
}

#page_container img {
  max-width: 100%;
  height: auto;
}

.demo-comparison {
  margin: 24px auto 0;
  position: relative;
}

.demo-comparison-labels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  font-weight: 500;
}

.demo-comparison video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 28 / 9;
  background: #000;
}

/* The pre-play cover avoids the browser's loading indicator on narrow videos. */
#page_container .demo-comparison .demo-poster-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-poster-cover-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding-left: 4px;
  border-radius: 50%;
  background: rgb(0 0 0 / 65%);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.demo-poster-cover:focus-visible .demo-poster-cover-icon {
  outline: 3px solid #007bff;
  outline-offset: 3px;
}

#page_container .demo-comparison .demo-poster-cover[hidden] {
  display: none;
}

/* Scene 2 keeps both reconstruction views stacked in the wider right panel. */
.demo-comparison-stacked video {
  aspect-ratio: 1680 / 828;
}

#demo-josh-virtualcrowd-video {
  outline: none;
}

.demo-scene-title {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 500;
  text-align: left;
}

.demo-note {
  margin-top: 0.75rem;
  color: #6c757d;
  font-size: 0.9rem;
  text-align: left;
}

.demo-method-title,
.demo-result-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 500;
  text-align: left;
}

.demo-method-title::before,
.demo-result-title::before {
  content: "路";
  margin-right: 0.5rem;
}

.demo-method-note {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 400;
}

.demo-method-tabs {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.5rem;
  border-bottom: 1px solid #dee2e6;
  text-align: left;
}

.demo-method-tab {
  margin-bottom: -1px;
  padding: 0.25rem 0 0.6rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6c757d;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
}

.demo-method-tab:hover {
  color: #212529;
}

.demo-method-tab[aria-selected="true"] {
  border-bottom-color: #007bff;
  color: #0069d9;
}

.demo-method-tab:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 4px;
}

.demo-method-tab:focus:not(:focus-visible) {
  outline: none;
}

.demo-switcher-note {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  text-align: left;
}

.demo-method-panel[hidden],
.demo-switcher-ready > .demo-method-panel > .demo-method-title {
  display: none !important;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.examples-grid.single-example {
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin: 24px auto;
}

.scene-example {
  min-width: 0;
  border: 1px solid #e3e6e9;
  border-radius: 5px;
  overflow: hidden;
  text-align: left;
}

.scene-example video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #fff;
}

.scene-example h3 {
  margin: 14px 16px 8px;
  font-size: 1.2rem;
}

.scene-example p {
  margin: 0 16px 12px;
  color: #59636e;
  font-size: 0.85rem;
}

.view-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 16px 16px;
}

.view-buttons button {
  padding: 5px 8px;
  border: 1px solid #ced4da;
  border-radius: 3px;
  background: white;
  color: #495057;
  font-size: 0.8rem;
  cursor: pointer;
}

.view-buttons button:hover,
.view-buttons button[aria-pressed="true"] {
  border-color: #007bff;
  color: #0069d9;
  background: #f2f8ff;
}

@media (max-width: 767.98px) {
  .examples-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .jumbotron {
    padding: 2rem 1rem;
  }

  header h2 {
    font-size: 1.65rem;
  }

  header h6 {
    line-height: 1.8;
  }

  section > div:first-child {
    padding: 0 15px;
  }
}