/* =========================================================
   About (V2) — isolated layout + team cards (SINGLE SOURCE)
   Clean drop-in (no duplicates / no conflicting overrides)
   ========================================================= */

/* Base */
.fef-aboutv2,
.fef-aboutv2 *{
  box-sizing: border-box;
}

/* ---------------------------------------------------------
   1) HARD RESET: kill legacy float/negative-margin layouts
   --------------------------------------------------------- */

body.page-template-page-about-v2 #content.site-content,
body.page-template-page-about-v2-php #content.site-content,
body.page-template-page-about-v2 #primary,
body.page-template-page-about-v2-php #primary,
body.page-template-page-about-v2 #primary.content-area,
body.page-template-page-about-v2-php #primary.content-area,
body.page-template-page-about-v2 .content-area,
body.page-template-page-about-v2-php .content-area,
body.page-template-page-about-v2 #main,
body.page-template-page-about-v2-php #main,
body.page-template-page-about-v2 #main.site-main,
body.page-template-page-about-v2-php #main.site-main,
body.page-template-page-about-v2 .site-main,
body.page-template-page-about-v2-php .site-main{
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  clear: both !important;
}

body.page-template-page-about-v2 .site-content .widget-area,
body.page-template-page-about-v2-php .site-content .widget-area{
  display: none !important;
}

/* ---------------------------------------------------------
   2) Layout containers
   --------------------------------------------------------- */

