/* Membership listing page styles. Extracted from web/memberships.php so
   brand colors land on tokens (--theme-color, --theme-color-hover) instead
   of hardcoded hex literals. White-label overrides in home.php cascade
   here automatically. */

.membership-hero {
  background: #fff;
  text-align: center;
  padding: 120px 16px 24px;
}
.membership-hero h1 {
  font-size: 40px;
  margin: 0 0 16px;
  font-weight: 700;
}
.membership-hero p {
  max-width: 720px;
  margin: 0 auto 28px;
  color: #666;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Tab pattern shared with .dir-category-tab in directory.css — pill-shaped
   selector tabs used for type/category filtering. If a third surface adopts
   this pattern, lift the base into a shared component. */
.membership-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}
.membership-type-tab {
  padding: 8px 22px;
  border-radius: 999px;
  border: 1.5px solid #d9dfeb;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  transition: 0.18s ease;
  background: #fff;
}
.membership-type-tab:hover,
.membership-type-tab.active {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: var(--theme-on-primary);
  text-decoration: none;
}

.membership-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px 24px;
  background: #fff;
  max-width: 1140px;
  margin: 0 auto;
}
.membership-search-wrap {
  position: relative;
  width: 100%;
  max-width: 280px;
}
.membership-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
}
.membership-search {
  width: 100%;
  border: 1.5px solid #d9dfeb;
  border-radius: 10px;
  padding: 10px 12px 10px 38px;
  font-size: 13px;
  outline: none;
  transition: 0.2s ease;
}
.membership-search:focus {
  border-color: var(--theme-color);
}
.membership-filter {
  border: 1.5px solid #d9dfeb;
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 130px;
  font-size: 12px;
  outline: none;
  background: #fff;
  cursor: pointer;
  color: #555;
}
.membership-filter:focus {
  border-color: var(--theme-color);
}

.membership-grid {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 12px 90px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* Row gap matches the 3.5rem total spacing the Bootstrap-row listing
     pages give. CSS Grid's `gap` measures edge-to-edge while Bootstrap's
     gutter system uses col padding + row negative margin (and the listing
     pages also have card box-shadow that bleeds out). So pure 56px here
     reads as ~half the breathing room of an events page. Bumping to 88px
     evens the visual feel across all listing surfaces. */
  row-gap: 88px;
  column-gap: 24px;
}

.membership-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e8ecf4;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  transition: 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.membership-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}
.membership-card.featured {
  border: 2px solid var(--theme-color);
}
.membership-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--theme-color);
  color: var(--theme-on-primary);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 10;
  letter-spacing: 0.3px;
}

.membership-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eef6fb;
  position: relative;
}
.membership-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The card_image() helper outputs either a real <img class="card-image"> or
   a colored-name <div class="card-image-fallback">. Both need to fill the
   1:1 wrap; the fallback's default 4:3 aspect-ratio is overridden via
   .membership-card-image so the disc stays square inside the card. */
.membership-card-image.card-image,
.membership-card-image.card-image-fallback {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
  border-radius: 0;
}
.membership-card-image.card-image-fallback {
  font-size: 1.3rem;
  padding: 16px;
  line-height: 1.25;
  word-break: break-word;
}
.membership-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.membership-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: #505050;
  line-height: 1.35;
}
.membership-description {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 18px;
  min-height: 56px;
}

.membership-price {
  margin-bottom: 18px;
}
.membership-cost {
  font-size: 1.7rem;
  font-weight: 700;
  color: #505050;
  line-height: 1;
}
.membership-free {
  font-size: 1.4rem;
  font-weight: 700;
  color: #28a745;
  line-height: 1;
}
.membership-duration {
  margin-top: 5px;
  font-size: 0.8rem;
  color: #777;
}

.membership-benefits {
  margin-bottom: 22px;
}
.membership-benefits-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--theme-color-readable);
  margin-bottom: 10px;
}
.membership-benefits-scroll {
  max-height: 115px;
  overflow-y: auto;
  padding-right: 4px;
}
.membership-benefits-scroll::-webkit-scrollbar {
  width: 5px;
}
.membership-benefits-scroll::-webkit-scrollbar-thumb {
  background: #c5d7e2;
  border-radius: 999px;
}
.membership-benefits ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.membership-benefits li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #444;
  line-height: 1.45;
}
.membership-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--theme-color-readable);
  font-weight: 700;
}

.membership-btn {
  margin-top: auto;
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--theme-color);
  color: var(--theme-on-primary);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.84rem;
  transition: 0.2s ease;
}
.membership-btn:hover {
  background: var(--theme-color-hover);
  color: var(--theme-on-primary);
  text-decoration: none;
}
.membership-details-link {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--theme-color-readable);
  text-decoration: none;
}
.membership-details-link:hover {
  text-decoration: underline;
}

.membership-empty {
  display: none;
  text-align: center;
  color: #888;
  padding: 70px 20px;
  font-size: 15px;
}

@media (max-width: 992px) {
  .membership-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .membership-grid {
    grid-template-columns: 1fr;
    padding: 20px 14px 50px;
  }
  .membership-hero {
    padding: 55px 20px 36px;
  }
  .membership-controls {
    padding: 28px 16px 36px;
  }
}
