/*
 Theme Name:   Astra Child – Members Portal
 Theme URI:    https://jroblesdev.com
 Description:  Membership portal demo — gated content, custom roles, member dashboard.
 Author:       Jose Robles
 Author URI:   https://jroblesdev.com
 Template:     astra
 Version:      1.1.0
 Text Domain:  astra-child-members
*/

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --mp-primary:      #007cf0;
  --mp-primary-dark: #0056b3;
  --mp-accent:       #7c3aed;
  --mp-dark:         #0f172a;
  --mp-surface:      #ffffff;
  --mp-light:        #f8fafc;
  --mp-border:       #e2e8f0;
  --mp-muted:        #64748b;
  --mp-radius:       12px;
  --mp-shadow:       0 4px 20px rgba(0,0,0,.06);

  /* Premium tier colors */
  --mp-gold:   #f59e0b;
  --mp-green:  #22c55e;
}

/* ── Base ───────────────────────────────────────────────────── */
body { -webkit-font-smoothing: antialiased; }

/* ── Demo Bar ───────────────────────────────────────────────── */
.jr-demo-bar {
  background: var(--mp-dark);
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 0 20px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 9999;
}
.jr-demo-bar a { color: #fff; text-decoration: none; font-weight: 600; }
.jr-demo-bar a:hover { color: var(--mp-primary); }
.jr-demo-bar .sep { opacity: 0.3; }

/* ── Header – non-sticky ────────────────────────────────────── */
#ast-desktop-header,
#ast-mobile-header {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  z-index: 100 !important;
  background: rgba(255,255,255,0.98) !important;
  box-shadow: 0 1px 0 var(--mp-border), 0 4px 16px rgba(0,0,0,.04) !important;
}

/* Nav links */
.ast-builder-menu-1 .menu-item a,
.ast-builder-menu-3 .menu-item a {
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.01em !important;
}

/* "Register" nav item — styled as a CTA pill */
.ast-builder-menu-1 .menu-item a[href*="/register/"],
.ast-builder-menu-3 .menu-item a[href*="/register/"],
.main-header-menu .menu-item a[href*="/register/"],
header .menu-item a[href*="/register/"] {
  background: var(--mp-accent) !important;
  color: #fff !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  border-radius: 6px !important;
  line-height: 1.2 !important;
  font-size: 0.875rem !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: background 0.15s !important;
}
.ast-builder-menu-1 .menu-item a[href*="/register/"]:hover,
.ast-builder-menu-3 .menu-item a[href*="/register/"]:hover,
.main-header-menu .menu-item a[href*="/register/"]:hover,
header .menu-item a[href*="/register/"]:hover {
  background: #6d28d9 !important;
  color: #fff !important;
}

/* ── Astra container fix — front page full-width sections ───── */
/*
 * Astra sets display:flex on .ast-container at ≥922px, which turns
 * our custom sections into shrinking flex items. Force block layout
 * only on the MAIN content area, not the header's .ast-container.
 */
.home #content,
.home #content > .ast-container {
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}
.home #content > .ast-container {
  display: block !important;
}

/* Ensure every direct section fills full width */
.home #content .jr-hero,
.home #content .jr-plans,
.home #content > div,
.home #content > section {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

