/**
 * Pattern styles shared by every Northport pattern.
 *
 * Loaded only on pages whose content contains an "np-" class, and in the
 * editor. Values are the child theme's own look (navy #1c2e4f, teal #96bbbb,
 * page #fbfbfb, the white card with a 5px radius and a 4px 4px 10px shadow)
 * so a pattern-built page matches the pages around it. px units on purpose:
 * the live root font size is 14px.
 *
 * Class map:
 *   .np-section        full-width band with 60px top/bottom and 20px side padding
 *   .np-section__intro muted sentence under a section heading
 *   .np-card           white card
 *   .np-band--navy     navy band, white text
 *   .np-band--teal     teal band, navy text
 *   .np-hero           cover block used as the page hero
 *   .np-eyebrow        small uppercase line above a title
 *   .np-action-bar     buttons block rendered as a 4-up bar under the hero
 *   .np-help-grid      buttons block rendered as a 4 x 2 grid of link tiles
 *   .np-split          media-text block, photo one side, navy panel the other
 */

/* Section: vertical rhythm plus the side gutter OceanWP's full-screen layout lacks. */
.np-section {
  padding: 60px 20px;
}

.np-section > .wp-block-heading:first-child {
  margin-top: 0;
}

/* Section heading rule: every section heading on the rebuilt pages, whether a
   core heading placed directly in a section or a block's own heading, ends in
   the same 2px teal rule. The blocks repeat this rule in their own sheets. */
.np-section > h2.wp-block-heading {
  padding-bottom: 12px;
  border-bottom: 2px solid #96bbbb;
  margin-bottom: 24px;
}

.np-section__intro {
  margin-top: 0;
  color: #5a616b;
}

/* Buttons inside Northport sections: the site's 5px corners instead of the core pill. */
.np-section .wp-block-button__link,
.np-split .wp-block-button__link,
.np-card .wp-block-button__link {
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 24px;
}

/* Card: the box the homepage "I am looking for" tiles use. */
.np-card {
  box-sizing: border-box;
  background: #fff;
  border-radius: 5px;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
  padding: 25px;
}

.np-card > :first-child {
  margin-top: 0;
}

.np-card > :last-child {
  margin-bottom: 0;
}

.np-card .wp-block-heading {
  color: #1c2e4f;
}

/* Navy band: white text on the site's navy. */
.np-band--navy {
  background: #1c2e4f;
  color: #fff;
}

.np-band--navy .wp-block-heading,
.np-band--navy a {
  color: #fff;
}

/* Teal band: navy text on the site's teal (6.4:1). */
.np-band--teal {
  background: #96bbbb;
  color: #1c2e4f;
}

.np-band--teal .wp-block-heading,
.np-band--teal a {
  color: #1c2e4f;
}

/* Hero: a cover block with the page title inside it. */
.np-hero {
  padding: 80px 20px 100px;
}

.np-hero .wp-block-cover__inner-container > * {
  color: #fff;
}

.np-hero .wp-block-heading,
.np-hero p {
  color: #fff;
}

.np-hero .wp-block-heading {
  margin-top: 0;
}

.np-hero p {
  font-size: 18px;
  line-height: 1.6;
}

.np-eyebrow,
.np-hero p.np-eyebrow {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Action bar: four equal navy buttons in one bar, overlapping the hero's bottom edge. */
.wp-block-buttons.np-action-bar,
.wp-block-buttons.np-action-bar.is-layout-flex {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: -50px 0 0;
  position: relative;
  z-index: 1;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
}

.np-action-bar .wp-block-button {
  margin: 0;
  width: auto;
}

.np-action-bar .wp-block-button__link {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 22px 16px;
  border-radius: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  background: #1c2e4f;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
}

.np-action-bar .wp-block-button:last-child .wp-block-button__link {
  border-right: 0;
}

.np-action-bar .wp-block-button__link:hover,
.np-action-bar .wp-block-button__link:focus-visible {
  background: #fbfbfb;
  color: #1c2e4f;
}

.np-action-bar .wp-block-button__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

/* Help grid: eight link tiles, four across. */
.wp-block-buttons.np-help-grid,
.wp-block-buttons.np-help-grid.is-layout-flex {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.np-help-grid .wp-block-button {
  margin: 0;
  width: auto;
}

.np-help-grid .wp-block-button__link {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 26px 16px;
  border: 1px solid #d9dede;
  border-radius: 5px;
  background: #fff;
  color: #1c2e4f;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
}

.np-help-grid .wp-block-button__link:hover,
.np-help-grid .wp-block-button__link:focus-visible {
  border-color: #1c2e4f;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
}

.np-help-grid .wp-block-button__link:focus-visible {
  outline: 2px solid #1c2e4f;
  outline-offset: 2px;
}

/* Split: photo one side, navy text panel the other. */
.np-split .wp-block-media-text__content {
  padding: 60px 50px;
}

.np-split .wp-block-media-text__content > :first-child {
  margin-top: 0;
}

.np-split .wp-block-media-text__content > :last-child {
  margin-bottom: 0;
}

.np-split .wp-block-heading,
.np-split p {
  color: #fff;
}

/* Tablet. */
@media (max-width: 900px) {
  .wp-block-buttons.np-action-bar,
  .wp-block-buttons.np-action-bar.is-layout-flex,
  .wp-block-buttons.np-help-grid,
  .wp-block-buttons.np-help-grid.is-layout-flex {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .np-action-bar .wp-block-button:nth-child(2n) .wp-block-button__link {
    border-right: 0;
  }

  .np-action-bar .wp-block-button:nth-child(-n + 2) .wp-block-button__link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }

  .np-split .wp-block-media-text__content {
    padding: 40px 24px;
  }
}

/* Phone. */
@media (max-width: 520px) {
  .np-section {
    padding: 40px 16px;
  }

  .np-hero {
    padding: 50px 16px 80px;
  }

  .np-hero .wp-block-heading {
    font-size: 30px;
  }

  .np-hero p {
    font-size: 16px;
  }

  .wp-block-buttons.np-action-bar,
  .wp-block-buttons.np-action-bar.is-layout-flex,
  .wp-block-buttons.np-help-grid,
  .wp-block-buttons.np-help-grid.is-layout-flex {
    grid-template-columns: minmax(0, 1fr);
  }

  .np-action-bar .wp-block-button .wp-block-button__link {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }

  .np-action-bar .wp-block-button:last-child .wp-block-button__link {
    border-bottom: 0;
  }
}
