/* ── Extra Theme CSS ──────────────────────────────────────────────────────── */

/* Header scroll state */
#site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,.4);
}

/* Smooth section transitions */
.section, .section-sm { transition: background .3s; }

/* Feature card base state for JS animation */
.feature-card, .step-card {
    will-change: transform, opacity;
}

/* Commission section improvements */
.commission-section .commission-table tbody tr { transition: background .15s; }

/* Levels track on mobile */
@media (max-width: 700px) {
    .levels-track { border-radius: var(--radius); }
    .level-band { padding: 24px 16px; }
    .level-band-num { font-size: 28px; }
}

/* Hero phone mockup shimmer */
.hero-phone-mockup::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
    animation: shimmer 3s infinite 1s;
}
@keyframes shimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

/* Coin badge pulse */
.header-coin-badge {
    animation: coin-pulse 3s ease-in-out infinite;
}
@keyframes coin-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); }
    50%       { box-shadow: 0 0 0 6px rgba(245,166,35,.15); }
}

/* Nav active underline */
#site-nav a.active {
    background: rgba(245,166,35,.15);
    color: var(--gold-light);
}

/* CTA banner decoration */
.cta-banner::after {
    content: '🚀';
    position: absolute;
    font-size: 120px;
    opacity: .07;
    left: -10px;
    bottom: -20px;
}

/* Stat block hover */
.stat-block {
    transition: transform .2s;
    cursor: default;
}
.stat-block:hover { transform: scale(1.05); }

/* Steps grid connector line */
@media (max-width: 900px) {
    .steps-grid { row-gap: 16px; }
}

/* WordPress alignment classes */
.aligncenter { display: block; margin: 0 auto; }
.alignleft   { float: left; margin: 0 20px 20px 0; }
.alignright  { float: right; margin: 0 0 20px 20px; }
.wp-caption  { max-width: 100%; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Print */
@media print {
    #site-header, #site-footer, #scroll-top { display: none; }
    .hero { background: none; color: var(--navy); padding: 20px 0; }
    .hero h1, .hero p { color: var(--navy); }
}

/* ── UBAP Plugin integration overrides ──────────────────────────────────── */
/* Make plugin's .ubap-wrap inherit the theme font */
.ubap-wrap {
    font-family: var(--font-body) !important;
}
/* Plugin buttons pick up theme radius */
.ubap-btn {
    font-family: var(--font-display);
    border-radius: var(--radius-pill) !important;
}
/* Fix plugin form inside theme container */
.content-area .ubap-auth-box {
    box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--border);
}
/* Page hero text for portal pages */
.page-hero h1 { font-size: clamp(1.4rem,2.5vw,2.2rem); }

/* Dashboard top bar spacing fix */
.ubap-topbar {
    padding: 0 0 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 28px;
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER FIX — Logo always LEFT, nav CENTER, actions RIGHT
══════════════════════════════════════════════════════════════════════════ */
#site-header { position: sticky; top: 0; z-index: 1000; }

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 70px;
  gap: 16px;
}

/* Logo — column 1, always left */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  justify-self: start;     /* ← stick to left */
}
.site-logo .logo-text-wrap { line-height: 1.1; }
.site-logo img { max-height: 50px; width: auto; }

/* Nav — column 2, centered */
#site-nav {
  display: flex;
  align-items: center;
  justify-content: center;   /* ← centered */
  gap: 2px;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* Header actions — column 3, right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;         /* ← stick to right */
  flex-shrink: 0;
}

.header-coin-badge {
  white-space: nowrap;
  font-size: 13px;
}

/* Hamburger — hidden on desktop */
.nav-toggle { display: none; }

/* ── Responsive: tablet ≤ 960px ─────────────────────────────────────── */
@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: auto 1fr;   /* logo | actions (no nav column) */
    height: 64px;
  }

  /* Hide desktop nav */
  #site-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: #0b1f4a;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 4px;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    border-top: 1px solid rgba(255,255,255,.1);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  #site-nav.open { display: flex; }

  #site-nav a {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 15px;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  #site-nav a:last-child { border-bottom: none; }
  #site-nav a.nav-cta {
    margin-top: 8px;
    text-align: center;
    justify-content: center;
  }

  .nav-toggle { display: flex !important; }
  .header-coin-badge span { display: none; }  /* hide "Coins" text, show number only */
}

/* ── Mobile ≤ 480px ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .header-inner { height: 58px; gap: 10px; }
  .logo-text    { font-size: 16px; }
  .logo-sub     { font-size: 9px; }
  .logo-icon    { width: 34px; height: 34px; font-size: 16px; }
  #site-nav     { top: 58px; max-height: calc(100vh - 58px); }
  .header-coin-badge { padding: 5px 10px; font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   FULL MOBILE RESPONSIVENESS — Theme Sections
══════════════════════════════════════════════════════════════════════════ */

/* Hero */
@media (max-width: 900px) {
  .hero           { padding: 60px 0 50px; }
  .hero-grid      { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual    { display: none; }
  .hero h1        { font-size: clamp(1.8rem,6vw,2.8rem); }
  .hero p         { font-size: 16px; }
  .hero-actions   { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats     { gap: 20px; flex-wrap: wrap; }
  .hero-stat-val  { font-size: 22px; }
}

/* Features grid */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-card  { padding: 22px 18px; }
}

/* Steps */
@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .steps-grid::before { display: none; }
}
@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
}

/* Commission section */
@media (max-width: 900px) {
  .commission-grid  { grid-template-columns: 1fr; gap: 28px; }
  .commission-table-wrap { overflow-x: auto; }
}

/* Levels track */
@media (max-width: 700px) {
  .levels-track         { flex-direction: column; border-radius: 14px; }
  .level-band           { padding: 20px 16px; }
  .level-band:hover     { flex: none; }
  .level-band-num       { font-size: 28px; }
}

/* Stats band */
@media (max-width: 640px) {
  .stats-row { gap: 28px; }
  .stat-block-val { font-size: 34px; }
}

/* CTA Banner */
@media (max-width: 600px) {
  .cta-banner            { padding: 36px 24px; margin: 0 12px; }
  .cta-banner h2         { font-size: 1.5rem; }
  .cta-banner .btn       { width: 100%; justify-content: center; }
  .cta-banner > div      { flex-direction: column; }
}

/* Footer */
@media (max-width: 768px) {
  .footer-grid      { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .footer-grid       { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom     { flex-direction: column; text-align: center; gap: 8px; }
  #site-footer       { padding: 44px 0 24px; }
}

/* Page hero */
@media (max-width: 600px) {
  .page-hero { padding: 40px 0 28px; }
  .page-hero h1 { font-size: 1.4rem; }
}

/* Container padding */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section   { padding: 56px 0; }
  .section-sm{ padding: 36px 0; }
}
