/* =========================================================
   TEAM PAGE — RMITSCS
   Flat / clean design with grouped committee sections
   ========================================================= */

/* ============================ PAGE BASE ============================ */

.team-page {
  position: relative;
  isolation: isolate;
  background: #f6f7f9;
}

.team-page .team-section {
  position: relative;
  padding: 0;
}

.team-page .team-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f6f7f9;
  border-top: 1px solid rgba(15,23,42,.10);
  border-bottom: 1px solid rgba(15,23,42,.10);
  z-index: 0;
}

.team-page .team-section .container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  padding-top: 32px;
  padding-bottom: 42px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================ OLD SCS WRAPPER SUPPORT ============================ */
/* Keep these in case other team markup still uses the scs-* classes */

.scs-team-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.scs-team-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.scs-team-kicker {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 900;
  opacity: .65;
}

.scs-team-title {
  margin: 0;
  font-family: Merriweather, serif;
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: 1.8rem;
  color: var(--accent);
}

.scs-team-sub {
  margin: .35rem 0 0;
  color: var(--muted);
  max-width: 70ch;
}

.scs-team-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.scs-team-cta:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.scs-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}

/* ============================ HERO ============================ */

.team-page .team-hero {
  position: relative;
  width: 100%;
  min-height: 36vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.team-page .team-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 420px at 50% 10%, rgba(255,255,255,.13), transparent 35%),
    linear-gradient(180deg, rgba(10,12,18,.16), rgba(10,12,18,.38));
  backdrop-filter: blur(1.5px);
  z-index: -1;
}

.team-page .team-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 320px at 18% 25%, rgba(159,0,20,.22), transparent 60%),
    radial-gradient(900px 320px at 82% 30%, rgba(15,23,42,.20), transparent 60%);
  opacity: .82;
  z-index: -1;
}

.team-page .team-hero .inner {
  width: 100%;
  max-width: 1050px;
  padding: 3.25rem 3rem 3.5rem;
}

.team-page .hero-pill {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.05rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  font-weight: 900;
  letter-spacing: .20em;
  text-transform: uppercase;
  font-size: .74rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.team-page .team-hero h1 {
  font-family: Merriweather, "Times New Roman", Times, serif;
  font-weight: 900;
  margin: 1.05rem 0 .65rem;
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  letter-spacing: -.025em;
  text-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.team-page .team-hero p {
  margin: 0 auto;
  max-width: 80ch;
  color: rgba(255,255,255,.90);
  font-size: clamp(1.02rem, 1.55vw, 1.14rem);
  line-height: 1.58;

}

.team-page .hero-mini-row {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .55rem;
}

.team-page .hero-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .78rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  color: rgba(255,255,255,.92);
  font-size: .8rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

/* ============================ PANEL / HEADER ============================ */

.team-page .team-panel {
  background: transparent;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 18px;
  border-radius: 18px;
}

.team-page .team-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.team-page .team-head h2 {
  margin: 0;
  font-family: Merriweather, "Times New Roman", Times, serif;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -.015em;
  color: var(--accent, #9f0014);
}

.team-page .team-head .sub {
  margin-top: 6px;
  color: var(--muted, #6b7280);
  max-width: 720px;
  line-height: 1.55;
}

.team-page .team-cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .70rem 1.05rem;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  color: var(--accent, #9f0014);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.team-page .team-cta:hover {
  transform: translateY(-1px);
  text-decoration: none;
  background: rgba(159,0,20,.04);
  border-color: rgba(159,0,20,.24);
}

/* ============================ FILTERS ============================ */

.team-page .team-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0 22px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: none;
}

.team-page .team-filters .filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-page .team-filters input.form-control,
.team-page .team-filters select.form-control {
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: none;
  min-height: 42px;
}

.team-page .team-filters input.form-control:focus,
.team-page .team-filters select.form-control:focus {
  border-color: rgba(159,0,20,.38);
  box-shadow: 0 0 0 .2rem rgba(159,0,20,.08);
}

.team-page .team-filters .pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .62rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.14);
  background: transparent;
  font-weight: 900;
  font-size: .85rem;
  cursor: pointer;
  user-select: none;
  color: #111827;
  transition: background .15s ease, border-color .15s ease;
}

.team-page .team-filters .pill:hover {
  background: rgba(159,0,20,.04);
  border-color: rgba(159,0,20,.22);
}

.team-page .team-filters .pill input {
  margin: 0;
  transform: translateY(1px);
}

/* ============================ SCROLL AREA ============================ */

.team-page .team-scroll {
  max-height: 74vh;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.team-page .team-scroll::-webkit-scrollbar {
  width: 10px;
}

.team-page .team-scroll::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,.18);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.7);
}