.fef-aboutv2__header,
.fef-aboutv2__container{
  max-width: 920px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Legacy hero (safe even if unused) */
.fef-aboutv2__hero{
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
}

.fef-aboutv2__titlewrap{ display: none; }

/* ---------------------------------------------------------
   3) Content readability
   --------------------------------------------------------- */

.fef-aboutv2__content{ max-width: none; }

.fef-aboutv2__content > p,
.fef-aboutv2__content > ul,
.fef-aboutv2__content > ol,
.fef-aboutv2__content > blockquote{
  max-width: 74ch;
}

.fef-aboutv2__content p,
.fef-aboutv2__content li{
  line-height: 1.7;
}

/* ---------------------------------------------------------
   4) Theme-style page title ("ABOUT") + spacing control
   --------------------------------------------------------- */

body.page-template-page-about-v2 .about-page-content .page-title.about-title,
body.page-template-page-about-v2-php .about-page-content .page-title.about-title{
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85em;
  margin: 0 0 22px;
}

body.page-template-page-about-v2 .about-page-content,
body.page-template-page-about-v2-php .about-page-content{
  margin-top: -18px !important;
  padding-top: 0 !important;
}

body.page-template-page-about-v2 .fef-aboutv2__container,
body.page-template-page-about-v2-php .fef-aboutv2__container{
  padding-top: 0 !important;
}

/* =========================================================
   Shared primitives
   ========================================================= */

.fef-aboutv2-block{ margin: 0; }
.fef-aboutv2-section{ margin: 0 0 34px; }

.fef-aboutv2-h2{
  margin: 0 0 16px;
  font-size: 1.5em;
  line-height: 1.2;
  font-weight: 700;
  position: relative;
}

.fef-aboutv2-h2::after{
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin-top: 10px;
  background: rgba(0,0,0,0.15);
}

.fef-aboutv2-block a{
  text-decoration: none;
}
.fef-aboutv2-block a:hover,
.fef-aboutv2-block a:focus{
  text-decoration: underline;
}

/* Hide any legacy lines from older shortcode versions */
.fef-aboutv2-meta,
.fef-aboutv2-tags,
.fef-aboutv2-taglist{
  display: none !important;
}

/* =========================================================
   Team cards — grid + "author card" styling + interactivity
   ========================================================= */

.fef-aboutv2--cards .fef-aboutv2-cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

/* Card shell */
.fef-aboutv2--cards .fef-aboutv2-card{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  background: rgba(0,0,0,0.015);
  padding: 18px 20px;

  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 8px;
  align-items: center;

  text-align: left;
  position: relative;
  cursor: default;

  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

/* Only show pointer when JS has confirmed a valid author link */
.fef-aboutv2--cards .fef-aboutv2-card.is-clickable{
  cursor: pointer;
}

.fef-aboutv2--cards .fef-aboutv2-card:hover{
  transform: translateY(-2px);
  border-color: rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.01);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

/* Media column */
.fef-aboutv2--cards .fef-aboutv2-card__media{
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Avatar (author-card vibe) */
.fef-aboutv2--cards .fef-aboutv2-avatar{
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  display: block;

  border: 4px solid rgba(255,255,255,0.95);
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  background: #fff;
}

/* Name (author-card vibe) */
.fef-aboutv2--cards .fef-aboutv2-name{
  margin: 0 0 10px;
  font-size: 0.95em;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Name link */
.fef-aboutv2--cards .fef-aboutv2-name a{
  color: rgba(0,0,0,0.55);
  text-decoration: none;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.fef-aboutv2--cards .fef-aboutv2-card:hover .fef-aboutv2-name a{
  color: rgba(0,0,0,0.70);
}

/* Roles pills */
.fef-aboutv2--cards .fef-aboutv2-roles{
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fef-aboutv2--cards .fef-aboutv2-roles li{
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.92);
  font-size: 0.9em;
  line-height: 1;
  color: rgba(0,0,0,0.70);
}

/* ---------------------------------------------------------
   Click behaviour
   --------------------------------------------------------- */
/*
  Team cards are made fully clickable via a small JS enhancer
  in the page template. This avoids inconsistent behaviour
  across browsers with pseudo-element overlays.
*/

/* Focus ring rules (no mouse-click border flash) */
.fef-aboutv2--cards .fef-aboutv2-card:focus-within{
  box-shadow: none;
  border-color: rgba(0,0,0,0.08);
}

/* Keyboard ring only (when supported) */
.fef-aboutv2--cards .fef-aboutv2-card:has(.fef-aboutv2-name a:focus-visible){
  border-color: rgba(0,0,0,0.18);
  box-shadow: 0 0 0 3px rgba(180, 60, 48, 0.18);
}

/* Suppress UA outline on overlay link itself */
.fef-aboutv2--cards .fef-aboutv2-name a:focus,
.fef-aboutv2--cards .fef-aboutv2-name a:active{
  outline: none;
  box-shadow: none;
}

/* =========================================================
   Contributors (details/summary) — clickable polish
   ========================================================= */

.fef-aboutv2-details{
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  background: rgba(0,0,0,0.02);
  padding: 10px 14px;
  width: 100%;
  display: block;

  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.fef-aboutv2-details:hover{
  transform: translateY(-2px);
  border-color: rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.015);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.fef-aboutv2-summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  width: 100%;

  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.fef-aboutv2-summary::-webkit-details-marker{ display: none; }

.fef-aboutv2-summary-title{ font-weight: 700; }

.fef-aboutv2-summary-cta{
  font-size: 0.95em;
  border: 1px solid rgba(0,0,0,0.16);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.92);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.fef-aboutv2-details:hover .fef-aboutv2-summary-cta{
  background: #fff;
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.fef-aboutv2-details[open] .fef-aboutv2-summary-cta{
  background: #fff;
  border-color: rgba(0,0,0,0.22);
}

/* Kill mouse-click “extra border/ring” on details */
.fef-aboutv2-details:focus-within{
  box-shadow: none;
  border-color: rgba(0,0,0,0.10);
}

/* Keyboard ring only (when supported) */
.fef-aboutv2-details:has(.fef-aboutv2-summary:focus-visible){
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 0 0 3px rgba(180, 60, 48, 0.18);
}

/* ---------------------------------------------------------
   Show list / Hide list label swap (CSS only)
   Works without JS by using details[open]
   --------------------------------------------------------- */

/* When open, hide original text but keep button size */
.fef-aboutv2-details[open] .fef-aboutv2-summary-cta{
  position: relative;
  color: transparent;
}

/* Inject "Hide list" */
.fef-aboutv2-details[open] .fef-aboutv2-summary-cta::after{
  content: "Hide list";
  position: absolute;
  inset: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: rgba(0,0,0,0.70);
  pointer-events: none;
}

/* =========================================================
   Contributors chips — normalized so link vs plain text match
   (single source; no conflicting overrides)
   ========================================================= */

.fef-aboutv2-pilllist{
  margin: 12px 0 6px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Chip box: same model for ALL items */
.fef-aboutv2-pilllist li{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 11px;
  line-height: 1;

  font-size: 0.80em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: rgba(0,0,0,0.55);
}

/* Anchor: inherit identical metrics (prevents “bigger” look) */
.fef-aboutv2-pilllist li a{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font: inherit;
  line-height: 1;
  color: inherit;

  text-decoration: none;
}

.fef-aboutv2-pilllist li:hover{
  background: #fff;
  border-color: rgba(0,0,0,0.14);
}

.fef-aboutv2-pilllist li:hover a{
  color: rgba(0,0,0,0.70);
}

.fef-aboutv2-pilllist li a:hover,
.fef-aboutv2-pilllist li a:focus{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Plain-text chips: slightly de-emphasised */
.fef-aboutv2-pilllist li:not(:has(a)){
  font-size: 0.76em;
  font-weight: 600;
  letter-spacing: 0.11em;
  color: rgba(0,0,0,0.45);
  padding: 6px 10px;
}

/* =========================================================
   Disclaimer
   ========================================================= */

.fef-aboutv2-disclaimer p{
  max-width: 78ch;
  line-height: 1.7;
}

/* =========================================================
   Responsive + mobile drift fix (MOBILE ONLY)
   ========================================================= */

@media (max-width: 520px){

  body.page-template-page-about-v2,
  body.page-template-page-about-v2-php{
    overflow-x: hidden;
  }

  .fef-aboutv2__header,
  .fef-aboutv2__container{
    padding-left: 16px;
    padding-right: 16px;
  }

  .fef-aboutv2--cards .fef-aboutv2-card{
    grid-template-columns: 1fr;
  }

  .fef-aboutv2--cards .fef-aboutv2-card__media{
    justify-content: flex-start;
  }

  .fef-aboutv2--cards .fef-aboutv2-avatar{
    width: 60px;
    height: 60px;
  }
}
