/* ============================================================
   FRESH AIR PILATES — Member Hub (member-hub.css)
   ============================================================ */

/* Hero */
.hub-hero {
  background: var(--text-dark);
  padding: 3rem 0 0;
  overflow: hidden;
}

.hub-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: end;
}

.hub-hero-text { padding-bottom: 3rem; }
.hub-hero-text h1 { color: var(--cream); margin-bottom: 0.75rem; }
.hub-hero-text h1 em { color: var(--gold); }
.hub-hero-text > p { color: rgba(255,255,255,0.6); max-width: 420px; margin-bottom: 1.25rem; }

.hub-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hub-hero-img {
  align-self: end;
}

.hub-screen {
  background: linear-gradient(to top, var(--sage) 0%, transparent 100%);
  border-radius: 8px 8px 0 0;
  padding: 2rem 2rem 0;
  overflow: hidden;
}

.hub-screen img {
  width: 100%;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,0.35);
}

/* Features */
.hub-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--stone-light);
}

.hub-feature {
  background: var(--warm-white);
  padding: 1.5rem 1.5rem;
}

.hf-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.hub-feature h4 { margin-bottom: 0.4rem; }
.hub-feature p  { font-size: 0.85rem; }

/* Gate card */
.gate-card {
  background: var(--text-dark);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  max-width: 580px;
  margin: 0 auto 3rem;
}

.gate-lock { font-size: 2.5rem; margin-bottom: 1.25rem; }
.gate-card h2 { color: var(--cream); margin-bottom: 0.75rem; }
.gate-card > p { color: rgba(255,255,255,0.6); max-width: 420px; margin: 0 auto 2rem; font-size: 0.92rem; }

.gate-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.gate-note {
  font-size: 0.76rem; color: rgba(255,255,255,0.3);
  margin: 0 !important;
}

/* Preview section */
.preview-header { margin-bottom: 1.5rem; }
.preview-header h2 { margin-bottom: 0.5rem; }
.preview-header > p { color: var(--text-light); }

/* Video filter */
.video-filter {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.vf-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.6rem 1.3rem; border-radius: 100px;
  cursor: pointer; border: 1.5px solid var(--stone);
  background: transparent; color: var(--text-mid);
  transition: all var(--trans); font-weight: 500;
}

.vf-btn.active { background: var(--text-dark); color: var(--cream); border-color: var(--text-dark); }
.vf-btn:hover:not(.active) { border-color: var(--sage); color: var(--sage); }

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.video-card {
  background: var(--warm-white);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--trans), box-shadow var(--trans);
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.video-thumb {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: var(--sage-pale);
}

.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(2px) brightness(0.85);
  transition: filter var(--trans);
}

.video-card:hover .video-thumb img {
  filter: blur(1px) brightness(0.9);
}

.play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  background: rgba(44,36,32,0.75);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
  z-index: 2;
}

.play-btn::after {
  content: '';
  border-left: 15px solid white;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.video-card:hover .play-btn { background: var(--sage); }

.video-dur {
  position: absolute; bottom: 0.75rem; right: 0.75rem;
  background: rgba(44,36,32,0.85); color: #fff;
  font-size: 0.72rem; padding: 0.2rem 0.55rem;
  border-radius: 3px; font-weight: 500;
  font-family: 'Jost', sans-serif; z-index: 2;
}

.video-lock {
  position: absolute; bottom: 0.75rem; left: 0.75rem;
  font-size: 0.85rem; z-index: 2;
}

.video-info { padding: 1.25rem; }
.video-cat   { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--sage); font-weight: 500; margin-bottom: 0.35rem; font-family: 'Jost', sans-serif; }
.video-title { font-size: 0.94rem; font-weight: 400; color: var(--text-dark); margin-bottom: 0.25rem; }
.video-meta  { font-size: 0.78rem; color: var(--text-light); }

.preview-cta {
  background: var(--sage-pale);
  padding: 2rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.preview-cta p { margin: 0; font-size: 0.92rem; }

/* Member stats card */
.hub-stats-card {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--stone-light);
  border-radius: 8px; overflow: hidden;
  margin-bottom: 1.5rem;
}
.hub-stat {
  background: var(--warm-white);
  padding: 1.25rem 1rem; text-align: center;
}
.hub-stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 600;
  color: var(--sage); line-height: 1.1;
  margin-bottom: 4px;
}
.hub-stat-unit {
  font-size: 0.85rem; font-weight: 400;
  color: var(--text-muted); margin-left: 2px;
}
.hub-stat-cat {
  font-size: 1rem; font-family: 'Jost', sans-serif;
  font-weight: 500;
}
.hub-stat-label {
  font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  font-family: 'Jost', sans-serif; font-weight: 500;
}

