/* =========================================================
   TEAMS + LIAISONS PAGE STYLES (FULL CLEAN VERSION)
   ========================================================= */


/* =========================
   HERO SECTION FIX
   ========================= */

.page-hero .container{
  max-width: 1200px;
  margin: 0 auto;
}

.teams-hero-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.teams-hero-left{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teams-hero-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.btn-linktree{
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-linktree:hover{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
}

.teams-hero-subtext{
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Mobile hero stacking */
@media (max-width: 768px){
  .teams-hero-row{
    flex-direction: column;
    align-items: flex-start;
  }

  .teams-hero-right{
    align-items: flex-start;
  }

  .btn-linktree{
    width: 100%;
  }
}


/* =========================================================
   TEAM CARDS
   ========================================================= */

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

.team-card-btn {
  all: unset;
  display: block;
  cursor: pointer;
  width: 100%;
}

.team-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
}

.team-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.20) 45%,
    rgba(0,0,0,0.05) 100%
  );
  pointer-events: none;
}

.team-card-title {
  margin-top: 10px;
  font-weight: 800;
}

.team-card-hint {
  margin-top: 6px;
  font-size: 0.9rem;
  opacity: 0.75;
}


/* =========================================================
   LIAISON MODAL
   ========================================================= */

[hidden] { display: none !important; }

.liaison-modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 9998;
}

.liaison-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;

  background: rgba(20, 18, 40, 0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);

  padding: 18px;
  z-index: 9999;
}

.liaison-modal-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.liaison-modal-title{
  margin: 0;
  font-size: 1.3rem;
  font-weight: 900;
}

.liaison-modal-close{
  font-size: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}

.liaison-modal-close:hover{
  background: rgba(255,255,255,0.08);
}

.liaison-modal-body{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.liaison-modal-card{
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  text-align: center;
}

.liaison-modal-card img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center; /* ADD THIS */
  border-radius: 12px;
  margin-bottom: 8px;
}

.liaison-modal-name{
  font-weight: 700;
  font-size: 0.95rem;
}

/* Mobile modal layout */
@media (max-width: 560px){
  .liaison-modal-body{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== HERO: keep center content centered while placing Linktree on right ===== */

.teams-hero-grid{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

/* This keeps your original "centered hero" look */
.teams-hero-center{
  text-align: center;
}

/* Right column stays right-aligned */
.teams-hero-right{
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.btn.btn-linktree{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.btn.btn-linktree:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}

.teams-hero-subtext{
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Mobile: stack nicely */
@media (max-width: 768px){
  .teams-hero-grid{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .teams-hero-right{
    justify-self: start;
    align-items: flex-start;
    text-align: left;
  }

  .btn.btn-linktree{
    width: 100%;
  }
}

.teams-hero-grid{
  align-items: start;
}

.teams-hero-right{
  margin-top: 6px;
}

/* ===== Teams hero buttons centered + adjacent ===== */

.teams-hero-actions{
  margin-top: 18px;
  display: flex;
  justify-content: center;   /* center them */
  align-items: center;
  gap: 18px;                 /* space BETWEEN them */
}

.teams-hero-linktree-sub{
  margin-top: 8px;
  text-align: right;
  opacity: 0.8;
}

/* Make Linktree button match your theme (subtle, not orange) */
.btn.btn-linktree{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.btn.btn-linktree:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

/* Mobile: stack buttons */
@media (max-width: 640px){
  .teams-hero-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .teams-hero-linktree-sub{
    text-align: left;
  }

  .btn.btn-linktree,
  .teams-hero-actions .btn{
    width: 100%;
  }
}


/* Use this on images that MUST NOT crop */
.liaison-img-contain{
  object-fit: contain !important;
  background: rgba(255,255,255,0.06); /* fills the empty bars nicely */
}

/* Use these to “re-center” the crop */
.liaison-pos-top{ object-position: center top !important; }
.liaison-pos-center{ object-position: center center !important; }
.liaison-pos-bottom{ object-position: center bottom !important; }

/* Big performance win for long image grids */
.team-card{
  content-visibility: auto;
  contain-intrinsic-size: 360px 420px; /* placeholder size so layout doesn't jump */
}