/*
 * Luxury Insights (blog) styles.
 * Loaded after app.css by header.php. Plain CSS, no build step: the copy in
 * css/insights.css (used on localhost) is identical to dist/css/insights.css.
 */

/* ---------------------------------------------------------------
   "Luxury Insights" panel: same look as the home page "All jobs" panel
   --------------------------------------------------------------- */
.insights-latest {
  --gap: calc(var(--gutter) / 2);
  --decoration-height: 1px;
  margin: 0 0 var(--gutter);
  width: 100%;
}

.insights-latest .insights-latest-heading {
  font-family: var(--font-family-notosans-bold);
  font-size: var(--font-size-body);
  line-height: var(--font-size-body);
  margin: 0 0 calc(var(--gap) / 2);
}

.insights-latest .insights-latest-heading a {
  color: var(--color-neutral-700);
  text-decoration: none;
  transition: color var(--speed-normal) var(--easing-color-or-opacity);
}

.insights-latest .insights-latest-heading a:hover {
  color: var(--color-neutral-900);
  transition-duration: var(--speed-extra-fast);
}

.insights-latest .insights-latest-heading a:active,
.insights-latest .insights-latest-heading a:focus {
  color: var(--color-black);
}

/* Looks like the selected "Latest" tab; it is a label, not a button */
.insights-latest .insights-tab {
  background-color: var(--color-neutral-700);
  color: var(--color-white);
  font-family: var(--font-family-notosans-bold);
  letter-spacing: var(--letter-spacing-all-caps);
  text-align: center;
  text-transform: uppercase;
}

.main.flex .column.utility .insights-latest .insights-tab span,
.insights-latest .insights-tab span {
  display: block;
  font-size: var(--font-size-body-fluid);
  line-height: 3em;
}

.insights-latest .insights-panel {
  background-color: var(--color-neutral-700);
  text-shadow: var(--text-shadow-black);
}

.insights-latest .insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.insights-latest .insight-item {
  margin: 0;
  position: relative;
}

.insights-latest .insight-link {
  --action-color: var(--color-neutral-900);
  --action-size-horizontal: 0;
  align-items: center;
  background-image: linear-gradient(to right, var(--action-color) 0, var(--action-color) 100%);
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: var(--action-size-horizontal) 100%;
  color: var(--color-white);
  display: flex;
  flex-wrap: nowrap;
  gap: var(--gap);
  padding: var(--gap);
  position: relative;
  text-decoration: none;
  transition: background-size var(--speed-normal) var(--easing-exiting);
}

.insights-latest .insight-link:hover,
.insights-latest .insight-link:focus,
.insights-latest .insight-link:active {
  --action-size-horizontal: 100%;
}

.insights-latest .insight-link:hover {
  transition-duration: var(--speed-fast);
  transition-timing-function: var(--easing-entering);
}

.insights-latest .insight-link:focus,
.insights-latest .insight-link:active {
  --action-color: var(--color-black);
  transition-property: none;
}

/* 1px dividers between items, inset like the job list */
.insights-latest .insight-item + .insight-item .insight-link::before,
.insights-latest .insights-view-all::before {
  background-color: var(--color-neutral-500);
  content: "";
  height: var(--decoration-height);
  left: var(--gap);
  position: absolute;
  right: var(--gap);
  top: 0;
  transition: left var(--speed-extra-slow) var(--easing-point-to-point), right var(--speed-extra-slow) var(--easing-point-to-point);
}

.insights-latest .insight-link:hover::before,
.insights-latest .insights-view-all:hover::before {
  left: 0;
  right: 0;
}

.insights-latest .insight-thumb-wrap {
  background-color: var(--color-neutral-100);
  display: block;
  flex: 0 0 48px;
  height: 48px;
  overflow: hidden;
  width: 48px;
}

