/* ==========================================================================
   Sub2Unlock — Premium Blue + White theme with Dark Mode & Glassmorphism
   ========================================================================== */

:root {
  --blue-600: #3b5bfd;
  --blue-700: #2f47d6;
  --blue-500: #5b78ff;
  --blue-100: #e8ecff;
  --ink: #10152b;
  --ink-soft: #4b5170;
  --bg: #f6f7fc;
  --surface: #ffffff;
  --border: rgba(16, 21, 43, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-lg: 0 20px 50px -18px rgba(59, 91, 253, 0.35);
  --shadow-sm: 0 6px 18px -10px rgba(16, 21, 43, 0.15);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
  --ink: #eef0ff;
  --ink-soft: #b6bcdf;
  --bg: #0b0e1f;
  --surface: #12162d;
  --border: rgba(255, 255, 255, 0.08);
  --blue-100: rgba(91, 120, 255, 0.14);
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4, .brand, .btn-primary-lg { font-family: var(--font-display); }

a { text-decoration: none; color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  backdrop-filter: blur(10px);
}
.brand { font-size: 1.3rem; font-weight: 800; color: var(--blue-600); display: flex; align-items: center; gap: 4px; }
.site-header nav a { font-weight: 600; color: var(--ink-soft); font-size: .95rem; }
.site-header nav a.active, .site-header nav a:hover { color: var(--blue-600); }
.theme-toggle, .navbar-toggler-custom {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
}

/* Dark mode toggle button hidden from the frontend UI (design decision).
   All dark-mode PHP/CSS/JS logic (theme-toggle styles, [data-theme="dark"]
   variables, localStorage, applyTheme(), etc.) is left fully intact below
   and can be restored anytime by removing this rule. Works on both
   desktop and mobile since it targets the button's id directly and the
   header's flex/gap layout auto-collapses the freed space, so no other
   layout change is needed. */
#darkModeToggle { display: none !important; }

/* Profile page: "locked" lock icons and the KYC-locked hint text next to
   Username/Email hidden visually only (design decision). The underlying
   PHP condition, the markup, and the actual lock/readonly behaviour of
   the fields are all still fully intact — remove this rule anytime to
   show them again. */
.profile-lock-icon { display: none !important; }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: -320px; width: 280px; height: 100vh; z-index: 200;
  background: var(--surface); box-shadow: -10px 0 40px rgba(0,0,0,.15);
  padding: 70px 28px; display: flex; flex-direction: column;
  transition: right .3s ease;
}
.mobile-menu.open { right: 0; }
.mobile-menu a { font-weight: 600; font-size: 1.05rem; color: var(--ink); margin: 11px 0; }
.mobile-menu-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 1.4rem; color: var(--ink); }
.mobile-menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199; display: none; }
.mobile-menu-backdrop.open { display: block; }

