/* ============================================
   PORTAL MEMBER VIEW
   Deep cosmic design matching design.propeller.la
   ============================================ */

/* ---- HERO ---- */
.pm-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 60px 20px 48px;
  text-align: center;
  overflow: hidden;
}

.pm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, #0d0a18 80%);
  pointer-events: none;
}

.pm-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.pm-hero__logo {
  max-width: 280px;
  margin: 0 auto 32px;
  display: block;
}

.pm-hero__profile {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.pm-hero__avatar-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pm-hero__avatar-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #1a1428;
}

.pm-hero__avatar-img {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.pm-hero__avatar-placeholder {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #1a1428;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
}

.pm-hero__name {
  font-family: var(--club-font, inherit);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}

.pm-hero__location {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin: 0 0 24px;
}

.pm-hero__points-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,200,0,0.4);
  border-radius: 999px;
  padding: 10px 14px 10px 20px;
}

.pm-hero__points-num {
  font-family: var(--club-font, inherit);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}

.pm-hero__points-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.pm-hero__redeem-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b35, #ffc107);
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s;
}

.pm-hero__redeem-btn:hover {
  transform: scale(1.05);
}

/* ---- SECTIONS ---- */
.pm-section {
  padding: 48px 0;
}

.pm-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.pm-section__title {
  font-family: var(--club-font, inherit);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 24px;
}

/* ---- YOUR IMPACT ---- */
.pm-impact {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,200,0,0.3);
  border-radius: 16px;
  overflow: hidden;
}

.pm-impact__col {
  padding: 28px 24px;
}

.pm-impact__done {
  border-right: 1px solid rgba(255,255,255,0.08);
}

.pm-impact__heading {
  font-family: var(--club-font, inherit);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #4ade80, #b388ff) 1;
  display: inline-block;
}

.pm-impact__tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  cursor: help;
  vertical-align: middle;
  margin-left: 6px;
}

.pm-impact__stat {
  margin-top: 12px;
}

.pm-impact__stat-num {
  font-family: var(--club-font, inherit);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-right: 6px;
}

.pm-impact__stat-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.pm-impact__stat-note {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pm-impact__effect-cta {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin: 12px 0 16px;
}

.pm-impact__link {
  color: #4ade80;
  text-decoration: underline;
  font-weight: 600;
}

.pm-impact__link:hover {
  opacity: 0.8;
}

.pm-impact__refer-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  border-left: 1px solid rgba(255,255,255,0.08);
}

.pm-impact__refer-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(179,136,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  margin-bottom: 10px;
}

/* ---- COMMUNITY ---- */
.pm-community {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.pm-community__referrals {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,200,0,0.3);
  border-radius: 16px;
  padding: 28px 24px;
}

.pm-community__heading {
  font-family: var(--club-font, inherit);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.pm-community__sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin: 0 0 16px;
}

.pm-community__link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pm-community__link-label {
  font-size: 0.85rem;
  font-weight: 700;
}

.pm-community__link-url {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  font-family: monospace;
  word-break: break-all;
  min-width: 0;
}

.pm-community__copy-btn {
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.pm-community__copy-btn:hover {
  background: rgba(255,255,255,0.12);
}

.pm-community__next-reward {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.pm-community__progress {
  margin-bottom: 24px;
}

.pm-community__progress-bar {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: visible;
}

.pm-community__progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ade80, #ffd700, #ff6b35, #b388ff);
  transition: width 0.4s ease;
}

.pm-community__progress-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pm-community__progress-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a1428;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
}

.pm-community__progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}

.pm-community__rewards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pm-community__reward-item {
  text-align: center;
}

.pm-community__reward-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  margin-bottom: 8px;
}

.pm-community__reward-name {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.pm-community__reward-unlock {
  font-size: 0.75rem;
  font-weight: 700;
}

.pm-community__find-others {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
}

.pm-community__find-others .pm-community__heading {
  margin-bottom: 4px;
}

.pm-community__find-others .pm-community__sub {
  margin-bottom: 20px;
}

.pm-community__circle-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b35, #ffc107);
  color: #000;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s;
}

.pm-community__circle-btn:hover {
  transform: scale(1.05);
}

/* ---- RECOMMENDED FOR YOU ---- */
.pm-recommended {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pm-recommended__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0,0,0,0.5);
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background-clip: padding-box;
}

.pm-recommended__card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #4ade80, #00bcd4, #ffc107, #ff6b35);
  z-index: -1;
}

