/*
 * "Our Team" page template (page-templates/page-our-team.php).
 * Rebuilds the site's Elementor page sections: fonts, heading sizes, link colours and the gold heading rule come
 * from the Elementor site kit (body.elementor-kit-32); the spacing, colours and accordion below copy the
 * Support Staff and Practice Areas pages. Breakpoints match Elementor's (1024 / 767).
 */

/* Elementor heading widgets: no margin, line-height 1, positioned so the kit's gold rule sits under the text. */
.cv-team h1,
.cv-team h2,
.cv-team h3 {
  position: relative;
  margin: 0;
  line-height: 1;
}

/* Boxed section (1140px) with the default 10px column padding. */
.cv-team .cv-team-container {
  box-sizing: border-box;
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px;
}

/* Banner */

.cv-team .cv-team-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 450px;
  background-color: #000;
  background-position: 50% 80%;
  background-repeat: no-repeat;
  background-size: cover;
}

.cv-team .cv-team-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #000;
  opacity: 0.6;
}

.cv-team .cv-team-hero .cv-team-container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.cv-team .cv-team-hero__title {
  color: #fff;
}

/* Breadcrumbs */

.cv-team .cv-team-breadcrumbs {
  background-color: #efefef;
}

.cv-team .cv-team-breadcrumbs #breadcrumbs {
  margin: 0;
  font-size: 0.85em;
}

/* Grey heading band (intro and support staff) */

.cv-team .cv-team-band {
  padding: 4em 0 5em;
  background-color: #efefef;
}

.cv-team .cv-team-lead {
  margin-top: 50px; /* heading rule + 10px spacer, as on the Elementor pages */
  text-align: justify;
}

/* Lawyer cards, pulled up over the grey band */

.cv-team .cv-team-lawyers {
  position: relative;
  z-index: 1;
  margin-top: -75px;
  padding-bottom: 4em;
}

.cv-team .cv-team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-team .cv-team-card {
  box-sizing: border-box;
  width: calc((100% - 48px) / 3);
  margin: 0;
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s;
}

.cv-team .cv-team-card:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.cv-team .cv-team-card__link,
.cv-team .cv-team-card__link:hover,
.cv-team .cv-team-card__link:focus {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  font-size: 1em;
  font-weight: inherit;
  text-decoration: none;
}

.cv-team .cv-team-card__link:focus-visible {
  outline: 2px solid #a28702;
  outline-offset: 3px;
}

.cv-team .cv-team-card__photo {
  box-sizing: border-box;
  height: 344px;
  padding: 24px 16px 0;
  background: linear-gradient(180deg, #f4f4f4 0%, #dcdcdc 100%);
}

.cv-team .cv-team-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.cv-team .cv-team-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25em 1.5em 2em;
}

.cv-team .cv-team-card__name {
  font-size: 1.6em;
  transition: color 0.3s;
}

.cv-team .cv-team-card__link:hover .cv-team-card__name {
  color: #a28702;
}

.cv-team .cv-team-card__position {
  margin: 40px 0 36px;
  color: #54595f;
  font-size: 0.85em;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Same look as the kit's buttons. */
.cv-team .cv-team-card__button {
  margin-top: auto;
  padding: 12px 24px;
  border: 1px solid #000;
  color: #000;
  font-size: 0.8em;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s;
}

.cv-team .cv-team-card__link:hover .cv-team-card__button,
.cv-team .cv-team-card__link:focus-visible .cv-team-card__button {
  background-color: #000;
  color: #fff;
}

/* Support staff accordion (matches the Elementor accordion on the Support Staff page) */

.cv-team .cv-team-staff {
  position: relative;
  z-index: 1;
  margin-top: -75px;
  padding-bottom: 4em;
}

.cv-team .cv-team-accordion {
  border: 1px solid #d5d8dc;
  background-color: #fff;
}

.cv-team .cv-team-accordion + .cv-team-accordion {
  border-top: none;
}

.cv-team .cv-team-accordion__title {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.cv-team .cv-team-accordion__title::-webkit-details-marker {
  display: none;
}

.cv-team .cv-team-accordion__title:focus-visible {
  outline: 2px solid #a28702;
  outline-offset: -2px;
}

.cv-team .cv-team-accordion__icon {
  position: relative;
  flex: none;
  width: 1.5em;
  height: 0.7em;
  margin-inline-end: 8px;
}

/* Plus when closed, minus when open. */
.cv-team .cv-team-accordion__icon::before,
.cv-team .cv-team-accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.7em;
  height: 3px;
  margin-top: -1.5px;
  background-color: #191918;
}

.cv-team .cv-team-accordion__icon::after {
  transform: rotate(90deg);
}

.cv-team .cv-team-accordion[open] .cv-team-accordion__icon::after {
  display: none;
}

.cv-team .cv-team-accordion__text {
  font-size: 1.2em;
  font-weight: 400;
}

.cv-team .cv-team-accordion__content {
  padding: 0.5em 1em 0;
  border-top: 1px solid #d5d8dc;
}

@media (max-width: 1024px) {
  .cv-team .cv-team-hero {
    min-height: 300px;
  }

  .cv-team .cv-team-card {
    width: calc((100% - 24px) / 2);
  }

  .cv-team .cv-team-card__name {
    font-size: 1.4em;
  }
}

@media (max-width: 767px) {
  .cv-team .cv-team-hero {
    min-height: 250px;
  }

  .cv-team .cv-team-card {
    width: 100%;
  }

  .cv-team .cv-team-card__photo {
    height: 324px;
  }

  .cv-team .cv-team-accordion__title {
    padding: 12px 15px;
  }

  .cv-team .cv-team-accordion__icon {
    width: 1.2em;
  }
}
