/**
 * page-leadership.css
 *
 * Styles unique to template-leadership.php — the National Leadership / ERTK page.
 * Loaded via wp_enqueue_style() only when this template is active.
 *
 * Depends on: main theme stylesheet for CSS custom properties, reset, typography
 * base, .container, .eyebrow, .hero-headline, .page-nav, breadcrumb, and footer.
 *
 * Sections:
 *   1. Page Anchors Nav
 *   2. Hero
 *   3. Roster Sections
 *   4. Section Header
 *   5. Sub-section Label
 *   6. Member Cards Grid
 *   7. Member Card
 *   8. Section Background Treatments (NEB / Cabinet)
 *   9. Responsive — Tablet (max-width: 1100px)
 *  10. Responsive — Mobile (max-width: 900px)
 *  11. Responsive — Small Phone (max-width: 640px)
 */


/* ─────────────────────────────────────────────────────────────────────────────
   1. PAGE ANCHORS NAV
   Sticky sub-nav that sits below the main header and scrolls horizontally
   on narrow viewports. Hidden on mobile via section 10.
───────────────────────────────────────────────────────────────────────────── */

.page-anchors {
  background: var(--black);
  border-bottom: 1px solid rgba(184, 184, 184, 0.12);
  position: sticky;
  top: 96px; /* aligns below the 96px sticky header */
  z-index: 50;
}

.page-anchors-inner {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-anchors-inner::-webkit-scrollbar {
  display: none;
}

.anchor-link {
  padding: 18px 0;
  margin-right: 36px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}

.anchor-link:hover,
.anchor-link.active {
  color: var(--white);
}

.anchor-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: width 0.25s;
}

.anchor-link:hover::after,
.anchor-link.active::after {
  width: 100%;
}


/* ─────────────────────────────────────────────────────────────────────────────
   2. HERO
   Plain dark background with an ERTK watermark pseudo-element.
   Overrides the generic .page-hero treatment in the main stylesheet.
───────────────────────────────────────────────────────────────────────────── */

/* Decorative ERTK watermark text */
.page-hero::before {
  content: "E.R.T.K";
  position: absolute;
  right: -20px;
  top: 10px;
  font-family: var(--serif);
  font-size: 160px;
  font-weight: 900;
  color: rgba(184, 184, 184, 0.025);
  line-height: 1;
  letter-spacing: 0.2em;
  pointer-events: none;
  white-space: nowrap;
  transform: none;
  -webkit-text-stroke: unset;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: clamp(42px, 5.5vw, 72px);
  line-height: 0.97;
  margin-bottom: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-content h1 em {
  font-style: italic;
  font-weight: 500;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: var(--silver-light);
  max-width: 600px;
  margin-bottom: 16px;
}

/* ERTK pill badge */
.ertk-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid rgba(184, 184, 184, 0.2);
  background: rgba(184, 184, 184, 0.04);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver);
  font-weight: 600;
}


/* ─────────────────────────────────────────────────────────────────────────────
   3. ROSTER SECTIONS
   Wrapper sections for NEB and Cabinet grids.
───────────────────────────────────────────────────────────────────────────── */

.roster-section {
  padding: 80px 0;
}

/* Remove top padding when two roster sections are stacked directly */
.roster-section + .roster-section {
  padding-top: 50px;
}


/* ─────────────────────────────────────────────────────────────────────────────
   4. SECTION HEADER
   Flexbox row with heading group on the left, decorative count on the right.
───────────────────────────────────────────────────────────────────────────── */

.section-header {
  margin-bottom: 56px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(184, 184, 184, 0.1);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.section-header-text h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.05;
}

.section-header-text h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--silver);
}

.section-header-text p {
  font-size: 14px;
  color: var(--silver-dark);
  max-width: 480px;
  line-height: 1.6;
  font-weight: 400;
}

/* Large ghost number on the right — purely decorative */
.section-count {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 800;
  color: rgba(184, 184, 184, 0.15);
  line-height: 1;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   5. SUB-SECTION LABEL
   Horizontal rule with inline label — used above Regional Representatives.
───────────────────────────────────────────────────────────────────────────── */

.sub-section-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
  margin: 48px 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sub-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(184, 184, 184, 0.12);
}


