/* ==========================================================================
   Posts Section Block
   ========================================================================== */

/* --- Section --- */
.psts-section {
  padding: 2.5rem 0;
}

/* --- Header --- */
.psts-header {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.psts-header__badge {
  display: inline-block;
  background-color: #b9ff66;
  border-radius: 7px;
  padding: 0 7px;
  flex-shrink: 0;
}

.psts-header__title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #000000;
  margin: 0;
}

.psts-header__subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: #000000;
  max-width: 580px;
  margin: 0;
}

/* --- Bordered grid wrapper --- */
.psts-grid-wrap {
  border-radius: 45px;
  border: 1px solid #000000;
  border-bottom-width: 6px;
  padding: 70px 60px;
}

/* --- Row of cards --- */
.psts-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

/* --- Vertical divider between columns --- */
.psts-v-divider {
  flex-shrink: 0;
  width: 1px;
  background-color: #000000;
  align-self: stretch;
}

/* --- Horizontal divider between rows --- */
.psts-h-divider {
  height: 1px;
  background-color: #000000;
}

/* --- Card --- */
.psts-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding: 50px 40px;
}

/* First card in each row: no left padding (container edge) */
.psts-card:first-child {
  padding-left: 0;
}

/* Last card in each row: no right padding (container edge) */
.psts-card:last-child {
  padding-right: 0;
}

/* First row: no top padding (container already provides it) */
.psts-row:first-child .psts-card {
  padding-top: 0;
}

/* Last row: no bottom padding (container already provides it) */
.psts-row:last-child .psts-card {
  padding-bottom: 0;
}

/* --- Card title --- */
.psts-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  color: #000000;
  margin: 0;
}

/* --- Card excerpt --- */
.psts-card__excerpt {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: #000000;
  margin: 0;
  font-family: 'SpaceGrotesk-Regular', sans-serif;
  flex-grow: 1;
}

/* --- Learn more link --- */
.psts-card__link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: #000000;
  font-family: 'SpaceGrotesk-Regular', sans-serif;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 400;
  transition: opacity 0.2s ease;
}

.psts-card__link:hover {
  opacity: 0.7;
  text-decoration: none;
  color: #000000;
}

.psts-card__icon {
  flex-shrink: 0;
  width: 41px;
  height: 41px;
}

/* --- Empty state --- */
.psts-empty {
  border-radius: 45px;
  border: 1px solid #000000;
  border-bottom-width: 6px;
  padding: 60px;
  text-align: center;
  color: #888888;
  font-family: 'SpaceGrotesk-Regular', sans-serif;
  font-size: 1.125rem;
}

.psts-empty p {
  margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1279px) {
  .psts-grid-wrap {
    padding: 60px 50px;
  }

  .psts-card {
    padding: 40px 32px;
  }

  .psts-card:first-child { padding-left: 0; }
  .psts-card:last-child  { padding-right: 0; }
  .psts-row:first-child .psts-card { padding-top: 0; }
  .psts-row:last-child  .psts-card { padding-bottom: 0; }

  .psts-header__title {
    font-size: 2.25rem;
  }
}

@media (max-width: 1023px) {
  .psts-grid-wrap {
    padding: 50px 40px;
  }

  .psts-card {
    padding: 30px 24px;
  }

  .psts-card:first-child { padding-left: 0; }
  .psts-card:last-child  { padding-right: 0; }
  .psts-row:first-child .psts-card { padding-top: 0; }
  .psts-row:last-child  .psts-card { padding-bottom: 0; }

  .psts-header__title {
    font-size: 2rem;
  }

  .psts-card__title {
    font-size: 1.25rem;
  }

  .psts-card__excerpt {
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  /* Header: centered + stacked */
  .psts-header {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .psts-header__subtitle {
    max-width: 100%;
    text-align: center;
  }

  .psts-header__title {
    font-size: 1.75rem;
  }

  /* Remove shared bordered wrapper — each card gets its own border on mobile */
  .psts-grid-wrap {
    border: none;
    border-radius: 0;
    border-bottom-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* Rows become vertical stacks */
  .psts-row {
    flex-direction: column;
    gap: 20px;
  }

  /* Hide internal dividers — replaced by card borders */
  .psts-v-divider,
  .psts-h-divider {
    display: none;
  }

  /* Each card: individual bordered box */
  .psts-card,
  .psts-card:first-child,
  .psts-card:last-child,
  .psts-row:first-child .psts-card,
  .psts-row:last-child .psts-card {
    flex: none;
    width: 100%;
    box-sizing: border-box;
    border-radius: 45px;
    border: 1px solid #000000;
    border-bottom-width: 6px;
    padding: 42px 40px;
  }
}

@media (max-width: 575px) {
  .psts-card,
  .psts-card:first-child,
  .psts-card:last-child,
  .psts-row:first-child .psts-card,
  .psts-row:last-child .psts-card {
    border-radius: 35px;
    padding: 32px 28px;
  }

  .psts-header__title {
    font-size: 1.5rem;
  }
}
