/* =====================================================================
   GOLDMEN SOLUTION — main stylesheet
   ===================================================================== */
:root {
  --gold: red;
  --gold-light: red;
  --gold-dark: red;
  --navy: #0f1b2b;
  --navy-light: #16263c;
  --ink: #1f2a37;
  --muted: #6b7280;
  --border: #e7e5df;
  --bg: #fbf9f4;
  --white: #ffffff;
  --success: #16a34a;
  --error: #dc2626;
  --radius: 2px;
  --shadow: 0 10px 30px rgba(15, 27, 43, .08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Manrope', 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.2; margin: 0 0 .5em; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 2px; font-weight: 700; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: all .15s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(212,160,23,.35); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-light); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251,249,244,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--navy); }
.logo-mark { width: 36px; height: 36px; border-radius: 2px; background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.logo-text span { color: var(--gold-dark); }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; font-size: 14.5px; color: var(--navy); }
.main-nav a:hover { color: var(--gold-dark); }
.nav-mobile-only { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; flex-shrink: 0; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); }

/* ---------- Flash messages ---------- */
.flash { margin: 14px auto; padding: 12px 18px; border-radius: 2px; font-weight: 600; }
.flash-success { background: #ecfdf3; color: var(--success); border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 60px; overflow: hidden; background: #0f1b2b; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-overlay { position: absolute; inset: 0;}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }
.eyebrow { display: inline-block; background: #fff2cc; color: var(--gold-dark); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 2px; margin-bottom: 14px; }
.hero h1 { font-size: 44px; color: #fff; word-wrap: break-word; }
.hero p.lead { font-size: 18px; color: #cbd5e1; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.network-strip { display: flex; gap: 22px; align-items: center; margin-top: 34px; flex-wrap: wrap; opacity: .85; }
.network-strip .chip { background: var(--white); border: 1px solid var(--border); border-radius: 2px; padding: 8px 16px; font-weight: 700; font-size: 13px; color: var(--navy); }

/* ---------- How to Use the Paybill Guide ---------- */
.how-to-guide .section-head { max-width: 720px; }
.how-to-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 40px; align-items: start; }
.how-to-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.how-to-steps li { display: flex; gap: 16px; align-items: flex-start; }
.how-to-num { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--gold-light); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.how-to-steps h3 { margin: 0 0 4px; font-size: 17px; color: var(--navy); }
.how-to-steps p { margin: 0; word-wrap: break-word; }
.how-to-videos { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.video-wrap-native video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }

/* ---------- Buy widget card ---------- */
.buy-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border: 1px solid var(--border); }
.buy-card h3 { color: var(--navy); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; font-size: 13.5px; color: var(--navy); margin-bottom: 6px; }
.form-group .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=tel], input[type=number], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 2px; border: 1.5px solid var(--border); font-size: 15px; font-family: var(--font); background: var(--white);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,.15); }
.amount-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.amount-quick button { border: 1.5px solid var(--border); background: var(--white); border-radius: 8px; padding: 7px 12px; font-weight: 700; cursor: pointer; font-size: 13.5px; }
.amount-quick button.active, .amount-quick button:hover { border-color: var(--gold); background: #fff8e6; }
.guest-notice { background: #fff8e6; border: 1px solid #f5dfa0; border-radius: 2px; padding: 12px 14px; font-size: 13.5px; color: #7a5b0a; margin-bottom: 16px; }
.tx-status { margin-top: 18px; padding: 14px; border-radius: 2px; font-weight: 600; display: none; }
.tx-status.show { display: block; }
.tx-status.pending { background: #fff8e6; color: #a97c0f; }
.tx-status.success { background: #ecfdf3; color: var(--success); }
.tx-status.failed { background: #fef2f2; color: var(--error); }

/* ---------- Section generic ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { color: var(--navy); font-size: 32px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step-num { width: 40px; height: 40px; border-radius: 2px; background: var(--navy); color: var(--gold-light); display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; }

/* ---------- How to Use the Paybill Guide (card widget) ---------- */
.guide-cards-title { text-align: center; color: var(--gold-dark); font-size: 26px; margin-bottom: 34px; }
.guide-cards-grid { display: grid; grid-template-columns: 1fr 1fr .85fr; gap: 22px; align-items: stretch; }
.guide-cards-grid > * { min-width: 0; }
.guide-card { background: var(--white); border-radius: 2px; padding: 20px 22px; box-shadow: 0 4px 16px rgba(15,27,43,.06); display: flex; flex-direction: column; min-width: 0; }
.guide-card-mpesa { border: 1.5px solid #bfe8cf; }
.guide-card-airtel { border: 1.5px solid #f3c3c0; }
.guide-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.guide-card-head h3 { margin: 0 0 2px; font-size: 15.5px; color: var(--navy); }
.guide-card-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.guide-card-mpesa .guide-card-head p strong { color: var(--success); }
.guide-card-airtel .guide-card-head p strong { color: #dc2626; }
.guide-card-signal { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.guide-card-dot { width: 9px; height: 9px; border-radius: 50%; }
.guide-card-mpesa .guide-card-dot { background: var(--success); }
.guide-card-airtel .guide-card-dot { background: #dc2626; }

.guide-card-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.guide-card-steps li { display: flex; gap: 12px; align-items: flex-start; }
.guide-card-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #eef0f3; color: #8b94a3; }
.guide-card-mpesa .guide-card-icon.is-active { background: var(--success); color: #fff; }
.guide-card-airtel .guide-card-icon.is-active { background: #dc2626; color: #fff; }
.guide-card-steps > li > div > strong { display: block; font-size: 13.5px; color: var(--navy); }
.guide-card-steps p strong { color: var(--navy); }
.guide-card-steps p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); word-wrap: break-word; }

.guide-card-note { display: flex; align-items: center; gap: 8px; background: #ecfdf5; color: var(--success); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 16px; }
.guide-card-note svg { flex-shrink: 0; }

.guide-card-actions { margin-top: auto; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
.btn-guide { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.guide-card-mpesa .btn-guide-filled { background: var(--success); color: #fff; }
.guide-card-mpesa .btn-guide-outline { border-color: var(--success); color: var(--success); }
.guide-card-airtel .btn-guide-filled { background: #dc2626; color: #fff; }
.guide-card-airtel .btn-guide-outline { border-color: #dc2626; color: #dc2626; }

.guide-video-card { position: relative; width: 100%; height: 500px; align-self: start; border-radius: 2px; overflow: hidden; box-shadow: var(--shadow); background: #000; aspect-ratio: 3/4; }
.guide-video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Video embed ---------- */
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Tabs (paybill guide) ---------- */
.tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn { border: 1.5px solid var(--border); background: var(--white); padding: 10px 18px; border-radius: 2px; font-weight: 700; cursor: pointer; font-size: 14px; }
.tab-btn.active { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.guide-steps { list-style: none; padding: 0; margin: 0; counter-reset: gstep; }
.guide-steps li { counter-increment: gstep; display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.guide-steps li::before { content: counter(gstep); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-light); color: var(--navy); font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ---------- Cards / blog ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card img { height: 180px; object-fit: cover; width: 100%; background: #eee; }
.blog-card-body { padding: 18px; }
.blog-card-body h3 { font-size: 17px; margin-bottom: 8px; }
.blog-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.blog-content { font-size: 16.5px; }
.blog-content img { border-radius: 2px; margin: 18px 0; }
.blog-content h2, .blog-content h3 { color: var(--navy); margin-top: 1.4em; }
.blog-content p { margin: 1em 0; }

/* ---------- Table ---------- */
table.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
table.data-table th { background: var(--navy); color: var(--gold-light); font-weight: 700; }
.badge { padding: 3px 10px; border-radius: 2px; font-size: 12px; font-weight: 700; }
.badge-pending { background: #fff8e6; color: #a97c0f; }
.badge-paid, .badge-sent, .badge-published, .badge-active { background: #ecfdf3; color: var(--success); }
.badge-failed { background: #fef2f2; color: var(--error); }
.badge-draft, .badge-suspended { background: #f3f4f6; color: var(--muted); }

/* ---------- Auth / admin forms ---------- */
.auth-wrap { max-width: 440px; margin: 60px auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--navy); color: #fff; padding: 24px 18px; }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 8px; color: #cbd5e1; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.08); color: var(--gold-light); }
.admin-main { padding: 30px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--navy); font-family: var(--font-head); }
.stat-card .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.checkbox-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cbd5e1; padding: 60px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.site-footer .logo { color: #fff; }
.footer-brand p { max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.footer-legal a { margin-left: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .how-to-grid { grid-template-columns: 1fr; }
  .guide-cards-grid { grid-template-columns: 1fr 1fr; }
  .guide-video-card { grid-column: 1 / -1; aspect-ratio: 16/9; max-width: 420px; margin: 0 auto; }
  .steps, .card-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
@media (max-width: 1040px) {
  /* Header: collapse the inline nav/actions into a single toggle once the
     full nav no longer fits in one row (this also covers tablets, where the
     nav items were wrapping mid-word and pushing the header button off-screen) */
  .header-inner { flex-wrap: nowrap; padding: 12px 16px; gap: 12px; position: relative; }
  .logo { min-width: 0; }
  .main-nav { display: none; order: 3; flex-basis: 100%; }
  .header-actions { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
  .main-nav.is-open {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); padding: 10px 20px 16px; z-index: 200;
    max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .main-nav.is-open ul { flex-direction: column; gap: 4px; }
  .main-nav.is-open a { display: block; padding: 10px 4px; }
  .nav-mobile-only { display: block; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
  .nav-mobile-only:first-of-type { margin-top: 6px; }
}
@media (max-width: 640px) {
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 16px; }
  .hero-actions .btn { width: 100%; }

  .section { padding: 44px 0; }
  .section-head h2 { font-size: 26px; }

  .buy-card { padding: 20px; }

  .tabs { gap: 8px; }
  .tab-btn { flex: 1 1 auto; text-align: center; padding: 10px 12px; }

  .guide-steps li { flex-wrap: wrap; }

  .guide-cards-grid { grid-template-columns: 1fr; }
  .guide-cards-title { font-size: 22px; margin-bottom: 24px; }
  .guide-card-actions { justify-content: stretch; }
  .btn-guide { flex: 1 1 auto; }
  .guide-video-card { aspect-ratio: 4/3; }

  .steps, .card-grid, .checkbox-list { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-legal a { margin-left: 0; margin-right: 16px; }
}

@media (max-width: 400px) {
  .container { padding: 0 14px; }
  .logo { font-size: 17px; }
  .hero h1 { font-size: 26px; }
  .eyebrow { font-size: 12px; padding: 5px 12px; }
  .btn { padding: 11px 16px; font-size: 14px; }
  .how-to-num { width: 34px; height: 34px; }
  .amount-quick button { padding: 6px 10px; font-size: 13px; }
}