/* ── Membership tier badge ──────────────────────────────────── */
.jr-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.jr-tier-badge.free    { background: #f1f5f9; color: var(--mp-muted); border: 1px solid var(--mp-border); }
.jr-tier-badge.premium { background: linear-gradient(120deg, #7c3aed, #a855f7); color: #fff; }

/* ── Hero (homepage) ────────────────────────────────────────── */
.jr-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #fff;
  padding: clamp(56px, 10vw, 100px) 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.jr-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(124,58,237,.25) 0%, transparent 70%);
}
.jr-hero-inner { position: relative; max-width: 680px; margin: 0 auto; }
.jr-hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #a78bfa;
  margin-bottom: 16px;
}
.jr-hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.jr-hero h1 span { color: #a78bfa; }
.jr-hero p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(255,255,255,0.72);
  margin-bottom: 32px;
  line-height: 1.7;
}
.jr-hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.jr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  min-height: 44px;
  font-family: inherit;
}
.jr-btn-primary { background: var(--mp-accent); color: #fff; }
.jr-btn-primary:hover { background: #6d28d9; color: #fff; transform: translateY(-1px); }
.jr-btn-outline { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.jr-btn-outline:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ── Pricing plans ──────────────────────────────────────────── */
.jr-plans {
  padding: clamp(48px, 8vw, 80px) 20px;
  background: var(--mp-light);
}
.jr-plans-inner { max-width: 900px; margin: 0 auto; }
.jr-section-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mp-accent);
  margin-bottom: 10px;
  text-align: center;
}
.jr-section-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--mp-dark);
  margin-bottom: 8px;
}
.jr-section-sub {
  text-align: center;
  color: var(--mp-muted);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

.jr-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.jr-plan-card {
  background: var(--mp-surface);
  border: 2px solid var(--mp-border);
  border-radius: var(--mp-radius);
  padding: 28px;
  position: relative;
}
.jr-plan-card.featured {
  border-color: var(--mp-accent);
  box-shadow: 0 0 0 4px rgba(124,58,237,.08);
}
.jr-plan-badge-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mp-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 50px;
  white-space: nowrap;
}
.jr-plan-name { font-weight: 800; font-size: 1.1rem; color: var(--mp-dark); margin-bottom: 4px; }
.jr-plan-price {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--mp-dark);
  line-height: 1;
  margin: 12px 0 4px;
}
.jr-plan-price sup { font-size: 1rem; vertical-align: super; }
.jr-plan-price span { font-size: 0.9rem; font-weight: 500; color: var(--mp-muted); }
.jr-plan-desc { font-size: 0.82rem; color: var(--mp-muted); margin-bottom: 20px; line-height: 1.6; }
.jr-plan-features { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.jr-plan-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.84rem; color: var(--mp-dark); }
.jr-plan-features li::before { content: '✓'; color: var(--mp-green); font-weight: 800; font-size: 0.8rem; margin-top: 1px; flex-shrink: 0; }
.jr-plan-features li.na { color: var(--mp-muted); }
.jr-plan-features li.na::before { content: '–'; color: var(--mp-border); }
.jr-plan-cta {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}
.jr-plan-cta.primary { background: var(--mp-accent); color: #fff; }
.jr-plan-cta.primary:hover { background: #6d28d9; }
.jr-plan-cta.secondary { background: var(--mp-light); color: var(--mp-dark); border: 1px solid var(--mp-border); }
.jr-plan-cta.secondary:hover { border-color: var(--mp-accent); color: var(--mp-accent); }

/* ── Content listing ────────────────────────────────────────── */
.jr-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}
.jr-article-card {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.jr-article-card:hover { transform: translateY(-3px); box-shadow: var(--mp-shadow); }
.jr-article-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.jr-article-card-body { padding: 18px; }
.jr-article-card-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.jr-article-card-title { font-size: 1rem; font-weight: 700; color: var(--mp-dark); margin-bottom: 8px; line-height: 1.35; }
.jr-article-card-excerpt { font-size: 0.82rem; color: var(--mp-muted); line-height: 1.65; margin-bottom: 14px; }
.jr-article-card-link { font-size: 0.82rem; font-weight: 700; color: var(--mp-primary); text-decoration: none; }

/* ── Paywall overlay ────────────────────────────────────────── */
.jr-paywall {
  border: 2px solid var(--mp-accent);
  border-radius: var(--mp-radius);
  overflow: hidden;
  margin: 32px 0;
}
.jr-paywall-teaser { padding: 0; }
.jr-paywall-teaser .jr-teaser-content {
  padding: 28px;
  position: relative;
}
.jr-paywall-teaser .jr-teaser-content::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #fff);
}
.jr-paywall-gate {
  background: linear-gradient(135deg, #faf5ff, #ede9fe);
  border-top: 1px solid #ddd6fe;
  padding: 28px;
  text-align: center;
}
.jr-paywall-icon { font-size: 2rem; margin-bottom: 12px; }
.jr-paywall-gate h3 { font-size: 1.1rem; font-weight: 800; color: var(--mp-dark); margin-bottom: 8px; }
.jr-paywall-gate p { font-size: 0.875rem; color: var(--mp-muted); margin-bottom: 20px; line-height: 1.6; }
.jr-paywall-gate .jr-btn-primary { font-size: 0.875rem; }

/* ── Member dashboard ───────────────────────────────────────── */
.jr-dashboard { padding: clamp(32px, 6vw, 56px) 20px; background: var(--mp-light); min-height: 60vh; }
.jr-dashboard-inner { max-width: 900px; margin: 0 auto; }
.jr-dashboard-header { margin-bottom: 28px; }
.jr-dashboard-header h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; }
.jr-dashboard-header p { color: var(--mp-muted); margin-top: 4px; }

.jr-dash-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.jr-dash-stat {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 10px;
  padding: 20px;
}
.jr-dash-stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mp-muted); margin-bottom: 6px; }
.jr-dash-stat-value { font-size: 1.75rem; font-weight: 900; letter-spacing: -0.03em; color: var(--mp-dark); }
.jr-dash-stat-sub { font-size: 0.78rem; color: var(--mp-muted); margin-top: 2px; }

.jr-dash-section { background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: var(--mp-radius); margin-bottom: 20px; }
.jr-dash-section-head { padding: 16px 20px; border-bottom: 1px solid var(--mp-border); display: flex; align-items: center; justify-content: space-between; }
.jr-dash-section-head h3 { font-size: 0.9rem; font-weight: 700; color: var(--mp-dark); }
.jr-dash-section-body { padding: 20px; }

/* ── Login / Register pages ─────────────────────────────────── */

/*
 * Astra sets display:flex on .ast-container at ≥922px — override for
 * auth pages so the full-width section fills and centers correctly.
 */
