/* images */

/* float right and left images */
.float-right, .float-left {
  max-width: 50%;
  margin: 0.5rem 0 1rem;
}
.float-right { float: right; margin-left: 1.5rem; }
.float-left  { float: left;  margin-right: 1.5rem; }

@media (max-width: 640px) {
  .float-right, .float-left { 
    float: none; 
    max-width: 100%; 
    margin: 1.5rem 0; }
}

.img-full img { 
    width: 100%; 
    height: auto; 
}
figure { 
    margin: 0; 
}
figcaption { 
    font-size: 0.9rem; 
    color: var(--text-light, #666); 
    text-align: center; 
    margin-top: 0.5rem; 
}

/* fill images */
.img-fill {
  margin: 2rem 0;
  width: 100%;
  max-width: none;
}

.img-fill img {
  width: 100% !important;   /* yes, !important needed to beat Apollo’s defaults */
  height: auto !important;
  display: block;
  object-fit: contain;        /* prevents any accidental crop/stretch */
}

.img-fill figcaption {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
}

.diagram {
  background: #fff;
  /* padding: 1.5rem; */
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}



/* youtube embeds */
.youtube {
    width: 100%;
}

.youtube-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 1em 0; /* Optional: breathing room around embed */
}
.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}