/* Membership page */
:root {
  --max-w-7xl: 80rem;
  --gap-6: 1.5rem;
  --gap-10: 2.5rem;
  --white: #fff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --teal-50: #f0fdfa;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --radius-lg: 1rem;
  --radius-md: .75rem; 
  --radius: .5rem;
}

.membership-page {
  min-height: 100vh;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
}

.hero-wrap {
  position: relative;
  flex: 1;
}

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .3;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.7), rgba(255,255,255,.7), rgba(255,255,255,1));
}

.membership-container {
  position: relative;
  z-index: 1;
  max-width: var(--max-w-7xl);
  margin: 0 auto;
  padding: 3rem 1rem;
}

@media (min-width: 640px) {
  .membership-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .membership-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
}

.header p {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--gray-600);
}

.tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-6);
}

@media (min-width: 768px) {
  .tiers {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.card.solid {
  background: var(--white);
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--teal-600);
}

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  border-radius: 9999px;
  background: var(--teal-50);
  color: var(--teal-600);
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 700;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
}

.card p {
  margin-top: .5rem;
  font-size: .875rem;
  color: var(--gray-600);
}

.price { margin-top: 1rem; }

.price .big {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
}

.price .unit { color: #6b7280; }

.features {
  margin-top: 1.5rem;
  list-style: none;
  padding: 0;
}

.features li {
  font-size: .875rem;
  color: #374151;
  line-height: 1.6;
}

/* Scope membership buttons to avoid affecting global header buttons */
.membership-page .btn {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}

/* Global Button Overrides for Membership and its Modal */
.btn-primary {
  background: var(--teal-600) !important;
  color: #fff !important;
}

.btn-primary:hover { 
  background: var(--teal-700) !important; 
}

.btn-light { 
  background: var(--gray-100) !important; 
  color: var(--gray-700) !important; 
  border: 1px solid #e5e7eb !important;
}

.btn-light:hover { 
  background: #e5e7eb !important;
  color: var(--gray-900) !important;
}

.btn-blue { 
  background: var(--blue-600) !important; 
  color: #fff !important; 
}

.btn-blue:hover { 
  background: var(--blue-700) !important; 
}

.benefits {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-6);
}

@media (min-width: 768px) {
  .benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

.benefit-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.benefit-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.benefit-list {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  list-style: none;
  padding: 0;
  color: #374151;
  font-size: .875rem;
}

@media (min-width: 640px) {
  .benefit-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,.4);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.is-open { display: flex; }

.modal-card {
  background: #fff;
  border-radius: .75rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 28rem;
  padding: 1.5rem;
  position: relative;
  margin: 0 1rem;
}

#purchaseModal .modal-close { 
  position: absolute !important; 
  right: 1.25rem !important; 
  top: 1.25rem !important; 
  color: #6b7280 !important; 
  background: transparent !important;
  border: none !important;
  font-size: 1.75rem !important;
  cursor: pointer !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all .2s ease !important;
  z-index: 60 !important;
}

#purchaseModal .modal-close:hover {
  color: #111827 !important;
  transform: scale(1.1) !important;
}

.modal-title { 
  font-size: 1.25rem; 
  font-weight: 600; 
  color: #111827; 
}

.modal-text { 
  margin-top: .25rem; 
  font-size: .875rem; 
  color: #4b5563; 
}

.modal-row { 
  margin-top: 1rem; 
}

.modal-label { 
  display: block; 
  font-size: .875rem; 
  font-weight: 600; 
  color: #374151;
}

.modal-actions { 
  margin-top: 1.5rem; 
  display: flex; 
  justify-content: flex-end; 
  gap: .5rem; 
}

.hidden { 
  display: none !important; 
}
