/* ---- ReplayBG docs custom styles ---- */

:root {
  /* ReplayBG logo red */
  --md-primary-fg-color: #cb5147;
  --md-primary-fg-color--light: #d97066;
  --md-primary-fg-color--dark: #a83e35;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  --md-accent-fg-color: #b23a30;
}

/* Keep links/hover legible in dark mode */
[data-md-color-scheme="slate"] {
  --md-accent-fg-color: #e8837a;
}

/* ---- Hero (home page) ---- */
.rbg-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.rbg-hero img {
  width: 320px;
  max-width: 80%;
  height: auto;
  margin-bottom: 1.2rem;
}

.rbg-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0.2rem 0;
}

.rbg-hero p.tagline {
  font-size: 1.1rem;
  max-width: 40rem;
  color: var(--md-default-fg-color--light);
  margin: 0.4rem auto 1.4rem;
}

.rbg-cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.rbg-cta .md-button {
  margin: 0;
}

/* ---- Feature cards ---- */
.rbg-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

.rbg-features .card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.5rem;
  padding: 1.2rem 1.3rem;
  background: var(--md-default-bg-color);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rbg-features .card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.rbg-features .card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.rbg-features .card .icon {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

/* Center images that carry the .rbg-figure class */
.rbg-figure {
  display: block;
  margin: 1.2rem auto;
  max-width: 100%;
}

/* ---- Header: site name (no logo) + inline top-level nav ---- */
.md-header__site-name {
  color: inherit;
  font-weight: 700;
}

.md-header__site-name:hover {
  color: inherit;
}

/* Inline navigation menu, aligned on the search-toolbar row */
.md-header__nav {
  display: flex;
  align-items: center;
  margin-left: 1.2rem;
}

.md-header__nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-header__nav .md-tabs__item {
  height: auto;
  display: flex;
  opacity: 1;
}

.md-header__nav .md-tabs__link {
  margin: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--md-primary-bg-color);
  opacity: 0.82;
  border-radius: 0.2rem;
  white-space: nowrap;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.md-header__nav .md-tabs__link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.md-header__nav .md-tabs__item--active .md-tabs__link {
  opacity: 1;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
}

/* Collapse the inline nav on smaller screens; the drawer takes over */
@media screen and (max-width: 76.1875em) {
  .md-header__nav {
    display: none;
  }
}