.insights-latest .insight-thumb {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.insights-latest .insight-thumb.insight-image-fallback {
  align-items: center;
  display: flex;
  justify-content: center;
}

.insights-latest .insight-thumb.insight-image-fallback img {
  height: auto;
  width: 70%;
}

/* Home page block: small plain squares, brand navy and red in turn
   (rows 1 and 3 navy #2b3851, rows 2 and 4 red #961719, as in the logo and hero) */
.insights-latest .insight-swatch {
  align-self: flex-start;
  background-color: var(--color-midnight-indigo-900);
  display: block;
  flex: 0 0 20px;
  height: 20px;
  margin-top: 1px;
  width: 20px;
}

.insights-latest .insight-item:nth-child(even) .insight-swatch {
  background-color: var(--color-crimson-velvet-900);
}

.insights-latest .insight-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.insights-latest .insight-title {
  font-family: var(--font-family-notosans-bold);
  font-size: var(--font-size-body-small);
  font-weight: normal;
  line-height: var(--type-scale-perfect-fourth);
  overflow-wrap: anywhere;
}

.insights-latest .insight-date {
  color: var(--color-neutral-300);
  font-size: var(--font-size-body-extra-small);
  line-height: 1.2;
}

.insights-latest .insights-view-all {
  --action-color: var(--color-neutral-900);
  --action-size-horizontal: 0;
  background-image: linear-gradient(to right, var(--action-color) 0, var(--action-color) 100%);
  background-repeat: no-repeat;
  background-size: var(--action-size-horizontal) 100%;
  color: var(--color-white);
  display: block;
  font-family: var(--font-family-notosans-bold);
  font-size: var(--font-size-body-small);
  line-height: var(--font-size-body-small);
  padding: calc(var(--gap) * 0.9) calc(var(--gap) * 2) calc(var(--gap) * 0.9) var(--gap);
  position: relative;
  text-decoration: none;
  transition: background-size var(--speed-normal) var(--easing-exiting);
}

.insights-latest .insights-view-all:hover,
.insights-latest .insights-view-all:focus {
  --action-size-horizontal: 100%;
}

/* Arrow, same as the "Category / Location ..." links in the job browser */
.insights-latest .insights-view-all::after {
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--color-white);
  border-top: 6px solid transparent;
  content: "";
  height: 0;
  position: absolute;
  right: var(--gap);
  top: calc(50% - 6px);
  width: 0;
}

/* Home page: same width and edges as the "All jobs" panel above it.
   The main row is indented by --device-size (the hero row isn't), which makes
   its right-hand column narrower by device-size x (1 - body column width).
   Widen the block to the left by exactly that amount. */
.insights-latest--home {
  --insights-align-shift: calc(var(--device-size, 0px) * 0.25); /* body column 75% */
}

@media (max-width: 768px) {
  .insights-latest--home {
    --insights-align-shift: calc(var(--device-size, 0px) * 0.4); /* body column 60% */
  }
}

.main.flex .column.utility > .insights-latest--home {
  margin-left: calc(var(--insights-align-shift) * -1);
  width: calc(100% + var(--insights-align-shift));
}

/* Phones: the columns stack, so lift the home page panel to sit directly
   under "All jobs" (otherwise it would drop below the page text). */
@media (max-width: 540px) {
  .main.flex .column.utility:has(> .insights-latest--home) {
    display: contents;
  }

  .main.flex .column.utility:has(> .insights-latest--home) > * {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Full-bleed on the left, lined up with the "All jobs" panel above it */
  .main.flex .column.utility > .insights-latest--home {
    flex-basis: calc(100% + var(--device-size, 0px));
    margin-left: calc(var(--device-size, 0px) * -1);
    max-width: none;
    order: -1;
    width: calc(100% + var(--device-size, 0px));
  }
}

/* ---------------------------------------------------------------
   /insights/ listing page
   --------------------------------------------------------------- */
.insight-cards {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin: var(--gutter) 0;
}

.insight-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.insight-card-image {
  aspect-ratio: 16 / 9;
  background-color: var(--color-neutral-100);
  display: block;
  overflow: hidden;
}

.insight-card-image .insight-card-img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform var(--speed-extra-slow) var(--easing-point-to-point);
  width: 100%;
}

.insight-card-image:hover .insight-card-img {
  transform: scale(1.03);
}

.insight-card-image .insight-image-fallback {
  align-items: center;
  display: flex;
  justify-content: center;
}

.insight-card-image .insight-image-fallback img {
  height: auto;
  width: 28%;
}

.insight-card-body {
  padding-top: calc(var(--gutter) / 2);
}

