/* =========================
   OUR TEAM ARCHIVE
   ========================= */

.team-archive {
  padding-bottom: 64px;
}

/* =========================
   HERO
   ========================= */

.team-hero {
  position: relative;
  overflow: hidden;
}

.team-hero img {
  display: block;
  width: 100%;
  height: clamp(260px, 38vw, 520px);
  object-fit: cover;
}

/* =========================
   INTRO
   ========================= */

.team-intro {
  padding: 34px 24px 22px;
}

.team-intro__inner {
  
  margin: 0 auto;
  text-align: center;
}

.team-intro__inner h1 {
  margin: 0 0 14px;

  line-height: .75;
  color: #2f281c;
}

.team-intro__text {
 
  margin: 0 auto;

  line-height: 1.7;
  color: #4b4336;
}

/* =========================
   COMPANY-WIDE STATS BAND
   ========================= */

.team-co-stats {
  background: linear-gradient(135deg, #141210 0%, #1b1710 60%, #141210 100%);
  border-top: 1px solid rgba(154,123,67,.1);
  border-bottom: 1px solid rgba(154,123,67,.25);
  padding: 48px 0;
}

.team-co-stats__inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.team-co-stats__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 40px;
}

.team-co-stats__divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(154,123,67,.35) 30%, rgba(154,123,67,.35) 70%, transparent);
  flex-shrink: 0;
  align-self: stretch;
}

.team-co-stats__count {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: #c7a96b;
  letter-spacing: 0.04em;
  font-family: 'Cinzel', serif;
}

.team-co-stats__label {
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,240,232,.55);
}

.team-co-stats__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 16px;
}

/* Structured figure + unit blocks */
.team-co-stats__detail-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.team-co-stats__detail-figure {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  font-family: 'Cinzel', serif;
  color: #d4b87a;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.team-co-stats__detail-unit {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(154,123,67,.65);
}

.team-co-stats__detail-stat--note {
  width: 100%;
  align-items: center;
  gap: 0;
  margin-top: 6px;
}

.team-co-stats__note {
  font-size: 0.7rem !important;
  color: rgba(244,240,232,.35) !important;
  letter-spacing: 0.04em;
  font-style: italic;
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

/* =========================
   MAIN LAYOUT
   ========================= */

.team-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  
  margin: 0 auto;
  padding: 12px 24px 0;
}

.team-main {
  min-width: 0;
}

/* =========================
   FILTERS
   ========================= */

.team-filters {
  position: sticky;
  top: 110px;
  z-index: 30;
}

.team-filter-form {
  position: relative;
  z-index: 31;
  padding: 18px;
  border: 1px solid #e9e4dc;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.team-filter-form h2 {
  margin: 0 0 14px;

  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3a3223;
}

.team-filter-group + .team-filter-group {
  margin-top: 14px;
}

.team-filter-group label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a6f45;
}

.team-filter-group select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e7e3dd;
  border-radius: 10px;
  background: #fff;
  color: #3a3223;
}

.team-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

/* =========================
   REMOVE AWARDS RAIL
   ========================= */

.team-awards {
  display: none;
}

/* =========================
   FILTER — SEARCH INPUT
   ========================= */

.team-filter-group--search .team-filter-search-wrap {
  position: relative;
}

.team-filter-group--search input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 36px 10px 12px;
  border: 1px solid #e7e3dd;
  border-radius: 10px;
  background: #fff;
  color: #3a3223;
  font-size: 0.875rem;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.team-filter-group--search input[type="text"]:focus {
  outline: none;
  border-color: #9a7b43;
  box-shadow: 0 0 0 3px rgba(154,123,67,.14);
}

.team-filter-search-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #a08860;
  pointer-events: none;
}

/* =========================
   CARD — STRUCTURE UPDATE
   (head is now a div, not <a>)
   ========================= */

.team-archive .agent-card__head {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 30px;
  align-items: start;
  text-decoration: none;   /* keep in case any legacy <a> remains */
}

/* =========================
   CARD — AVATAR & BADGES
   ========================= */

.team-archive .agent-card__avatar-wrap {
  position: relative; /* needed for badge overlay */
  width: 168px;
  height: 205px;
  min-width: 168px;
  overflow: visible;   /* let badges poke outside the clip */
  border: 3px solid #9a7b43;
  border-radius: 999px;
  background: #232323;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

/* Clip the actual image, not the wrapper (so badges can overflow) */
.team-archive .agent-card__avatar {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Badge strip along the bottom-right of the avatar */
.team-archive .agent-card__award-badges {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 4px;
  z-index: 2;
}

/* =========================
   AWARD BADGE — gold pill placeholder
   (custom badge graphics to replace once designed)
   ========================= */

.award-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(154,123,67,.14);
  border: 1px solid rgba(154,123,67,.38);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #c7a96b;
  white-space: nowrap;
  cursor: default;
  transition: background .15s, border-color .15s;
}

.award-badge:hover {
  background: rgba(154,123,67,.24);
  border-color: rgba(154,123,67,.6);
}

/* "+N more" overflow chip */
.award-badge.award-badge--more {
  background: rgba(154,123,67,.10);
  border-color: rgba(154,123,67,.28);
  color: #9a7b43;
}

/* =========================
   CARD — TENURE
   ========================= */

.team-archive .agent-card__tenure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244,240,232,.52);
  line-height: 1;
}

