/* MASTER WRAPPER */
.ahr-membership-cards {
  display: grid;
  gap: 34px;
  justify-items: center;
  justify-content: center;
  align-items: start;

  /* This is what keeps the 3 cards in a row (same look as your current Elementor layout) */
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
}

/* UNIVERSAL CARD DESIGN */
.ahr-membership-cards .ahr-card {
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Banner */
.ahr-membership-cards .ahr-card-banner img {
  width: 100%;
  display: block;
}

/* Body */
.ahr-membership-cards .ahr-card-body {
  padding: 18px 20px 22px;
}

/* Title + Tagline */
.ahr-membership-cards .ahr-card-title {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

.ahr-membership-cards .ahr-card-tagline {
  margin: 3px 0 15px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: #6b7280;
}

/* Pricing */
.ahr-membership-cards .ahr-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.ahr-membership-cards .ahr-card-price {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.ahr-membership-cards .ahr-card-price-meta {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.1;
  text-transform: lowercase;
}

.ahr-membership-cards .ahr-card-subcopy {
  margin: 0 0 12px;
  font-size: 15px;
  color: #4b5563;
}

/* Button */
.ahr-membership-cards .ahr-card-btn,
.ahr-lifetime-card .ahr-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  line-height: 1.1;
  text-align: center;
  border: none;
  background: #32a2e7;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  width: 100%;
}

/* Lifetime card only: prevent text wrap + extend pill 20px each side, shifted left (not current plan) */
.ahr-lifetime-card .ahr-card-btn:not(.is-current-plan) {
  white-space: nowrap;
  width: calc(100% + 40px);
  margin-left: -33px;
  margin-right: -7px;
  box-sizing: border-box;
}

/* =========================================================
   Current plan button (disabled vibe)
   ========================================================= */
.ahr-membership-cards .ahr-card-btn.is-current-plan,
.ahr-lifetime-card .ahr-card-btn.is-current-plan {
  background: #c4e1ca !important;
  color: #546856 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.95;
}

.ahr-membership-cards .ahr-card-btn.is-current-plan:hover,
.ahr-lifetime-card .ahr-card-btn.is-current-plan:hover {
  background: #d1d5db !important;
  box-shadow: none !important;
  transform: none !important;
}


.ahr-membership-cards .ahr-card-btn.is-current-plan,
.ahr-lifetime-card .ahr-card-btn.is-current-plan{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-right: 35px; /* make room for icon */
}

.ahr-membership-cards .ahr-card-btn.is-current-plan::after,
.ahr-lifetime-card .ahr-card-btn.is-current-plan::after{
  content: "";
  position: absolute;
  right: 13px;
  width: 22px;
  height: 22px;

  background-image: url("https://courses.ahrstudios.com/wp-content/uploads/2025/11/check-symbol-4794.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}



.ahr-membership-cards .ahr-card-btn:hover,
.ahr-lifetime-card .ahr-card-btn:hover {
  background: #228ad0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* Footnote under button */
.ahr-membership-cards .ahr-card-footnote {
  margin: 0 0 14px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

/* Description */
.ahr-membership-cards .ahr-card-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

/* Benefits */
.ahr-membership-cards .ahr-card-benefits-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #6b7280;
}

.ahr-membership-cards .ahr-card-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

/* Patreon-style fade: last benefit text fades out in collapsed state only */
.ahr-membership-cards .ahr-card-collapsed .ahr-card-benefits-list {
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.ahr-membership-cards .ahr-card-expanded .ahr-card-benefits-list {
  -webkit-mask-image: none;
  mask-image: none;
}

.ahr-membership-cards .ahr-card-benefit {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  column-gap: 8px;
}

.ahr-membership-cards .ahr-card-benefit-icon {
  width: 24px;
  height: 24px;
  opacity: 0.8;
  margin-top: 1px;
}

.ahr-membership-cards .ahr-card-benefit-text {
  font-size: 12.5px;
  line-height: 1.3;
  color: #374151;
}

/* MOST POPULAR BADGE */
.ahr-membership-cards .ahr-card-popular {
  border: 2px solid #32a2e7;
  padding-top: 0;
}

.ahr-membership-cards .ahr-card-popular .ahr-card-popular-bar {
  background: #32a2e7;
  width: 100%;
  padding: 6px 0;
  text-align: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ahr-membership-cards .ahr-card-popular .ahr-card-banner {
  margin-top: 0;
}

/* OLD SHOW MORE WRAPPER (still used as container for extra text) */
.ahr-membership-cards .ahr-card-more {
  margin-top: 8px;
}

/* content itself is always block; visibility controlled by .ahr-card-extra */
.ahr-membership-cards .ahr-card-more-content {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.55;
}

/* MOBILE */
@media (max-width: 480px) {
  .ahr-membership-cards .ahr-card-body {
    padding: 16px 16px 20px;
  }
}

/* ------------------------------- */
/* PRICING TOGGLE */
/* ------------------------------- */

.ahr-membership-toggle {
  text-align: center;
}

.ahr-toggle-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* hide the native checkbox completely on BuddyBoss */
.ahr-membership-toggle .ahr-toggle-input {
  display: none !important;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ahr-toggle-track {
  width: 48px;
  height: 26px;
  background: #d1d5db;
  border-radius: 999px;
  position: relative;
  transition: background 0.25s ease;
}

.ahr-toggle-knob {
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.ahr-toggle-input:checked + .ahr-toggle-track {
  background: #32a2e7;
}

.ahr-toggle-input:checked + .ahr-toggle-track .ahr-toggle-knob {
  transform: translateX(22px);
}

.ahr-toggle-text {
  font-size: 16px;
  color: #374151;
  font-weight: 500;
}

/* slashed yearly price */
.ahr-membership-cards .ahr-card-price-strike {
  font-size: 18px;
  color: #9ca3af;
  text-decoration: line-through;
  margin-right: 4px;
  display: none;
}

/* ------------------------------- */
/* PATREON-STYLE COLLAPSE / FADE  */
/* ------------------------------- */

/* Extras wrapper: one animating block for smooth open/close */
.ahr-membership-cards .ahr-card-extras-wrap {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ahr-membership-cards .ahr-card-collapsed .ahr-card-extras-wrap {
  max-height: 0;
}

.ahr-membership-cards .ahr-card-expanded .ahr-card-extras-wrap {
  max-height: 2000px;
}

.ahr-membership-cards .ahr-card-extras-inner {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

/* Fade: smooth opacity + height transition */
.ahr-membership-cards .ahr-card-fade {
  height: 40px;
  margin-top: -18px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
  overflow: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.35s cubic-bezier(0.4, 0, 0.2, 1), margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Patreon-style: last benefit text fades out above Show more (collapsed only) */
.ahr-membership-cards .ahr-card-collapsed .ahr-card-fade {
  opacity: 1;
  height: 56px;
  margin-top: -40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 35%, #ffffff 100%);
}

.ahr-membership-cards .ahr-card-expanded .ahr-card-fade {
  opacity: 0;
  height: 0;
  margin-top: 0;
  pointer-events: none;
}

/* Show more / Show less button */
.ahr-membership-cards .ahr-card-showmore {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: #32a2e7;
  cursor: pointer;
  display: block;
  margin: 0 auto 8px;
  transition: margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* extra breathing room when expanded */
.ahr-membership-cards .ahr-card-expanded .ahr-card-showmore {
  margin-top: 28px;
}

/* tighter spacing between last benefit and Show more button (collapsed state only) */
.ahr-membership-cards .ahr-card-collapsed .ahr-card-showmore {
  margin-top: -25px;
}

/* Remove ugly BuddyBoss focus outline from Show More buttons */
.ahr-membership-cards .ahr-card-showmore:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}


/* =========================================================
   FEATURED CENTER CARD: push side cards down (desktop only)
   Using transform is more reliable than margin inside Elementor layouts.
   ========================================================= */

@media (min-width: 1024px) {
  /* push side cards down */
  .ahr-membership-cards > .ahr-card:not(.ahr-card-popular) {
    transform: translateY(40px);
  }

  /* keep popular card normal */
  .ahr-membership-cards > .ahr-card.ahr-card-popular {
    transform: none;
  }

  /* add bottom space so pushed cards don't collide with next section */
  .ahr-membership-cards {
    padding-bottom: 40px;
  }
}

/* reset on tablet/mobile */
@media (max-width: 1023px) {
  .ahr-membership-cards > .ahr-card {
    transform: none;
  }
  .ahr-membership-cards {
    padding-bottom: 0;
  }
}

/* ================================
   Membership change confirmation
   ================================ */

.ahr-mp-plan-change-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.ahr-mp-confirm-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 32px 30px;
  width: min(92vw, 560px);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  position: relative;
  text-align: center;
  animation: ahr-mp-pop-in .18s ease;
}

@keyframes ahr-mp-pop-in {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}


.ahr-mp-confirm-title {
  font-weight: 700;
  font-size: 25px;
  color: #0f172a;
  margin-bottom: 16px;
}

/* Mobile: slightly smaller title for phone screens */
@media (max-width: 480px) {
  .ahr-mp-confirm-title {
    font-size: 22px;
  }
}

.ahr-mp-confirm-text {
  font-size: 13px;
  line-height: 1.2;
  color: #475569;
  margin-bottom: 25px;
}

.ahr-mp-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.ahr-mp-plan-change-cancel {
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
}

.ahr-mp-plan-change-proceed {
  padding: 10px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}

.ahr-mp-plan-change-cancel {
  background: #e5e7eb;
  border: none;
  color: #374151;
}

.ahr-mp-plan-change-proceed {
  background: #32a2e7;
  border: none;
  color: #ffffff;
}

.ahr-mp-plan-change-proceed:hover {
  background: #228ad0;
}

.ahr-mp-plan-change-cancel:hover {
  background: #414854;
}

/* ================================
   Lifetime horizontal card
   ================================ */

.ahr-lifetime-card{
  --lp-brand:#2ea0ff;
  --lp-bg:#ffffff;
  --lp-ink:#0f172a;
  --lp-sub:#64748b;
  max-width:1000px;
  margin:28px auto;
  position:relative;
  overflow:visible;
}

/* Pill on top (same design as locked-card .ahr-unlock-pill, green = border #16a34a, left-aligned) */
.ahr-lifetime-pill{
  position:absolute;
  top:-28px;
  left:42px;
  background:#16a34a;
  color:#fff;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.8px;
  text-transform:uppercase;
  padding:2px 14px 0;
  border-radius:10px 10px 0 0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  z-index:0;
}

.ahr-lifetime-inner{
  position:relative;
  z-index:1;
  display:grid;
  /* 5-column layout with spacer so price stays centered between text + CTA */
  grid-template-columns:90px 1fr minmax(160px, 180px) 0px minmax(160px, 180px);
  gap:18px;
  align-items:center;
  padding:28px 40px 40px;
  border-radius:20px;
  background:var(--lp-bg);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.14), 0 8px 16px rgba(0, 0, 0, 0.09);
  border:2px solid #16a34a;
}

.ahr-lifetime-img{ width:85px; height:85px; display:block; }

.ahr-lifetime-title{ font-weight:700; font-size:20px; color:#111827; }

.ahr-lifetime-sub{
  margin-top:4px;
  font-size:13px;
  color:#4b5563;
  max-width:420px;
  line-height:1.4;
}

.ahr-lifetime-price-row{
  text-align:center;
  position:relative;
  padding:0 18px; /* space for vertical separators */
  grid-column: 3;
  justify-self: center;
}

/* Place CTA in the last column (leaves a stable gap from the price column) */
.ahr-lifetime-card .ahr-card-btn{
  grid-column: 5;
}

/* Vertical separators (desktop) */
.ahr-lifetime-price-row::before,
.ahr-lifetime-price-row::after{
  content:"";
  position:absolute;
  top:10%;
  bottom:10%;
  width:1.5px;
  background:rgba(15,23,42,.14);
}

.ahr-lifetime-price-row::before{ left:0; }
.ahr-lifetime-price-row::after{ right:0; }

.ahr-lifetime-price{ font-weight:700; font-size:22px; color:#111827; }
.ahr-lifetime-price-meta{ font-size:13px; color:#6b7280; }

.ahr-lifetime-cta-icon{
  width:16px;
  height:16px;
  display:inline-block;
  filter: invert(35%) sepia(58%) saturate(316%) hue-rotate(173deg) brightness(97%) contrast(95%);
}

/* Separator below main row */
.ahr-lifetime-separator{
  grid-column: 1 / -1;
  height:1px;
  background:rgba(15,23,42,.14);
  margin:0 0 14px;
}

/* Benefits: two-column grid so rows align and it doesn’t look “spilled” */
.ahr-lifetime-benefits{
  grid-column: 1 / -1;
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  column-gap:20px;
  row-gap:8px;
  font-size:13px;
  color:#374151;
  line-height:1.4;
}

.ahr-lifetime-benefit{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.ahr-lifetime-tick{
  width:12px;
  height:12px;
  flex-shrink:0;
  display:block;
  object-fit:contain;
}

/* Tablet */
@media (max-width:720px){
  .ahr-lifetime-inner{ grid-template-columns:75px 1fr minmax(220px, 320px); }
  .ahr-lifetime-price-row{ display:none; }
  .ahr-lifetime-card .ahr-card-btn{ grid-column:auto; }
  .ahr-lifetime-benefits{ grid-template-columns:1fr 1fr; }
  .ahr-lifetime-pill{ left:32px; }
}

/* Mobile */
@media (max-width:520px){
  .ahr-lifetime-card{
    padding-left:28px;
    padding-right:28px;
  }
  .ahr-lifetime-pill{
    left:22px;
    margin-left:40px;
    transform:none;
    width:auto;
    white-space:nowrap;
    padding:2px 14px 0;
    border-radius:10px 10px 0 0;
  }
  .ahr-lifetime-inner{
    grid-template-columns:1fr;
    text-align:center;
    gap:10px;
    padding:16px;
  }

  .ahr-lifetime-img{
    width:100px;
    height:100px;
    margin:0 auto;
  }

  .ahr-lifetime-sub{
    padding-left:10px;
    padding-right:10px;
  }

  .ahr-lifetime-price-row{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    text-align:center;
    padding:10px 0;
    margin-top:-5px;
    margin-bottom:-5px;
    /* Reset desktop grid placement so the stack is clean */
    grid-column:auto;
    justify-self:stretch;
  }

  /* Hide separators on phone; spacing unchanged */
  .ahr-lifetime-price-row::before,
  .ahr-lifetime-price-row::after{
    display:none;
  }

  /* keep button centered on phones; reset extended pill so it doesn't spill */
  .ahr-lifetime-card .ahr-card-btn{
    width:86%;
    margin:6px auto 10px;
    display:flex;
    justify-content:center;
    grid-column:auto;
  }
  .ahr-lifetime-card .ahr-card-btn:not(.is-current-plan){
    width:86%;
    margin-left:auto;
    margin-right:auto;
  }

  .ahr-lifetime-benefits{
    grid-template-columns:1fr;
    font-size:12px;
    column-gap:0;
    row-gap:6px;
    text-align:left;
    padding-left:20px;
    padding-right:10px;
    padding-bottom:20px;
  }
}