/* Custom overrides for site appearance */

/* Hide the theme's top site title ("app") */
.markdown-body > h1:first-of-type { display: none !important; }

/* Small additional tweaks can go here */

/* Make first image (bg.gif) full-bleed across the viewport and fix height to 100px */
.markdown-body > p:first-of-type img {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%);
  display: block;
  height: 100px; /* enforced height */
  object-fit: cover;
}

/* Make images responsive */
.markdown-body img { max-width: 100%; height: auto; }

/* Hero grid: two-column layout for title.gif and text */
.hero-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  align-items: start;
  margin: 1.2rem 0 1.8rem 0;
}
.hero-grid .hero-image img { width: 100%; height: auto; display: block; }
.hero-grid .hero-text h1 { margin-top: 0; }

/* Responsive: stack on small screens */
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .hero-image { order: -1; }
}

/* Header hero: title.gif placed on the right of the intro */
.header-hero { display: grid; grid-template-columns: 1fr 150px; gap: 1rem; align-items: start; margin-bottom: 1.2rem; }
.header-hero .header-image img { width: 100%; max-width: 150px; display: block; }
.header-hero .header-text p { margin: 0 0 0.85rem 0; }
@media (max-width: 900px) {
  .header-hero { grid-template-columns: 1fr; }
  .header-hero .header-image { order: -1; display:flex; justify-content:center; }
  .header-hero .header-image img { width: 150px; max-width: 150px; }
}

/* Tweak overall spacing and make the title.gif act as a left column (works even if raw HTML is present) */
.markdown-body p { margin-bottom: 1rem; line-height: 1.7; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin-top: 1.2rem; margin-bottom: 0.6rem; }

/* Float title image to left to visually create a two-column layout (halved) */
.markdown-body > p img[alt="title.gif"],
.markdown-body > p img[src$="/title.gif"],
.markdown-body > p img[src$="title.gif"] {
  float: left;
  width: 130px; /* half size */
  margin: 0 1rem 0.8rem 0;
  display: block;
}
@media (max-width: 720px) {
  .markdown-body > p img[alt="title.gif"],
  .markdown-body > p img[src$="/title.gif"],
  .markdown-body > p img[src$="title.gif"] {
    float: none;
    width: 130px; /* keep small on mobile */
    margin: 0 auto 1rem; /* center */
  }
}
/* Page margins: center content with 30% left/right margins on large screens */
.markdown-body {
  margin-left: 15%;
  margin-right: 15%;
}
@media (max-width: 900px) {
  .markdown-body {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

