/* Screenshot rows */
.img-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0;
}
.img-row img {
  width: 25%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Download block styling */
.md-typeset .admonition.download {
  border-left: 4px solid var(--md-accent-fg-color);
  background: var(--md-code-bg-color);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  margin: 1.2rem 0;
}
.md-typeset .admonition.download > .admonition-title {
  font-weight: 700;
  font-size: 1.05rem;
}

/* --- Centered Button Wrapper --- */
.center-button {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 1rem 0;
  width: 100%;
}
.center-button.stacked {
  flex-direction: column;
}

/* Light/dark toggle for general elements */
.dark-only {
  display: none !important;
}
.light-only {
  display: block !important;
}
[data-md-color-scheme="slate"] .dark-only {
  display: block !important;
}
[data-md-color-scheme="slate"] .light-only {
  display: none !important;
}

/* Light/dark toggle specifically for video containers (uses flex, not block) */
.video-dark {
  display: none !important;
}
.video-light {
  display: flex !important;
}
[data-md-color-scheme="slate"] .video-dark {
  display: flex !important;
}
[data-md-color-scheme="slate"] .video-light {
  display: none !important;
}

/* Video Container Styling */
.center-video-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  width: 100%;
}

/* Strip default browser margins and set video size */
.center-video-container figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 2rem 0;
  width: 80%;
}

/* Ensure video fills the figure container */
.center-video-container video {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: block;
}

/* Style the captions to look clean and centered */
.center-video-container figcaption {
  margin-top: 0.8rem;
  text-align: center;
  font-weight: 500;
  color: var(--md-default-fg-color--light);
}

/* On mobile (Z Flip), make it wider so controls are easy to touch */
@media screen and (max-width: 768px) {
  .center-video-container figure {
    width: 100%;
  }
}

/* Unified Image Styling */
.theme-image {
  width: 32%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  margin: 1rem auto;
  display: block;
}

/* Mobile: Make image wider on small screens */
@media screen and (max-width: 768px) {
  .theme-image {
    width: 85%;
  }
}

/* --- Image Rows (Group of 3) --- */
.image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.5rem 0;
  justify-content: center;
}
.image-row img {
  width: 31%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  object-fit: cover;
}

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 768px) {
  .image-row {
    flex-direction: column;
    gap: 15px;
  }
  .image-row img {
    width: 100%;
  }
}
