/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Card Section Container */
.journal-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  max-width: 1150px;
  margin: 20px auto;
  padding: 24px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-family: Arial, Helvetica, sans-serif;
  color: #333333;
  line-height: 1.6;
}

/* Cover Image styling */
.journal-cover {
  flex-shrink: 0;
  width: 240px;
}

.journal-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Text Content styling */
.journal-content {
  flex: 1;
  font-size: 15px;
  color: #222222;

  /* Text Justification & Line Break Safety */
  text-align: justify;
  text-justify: inter-word; /* Creates clean spacing between words */
  overflow-wrap: break-word; /* Prevents long words/links from overflowing */
  word-break: normal;        /* Prevents arbitrary mid-word breaks */
  hyphens: auto;             /* Adds soft hyphens if necessary on narrow screens */
}

.journal-content p {
  margin-bottom: 16px;
}

.journal-content p:last-child {
  margin-bottom: 0;
}

.journal-content strong {
  color: #000000;
  font-weight: 700;
}

/* Link styling */
.view-link {
  color: #2b6cb0;
  text-decoration: none;
  white-space: nowrap; /* Keeps link text intact on one line */
}

.view-link:hover {
  text-decoration: underline;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 650px) {
  .journal-card {
    flex-direction: column;
    align-items: center;
    padding: 16px;

    /* Pulls card inward 16px from both left and right screen edges */
    margin: 16px;
    width: calc(100% - 32px);
  }

  .journal-cover {
    width: 200px;
  }

  .journal-content {
    /* Set text to justified on mobile screens */
    text-align: justify;
    text-justify: inter-word;
  }
}