/* ---------- Hero ---------- */
.hero-wrap { padding: 40px 0 60px; }
.hero-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px 28px; max-width: 640px; margin: 0 auto;
  border: 1px solid var(--border);
}
.hero-banner {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; border-radius: 18px; padding: 22px 24px; display: flex; gap: 16px; align-items: center;
  margin-bottom: 26px;
}
.hero-banner .icon-circle {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 4px; }
.task-grid .task-cell { display: flex; justify-content: center; min-width: 0; }
.task-grid .task-cell.full { grid-column: 1 / -1; }
.task-btn {
  width: 100%; max-width: 100%; min-width: 0; border: none; border-radius: 14px; padding: 10px 14px; font-weight: 700;
  background: var(--blue-600); color: #fff; display: flex; align-items: center; gap: 6px;
  transition: transform .15s ease, box-shadow .15s ease; cursor: pointer;
  font-size: .88rem; min-height: 44px; justify-content: center;
}
.task-btn span:last-child { white-space: normal; text-align: left; line-height: 1.25; overflow-wrap: break-word; word-break: break-word; min-width: 0; }
.task-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.task-btn.selected { background: #e0433f; color: #fff; }
.task-btn.done { background: #22c55e; cursor: default; }
.task-btn.done:hover { transform: none; box-shadow: none; }
.task-btn .plus-circle {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; font-size: .72rem; flex-shrink: 0;
}
.task-btn.selected .plus-circle { background: rgba(255,255,255,.22); color: #fff; }
.task-btn.done .plus-circle { background: rgba(255,255,255,.3); color: #fff; }
@media (min-width: 400px) {
  .task-btn { font-size: .92rem; padding: 12px 16px; gap: 8px; }
  .task-btn .plus-circle { width: 22px; height: 22px; }
}
@media (min-width: 576px) {
  .task-btn { font-size: .9rem; padding: 13px 18px; gap: 10px; }
  .task-btn .plus-circle { width: 24px; height: 24px; }
}
.form-input-glass {
  background: var(--blue-100); border: none; border-radius: 14px; padding: 16px 18px;
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
}
.form-input-glass input {
  border: none; background: transparent; width: 100%; font-size: .98rem; color: var(--ink); outline: none;
}
.form-input-glass i { color: var(--blue-600); font-size: 1.1rem; }
.btn-generate {
  width: 100%; background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff; border: none; border-radius: 14px; padding: 16px; font-weight: 800; font-size: 1.05rem;
  margin-top: 20px; box-shadow: var(--shadow-lg); transition: transform .15s ease;
}
.btn-generate:hover { transform: translateY(-2px); }

.dark-toggle-row { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 22px 0; }
.switch { position: relative; width: 56px; height: 30px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-toggle {
  position: absolute; inset: 0; background: #ccc; border-radius: 30px; cursor: pointer; transition: .3s;
}
.slider-toggle::before {
  content: ""; position: absolute; height: 24px; width: 24px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.switch input:checked + .slider-toggle { background: var(--blue-600); }
.switch input:checked + .slider-toggle::before { transform: translateX(26px); }

/* ---------- Sections ---------- */
section { padding: 60px 0; }
.section-title { font-weight: 800; font-size: 2rem; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 520px; margin: 0 auto 40px; }

.glass-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px; box-shadow: var(--shadow-sm); height: 100%;
}
.glass-card h3 { font-weight: 700; margin-bottom: 10px; }
.glass-card p { color: var(--ink-soft); margin: 0; }

.step-circle {
  width: 130px; height: 130px; border-radius: 50%; background: var(--blue-100);
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--blue-600);
  margin: 0 auto 20px; position: relative;
}
.step-num {
  position: absolute; top: 0; right: 6px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-600); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}
.step-block { text-align: center; margin-bottom: 40px; }
.step-block h4 { font-weight: 700; }
.step-block p { color: var(--ink-soft); }

.cta-section {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff; border-radius: var(--radius-lg); padding: 50px 30px; text-align: left;
}
.cta-section h2 { font-weight: 800; font-size: 2rem; }
.cta-section p { opacity: .9; }
.btn-outline-white {
  border: 2px solid #fff; color: #fff; border-radius: 12px; padding: 12px 26px; font-weight: 700; display: inline-block;
}
.btn-outline-white:hover { background: #fff; color: var(--blue-600); }

/* FAQ */
.accordion-item { background: var(--surface); border: none; border-bottom: 1px solid var(--border); }
.accordion-button { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: none !important; }
.accordion-button:not(.collapsed) { color: var(--blue-600); background: var(--surface); }
.accordion-body { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: #0b0e1f; color: #cfd3ee; padding: 60px 0 24px; margin-top: 40px; }
.site-footer h3 { color: #fff; font-weight: 800; }
.site-footer h4 { color: #fff; font-weight: 700; margin-bottom: 14px; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer a { display: block; color: #9ba1cc; margin-bottom: 10px; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer hr { border-color: rgba(255,255,255,.1); margin: 30px 0 16px; }
.copyright { color: #7d83ab; font-size: .85rem; text-align: center; margin: 0; }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer.footer-nav-hidden { padding: 20px 0; }

/* ---------- Generic form / admin utilities ---------- */
.card-clean { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.btn-blue { background: var(--blue-600); color: #fff; border: none; border-radius: 10px; padding: 10px 20px; font-weight: 700; }
.btn-blue:hover { background: var(--blue-700); color: #fff; }
.form-control:focus { border-color: var(--blue-600); box-shadow: 0 0 0 .2rem rgba(59,91,253,.15); }

/* ---------- Unlock (visitor) page ---------- */
.unlock-wrap { max-width: 560px; margin: 60px auto; }
.progress-ring-wrap { text-align: center; margin-bottom: 20px; }
.unlock-task {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 12px;
}
.unlock-task.done { border-color: #22c55e; background: rgba(34,197,94,.06); }
.unlock-task .task-label { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.unlock-task .btn-do { background: var(--blue-600); color: #fff; border: none; border-radius: 10px; padding: 8px 16px; font-weight: 700; font-size: .88rem; }
.unlock-task.done .btn-do { background: #22c55e; }
.unlock-btn-final {
  width: 100%; padding: 16px; border-radius: 14px; border: none; font-weight: 800; font-size: 1.05rem;
  background: #d6dae8; color: #7c8199; margin-top: 10px; transition: all .25s ease;
}
.unlock-btn-final.active {
  background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 15px 30px -12px rgba(34,197,94,.5); cursor: pointer;
}

@media (max-width: 767px) {
  .cta-section { text-align: center; }
  .section-title { font-size: 1.6rem; }
}

/* ---------- Header auth buttons (Login / Get Started / Dashboard / Logout) ---------- */
.btn-auth-outline, .btn-auth-primary {
  display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700;
  padding: 9px 16px; border-radius: 10px; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-auth-outline {
  color: var(--blue-600); border: 1.5px solid var(--blue-600); background: transparent;
}
.btn-auth-outline:hover { background: var(--blue-100); }
.btn-auth-primary {
  color: #fff; background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 8px 18px -8px rgba(59,91,253,.5);
}
.btn-auth-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(59,91,253,.6); }

/* ---------- Guest welcome hero (site name + GET STARTED / Login) ---------- */
.welcome-hero {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; padding: 44px 20px 50px; text-align: center;
}
.welcome-hero h1 {
  font-size: 2rem; font-weight: 800; margin-bottom: 14px; word-break: break-word;
}
.welcome-hero p {
  color: rgba(255,255,255,.9); max-width: 640px; margin: 0 auto 26px; font-size: 1.02rem; line-height: 1.55;
}
.welcome-hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn-hero-outline {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem;
  padding: 12px 26px; border-radius: 12px; border: 2px solid rgba(255,255,255,.85);
  color: #fff; background: transparent; transition: background .15s ease, transform .15s ease;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.16); color: #fff; transform: translateY(-2px); }
.btn-hero-outline.solid { background: #fff; color: var(--blue-600); }
.btn-hero-outline.solid:hover { background: rgba(255,255,255,.9); color: var(--blue-700); }
@media (max-width: 400px) {
  .welcome-hero h1 { font-size: 1.6rem; }
  .btn-hero-outline { padding: 11px 20px; font-size: .92rem; }
}

/* Hero title/subtitle hidden on frontend (kept in DOM; buttons stay visible) */
.welcome-hero h1,
.welcome-hero p {
  display: none;
}

/* ---------- Floating WhatsApp contact button ---------- */
.s2u-whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1050;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 26px -8px rgba(37, 211, 102, 0.55), 0 2px 8px rgba(16, 21, 43, 0.15);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.s2u-whatsapp-float i.bi-whatsapp {
  font-size: 1.7rem;
  line-height: 1;
  color: #fff;
}
.s2u-whatsapp-float:hover,
.s2u-whatsapp-float:focus-visible {
  background: #20bd5a;
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 32px -8px rgba(37, 211, 102, 0.65), 0 4px 10px rgba(16, 21, 43, 0.2);
}
.s2u-whatsapp-float:focus-visible {
  outline: 3px solid var(--blue-100);
  outline-offset: 3px;
}

/* Tooltip / label - hidden by default, shown on hover/focus (desktop only) */
.s2u-whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm, 0 6px 18px -10px rgba(16, 21, 43, 0.15));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.s2u-whatsapp-tooltip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--ink);
}
.s2u-whatsapp-float:hover .s2u-whatsapp-tooltip,
.s2u-whatsapp-float:focus-visible .s2u-whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Mobile: smaller button, no tooltip text (keeps it icon-only / avoids clutter) */
@media (max-width: 767px) {
  .s2u-whatsapp-float {
    width: 52px;
    height: 52px;
    right: 16px;
    bottom: 16px;
  }
  .s2u-whatsapp-float i.bi-whatsapp { font-size: 1.5rem; }
  .s2u-whatsapp-tooltip { display: none; }
}
