/* =========================================================
   GROUP LIST PAGE (groups_list.css)
   Only for group_list.html
   ========================================================= */

/* Page wrapper */
.grouplist {
  position: relative;
}

/* ===== HERO (Teams-style) ===== */
.grouplist-hero {
  position: relative;
  padding: 28px 0 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.grouplist-hero__bg {
  position: absolute;
  inset: -2px;
  pointer-events: none;
}

.grouplist-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #ffd500;
  font-size: 0;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  opacity: 1;
}

.grouplist-kicker::before {
  content: "Groups";
  font-size: 0.78rem;
}

.grouplist-title {
  color: #fff;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 900;
  line-height: 1.02;
}

.grouplist-sub {
  color: rgba(255, 255, 255, 0.62);
  font-size: 1rem;
  max-width: 70ch;
}

.grouplist-cta {
  box-shadow: 0 10px 28px rgba(255, 223, 0, .08);
}

/* ===== FILTER CONTROLS (wrapped) ===== */
.grouplist-controls {
  position: relative;
  margin-top: 0;
  padding: 12px;
  border-radius: 18px;
  /* border:1px solid #242536; */
  /* background: rgba(15,16,21,.55); */
  backdrop-filter: blur(6px);
}

.grouplist-btn {
  border-radius: 14px;
}

.grouplist-filter-input {
  border-radius: 14px;
}

.grouplist-help {
  color: #8a8a8a;
}

/* ===== SECTION HEADERS ===== */
.grouplist-section {
  margin-bottom: 2.5rem;
}

.grouplist-heading {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  opacity: 0.9;
  color: #FFDF00;
}

.grouplist-count {
  font-size: .82rem;
  color: #aeb2c1;
  opacity: .9;
  border: 1px solid #2b2c3c;
  background: #0f1015;
  padding: 6px 10px;
  border-radius: 999px;
}

.grouplist-empty {
  border: 1px dashed #303245;
  border-radius: 18px;
}

/* ===== GRID ===== */
.group-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* ===== CARD ===== */
.groupCard {
  background-color: #111216;
  overflow: hidden;
  border-radius: 18px;
}

/* Banner area (new) */
.groupCard__banner {
  position: relative;
  display: block;
  height: 120px;
  /* tweakable banner height */
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  text-decoration: none;
}

.groupCard__banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .22s ease;
}

.groupCard:hover .groupCard__banner img {
  transform: scale(1.04);
}

.groupCard__edge {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .35) 65%, rgba(0, 0, 0, .65));
  pointer-events: none;
}

.groupCard__bannerText {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .70));
}

.groupCard__bannerTitle {
  color: #f6f7fb;
  font-weight: 900;
  letter-spacing: .25px;
  text-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Your existing card body container */
.group-card {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.95rem 0.8rem;
  width: 100%;
  max-width: 340px;
  flex: 0 0 auto;
  background: #171718;
}

.groupCard:hover {
  background: #14161c;
}

.group-card-body {
  padding-top: 0.1rem;
}

.group-title {
  font-size: 1rem;
  font-weight: 700;
}

.group-title-link {
  color: inherit;
  text-decoration: none;
}

.group-title-link:hover {
  color: #FFDF00;
}

.group-status-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}

.group-description {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.80);
}

.group-description-empty {
  opacity: 0.6;
  font-style: italic;
}

/* Pills (new) */
.groupCard__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.groupCard__pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0f1015;
  border: 1px solid #2b2c3c;
  color: #c8cbda;
  font-size: .82rem;
}

.group-card-footer {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.grouplist-hint {
  color: #9aa0b2;
  font-size: .78rem;
  opacity: .9;
}

/* icon button same as teams */
.view-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 34px;
  height: 31px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
  .group-card {
    max-width: 100%;
  }
}

