/* Robot showcase page (Pages/Robot/Robot.cshtml). Behavior lives in wwwroot/js/robot.js.
   Prefix: rs- (robot showcase). Brand palette: purple #442e5f, indigo #6366f1, navy #0f172a. */

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.rs-hero {
  position: relative;
  color: #fff;
  background-color: #0f172a;
  overflow: hidden;
  isolation: isolate;
}

  /* Blurred, dimmed copy of the robot's cover image fills the hero. */
  .rs-hero .rs-hero-back {
    position: absolute;
    inset: -24px;
    background-size: cover;
    background-position: center 30%;
    filter: blur(14px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.55;
    z-index: -2;
  }

  /* Brand gradient wash keeps text legible no matter what the cover image looks like. */
  .rs-hero .rs-hero-wash {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.35) 45%, rgba(15, 23, 42, 0.92) 100%),
      linear-gradient(115deg, rgba(68, 46, 95, 0.75) 0%, rgba(99, 102, 241, 0.25) 60%, rgba(206, 57, 145, 0.25) 100%);
    z-index: -1;
  }

  /* Only vertical padding: the horizontal padding comes from .container so the hero text lines up
     with the page content below it (nested rows cancel the column gutters, leaving the container's). */
  .rs-hero .rs-hero-content {
    padding-top: 2.25rem;
    padding-bottom: 2.75rem;
  }

  .rs-hero .breadcrumb {
    background: transparent;
    margin-bottom: 1rem;
    font-size: 0.85rem;
  }

    .rs-hero .breadcrumb a,
    .rs-hero .breadcrumb-item + .breadcrumb-item::before {
      color: rgba(255, 255, 255, 0.75);
    }

    .rs-hero .breadcrumb a:hover {
      color: #fff;
    }

  .rs-hero .rs-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    margin-bottom: 1rem;
  }

  .rs-hero h1 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  }

  .rs-hero .rs-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
  }

    .rs-hero .rs-byline a {
      color: #fff;
      font-weight: 600;
      text-decoration: none;
    }

      .rs-hero .rs-byline a:hover {
        text-decoration: underline;
      }

  .rs-hero .rs-byline-author {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
  }

    .rs-hero .rs-byline-author img {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid rgba(255, 255, 255, 0.7);
      background: #fff;
    }

  .rs-hero .rs-byline-sep {
    opacity: 0.5;
  }

/* Stat pills (views, comments, likes, photos, videos). */
.rs-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.rs-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  backdrop-filter: blur(6px);
  text-decoration: none;
}

  .rs-stat:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
  }

  .rs-stat svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex-shrink: 0;
  }

  .rs-stat strong {
    font-weight: 700;
  }

/* ─── Page body ────────────────────────────────────────────────────────────── */
.rs-page {
  padding-top: 1.5rem;
}

.rs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

  .rs-toolbar .rs-toolbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

/* Section headings in the main column. */
.rs-section {
  margin-bottom: 2rem;
}

.rs-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

  .rs-section-title svg {
    width: 1.2em;
    height: 1.2em;
    fill: #442e5f;
    flex-shrink: 0;
  }

.rs-body {
  font-size: 1.05rem;
  line-height: 1.75;
}

  .rs-body img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
  }

  .rs-body .forum-post-actions {
    margin-top: 0.75rem;
  }

/* ─── Media gallery ────────────────────────────────────────────────────────── */
.rs-gallery {
  margin-bottom: 1.75rem;
}

.rs-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

  .rs-stage .rs-stage-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rs-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
  }

  .rs-stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

  /* Click-to-load video facade: thumbnail with a play button. */
  .rs-stage .rs-facade {
    position: absolute;
    inset: 0;
    display: block;
    cursor: pointer;
    border: 0;
    padding: 0;
    background: #0f172a;
  }

    .rs-stage .rs-facade img {
      object-fit: cover;
      opacity: 0.9;
      transition: opacity 0.2s ease, transform 0.3s ease;
    }

    .rs-stage .rs-facade:hover img {
      opacity: 1;
      transform: scale(1.02);
    }

  .rs-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(68, 46, 95, 0.92);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    pointer-events: none;
  }

    .rs-play::after {
      content: "";
      display: block;
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 14px 0 14px 24px;
      border-color: transparent transparent transparent #fff;
      margin-left: 5px;
    }

  .rs-facade:hover .rs-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(99, 102, 241, 0.95);
  }

  /* Image slides open full size in a new tab. */
  .rs-stage .rs-stage-link {
    position: absolute;
    inset: 0;
    display: block;
  }

  .rs-stage .rs-stage-caption {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(15, 23, 42, 0.65);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    pointer-events: none;
  }

