/* ==========================================================================
   Sonex Branding — Portfolio category pages
   Logo · Brochure · Label · Packaging · Business Card · Social Media ·
   Advertisement · Web Design

   A titled intro band, a section heading, then rows of two framed images.
   The Web Design page swaps the plain images for captioned, linked cards.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Intro band
   -------------------------------------------------------------------------- */

/* --pf-head-tail reproduces blank space the live pages carry under this
   intro; it comes from empty wrapper elements left behind when the text was
   pasted into WordPress from ChatGPT. Set it to 10px to close the gap up. */
.pf-head {
  padding: 10px 10px var(--pf-head-tail, 10px);
  text-align: center;
}

.pf-head__inner {
  max-width: var(--container);
  margin-inline: auto;
}

.pf-head__title {
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--c-green-hover);
  text-align: center;
}

.pf-head__intro {
  margin-top: 22px;
  font-family: var(--f-body);
  font-size: 23px;
  font-weight: var(--fw-regular);
  line-height: 31px;
  color: #BDBDBD;
  text-align: center;
}

.pf-head__intro p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Section heading
   -------------------------------------------------------------------------- */

.pf-sub {
  min-height: 97px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}

.pf-sub__title {
  max-width: var(--container);
  margin-inline: auto;
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--c-green-hover);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Image rows — two per row, each framed
   -------------------------------------------------------------------------- */

.pf-row {
  display: flex;
  justify-content: center;
  margin-top: var(--pf-row-gap, 36px);
  padding: 10px;
  border: 3px groove #111111;
}

.pf-cell {
  flex: 0 1 523px;
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 10px;
}

/* Each page frames its work at its own width; the height follows the
   image's own aspect ratio. Set --pf-img-w per page. */
.pf-cell img {
  width: var(--pf-img-w, 277px);
  max-width: 100%;
  height: auto;
  border: 3px solid var(--c-white);
  border-radius: 34px;
}

/* --------------------------------------------------------------------------
   Web Design page — captioned, linked cards
   -------------------------------------------------------------------------- */

.pf-row--wide .pf-cell {
  flex: 0 1 707px;
  flex-direction: column;
  align-items: center;
}

.pf-card {
  display: block;
  text-align: center;
}

.pf-card img {
  width: 302px;
  max-width: 100%;
  height: auto;
  border: 3px solid #3C311B;
  border-radius: 0;
  margin-inline: auto;
}

.pf-card__title {
  margin: 24px 0 20px;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--c-green-hover);
  text-align: center;
  transition: color var(--t-fast);
}

.pf-card:hover .pf-card__title {
  color: var(--c-white);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .pf-head__intro {
    font-size: 20px;
    line-height: 28px;
  }

  .pf-cell,
  .pf-row--wide .pf-cell {
    flex: 1 1 50%;
  }
}

@media (max-width: 767px) {
  .pf-head__title,
  .pf-sub__title {
    font-size: var(--fs-h2);
  }

  .pf-head__intro {
    font-size: 18px;
    line-height: 26px;
  }

  .pf-row {
    flex-direction: column;
    align-items: center;
  }

  .pf-cell {
    flex: 1 1 auto;
    width: 100%;
  }

  .pf-cell img {
    width: min(var(--pf-img-w, 277px), 100%);
  }

  .pf-card img {
    width: min(302px, 100%);
    height: auto;
  }
}