/* >= 576px: 2 per row */
@media (min-width: 576px) {
  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* >= 992px: 3 per row */
@media (min-width: 992px) {
  .group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* >= 1200px: 4 per row */
@media (min-width: 1200px) {
  .group-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* =========================================================
   Pagination (COPY from Teams page look)
   Uses same class: .teamlist-pagination
   ========================================================= */
.teamlist-pagination .page-link {
  background: #0f1015;
  border-color: #2b2c3c;
  color: #e7e8ef;
}

.teamlist-pagination .page-item.active .page-link {
  background: #FFDF00;
  border-color: #FFDF00;
  color: #121214;
  font-weight: 900;
}


/* Reserve tag-row height so cards align even when there are no tags */
.groupCard__tags {
  min-height: 28px;
  /* tweak: 24–34px depending on your badge size */
}

.groupCard__tags--empty {
  /* optional: keeps spacing consistent even if min-height changes later */
}



/* Perfect vertical centering for circular tag badges */
.groupCard__tags .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  /* 🔴 critical */
  padding-top: 0;
  /* remove font bias */
  padding-bottom: 0;

  height: 26px;
  /* match your circle size */
  min-width: 26px;
  /* keeps it round */
}



/* =========================================
   Groups Tag Scroller (Home-style)
   Scoped so it only affects group_list
   ========================================= */

.grouplist-controls .post-tag-scroller {
  display: grid;
  grid-template-rows: repeat(2, max-content);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem;
  -webkit-overflow-scrolling: touch;
  align-content: start;
}

.grouplist-controls .post-tag-pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  text-decoration: none;
  opacity: 0.9;
  color: #4e4611;
  background: transparent;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition:
    opacity 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.grouplist-controls .post-tag-pill:hover {
  opacity: 1;
  color: #FFDF00;
  border-color: #FFDF00;
}

.grouplist-controls .post-tag-pill.is-active {
  opacity: 1;
  color: #FFDF00;
  border-color: #FFDF00;
  box-shadow: 0 0 0 1px rgba(255, 223, 0, 0.35) inset;
}

.grouplist-controls .post-tag-pill:active {
  transform: translateY(1px);
}

/* Carousel wrapper + buttons */
.grouplist-controls .tag-carousel {
  position: relative;
}

.grouplist-controls .tag-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #2a2b31;
  background: rgba(15, 15, 18, 0.75);
  color: #FFDF00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.grouplist-controls .tag-carousel-btn:hover {
  border-color: #FFDF00;
}

.grouplist-controls .tag-carousel-btn:active {
  transform: translateY(-50%) scale(0.98);
}

.grouplist-controls .tag-carousel-btn--left {
  left: 6px;
}

.grouplist-controls .tag-carousel-btn--right {
  right: 6px;
}

/* Space so buttons don’t cover pills */
.grouplist-controls .tag-carousel .post-tag-scroller {
  padding-left: 48px;
  padding-right: 48px;
}

/* Hide scrollbar but keep scrolling */
.grouplist-controls .tag-carousel .post-tag-scroller {
  scrollbar-width: none;
}

.grouplist-controls .tag-carousel .post-tag-scroller::-webkit-scrollbar {
  display: none;
}

/* Fade edges to imply overflow (match group filter background vibe) */
.grouplist-controls .tag-carousel::before,
.grouplist-controls .tag-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42px;
  z-index: 2;
  pointer-events: none;
}

.grouplist-controls .tag-carousel::before {
  left: 0;
  background: linear-gradient(90deg, rgba(15, 16, 21, .85) 40%, rgba(15, 16, 21, 0));
}

.grouplist-controls .tag-carousel::after {
  right: 0;
  background: linear-gradient(270deg, rgba(15, 16, 21, .85) 40%, rgba(15, 16, 21, 0));
}

.grouplist-controls .tag-carousel-btn.is-disabled {
  opacity: 0;
  pointer-events: none;
}


/* =========================================
   Filter toggle (collapse tags panel)
   ========================================= */

.grouplist-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid #242536;
  background: rgba(15, 16, 21, .35);
  color: #e7e8ef;
  padding: .35rem .7rem;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.grouplist-filter-toggle:hover {
  border-color: #FFDF00;
}

.grouplist-filter-toggle:active {
  transform: translateY(1px);
}

.grouplist-filter-toggle i {
  color: #FFDF00;
}

.grouplist-filter-toggle__chev {
  transition: transform .12s ease;
  opacity: .85;
}

/* Collapsed state */
.grouplist-controls.is-collapsed .grouplist-tagpanel {
  display: none;
}

.grouplist-controls.is-collapsed .grouplist-filter-toggle__chev {
  transform: rotate(-90deg);
}

/* Optional: hide Clear All when collapsed (keeps header compact) */
.grouplist-controls.is-collapsed .js-group-tags-clear {
  display: none !important;
}