/* Prev / next arrows on the stage. */
.rs-stage .rs-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
}

  .rs-stage:hover .rs-nav,
  .rs-stage:focus-within .rs-nav {
    opacity: 1;
  }

  .rs-stage .rs-nav:hover {
    background: rgba(99, 102, 241, 0.9);
  }

  .rs-stage .rs-nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  .rs-stage .rs-nav-prev {
    left: 0.75rem;
  }

  .rs-stage .rs-nav-next {
    right: 0.75rem;
  }

/* Thumbnail strip. */
.rs-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.rs-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #e9ecef;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

  .rs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .rs-thumb:hover {
    opacity: 1;
    transform: translateY(-1px);
  }

  .rs-thumb.active {
    opacity: 1;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  }

  .rs-thumb .rs-play {
    width: 30px;
    height: 30px;
  }

    .rs-thumb .rs-play::after {
      border-width: 6px 0 6px 10px;
      margin-left: 2px;
    }

/* ─── Build details (skills / parts) ───────────────────────────────────────── */
.rs-detail-card {
  height: 100%;
  border: 1px solid #e6e6ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #faf9fd 0%, #fff 100%);
  padding: 1.25rem 1.25rem 1rem;
}

  .rs-detail-card .rs-detail-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
  }

    .rs-detail-card .rs-detail-head .rs-detail-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: #442e5f;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

      .rs-detail-card .rs-detail-head .rs-detail-icon svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
      }

    .rs-detail-card .rs-detail-head h3 {
      font-size: 1.05rem;
      font-weight: 700;
      margin: 0;
    }

  .rs-detail-card .rs-detail-body {
    line-height: 1.65;
  }

    .rs-detail-card .rs-detail-body p:last-child {
      margin-bottom: 0;
    }

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
@media (min-width: 992px) {
  .rs-sidebar {
    position: sticky;
    top: 1rem;
  }
}

.rs-card {
  border: 1px solid #e6e6ef;
  border-radius: 12px;
  background: #fff;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

  .rs-card h2,
  .rs-card h3 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6c6a78;
    margin-bottom: 0.9rem;
  }

/* Builder card. */
.rs-builder {
  text-align: center;
}

  .rs-builder .rs-builder-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 0.75rem;
  }

    .rs-builder .rs-builder-avatar img {
      width: 96px;
      height: 96px;
      border-radius: 50%;
      object-fit: cover;
      border: 3px solid #fff;
      box-shadow: 0 0 0 3px #6366f1, 0 8px 24px rgba(68, 46, 95, 0.2);
      background: #fff;
    }

    .rs-builder .rs-builder-avatar .badge {
      position: absolute;
      right: -4px;
      bottom: 4px;
    }

  .rs-builder .rs-builder-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
  }

    .rs-builder .rs-builder-name a {
      color: #1a1a2e;
      text-decoration: none;
    }

      .rs-builder .rs-builder-name a:hover {
        color: #442e5f;
      }

  .rs-builder .rs-builder-meta {
    font-size: 0.85rem;
    color: #6c6a78;
  }

  .rs-builder .rs-builder-bio {
    font-size: 0.9rem;
    color: #444;
    margin-top: 0.75rem;
    line-height: 1.5;
  }

  .rs-builder .rs-builder-social {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

    .rs-builder .rs-builder-social img {
      opacity: 0.8;
      transition: opacity 0.15s ease;
    }

    .rs-builder .rs-builder-social a:hover img {
      opacity: 1;
    }

  .rs-builder .rs-builder-actions {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
  }

/* Project facts list. */
.rs-facts {
  list-style: none;
  padding: 0;
  margin: 0;
}

  .rs-facts li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-top: 1px solid #f0eff5;
    font-size: 0.9rem;
    color: #444;
  }

    .rs-facts li:first-child {
      border-top: 0;
      padding-top: 0;
    }

    .rs-facts li svg {
      width: 1.1em;
      height: 1.1em;
      fill: #6366f1;
      flex-shrink: 0;
    }

    .rs-facts li .rs-fact-value {
      margin-left: auto;
      font-weight: 600;
      color: #1a1a2e;
      text-align: right;
    }

/* Share row. */
.rs-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

  .rs-share .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .rs-share .btn img {
    width: 16px;
    height: 16px;
  }

  .rs-share .btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
  }

/* ─── Discover / more robots ───────────────────────────────────────────────── */
.rs-discover {
  background: linear-gradient(180deg, #f6f5fb 0%, #fbfbfe 100%);
  border: 1px solid #e6e6ef;
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1rem;
  margin-top: 2rem;
}

  .rs-discover .rs-section-title {
    margin-bottom: 1.25rem;
  }

  .rs-discover .rs-discover-sub {
    color: #6c6a78;
    margin-top: -0.75rem;
    margin-bottom: 1.25rem;
  }

/* ─── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .rs-hero .rs-hero-content {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .rs-hero .rs-byline {
    font-size: 0.875rem;
  }

  .rs-thumb {
    width: 92px;
    height: 60px;
  }

  .rs-stage .rs-nav {
    opacity: 1;
    width: 36px;
    height: 36px;
  }
}