/* ─────────────────────────────────────────────────────────────────────────────
   6. MEMBER CARDS GRID
   CSS Grid wrapper. Three column default; two-col and four-col modifiers.
   The 1px gap on a coloured background creates hairline grid lines.
───────────────────────────────────────────────────────────────────────────── */

.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(184, 184, 184, 0.1);
}

.members-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.members-grid.four-col {
  grid-template-columns: repeat(4, 1fr);
}


/* ─────────────────────────────────────────────────────────────────────────────
   7. MEMBER CARD
   Flex column card with photo, body, and contact footer.
───────────────────────────────────────────────────────────────────────────── */

.member-card {
  background: var(--black-4);
  display: flex;
  flex-direction: column;
  transition: background 0.25s;
  position: relative;
  overflow: hidden;
}

.member-card:hover {
  background: #1e1e1e;
}

/* Silver gradient underline that reveals on hover */
.member-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--silver-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.member-card:hover::after {
  transform: scaleX(1);
}

/* ── Photo ── */

.member-photo {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  background: #1c1c1c;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
  display: block;
}

.member-card:hover .member-photo img {
  transform: scale(1.03);
}

.member-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Card Body ── */

.member-body {
  padding: 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.member-title-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
  margin-bottom: 6px;
}

.member-role {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--silver-light);
  line-height: 1.2;
  margin-bottom: 4px;
}

.member-term {
  font-size: 11px;
  color: var(--silver-dark);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.member-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* ── Meta Details ── */

.member-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(184, 184, 184, 0.08);
  margin-top: auto;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
}

.meta-value {
  font-size: 13px;
  color: var(--silver);
  line-height: 1.5;
}

/* ── Contact Row ── */

.member-contact {
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(184, 184, 184, 0.08);
}

.member-email {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--silver-dark);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.member-email:hover {
  color: var(--white);
}

.member-email svg {
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   8. SECTION BACKGROUND TREATMENTS
   NEB sits on pure black. Cabinet is slightly elevated with a darker card.
───────────────────────────────────────────────────────────────────────────── */

.neb-section {
  background: var(--black);
}

.neb-section .members-grid {
  background: var(--black);
}

.cabinet-section {
  background: var(--black-2);
  border-top: 1px solid rgba(184, 184, 184, 0.08);
  border-bottom: 1px solid rgba(184, 184, 184, 0.08);
}

.cabinet-section .member-card {
  background: var(--black-3);
}

.cabinet-section .member-card:hover {
  background: #282828;
}

.cabinet-section .members-grid {
  background: #141414;
}

.nmgc-section .members-grid{
    background: var(--black);
}



/* ─────────────────────────────────────────────────────────────────────────────
   9. RESPONSIVE — TABLET (max-width: 1100px)
───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .members-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ─────────────────────────────────────────────────────────────────────────────
  10. RESPONSIVE — MOBILE (max-width: 900px)
───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {

  /* Hide sticky anchor nav — too cramped at this width */
  .page-anchors {
    display: none;
  }

  /* Hero */
  .page-hero {
    padding: 72px 0 60px;
  }

  .page-hero::before {
    font-size: 80px;
    right: -10px;
    top: 16px;
  }

  .hero-content h1 {
    font-size: clamp(34px, 10vw, 52px);
  }

  /* Roster sections */
  .roster-section {
    padding: 56px 0;
  }

  /* Section header: stack vertically, hide ghost count */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-count {
    display: none;
  }

  /* Member grids: single column on mobile */
  .members-grid,
  .members-grid.two-col,
  .members-grid.four-col {
    grid-template-columns: 1fr;
  }
}


/* ─────────────────────────────────────────────────────────────────────────────
  11. RESPONSIVE — SMALL PHONE (max-width: 640px)
───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .members-grid,
  .members-grid.two-col {
    grid-template-columns: 1fr;
  }
}
