/* RU4M Brand Colors
   Gradient: linear-gradient(180deg, #2ccf6a, #0985cc)
   Green: #2ccf6a  |  Blue: #0985cc
*/
:root {
  /* Gradient accent colors — for links, highlights, emphasis only */
  --ru4m-green: #2ccf6a;
  --ru4m-blue: #0985cc;
  --ru4m-gradient: linear-gradient(180deg, #2ccf6a, #0985cc);
  --ru4m-gradient-h: linear-gradient(135deg, #2ccf6a, #0985cc);
  /* Primary — navy blue (header, footer, tabs) */
  --md-primary-fg-color: #1B2A5B;
  --md-primary-fg-color--light: #2D4080;
  --md-primary-fg-color--dark: #111D42;
  /* Accent — green from gradient */
  --md-accent-fg-color: #2ccf6a;
  --md-accent-fg-color--transparent: rgba(44, 207, 106, 0.1);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #2D4080;
  --md-primary-fg-color--light: #4060B0;
  --md-primary-fg-color--dark: #1B2A5B;
  --md-accent-fg-color: #3ddb7a;
  --md-accent-fg-color--transparent: rgba(61, 219, 122, 0.1);
}

/* Tabs bar — darker than header */
.md-tabs {
  background-color: var(--md-primary-fg-color--dark);
}

[data-md-color-scheme="slate"] .md-tabs {
  background-color: #0a1225;
}

/* Logo sizing in header */
.md-header__button.md-logo img {
  height: 1.8rem;
  width: auto;
}

/* Screenshot styling — phone mockups */
.md-content img {
  max-width: 320px;
  display: block;
  margin: 1rem auto;
  border-radius: 4px;
}

[data-md-color-scheme="slate"] .md-content img {
  filter: brightness(0.95);
}

/* Step numbering — gradient left border */
.md-typeset h3 {
  border-left: 3px solid var(--ru4m-green);
  padding-left: 0.8rem;
}

/* Admonition — tip uses green, info uses blue */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: var(--ru4m-green);
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(44, 207, 106, 0.1);
}

.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: var(--ru4m-blue);
}

.md-typeset .info > .admonition-title,
.md-typeset .info > summary {
  background-color: rgba(9, 133, 204, 0.1);
}

/* Feature cards on homepage */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .feature-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }
  .feature-card {
    min-width: 260px;
    max-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.feature-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(9, 133, 204, 0.12);
  border-color: var(--ru4m-blue);
}

.feature-card h3 {
  border-left: none;
  padding-left: 0;
  margin-top: 0;
  font-size: 1.1rem;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Homepage links — gradient underline on hover */
.feature-card a {
  background-image: var(--ru4m-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Nav active state — green accent */
.md-nav__link--active {
  color: var(--ru4m-green) !important;
  font-weight: 600;
}

/* Search highlight — green */
.md-search-result mark {
  background-color: rgba(44, 207, 106, 0.2);
  color: inherit;
}

/* Horizontal rules — gradient */
.md-typeset hr {
  border: none;
  height: 2px;
  background: var(--ru4m-gradient-h);
  opacity: 0.4;
}

/* Scrollbar accent (webkit) */
.md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
  background: var(--ru4m-gradient);
  border-radius: 4px;
}

/* Hide homepage h1 (title is in hero section) */
.hero-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ===== Homepage Hero ===== */
.hero {
  text-align: center;
  padding: 4rem 1rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-heading {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 1.2rem;
  color: var(--md-default-fg-color);
}

.hero-heading .gradient {
  background: var(--ru4m-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.hero-buttons .md-button {
  border-radius: 8px;
  padding: 0.6rem 1.8rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-buttons .md-button--primary {
  background: var(--ru4m-gradient-h);
  border: none;
  color: #fff;
}

.hero-buttons .md-button--primary:hover {
  opacity: 0.9;
}

/* Store badges */
.store-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.store-badges img {
  height: 44px;
  width: auto;
  max-width: none;
  border-radius: 0;
  filter: none;
}

[data-md-color-scheme="slate"] .store-badges img {
  filter: brightness(0.9);
}

/* Stats row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin: 2rem 0 0.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.stat-item {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--ru4m-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--md-default-fg-color--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Quick-start steps */
.quick-start-section {
  background: linear-gradient(135deg, rgba(44, 207, 106, 0.08), rgba(9, 133, 204, 0.08));
  border: 1px solid rgba(9, 133, 204, 0.12);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  margin: 2.5rem 0;
}

[data-md-color-scheme="slate"] .quick-start-section {
  background: linear-gradient(135deg, rgba(44, 207, 106, 0.06), rgba(9, 133, 204, 0.06));
  border-color: rgba(9, 133, 204, 0.15);
}

.quick-start {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0 0;
}

@media (max-width: 768px) {
  .hero {
    padding: 2rem 0.5rem 1rem;
  }
  .hero-heading {
    font-size: 1.6rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-buttons .md-button {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
  }
  .store-badges img {
    height: 36px;
  }
  .quick-start-section {
    padding: 1.2rem 0.5rem;
    overflow-x: auto;
  }
  .quick-start {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }
  .quick-start-step {
    min-width: 180px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.quick-start-step {
  text-align: center;
  padding: 1rem 0.5rem;
}

.quick-start-step .step-num {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  background: var(--ru4m-gradient-h);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.quick-start-step h4 {
  margin: 0.3rem 0;
  font-size: 0.95rem;
}

.quick-start-step p {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
  margin: 0.3rem 0 0.5rem;
}

/* Help card */
.help-card {
  border: 1px solid rgba(9, 133, 204, 0.15);
  background: linear-gradient(135deg, rgba(44, 207, 106, 0.05), rgba(9, 133, 204, 0.05));
  border-radius: 12px;
  padding: 1.5rem 2rem;
  text-align: center;
  margin: 2.5rem 0;
}

[data-md-color-scheme="slate"] .help-card {
  background: linear-gradient(135deg, rgba(44, 207, 106, 0.04), rgba(9, 133, 204, 0.04));
  border-color: rgba(9, 133, 204, 0.15);
}

.help-card h2 {
  margin-top: 0;
}

.help-card p {
  margin-bottom: 0;
}

/* ===== Custom Footer ===== */
.md-footer-meta__inner {
  display: block;
}

.ru4m-footer {
  display: flex;
  gap: 6rem;
  padding: 2.5rem 1rem 1.5rem;
  color: var(--md-footer-fg-color--lighter);
  font-size: 0.78rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .ru4m-footer {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
  }
}

.ru4m-footer__col {
  max-width: 280px;
}

.ru4m-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ru4m-footer p {
  margin: 0.15rem 0;
}

.ru4m-footer a {
  color: var(--md-footer-fg-color--light);
  text-decoration: none;
}

.ru4m-footer a:hover {
  color: var(--ru4m-green);
}

.ru4m-footer ul,
.ru4m-footer ul li {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-left: 0 !important;
}

.ru4m-footer ul li {
  margin: 0.25rem 0;
}

.ru4m-footer__bottom {
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
  padding: 0.7rem 0;
  font-size: 0.72rem;
  color: var(--md-footer-fg-color--lighter);
  letter-spacing: 0.02em;
}