.page-template-page-login-php #content > .ast-container,
.page-template-page-register-php #content > .ast-container {
  display: block !important;
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
}

.jr-auth-wrap {
  min-height: calc(100vh - 108px); /* viewport minus demo bar + header */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--mp-light);
}
.jr-auth-card { background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); padding: clamp(28px, 5vw, 40px); width: 100%; max-width: 440px; box-shadow: var(--mp-shadow); }
.jr-auth-logo { text-align: center; margin-bottom: 24px; }
.jr-auth-logo a { font-weight: 900; font-size: 1.25rem; color: var(--mp-dark); text-decoration: none; letter-spacing: -0.03em; }
.jr-auth-logo a span { color: var(--mp-accent); }
.jr-auth-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; text-align: center; margin-bottom: 6px; }
.jr-auth-sub { text-align: center; color: var(--mp-muted); font-size: 0.875rem; margin-bottom: 24px; }

/* WP default login form overrides */
#login { padding: 0; }
#loginform, #registerform {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
.login label { font-size: 0.82rem; font-weight: 600; color: var(--mp-dark); }
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.15s;
}
.login input[type="text"]:focus,
.login input[type="password"]:focus { border-color: var(--mp-accent); outline: none; box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.login input[type="submit"],
#wp-submit {
  background: var(--mp-accent) !important;
  border-color: var(--mp-accent) !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  padding: 10px !important;
  min-height: 44px !important;
}
.login #nav a, .login #backtoblog a { color: var(--mp-primary); }

/* ── Footer ─────────────────────────────────────────────────── */
.jr-mp-footer { background: var(--mp-dark); color: #64748b; }
.jr-mp-footer-cta {
  background: linear-gradient(120deg, #4c1d95, #7c3aed);
  padding: clamp(28px, 5vw, 40px) 20px;
}
.jr-mp-footer-cta-inner {
  max-width: 1000px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.jr-mp-footer-cta h2 { color: #fff; font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 800; letter-spacing: -0.02em; }
.jr-mp-footer-cta p { color: rgba(255,255,255,.75); font-size: 0.85rem; margin-top: 4px; }
.jr-mp-footer-cta .jr-btn-white { background: #fff; color: #6d28d9; font-weight: 700; padding: 11px 22px; border-radius: 8px; text-decoration: none; font-size: 0.875rem; white-space: nowrap; }
.jr-mp-footer-cta .jr-btn-white:hover { background: #f5f3ff; }

.jr-mp-footer-main { max-width: 1000px; margin: 0 auto; padding: 36px 20px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.jr-mp-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: clamp(20px, 4vw, 40px); padding-bottom: 32px; }
.jr-mp-footer-col h4 { color: #fff; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.jr-mp-footer-logo { font-weight: 900; font-size: 1.05rem; color: #fff; text-decoration: none; display: inline-block; margin-bottom: 10px; letter-spacing: -0.02em; }
.jr-mp-footer-logo span { color: #a78bfa; }
.jr-mp-footer-tagline { font-size: 0.85rem; line-height: 1.7; margin-bottom: 14px; }
.jr-mp-footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jr-mp-footer-nav a { color: #64748b; text-decoration: none; font-size: 0.875rem; transition: color .15s; }
.jr-mp-footer-nav a:hover { color: var(--mp-primary); }
.jr-mp-footer-contact li { list-style: none; margin-bottom: 10px; font-size: 0.875rem; }
.jr-mp-footer-contact span { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: .05em; color: #475569; margin-bottom: 2px; }
.jr-mp-footer-contact a { color: #e2e8f0; text-decoration: none; }
.jr-mp-footer-contact a:hover { color: var(--mp-primary); }

.jr-mp-footer-bottom { max-width: 1000px; margin: 0 auto; padding: 16px 20px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.78rem; }
.jr-mp-footer-bottom a { color: var(--mp-primary); text-decoration: none; font-weight: 600; }

/* ── WhatsApp FAB ────────────────────────────────────────────── */
.jr-whatsapp-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.jr-whatsapp-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,.6); color: #fff; }
.jr-whatsapp-fab::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: #25d366; animation: wa-pulse 2.4s ease-out infinite; z-index: -1;
}
@keyframes wa-pulse { 0% { transform: scale(1); opacity: 0.6; } 70% { transform: scale(1.5); opacity: 0; } 100% { transform: scale(1.5); opacity: 0; } }

/* ── Responsive ─────────────────────────────────────────────── */
/* ── Register page — stack on mobile ─────────────────────────── */
@media (max-width: 700px) {
  .jr-auth-wrap > div > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .jr-plan-grid { grid-template-columns: 1fr; }
  .jr-dash-grid { grid-template-columns: 1fr 1fr; }
  .jr-mp-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .jr-dash-grid { grid-template-columns: 1fr; }
  .jr-mp-footer-grid { grid-template-columns: 1fr; }
  .jr-mp-footer-cta-inner { flex-direction: column; }
}
