/*
 * TruePath Academics partner panel on the home page.
 *
 * Kept out of main.css, which is a minified Bootstrap 4.3.1 build — this is
 * hand-written and belongs somewhere it can be read and reverted.
 *
 * Brand colours are TruePath's, from images/truepathacademics/TruePath-color-card.png.
 * Note that colour card labels the wordmark teal; the SVG actually uses #24345c.
 */

/* Break out of .full-panel > .container (max-width 1005px) to run edge to edge.
   100vw includes the scrollbar, so .full-panel clips the few px of overhang. */
.partner-panel {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 28px;
  /* Flat colour and hard rules top and bottom, so the section reads as a
     separate property rather than fading into the page. */
  background-color: #deeae8;
  border-top: 5px solid #24345c;
  border-bottom: 5px solid #24345c;
  color: #323139;
}

.full-panel {
  overflow-x: hidden;
}

.partner-panel__inner {
  max-width: 1005px;
  margin: 0 auto;
  padding: 38px 15px 42px;
}

/* ---- Headline and brand lockup, side by side ---------------------- */

/* The lockup sits beside the headline rather than above it: the partner's
   mark gets its own surface without costing vertical space the fold can't
   spare. */
.partner-panel__top {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.partner-panel__headline {
  flex: 1 1 auto;
}

.partner-panel__headline h2 {
  /* main.css has a site-wide `p+h2 { margin-top: 75px }`. */
  margin-top: 0;
  margin-bottom: 10px;
  color: #1c253c;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
}

.partner-panel__lead {
  max-width: 44rem;
  margin-bottom: 15px;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.partner-panel__brand {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  padding: 17px 24px;
  background-color: #fff;
  border-left: 6px solid #f2be34;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(28, 37, 60, 0.12);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.partner-panel__brand:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(28, 37, 60, 0.2);
}

.partner-panel__brand:focus-visible {
  outline: 3px solid #24345c;
  outline-offset: 3px;
}

.partner-panel__logo {
  width: 236px;
  max-width: 55vw;
}

.partner-panel__tagline {
  color: #1f6b69;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ---- Feature chips ------------------------------------------------ */

.partner-panel__chips {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
}

.partner-panel__chips li {
  display: flex;
  flex: 1 1 210px;
  margin: 0 10px 10px 0;
}

/* The whole chip is the hit target — it reads as clickable, so it has to be. */
.partner-panel__chips a {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  padding: 8px 12px 8px 8px;
  background-color: #fff;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1c253c;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(28, 37, 60, 0.1);
  transition: box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.partner-panel__chips a:hover {
  background-color: #f6fbfa;
  color: #1c253c;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(28, 37, 60, 0.16);
}

.partner-panel__chips a:focus-visible {
  outline: 3px solid #24345c;
  outline-offset: 2px;
}

.partner-panel__chips img {
  width: 48px;
  height: 48px;
  margin-right: 13px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center top;
}

.partner-chip__text {
  flex: 1 1 auto;
}

.partner-chip__arrow {
  margin-left: 10px;
  color: #1f6b69;
  font-weight: 700;
  transition: transform 0.15s ease;
}

.partner-panel__chips a:hover .partner-chip__arrow {
  transform: translateX(3px);
}

/* ---- Call to action ----------------------------------------------- */

.partner-panel__cta-row {
  margin-bottom: 0;
}

/* Navy rather than the #2faaa8 teal: white on teal is ~2.6:1 and fails contrast. */
.partner-panel__cta {
  display: inline-block;
  padding: 13px 28px;
  color: #fff;
  background-color: #24345c;
  border-radius: 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.partner-panel__cta:hover {
  color: #fff;
  background-color: #1c253c;
  text-decoration: none;
  transform: translateY(-2px);
}

.partner-panel__cta:focus-visible {
  outline: 3px solid #f2be34;
  outline-offset: 2px;
}

.partner-panel__cta-arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.15s ease;
}

.partner-panel__cta:hover .partner-panel__cta-arrow {
  transform: translateX(3px);
}

@media (max-width: 767px) {
  /* column-reverse puts the lockup above the headline so the partner brand is
     the first thing read, without reordering the markup. */
  .partner-panel__top {
    flex-direction: column-reverse;
    gap: 0;
  }

  .partner-panel__brand {
    margin-bottom: 18px;
  }

  .partner-panel__inner {
    padding: 28px 15px 32px;
  }

  .partner-panel__headline h2 {
    font-size: 1.625rem;
  }
}