/* My Program card */
.my-prog-card {
  background: var(--warm-white); border: 1px solid var(--sage-light);
  border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem;
}
.my-prog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.my-prog-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; }
.my-prog-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.my-prog-progress-ring {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--sage); color: #fff; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.my-prog-bar { height: 5px; background: var(--stone-light); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.my-prog-bar-fill { height: 100%; background: var(--sage); transition: width 0.3s; }
.my-prog-meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 16px; }
.my-prog-week {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--sage); font-weight: 600; font-family: 'Jost', sans-serif;
  margin: 12px 0 6px; padding-top: 8px; border-top: 1px solid var(--stone-light);
}
.my-prog-week:first-of-type { border-top: none; margin-top: 0; }
.my-prog-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
}
.my-prog-item.is-done { opacity: 0.6; }
.my-prog-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--sage);
  background: none; cursor: pointer; font-size: 0.8rem; color: var(--sage);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all 0.2s;
}
.my-prog-item.is-done .my-prog-check { background: var(--sage); color: #fff; border-color: var(--sage); }
.my-prog-item-info { flex: 1; min-width: 0; }
.my-prog-item-title { font-size: 0.88rem; }
.my-prog-item.is-done .my-prog-item-title { text-decoration: line-through; }
.my-prog-item-meta { font-size: 0.72rem; color: var(--text-muted); }
.my-prog-item-notes { font-size: 0.72rem; color: var(--sage); font-style: italic; margin-top: 2px; }
.my-prog-play {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--sage); color: #fff; cursor: pointer; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform 0.2s;
}
.my-prog-play:hover { transform: scale(1.1); }

/* Search & Sort controls */
.hub-controls {
  display: flex; gap: 12px; margin-bottom: 1rem; align-items: center;
}
.hub-search {
  flex: 1; max-width: 340px; font-size: 0.85rem; padding: 0.6rem 1rem;
  border: 1px solid var(--stone-light); border-radius: 100px;
  background: var(--warm-white);
}
.hub-sort {
  width: auto; min-width: 160px; font-size: 0.8rem; padding: 0.55rem 1rem;
  border-radius: 100px; border: 1px solid var(--stone-light);
  background: var(--warm-white);
}