.team-page .team-scroll::-webkit-scrollbar-track {
  background: rgba(15,23,42,.04);
  border-radius: 999px;
}

/* ============================ CATEGORY BLOCKS ============================ */

.team-page .team-category-block {
  margin-bottom: 34px;
}

.team-page .team-category-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 16px;
}

.team-page .team-category-title-wrap {
  min-width: 0;
}

.team-page .team-category-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 7px;
  padding: .32rem .65rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(159,0,20,.22);
  color: var(--accent, #9f0014);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.team-page .team-category-title {
  margin: 0;
  font-family: Merriweather, "Times New Roman", Times, serif;
  font-weight: 900;
  font-size: 1.48rem;
  color: #0b1220;
  letter-spacing: -.015em;
}

.team-page .team-category-subtitle {
  margin-top: 6px;
  color: #6b7280;
  font-size: .95rem;
  line-height: 1.55;
  max-width: 760px;
}

.team-page .team-count-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(15,23,42,.14);
  color: #374151;
  font-size: .82rem;
  font-weight: 900;
  box-shadow: none;
}

.team-page .team-category-divider {
  height: 1px;
  background: rgba(15,23,42,.10);
  margin: 28px 0;
}

/* ============================ GRID ============================ */

.team-page .team-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.scs-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}

/* ============================ FLAT COMMITTEE TILES ============================ */

.team-page .team-card {
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: border-color .18s ease, background .18s ease;
  position: relative;
}

.team-page .team-card::after {
  display: none;
}

.team-page .team-card:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(159,0,20,.35);
  background: rgba(159,0,20,.03);
}

.team-page .team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: rgba(15,23,42,.06);
}

.team-page .team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none;
  filter: none;
  transition: none;
}

.team-page .team-card:hover .team-photo img {
  transform: none;
  filter: none;
}

.team-page .team-photo-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .34rem .58rem;
  border-radius: 999px;
  background: rgba(11,18,32,.78);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.team-page .team-meta {
  padding: 12px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.team-page .name {
  font-weight: 900;
  margin: 0;
  font-size: 1rem;
  color: #0b1220;
  letter-spacing: -.01em;
}

.team-page .role-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted, #6b7280);
  margin-top: 3px;
  margin-bottom: 0;
}

.team-page .role-value {
  display: inline-flex;
  align-items: center;
  padding: .28rem .62rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  background: transparent;
  border: 1px solid rgba(159,0,20,.28);
  color: var(--accent, #9f0014);
  width: fit-content;
}

.team-page .bio-snippet {
  margin: 6px 0 0;
  font-size: .86rem;
  line-height: 1.5;
  color: #374151;
  max-height: 4.5em;
  overflow: hidden;
}

.team-page .talk-label {
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #6b7280;
  margin-top: 10px;
}

.team-page .talk-value {
  font-size: .86rem;
  line-height: 1.45;
  color: #111827;
  opacity: .92;
  margin-top: 4px;
}

.team-page .meta-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--muted, #6b7280);
}

.team-page .meta-footer span.view-label {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 800;
}

.team-page .btn-linkedin {
  border-radius: 999px;
  font-weight: 900;
  font-size: .8rem;
  padding: .42rem .8rem;
  border: 1px solid rgba(15,23,42,.16);
  color: #0b1220;
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  box-shadow: none;
}

.team-page .btn-linkedin:hover {
  transform: none;
  background: #0b1220;
  color: #fff;
  border-color: #0b1220;
  text-decoration: none;
}

/* ============================ EMPTY STATE ============================ */

.team-page .team-empty {
  display: none;
  text-align: center;
  padding: 34px 18px;
  border-radius: 18px;
  background: transparent;
  border: 1px dashed rgba(15,23,42,.18);
  color: #6b7280;
  box-shadow: none;
}

.team-page .team-empty i {
  display: block;
  font-size: 1.75rem;
  color: #9f0014;
  margin-bottom: 8px;
}

.team-page .team-empty strong {
  display: block;
  color: #111827;
  margin-bottom: 4px;
}

/* ============================ TEAM MODAL ============================ */

