/* ============================== //
  SPECIAL ARTICLE COMPONENTS
  - .info-box  → For explainer/information callouts
  - .faq-box    → For basic frequently asked questions
/* ============================== */



/* === Reset layout width === */
main {
  max-width: 100%;
}

/* === Fixed Side Ads === */
.ad-left, .ad-right {
  position: fixed;
  top: 120px; 
  z-index: 10;
  box-sizing: border-box;
}

.ad-left {
  width: 17%;
  padding-left: 1rem;
  padding-right: 1rem;
}

.ad-right {
  width: 17%;
  right: 0px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.ad-slot {
  background: #f4f4f4;
  border: 1px dashed #aaa;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #333;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

/* === Article Wrapper and Content === */
.article-scroll-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

.main-article {
  background: white;
  padding: 0.5rem 2rem 2rem 2rem;
  border-left: 4px solid #2e86de;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 5px;
  width: 64%;
  margin: 1rem auto;
  box-sizing: border-box;
}



/* === General Article Styling === */
.page h1, .main-article h1, article h1 {
  font-size: 2rem;
  margin-block: 0.67em;
}

.page h2 {
  margin-top: 2rem;
  color: #0e0e0e;
}

.page p {
  margin: 1rem 0;
  color: #333;
}

.page ul {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.page li {
  margin-bottom: 0.5rem;
}


.related-articles {
  margin-top: 2.5rem;
  width: 64%;
  margin: 1rem auto;
  padding: 1.5rem 0 0 0;
  border-top: 2px solid #232a3b33;
}

.related-articles h3 {
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  color: #3a476a;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.related-articles ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Always 3 columns */
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-items: center; /* Centers items if fewer than 3 */
}

.related-articles li {
  /* Remove max-width! */
  width: 100%;
  min-width: 0;
  background: #232a3b09;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(35, 42, 59, 0.08);
  padding: 1.1rem 1.1rem 0.9rem 1.1rem;
  transition: box-shadow 0.15s, transform 0.13s;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  justify-content: space-between;
}

.related-articles li a {
  text-decoration: none;
  color: inherit;
}

.related-articles li strong {
  font-size: 1.08rem;
  color: #232a3b;
}

.related-articles .date {
  font-size: 0.96rem;
  color: #444;
  margin-top: 0.3rem;
  display: block;
}

.related-articles li:hover,
.related-articles li:focus-within {
  box-shadow: 0 4px 18px 0 rgba(35, 42, 59, 0.16);
  transform: translateY(-3px) scale(1.03);
  background: #232a3b16;
}

/* ================================ */
/*    SPECIAL ARTICLE COMPONENTS    */
/* ================================ */

/* ====== INFO BOX ======= */
.info-box {
  background: #eef4fa;
  border-left: 5px solid #5082d9;
  padding: 1em 1.2em;
  margin: 1em 0;
  border-radius: 0.6em;
}

/* ====== FAQ BOX ======= */
.faq-box {
  background: #f8f8f1;
  border-left: 5px solid #bca34b;
  padding: 1em 1.2em;
  margin: 2em 0;
  border-radius: 0.6em;
}

.faq-box ul {
  margin-top: 0.6em;
  margin-bottom: 0;
  padding-left: 1.2em;
}

/* ====== PULL-QUOTE BOX ======= */
.pull-quote-box {
  background: #f3f4f9;
  border-left: 4px solid #3a476a;
  margin: 1.8em 0;
  padding: 1em 1.2em;
  font-style: italic;
  color: #293654;
  box-shadow: 0 2px 8px #232a3b0c;
  border-radius: 10px;
}
.pull-quote-box blockquote { margin: 0; }
.pull-quote-box footer { 
  font-size: 0.93em; 
  color: #555b7a; 
  margin-top: 0.5em; 
  padding: 0;
  text-align: right;
  background: #f3f4f9;
}

/* ====== GLOSSARY BOX ======= */
.glossary-box {
  background: #f6f7fa;
  border: 1.5px solid #c7cfe8;
  border-radius: 8px;
  padding: 1em 1.3em;
  margin: 1.5em 0;
  color: #2d365a;
  font-size: 0.98em;
}
.glossary-box ul { margin: 0.6em 0 0 0; padding: 0 0 0 1.1em; }
.glossary-box li { margin-bottom: 0.2em; }

/* ====== POLL BOX ======= */
.poll-box {
  background: #f4f7fb;
  border: 1.5px solid #d2d7e9;
  border-radius: 8px;
  padding: 1em 1.2em;
  margin: 1.6em 0;
  color: #2b365a;
  font-size: 1em;
}
.poll-box button {
  margin-top: 0.6em;
  background: #3a476a;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.4em 1em;
  cursor: pointer;
  font-size: 1em;
}

/* ====== TRIVIA BOX ======= */
.trivia-box {
  background: #fffbe9;
  border-left: 4px solid #ffd600;
  border-radius: 7px;
  padding: 1em 1.2em;
  margin: 1.7em 0;
  color: #725c1c;
  font-size: 1em;
  box-shadow: 0 1.5px 6px #ffd60022;
}
.trivia-box ul { margin: 0.7em 0 0 0; padding: 0 0 0 1.2em; }
.trivia-box li { margin-bottom: 0.18em; }


/* ====== DATA TABLES ====== */
/* Table wrapper for better control */
.table-wrap {
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 2px 8px rgba(35,42,59,0.06);
  margin: 1.5rem 0;
  background: #fff; /* or #f9f9fb if you want light gray */
}

/* Keep your current table style but tighten it up */
.table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px; /* Forces scroll on mobile */
}

.table-wrap th,
.table-wrap td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: #f4f5f7;
  font-weight: 600;
  border-bottom: 2px solid #e0e3e9;
}

.table-wrap tr:nth-child(even) {
  background: #fafbfc;
}

.table-wrap td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Optional caption for SEO & accessibility */
.table-wrap caption {
  caption-side: bottom;
  padding-top: 0.4rem;
  font-size: 0.9rem;
  color: #555b7a;
}

/* Make sure pull quotes don’t sit flush against it */
.table-wrap + .pull-quote-box {
  margin-top: 1.5rem;
}


/* =========================================== */
/*    SPECIAL EFFECTS AND STYLES FOR IMAGES    */
/* =========================================== */
.article-image-wrap {
  position: relative;
  display: block;
  max-width: 1200px;
  margin: 1rem 5rem;
  border-radius: 0.6em;
  overflow: hidden;
}

.article-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
  border-radius: 0.6em;
}