/* Favourites tab */
.vf-fav { color: var(--sage) !important; }
.vf-fav.active { background: var(--sage) !important; color: #fff !important; border-color: var(--sage) !important; }

/* Favourite heart on card */
.fav-heart {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(0,0,0,0.45); border: none; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; color: rgba(255,255,255,0.7);
}
.fav-heart:hover { background: rgba(0,0,0,0.65); transform: scale(1.1); }
.fav-heart.is-fav { color: #e74c3c; }

/* Watch progress bar */
.watch-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(0,0,0,0.2);
}
.watch-progress-fill {
  height: 100%; background: var(--sage); transition: width 0.3s;
}

/* Difficulty badge */
.diff-badge {
  font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 100px; font-weight: 600;
  font-family: 'Jost', sans-serif; display: inline-block;
}
.diff-beginner { background: #d5f5e3; color: #27ae60; }
.diff-intermediate { background: #fef9e7; color: #f39c12; }
.diff-advanced { background: #fadbd8; color: #e74c3c; }

/* Instructor name on card */
.video-instructor {
  font-size: 0.72rem; color: var(--sage); font-weight: 500;
  font-family: 'Jost', sans-serif;
}

/* Completed tick */
.watch-completed {
  position: absolute; top: 8px; left: 8px;
  background: var(--sage); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
}

@media (max-width: 1024px) {
  .hub-hero-inner { grid-template-columns: 1fr; }
  .hub-screen { display: none; }
  .hub-features { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .preview-cta { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
  .gate-card { padding: 2.5rem 1.5rem; }
  .hub-controls { flex-direction: column; }
  .hub-search { max-width: none; }
  .hub-stats-card { grid-template-columns: 1fr 1fr; }
}

/* ── WELCOME TAB ──────────────────────────────────────────────── */
.hub-welcome-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2rem;
}
.hub-welcome-text h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; line-height: 1.15; margin: 0.6rem 0 1rem; }
.hub-welcome-text h2 em { color: var(--sage); font-style: italic; }
.hub-welcome-text > p { color: var(--text-mid); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.25rem; }
.hub-welcome-list { list-style: disc; padding-left: 1.25rem; margin: 0 0 1.25rem; color: var(--text-mid); font-size: 0.95rem; line-height: 1.7; }
.hub-welcome-list li { margin-bottom: 0.5rem; }
.hub-welcome-list li:last-child { margin-bottom: 0; }
.hub-welcome-list li::marker { color: var(--sage); }
.hub-welcome-list b { color: var(--text-dark); font-weight: 500; }

/* Welcome-video tile: reuses the Individual-Content card look. */
.hub-welcome-video-wrap { align-self: start; }
.hub-welcome-video-wrap .video-card { margin: 0; }
.hub-welcome-video-wrap .video-thumb { aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; }

/* Inline welcome player — replaces the old clickable card that opened
   the modal. The iframe/video sits directly in the Welcome sub-tab. */
.hub-welcome-inline-player {
  display: block;
  background: var(--warm-white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(44,36,32,0.06);
}
.hub-welcome-inline-meta {
  padding: 1rem 1.25rem 1.1rem;
}
.hub-welcome-inline-meta .video-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-dark);
  margin: 4px 0 2px;
}
.hub-welcome-inline-meta .video-cat {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  font-family: 'Jost', sans-serif;
}
.hub-welcome-inline-meta .video-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 2px;
}
.hub-welcome-empty {
  padding: 1.5rem; border: 1px dashed var(--stone-light); border-radius: 8px;
  text-align: center; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6;
}

/* Pilates Flow game CTA card. */
.hub-welcome-game {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem auto 0;
  max-width: 720px;
  background: linear-gradient(135deg, var(--sage-pale), var(--warm-white));
  border: 1px solid var(--sage-light); border-radius: 10px;
}
.hwg-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.hwg-body { flex: 1; min-width: 0; }
.hwg-body h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 500; margin: 0 0 0.2rem; }
.hwg-body p { font-size: 0.86rem; color: var(--text-mid); margin: 0; line-height: 1.55; }

@media (max-width: 900px) {
  .hub-welcome-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .hub-welcome-game { flex-direction: column; text-align: center; }
}

/* ─── Mobile App install card ───────────────────────────────── */
.hub-mobile-app {
  max-width: 720px;
  margin: 1rem auto 0;
}
.hma-trigger {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--warm-white);
  border: 1px solid var(--sage-light);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-dark);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.hma-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(44,36,32,0.08);
  border-color: var(--sage);
}
.hma-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.hma-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hma-text strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.hma-sub { font-size: 0.82rem; color: var(--text-mid); }
.hma-arrow {
  color: var(--sage); font-size: 1.1rem; flex-shrink: 0;
  transition: transform 0.2s;
}
.hma-trigger[aria-expanded="true"] .hma-arrow { transform: rotate(90deg); }

.hma-panel {
  margin-top: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--warm-white);
  border: 1px solid var(--stone-light);
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-mid);
}
.hma-panel h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0 0 0.6rem;
}
.hma-panel p { margin: 0 0 0.75rem; }
.hma-panel ol, .hma-panel ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.hma-panel li { margin-bottom: 0.4rem; }
.hma-panel b, .hma-panel strong { color: var(--text-dark); font-weight: 500; }

.hma-install-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--sage); color: #fff;
  border: none; border-radius: 6px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.hma-install-btn:hover { background: var(--sage-mid); }
.hma-install-btn:active { transform: scale(0.98); }

.hma-installed {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--sage-pale);
  border: 1px solid var(--sage-light);
  border-radius: 100px;
  color: var(--sage-mid);
  font-size: 0.85rem; font-weight: 500;
  width: fit-content;
}
.hma-installed::before { content: "✓"; font-weight: 700; }

.hma-tip {
  margin: 0.75rem 0 0 !important;
  padding: 0.6rem 0.85rem;
  background: var(--sage-pale);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-mid);
}

.ios-share-icon {
  display: inline-block;
  padding: 0 0.3rem; margin: 0 0.15rem;
  border: 1px solid var(--sage);
  border-radius: 4px;
  color: var(--sage-mid);
  font-weight: 600;
  font-family: -apple-system, sans-serif;
}

@media (max-width: 600px) {
  .hma-trigger { padding: 0.75rem 1rem; }
  .hma-text strong { font-size: 1rem; }
  .hma-sub { font-size: 0.78rem; }
}