.team-archive .agent-card__tenure .trs-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  opacity: .85;
}

/* =========================
   CARD — FOOTER (contact + profile btn)
   ========================= */

.team-archive .agent-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* =========================
   CARD — PROFILE BUTTON
   ========================= */

.team-archive .agent-card__profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid rgba(154,123,67,.55);
  border-radius: 999px;
  background: transparent;
  color: #c7a96b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .1s ease;
  flex-shrink: 0;
}

.team-archive .agent-card__profile-btn:hover {
  background: #9a7b43;
  border-color: #9a7b43;
  color: #1a1610;
  transform: translateY(-1px);
}

.team-archive .agent-card__profile-btn svg {
  transition: transform .14s ease;
}

.team-archive .agent-card__profile-btn:hover svg {
  transform: translateX(3px);
}

/* =========================
   MAP — CUSTOM DOT MARKERS
   ========================= */

/* Override Leaflet default icon shadows */
.trs-map-dot {
  background: transparent !important;
  border: none !important;
}

/* Cluster bubble inherits brand color from inline style;
   these rules handle Leaflet's default overrides */
.trs-map-cluster {
  background: transparent !important;
  border: none !important;
}

/* Reset Leaflet MarkerCluster default styles */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform .3s ease-out, opacity .3s ease-in;
}

/* Leaflet popup tweaks to match card aesthetic */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.14) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 14px 16px !important;
}

.leaflet-popup-tip-container {
  margin-top: -1px;
}

/* =========================
   RESPONSIVE — BADGE + FOOTER
   ========================= */

@media (max-width: 640px) {
  .team-archive .agent-card__avatar-wrap,
  .team-archive .team-group--leadership .agent-card__avatar-wrap {
    width: 96px;
    height: 118px;
    min-width: 96px;
    border-width: 2px;
  }

  .team-archive .agent-card__award-badges {
    gap: 2px;
  }

  .team-archive .agent-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .team-archive .agent-card__profile-btn {
    align-self: stretch;
    justify-content: center;
  }
}

/* =========================
   MAP
   ========================= */

.team-map-block {
  margin-bottom: 36px;
}

.team-map-head {
  margin-bottom: 12px;
}

.team-map-head h2 {
  margin: 0 0 6px;

  color: #2f281c;
}

.team-map-head p {
  margin: 0;
  color: #6b6254;
}

.team-map {
  width: 100%;
  height: 320px;
  border: 1.5px solid #b8ad9e;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07);
}

.trs-map-reset-btn {
  display: block;
  margin-top: 10px;
  padding: 7px 16px;
  background: none;
  border: 1px solid #9a7b43;
  border-radius: 6px;
  color: #9a7b43;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .03em;
  transition: background .15s, color .15s;
}

.trs-map-reset-btn:hover {
  background: #9a7b43;
  color: #fff;
}

/* =========================
   GROUP HEADINGS
   ========================= */

.team-group + .team-group {
  margin-top: 40px;
}

.team-group__head {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeae4;
}

.team-group__head h2 {
  margin: 0;

  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2f281c;
}

/* =========================
   AGENT GRID
   ========================= */

.team-archive .agent-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(460px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* =========================
   AGENT CARD
   ========================= */

.team-archive .agent-card {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0;
  padding: 22px 24px;
  border: 1px solid #2f2f2f;
  border-radius: 22px;
  background: linear-gradient(180deg, #222222 0%, #1d1d1d 100%);
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
  scroll-margin-top: 120px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.team-archive .agent-card.is-highlighted {
  border-color: #c7a96b;
  box-shadow: 0 0 0 4px rgba(199,169,107,.16), 0 14px 28px rgba(0,0,0,.14);
  transform: translateY(-2px);
}

/* =========================
   CARD HEADER
   ========================= */

.team-archive .agent-card__head {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 30px;
 align-items: start;
  text-decoration: none;
}

.team-archive .agent-card__avatar-wrap {
  width: 168px;
  height: 205px;
  min-width: 168px;
  overflow: hidden;
  border: 3px solid #9a7b43;
  border-radius: 999px;
  background: #232323;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.team-archive .agent-card__avatar {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.team-archive .agent-card__meta {
  min-width: 0;
  padding-right: 4px;
}

.team-archive .agent-card__name {
  margin: 0;

  line-height: 0.75;
  letter-spacing: 0.03em;
  color: #fff;
}

.team-archive .agent-card__title {
  margin: 16px 0 0;

  line-height: .75;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b08d55;
}

/* =========================
   LOCATION
   ========================= */

.team-archive .agent-card__location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  line-height: .75;
  color: #f3f0ea;
	font-weight: 500;
  letter-spacing: 0.08em;
}

.team-archive .agent-card__location .trs-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}



/* =========================
   STATS PANEL
   ========================= */

.team-archive .agent-card__stats-panel {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.team-archive .agent-card__stats-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 10px;
  border-left: 1px solid rgba(154,123,67,.22);
}

.team-archive .agent-card__stats-item:first-child {
  border-left: none;
  padding-left: 0;
}

.team-archive .agent-card__stats-item:last-child {
  padding-right: 0;
}

.team-archive .agent-card__stats-count {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #c7a96b;
}

.team-archive .agent-card__stats-text {
  margin-top: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,240,232,.42);
  line-height: 1.3;
}