.image-credit {
  position: absolute;
  bottom: 0.75em;
  right: 0.9em;
  background: rgba(24, 24, 24, 0.73); /* semi-transparent dark */
  color: #fff;
  padding: 0.22em 0.75em;
  font-size: 0.98em;
  border-radius: 0.4em;
  font-family: inherit;
  letter-spacing: 0.01em;
  pointer-events: none; /* so it doesn't block image context menu */
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}





/* ===================================================== */
/*    ===============================================    */
/*       SPECIAL LAYOUT FOR DIFFERENT SCREEN SIZES       */
/*                                                       */
/*     Every special device should be differenciated     */
/*     under this comment, any other place is bad :(     */
/*    ================================================== */
/* ===================================================== */

@media (max-width: 1000px) {
  .ad-left, .ad-right {
    display: none;
  }

  .article-scroll-wrapper {
    padding: 1rem;
  }

  .main-article {
    width: calc(100% - 1rem);
    padding: 0.8rem;
    border-left: 0px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    margin: 0;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  body {
    padding: 20vw;
  }

  .progressive-image {
    margin: 1rem 0;
  }

  .article-image-wrap {
    margin: 1rem 0;
  }

  .image-credit {
    font-size: 0.9em;
  }

  .related-articles {
    width: calc(100% - 1rem);
    padding: 0.8rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .related-articles ul {
    grid-template-columns: 1fr;
  }

  .data-table { min-width: 560px; }
}