/* site.css — shared styles for Queen of Hearts articles */

/* Layout */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.container {
  flex-grow: 1;
  max-width: 640px;
}

/* Divider */
hr {
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}

/* Links */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Article metadata */
.article-date {
  font-size: 0.8em;
  color: color-mix(in srgb, currentColor 50%, transparent);
  margin-bottom: 0.5rem;
}

/* Images */
.img_container {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.img_container img {
  display: block;
  width: 100%;
  height: auto;
}

.img-caption {
  font-size: 0.78em;
  color: color-mix(in srgb, currentColor 50%, transparent);
  font-style: italic;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Photo grids */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.photo-grid .img_container {
  margin-bottom: 0;
}

.photo-grid + .img-caption {
  margin-top: 0.5rem;
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  margin-bottom: 2rem;
}

table th, table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

table th {
  background: color-mix(in srgb, currentColor 5%, transparent);
  font-weight: bold;
  width: 45%;
}

table tr:last-child th,
table tr:last-child td {
  border-bottom: none;
}

/* External link boxes */
.external-link-box {
  display: inline-block;
  background: color-mix(in srgb, currentColor 5%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.9em;
  margin-bottom: 1.5rem;
}

/* Navigation */
.back-link {
  margin-top: 2rem;
  font-size: 0.85em;
}

/* Smaller images on large screens */
@media (min-width: 900px) {
  .img_container {
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
  }
}