.insight-card-date,
.insight-breadcrumb {
  color: var(--color-neutral-700);
  display: block;
  font-family: var(--font-family-notosans-bold);
  font-size: var(--font-size-body-extra-small);
  letter-spacing: var(--letter-spacing-all-caps);
  text-transform: uppercase;
}

.page-body-wrapper .insight-card-title {
  font-size: var(--font-size-h6-fluid);
  margin: calc(var(--gutter) / 4) 0 calc(var(--gutter) / 4);
}

.insight-card-title a {
  color: var(--color-midnight-indigo-900);
  text-decoration: none;
  transition: color var(--speed-normal) var(--easing-color-or-opacity);
}

.insight-card-title a:hover,
.insight-card-title a:focus {
  color: var(--color-crimson-velvet-900);
}

.page-body-wrapper .insight-card-summary {
  font-size: var(--font-size-body-small);
  margin-bottom: calc(var(--gutter) / 4);
}

.insight-card-more,
.insight-back a,
.insight-breadcrumb a {
  color: var(--color-crimson-velvet-900);
  font-family: var(--font-family-notosans-bold);
  font-size: var(--font-size-body-small);
  text-decoration: none;
}

.insight-breadcrumb a {
  font-size: inherit;
}

.insight-card-more:hover,
.insight-back a:hover,
.insight-breadcrumb a:hover {
  text-decoration: underline;
}

.insights-page-number {
  color: var(--color-neutral-700);
  font-size: 0.6em;
}

.insights-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--gutter) / 4);
  list-style: none;
  margin: var(--gutter) 0;
  padding: 0;
}

.insights-pagination a,
.insights-pagination span {
  border: 1px solid var(--color-neutral-300);
  color: var(--color-midnight-indigo-900);
  display: inline-block;
  font-family: var(--font-family-notosans-bold);
  font-size: var(--font-size-body-small);
  padding: 0.4em 0.8em;
  text-decoration: none;
}

.insights-pagination .current {
  background-color: var(--color-midnight-indigo-900);
  border-color: var(--color-midnight-indigo-900);
  color: var(--color-white);
}

/* ---------------------------------------------------------------
   Single article
   --------------------------------------------------------------- */
.insight-article {
  max-width: 48rem;
}

.insight-breadcrumb {
  margin-bottom: calc(var(--gutter) / 4);
}

.page-body-wrapper .insight-meta {
  color: var(--color-neutral-700);
  font-size: var(--font-size-body-small);
}

.insight-meta-sep {
  padding: 0 0.4em;
}

.insight-hero-image {
  margin: 0 0 var(--gutter);
}

.insight-hero-image img {
  display: block;
  height: auto;
  max-height: 32rem;
  object-fit: cover;
  width: 100%;
}

.insight-content img {
  height: auto;
  max-width: 100%;
}

.insight-content figure {
  margin: 0 0 var(--gutter);
  max-width: 100%;
}

.insight-content figcaption,
.insight-content .wp-caption-text {
  color: var(--color-neutral-700);
  font-size: var(--font-size-body-extra-small);
  margin-top: 0.4em;
}

.insight-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.insight-content .alignleft {
  float: left;
  margin: 0 var(--gutter) calc(var(--gutter) / 2) 0;
  max-width: 50%;
}

.insight-content .alignright {
  float: right;
  margin: 0 0 calc(var(--gutter) / 2) var(--gutter);
  max-width: 50%;
}

.insight-content::after {
  clear: both;
  content: "";
  display: table;
}

.insight-content h2,
.insight-content h3,
.insight-content h4 {
  color: var(--color-midnight-indigo-900);
  margin-top: var(--gutter);
}

.insight-content a {
  color: var(--color-crimson-velvet-900);
}

.insight-content ul,
.insight-content ol {
  margin: 0 0 calc(var(--gutter) / 2);
  padding-left: 1.25em;
}

.insight-content blockquote {
  border-left: 3px solid var(--color-crimson-velvet-900);
  color: var(--color-midnight-indigo-900);
  font-style: italic;
  margin: var(--gutter) 0;
  padding: 0 0 0 var(--gutter);
}

.insight-back {
  margin-top: var(--gutter);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

@media (max-width: 540px) {
  .insight-content .alignleft,
  .insight-content .alignright {
    float: none;
    margin: 0 0 calc(var(--gutter) / 2);
    max-width: 100%;
  }
}
