/* ================================
   content.css — Styles for page content
   ================================ */

/* --------------------------------
   1) Page-wide styling (inherited from main.css)
   -------------------------------- */

/* (Assuming main.css already sets body { background: #fff; } etc.) */

/* --------------------------------
   2) Page Header Styling
   -------------------------------- */
.page-header {
  position: sticky; /* optional — keeps title visible when scrolling */
  top: 0;
  text-align: center;
  background: var(--main-bg);
  z-index: 100;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #ddd;
}

.page-header h1 {
  margin: 0;
  font-size: 2.2rem;
  color: var(--main-text);
}

/* --------------------------------
   3) Main Content Block
   -------------------------------- */
.text {
  background-color: #fff;
  padding: 1rem 2rem;
  line-height: 1.6;
  color: #333;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  white-space: pre-wrap;
}

.text img {
  float: left;
  margin: 0.5rem 1rem 0.5rem 0;
  max-width: 100%;
  height: auto;
}

/* --------------------------------
   4) Content Section Titles
   -------------------------------- */
.title {
  display: inline-block;
  width: 100%;
  text-align: left;
  font-weight: bold;
  font-size: 1.75rem;
  color: #0d1a26;
  margin-top: 0rem;
  margin-bottom: 0rem;
}

/* --------------------------------
   5) Link Styling
   -------------------------------- */
.text a {
  color: #00008B;
  font-weight: bold;
  text-decoration: underline;
}
.text a:visited {
  color: #8B0000;
  font-weight: normal;
}

/* --------------------------------
   6) Credits Section
   -------------------------------- */
.credits {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-style: italic;
  color: #555;
  font-size: 0.9rem;
}

/* --------------------------------
   7) Responsive Tweaks (Mobile)
   -------------------------------- */
@media screen and (max-width: 600px) {
  .page-header h1 {
    font-size: 1.6rem;
  }
  .text {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  .title {
    font-size: 1.25rem;
  }
  .fact-block {
    white-space: pre-wrap !important;
  }
}

/* --------------------------------
   8) Images Inside Content
   -------------------------------- */
.content img,
.text img {
  width: auto !important;
  max-width: 100% !important;
}

.fact-block {
  overflow: hidden;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  white-space: pre-line;
}
.fact-block img {
  float: left;
  width: 120px;
  height: auto;
  margin-right: 1rem;
}
.fact-block .title {
  margin-bottom: 0.1rem;
}
/* Zebra-striped fact blocks */
.fact-block:nth-child(odd) {
  background-color: #f2f2f2;
}
.fact-block:nth-child(even) {
  background-color: #ffffff;
}

.related-topics {
  margin: 2rem 0;
}
.related-topics h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
/* Pull in the dynamic-tiles rules *after* everything else */
@import url("/css/dynamic-tiles.css");

.related-image {
  text-align: center;
  margin: 1rem 0 2rem 0;
}
.related-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
}

<style>
.video-container {
  max-width: 100%;
  margin: 2em auto;       /* center and give vertical breathing room */
}
.video-container iframe {
  width: 100%;            /* fill the container */
  aspect-ratio: 16/9;     /* keep a 16:9 ratio */
  border: 0;
  display: block;         /* remove inline quirks */
}
</style>
