.md-content:has(.hero-section) .md-content__inner {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

/* When TOC is hidden, keep the sidebar's space reserved so content doesn't stretch */
.md-sidebar--secondary[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

.hero-section {
  background: url('../assets/images/hero-bg.png') center top / cover no-repeat;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 3rem 4rem;
  z-index: 1;
}

/* Hide permalink anchor on hero heading */
.hero-section .headerlink {
  display: none !important;
}

.hero-section h1 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  max-width: 36rem;
  margin: 0 0 1.25rem;
}

/* Buttons on the hero */
.hero-section .md-button {
  color: #fff;
  border-color: #fff;
  background-color: transparent;
  border-radius: 0;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hero-section .md-button:hover,
.hero-section .md-button:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}

.hero-section .md-button--primary {
  background-color: #ff4088;
  border-color: #ff4088;
  color: #fff;
}

.hero-section .md-button--primary:hover,
.hero-section .md-button--primary:focus {
  background-color: #ff66a3;
  border-color: #ff66a3;
  color: #fff;
}

/* Lock home page to the viewport — no scrolling, no overflow, no bounce */
html:has(body.home-page),
body.home-page {
  overflow: hidden;
  height: 100vh;
  overscroll-behavior: none;
}

/* Hide theme toggle on home page */
body.home-page .md-header__option {
  display: none;
}

/* Transparent header + tabs on home page */
body.home-page .md-header,
body.home-page .md-header::before,
body.home-page .md-tabs {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Brighter nav/header text on home page for readability over the image */
body.home-page .md-header,
body.home-page .md-tabs__link,
body.home-page .md-tabs__link--active {
  color: #fff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: opacity 0.15s ease;
}

/* Restore hover feedback on home page */
body.home-page .md-tabs__link:hover {
  opacity: 0.7 !important;
}

/* Hide footer only on the home page */
body.home-page .md-footer {
  display: none;
}

/* Hide the entire footer meta bar (copyright + "Made with Zensical") */
.md-footer-meta {
  display: none;
}

/* Logo: white version on dark/slate (which includes the home page) */
[data-md-color-scheme="slate"] .md-logo img {
  content: url('../assets/images/logo-white.svg');
}