/* contact list lives inside .agent-card__footer — see FOOTER section above */

/* =========================
   CONTACT BUTTONS
   ========================= */

.team-archive .agent-card__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
}

.team-archive .agent-card__contact li {
  margin: 0;
  padding: 0;
}

.team-archive .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 50px;
  padding: 10px;
  border: 0;
  border-radius: 999px;
  background: #9a7b43;
  color: #231f18;
  text-decoration: none;
  transition: transform .08s ease, background .14s ease, box-shadow .14s ease;
}

.team-archive .chip:hover {
  background: #b89559;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
  transform: translateY(-1px);
}

.team-archive .chip.is-disabled {
  opacity: .75;
  pointer-events: none;
}

.team-archive .chip .trs-icon {
  width: 18px;
  height: 18px;
}

/* =========================
   MAP POPUP
   ========================= */

.team-map-popup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.team-map-popup__img {
  width: 52px;
  height: 52px;
  border: 1px solid #e6e2dc;
  border-radius: 50%;
  object-fit: cover;
}

.team-map-popup__meta strong {
  display: block;
  margin-bottom: 2px;
  color: #2f281c;
}

.team-map-popup__meta div {

  color: #856d47;
}

.team-map-popup__link {
  display: inline-block;
  margin-top: 6px;

  font-weight: 600;
  color: #3a3223;
  text-decoration: none;
}

/* =========================
   LEADERSHIP
   ========================= */

.team-archive .team-group--leadership .agent-cards {
  grid-template-columns: repeat(2, minmax(560px, 1fr));
max-width: 1600px;

}

.team-archive .team-group--leadership .agent-card__head {
  grid-template-columns: 182px 1fr;
  gap: 32px;
}

.team-archive .team-group--leadership .agent-card__avatar-wrap {
  width: 182px;
  height: 222px;
  min-width: 182px;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1750px) {
  .team-archive .agent-cards {
    grid-template-columns: repeat(2, minmax(440px, 1fr));
  }
}

@media (max-width: 1440px) {
  .team-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
  }

  .team-archive .agent-cards {
    grid-template-columns: repeat(2, minmax(400px, 1fr));
  }

  .team-archive .team-group--leadership .agent-cards {
    grid-template-columns: repeat(2, minmax(480px, 1fr));
    max-width: none;
  }
}

@media (max-width: 1080px) {
  .team-layout {
    grid-template-columns: 1fr;
  }

  .team-filters {
    position: static;
  }

  .team-archive .agent-cards,
  .team-archive .team-group--leadership .agent-cards {
    grid-template-columns: 1fr;
    max-width: min(100%, 760px);
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .team-intro {
    padding-left: 18px;
    padding-right: 18px;
  }

  .team-layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .team-co-stats {
    padding: 36px 0;
  }

  .team-co-stats__inner {
    flex-direction: column;
    gap: 32px;
  }

  .team-co-stats__divider {
    width: 60px;
    height: 1px;
    align-self: center;
    background: linear-gradient(to right, transparent, rgba(154,123,67,.35), transparent);
  }

  .team-co-stats__col {
    padding: 0 24px;
  }

  .team-map {
    height: 260px;
  }

  .team-archive .agent-card {
    padding: 18px;
    border-radius: 18px;
  }

  .team-archive .agent-card__head,
  .team-archive .team-group--leadership .agent-card__head {
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: center;
  }

  .team-archive .agent-card__avatar-wrap,
  .team-archive .team-group--leadership .agent-card__avatar-wrap {
    width: 96px;
    height: 118px;
    min-width: 96px;
    border-width: 2px;
  }

  .team-archive .agent-card__name {
 
  }

  .team-archive .agent-card__title {
   
    margin-top: 10px;
  }

  .team-archive .agent-card__location {
  
    margin-top: 10px;
  }



  .team-archive .agent-card__contact {
    justify-content: flex-start;
    gap: 8px;
  }

  .team-archive .chip {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
  }
}

