.container {
  width: 800px;
  max-width: 90vw;
  margin: 10px auto;
  background: var(--dark-background);
  /* filter: drop-shadow(2px 4px 6px black); */
  box-shadow: 2px 4px 6px black;
  border-radius: 10px;
  padding: 20px;
  font-size: 18px;
  line-height: 1.6;
}

.post-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 50px;
}

.issue {
  font-family: var(--font-title);
  text-transform: uppercase;
}


/** 
 * Images and their captions.
 * By convetion, images are contained in <a> tags,
 * and the caption is contained in the <em> tag.
 */
p:has(a+em) {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px;
  text-align: center;
  font-size: 0.8em;
}

/** 
 * Image without a caption.
 */
p:has(img) {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* quotes for interviews */
blockquote > p:first-child {
  font-weight: bold;
}

blockquote {
  font-style: italic;
  color: #eeeeee;
  background-color: #222;
  border: 1px solid white;
  border-radius: 5px;
  padding: 5px;
  margin: 20px;
}

.comment-wrapper {
  margin: 10px auto;
}

.comment-wrapper h1 {
  margin: 0 auto;
}

.comment-form {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-weight: bold;
  display: none;
}
.form-field input {
  font-weight: bold;
  font-size: 1.2em;
  display: block;
  width: 100%;
  margin: 5px auto;
  padding: 5px;
  background-color: #3B3B3B;
  border: none;
  border-radius: 5px;
  color: white;
}

.form-field textarea {
  width: 100%;
  font-size: 14pt;
  margin: 5px auto;
  padding: 5px;
  background-color: #3B3B3B;
  border: none;
  border-radius: 5px;
}

.captcha-input {
  font-size: 2em !important;
  font-family: var(--font-unown);
  font-weight: normal !important;
  text-transform: uppercase;
}

#captcha-wrapper img {
  width: 256px;
  height: 64px;
}

.captcha-image {
  display: flex;
  flex-direction: row;
  margin: 10px 0;
  justify-content: center;
  gap: 32px;
}
.captcha-image button {
  font-size: 2em;
  width: 64px;
  height: 64px;
}

.error-message {
  color: var(--neon-red);
}

.comment-author {
  font-weight: bold;
  font-size: 1.2em;
}

.comment-date {
  font-size: 0.8em;
  color: var(--gray);
}

/* Max width for mobile layout is iPad mini portrait */
@media (min-width: 770px) {
  .container {
    /* font-size: 14pt; */
    /* line-height: 18pt; */
  }
}


/* Grid Container Styles */
.image-grid-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  justify-content: center;
}

/* Image Item Styles */
.grid-item {
  flex: 0 0 calc((100% - 40px) / 3);
  background-color: #f0f0f0;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.grid-item:hover {
    transform: scale(1.02);
    border-color: #007bff;
}

.grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder styling for demo */
.image-placeholder {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .grid-item {
        flex: 0 0 calc((100% - 10px) / 2);
    }
}

@media (max-width: 400px) {
    .grid-item {
        flex: 0 0 100%;
    }
}
