/* Reset / base */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

/* Page background and default text */
body {
  background: #1a1a1a;
  color: #ffffff;
  font-family: Georgia, 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 20px;
}

main {
  margin: 0;
  padding: 0;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header Section */
.heading {
  text-align: center;
  margin-bottom: 40px;
  grid-column: 1 / -1;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

figure {
  margin: 0;
  padding: 0;
}

figure img {
  max-width: 200px;
  height: auto;
}

figcaption {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.hero-title {
  font-size: 28px;
  font-weight: bold;
  color: #ff6600;
  margin: 10px 0;
  font-family: Arial, sans-serif;
}

.hero-subtitle {
  font-size: 16px;
  color: #ccc;
  margin: 10px 0;
}

.hero-subtitle a {
  color: #00ccff;
  text-decoration: none;
}

.hero-subtitle a:hover {
  text-decoration: underline;
}

.author {
  font-size: 12px;
  color: #999;
  margin: 10px 0;
}

.author-name a {
  color: #00ccff;
  text-decoration: none;
}

.author-name a:hover {
  text-decoration: underline;
}

.publish-date {
  font-size: 12px;
  color: #666;
  margin: 5px 0;
}

.social-icons {
  margin: 15px 0;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.social-icons a {
  color: #00ccff;
  text-decoration: none;
  font-size: 16px;
}

.social-icons a:hover {
  color: #ff6600;
}

/* Magazine-style multi-column layout for the main article text */
.text {
  /* Use CSS multi-column flow instead of CSS grid to create a magazine/newspaper feel */
  column-count: 3;
  column-gap: 2rem;
  column-fill: balance; /* try to balance column heights */
  -webkit-column-count: 3;
  -webkit-column-gap: 2rem;
  -webkit-column-fill: balance;
  margin-bottom: 40px;
  margin-top: 30px;
  hyphens: auto;
}

/* Paragraphs flow naturally into columns */
.text p,
.text li,
.text blockquote,
.text .quote {
  display: block;
  margin: 0 0 1rem 0;
  text-align: justify;
  line-height: 1.6;
  font-size: 15px;
  color: #ffffff;
  widows: 2;
  orphans: 2;
}

/* First paragraph drop-cap */
.first-paragraph:first-letter {
  float: left;
  font-size: 4.2rem;
  line-height: 0.75;
  margin: 0 0.15em 0 0;
  color: #ff6600; /* orange drop-cap */
  font-weight: 700;
  font-family: Georgia, serif;
}

/* Hint / quote box styling — make it visually distinct and optionally span columns */
.text .quote {
  background: #072b2c; /* dark teal */
  color: #a8eaf0;      /* light cyan text */
  border-left: 4px solid #1abc9c;
  padding: 0.8rem 1rem;
  margin: 0 0 1rem 0;
  box-sizing: border-box;
  /* Try to span across all columns on supporting browsers */
  -webkit-column-span: all;
  column-span: all;
}

/* Keep blockquote styling readable (spans columns) */
.text blockquote {
  -webkit-column-span: all;
  column-span: all;
  border-left: 3px solid #ff6600;
  padding-left: 15px;
  margin: 1.25rem 0;
  color: #ccc;
  font-style: italic;
  background: transparent;
}

/* Lists: let them break naturally but keep padding */
.text .lists {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.text .lists li {
  margin: 0 0 0.75rem 0;
  padding: 0;
}

/* Images and image section remain grid-based to avoid breaking column flow */
.text-with-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 40px;
}

.brief-history {
  grid-column: 1 / 4;
}

.list-title {
  font-size: 20px;
  font-weight: bold;
  color: #ff6600;
  margin-bottom: 15px;
  grid-column: 1 / 4;
}

.brief-history > p {
  grid-column: 1 / 4;
}

.lists {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  grid-column: 1 / 4;
}

.lists li {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  text-align: justify;
}

.list-subtitle {
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  margin: 0 0 10px 0;
}

.lists li p {
  font-size: 13px;
  margin: 8px 0;
}

.image-wrapper {
  grid-column: 1 / 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 30px;
  align-items: start;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  max-width: 400px;
  justify-self: center;
}

.image-quote {
  text-align: center;
  color: #ccc;
  margin-top: 15px;
}

.image-quote p {
  text-align: center;
  font-size: 14px;
  margin: 10px 0;
}

.image-quote hr {
  grid-column: auto;
}

/* Responsive adjustments: reduce column-count on smaller screens */
@media (max-width: 1024px) {
  .text {
    column-count: 2;
    -webkit-column-count: 2;
  }

  .text-with-images,
  .lists {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .text {
    column-count: 1;
    -webkit-column-count: 1;
  }

  .text-with-images,
  .lists {
    grid-template-columns: 1fr;
  }

  .image-wrapper {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 24px;
  }

  body {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .hero-title {
    font-size: 20px;
  }

  .text p,
  .lists li p {
    font-size: 13px;
  }
}