.modal-backdrop.show {
  background: rgba(10,12,18,.65);
  backdrop-filter: blur(6px);
}

.team-modal .modal-dialog {
  max-width: 740px;
}

.team-modal .modal-content {
  border-radius: 24px;
  border: 1px solid rgba(15,23,42,.16);
  overflow: hidden;
  background:
    radial-gradient(900px 320px at 18% 12%, rgba(255,255,255,.95), rgba(255,255,255,0) 60%),
    radial-gradient(760px 280px at 86% 18%, rgba(255,255,255,.85), rgba(255,255,255,0) 62%),
    linear-gradient(135deg, #f9fafb, #e5e7eb);
  box-shadow: 0 40px 120px rgba(15,23,42,.45);
}

.team-modal .modal-header {
  border: 0;
  padding: 16px 22px 6px;
  background: transparent;
}

.team-modal .modal-title {
  font-family: Merriweather, "Times New Roman", Times, serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  color: #0b1220;
}

.team-modal .close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: none;
  opacity: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-modal .close span {
  font-size: 1.4rem;
  line-height: 1;
}

.team-modal .modal-body {
  padding: 8px 22px 20px;
}

.team-modal .team-modal-grid {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  align-items: center;
}

.team-modal .team-modal-photo img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: none;
}

.team-modal .team-modal-category {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .70rem;
  color: #374151;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.72);
  padding: .38rem .68rem;
  border-radius: 999px;
  margin: 0 0 8px;
}

.team-modal .team-modal-role {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .75rem;
  color: #9f0014;
  border: 1px solid rgba(159,0,20,.18);
  background: transparent;
  padding: .45rem .75rem;
  border-radius: 999px;
  margin: 4px 0 10px;
}

.team-modal .team-modal-bio {
  margin: 0 0 14px;
  line-height: 1.65;
  color: #111827;
  opacity: .9;
}

.team-modal .team-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.team-modal .team-modal-actions a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .95rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: .86rem;
  background: transparent;
  border: 1px solid rgba(15,23,42,.16);
  color: #0b1220;
  text-decoration: none;
  box-shadow: none;
}

.team-modal .team-modal-actions a:hover {
  background: #0b1220;
  color: #fff;
}

.team-modal .btn-coffee {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .95rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: .86rem;
  background: transparent;
  border: 1px solid rgba(159,0,20,.24);
  color: #9f0014;
  text-decoration: none;
  box-shadow: none;
}

.team-modal .btn-coffee:hover {
  background: #9f0014;
  color: #fff;
  border-color: #9f0014;
  text-decoration: none;
}

/* ============================ COFFEE MODAL ============================ */

.coffee-request-modal .modal-dialog {
  max-width: 760px;
}

.coffee-request-modal .modal-content {
  border-radius: 24px;
  border: 1px solid rgba(15,23,42,.16);
  overflow: hidden;
  background:
    radial-gradient(900px 320px at 18% 12%, rgba(255,255,255,.95), rgba(255,255,255,0) 60%),
    radial-gradient(760px 280px at 86% 18%, rgba(255,255,255,.85), rgba(255,255,255,0) 62%),
    linear-gradient(135deg, #f9fafb, #e5e7eb);
  box-shadow: 0 40px 120px rgba(15,23,42,.45);
}

.coffee-request-modal .modal-header {
  border: 0;
  padding: 16px 22px 10px;
}

.coffee-request-modal .modal-title {
  font-family: Merriweather, "Times New Roman", Times, serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #0b1220;
}

.coffee-request-modal .modal-body {
  padding: 10px 22px 18px;
}

.coffee-request-modal .hint {
  font-size: .85rem;
  color: #6b7280;
  margin-top: -4px;
  margin-bottom: 12px;
}

/* ============================ RESPONSIVE ============================ */

@media (max-width: 992px) {
  .team-page .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scs-team-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 576px) {
  .team-page .team-hero .inner {
    padding: 4.25rem 1rem 3.5rem;
  }

  .team-page .team-head,
  .scs-team-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-page .team-cta {
    margin-top: 8px;
  }

  .team-page .team-category-heading {
    flex-direction: column;
    gap: 8px;
  }

  .team-page .team-grid,
  .scs-team-grid {
    grid-template-columns: 1fr;
  }

  .team-modal .team-modal-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .team-modal .team-modal-actions {
    justify-content: center;
  }
}