.pm-recommended__text {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pm-recommended__text h3 {
  font-family: var(--club-font, inherit);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.pm-recommended__pts {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.pm-recommended__btn {
  width: fit-content;
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.pm-recommended__btn:hover {
  background: rgba(255,255,255,0.2);
}

.pm-recommended__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 200px;
}

/* ---- TAKE ACTION ---- */
.pm-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pm-action-card {
  background: rgba(0,0,0,0.5);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  padding-bottom: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.pm-action-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffc107, #ff6b35, #b388ff);
  z-index: -1;
}

.pm-action-card:hover {
  transform: translateY(-3px);
}

.pm-action-card__img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.pm-action-card__title {
  font-family: var(--club-font, inherit);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 12px 14px 6px;
  line-height: 1.3;
}

.pm-action-card__pts {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 14px 10px;
}

.pm-action-card__btn {
  margin: 0 14px;
  padding: 7px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.pm-action-card__btn:hover {
  background: rgba(255,255,255,0.1);
}

/* ---- INSIDE PORTAL ---- */
.pm-inside-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.pm-inside-card {
  background: rgba(0,0,0,0.5);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.pm-inside-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4ade80, #00bcd4, #b388ff);
  z-index: -1;
}

.pm-inside-card:hover {
  transform: translateY(-3px);
}

.pm-inside-card__img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.pm-inside-card__title {
  font-family: var(--club-font, inherit);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  padding: 12px 14px 16px;
  margin: 0;
  line-height: 1.4;
}

.pm-view-all {
  display: block;
  text-align: center;
  color: #4ade80;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
}

.pm-view-all:hover {
  opacity: 0.7;
}

/* ---- REWARDS ---- */
.pm-rewards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pm-reward-featured {
  background: rgba(0,0,0,0.5);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pm-reward-featured::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #4ade80, #00bcd4, #ffc107);
  z-index: -1;
}

.pm-reward-featured__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.pm-reward-featured__body {
  padding: 20px;
  text-align: center;
}

.pm-reward-featured__body h3 {
  font-family: var(--club-font, inherit);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.pm-reward-featured__pts {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.pm-reward-featured__btn {
  padding: 10px 28px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.pm-reward-featured__btn:hover {
  background: rgba(255,255,255,0.1);
}

.pm-rewards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pm-reward-card {
  background: rgba(0,0,0,0.5);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
}

.pm-reward-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffc107, #ff6b35, #b388ff);
  z-index: -1;
}

.pm-reward-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 100px;
}

.pm-reward-card__body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pm-reward-card__title {
  font-family: var(--club-font, inherit);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.3;
}

.pm-reward-card__pts {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.pm-reward-card__btn {
  width: fit-content;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.pm-reward-card__btn:hover {
  background: rgba(255,255,255,0.1);
}

/* ---- COLLECTIVE IMPACT ---- */
.pm-collective {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pm-collective__stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,200,0,0.3);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
}

.pm-collective__num {
  font-family: var(--club-font, inherit);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  display: block;
  margin-bottom: 4px;
}

.pm-collective__label {
  font-size: 0.82rem;
  font-weight: 700;
}

/* ---- FAQ ---- */
.pm-faq-section {
  padding-bottom: 64px;
}

.pm-faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.pm-faq-item {
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #ff6b35, #ffc107, #4ade80, #00bcd4, #b388ff) 1;
}

.pm-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.pm-faq-q:hover {
  opacity: 0.8;
}

.pm-faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.pm-faq-item.open .pm-faq-chevron {
  transform: rotate(180deg);
}

.pm-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.pm-faq-item.open .pm-faq-a {
  max-height: 500px;
}

.pm-faq-a-inner {
  padding: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
}

/* ---- PORTAL MEMBER OVERRIDES ---- */
/* Hide the generic club hero when Portal member view is active */
.portal-member ~ .cd-hero,
.cd-themed:has(.portal-member) .cd-hero {
  display: none;
}

/* Make sure the Portal member wraps in the themed bg */
.portal-member {
  background: var(--club-bg, #0d0a18);
  color: var(--club-text, #e8e0f5);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .pm-impact {
    grid-template-columns: 1fr 1fr;
  }
  .pm-impact__refer-visual {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    flex-direction: row;
    gap: 12px;
  }
  .pm-rewards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .pm-hero {
    padding: 40px 16px 36px;
  }
  .pm-hero__logo {
    max-width: 200px;
  }
  .pm-hero__avatar-ring {
    width: 110px;
    height: 110px;
  }
  .pm-hero__avatar-placeholder {
    width: 94px;
    height: 94px;
  }
  .pm-hero__points-bar {
    flex-wrap: wrap;
    justify-content: center;
  }
  .pm-impact {
    grid-template-columns: 1fr;
  }
  .pm-impact__done {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .pm-impact__refer-visual {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .pm-community {
    grid-template-columns: 1fr;
  }
  .pm-community__rewards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pm-recommended__card {
    grid-template-columns: 1fr;
  }
  .pm-recommended__img {
    min-height: 180px;
  }
  .pm-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pm-inside-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pm-rewards {
    grid-template-columns: 1fr;
  }
  .pm-collective {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .pm-actions-grid {
    grid-template-columns: 1fr;
  }
  .pm-inside-grid {
    grid-template-columns: 1fr;
  }
  .pm-collective {
    grid-template-columns: 1fr 1fr;
  }
  .pm-community__rewards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pm-reward-card {
    grid-template-columns: 80px 1fr;
  }
}

/* ── Mobile container-padding override ── */
@media (max-width: 480px) {
  .pm-section .container { padding: 0 16px; }
}

/* ── Mobile touch targets ── */
@media (max-width: 768px) {
  .pm-action-card__btn { min-height: 44px; padding: 12px 16px; }
  .pm-reward-card__btn, .pm-reward-featured__btn { min-height: 44px; }
  .pm-recommended__btn { min-height: 44px; }
  .pm-community__copy-btn { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .pm-community__circle-btn { min-height: 44px; }
  .pm-hero__redeem-btn { min-height: 44px; padding: 12px 20px; }
}
