/*
Theme Name: Digital Rakshit
Theme URI: https://digitalrakshit.com
Author: Digital.Rakshit
Description: Course-selling theme for digital marketing trainers. Adds a Courses section to the dashboard, a front page with learning paths, syllabus, FAQ and an enroll panel with WhatsApp and payment links.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digital-rakshit
*/

/* Layout: a trainer's site that reads like an ad-ops workspace. Pale cool ground, deep green ink,
   one marigold highlight used only for the primary action and the key number. */
:root {
  --bg: #F2F6F3;
  --surface: #FFFFFF;
  --surface-2: #E7EEE9;
  --ink: #0D1F19;
  --muted: #4E625A;
  --line: #CFDBD4;
  --accent: #0A6B4D;
  --accent-ink: #FFFFFF;
  --mark: #FFC21A;
  --mark-ink: #1B1500;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1410; --surface: #111E19; --surface-2: #172822; --ink: #E6F0EB; --muted: #94ABA1;
    --line: #243830; --accent: #3FD39B; --accent-ink: #052018; --mark: #FFC21A; --mark-ink: #1B1500;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1410; --surface: #111E19; --surface-2: #172822; --ink: #E6F0EB; --muted: #94ABA1;
  --line: #243830; --accent: #3FD39B; --accent-ink: #052018; --mark: #FFC21A; --mark-ink: #1B1500;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  padding-block: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin-inline: auto; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 20; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; background: var(--bg); border-bottom: 1px solid var(--line);
  margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; max-width: 1120px; margin-inline: auto; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.03em; }
.brand span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a.link { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav a.link:hover { color: var(--ink); }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 16px; display: grid; place-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px var(--font-body); padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn-mark { background: var(--mark); color: var(--mark-ink); }
.btn-mark:hover { filter: brightness(0.95); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--surface-2); }
.btn-sm { padding: 9px 14px; font-size: 14px; min-height: 40px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-block: 64px 56px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 64px); font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--mark) 62% 92%, transparent 92%); padding-inline: 2px; }
.hero p.lead { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 500; }

.board { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.kpi { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.kpi small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.kpi strong { font-family: var(--font-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi.hot strong { background: linear-gradient(transparent 60%, var(--mark) 60%); }
.chart { width: 100%; height: auto; display: block; margin-top: 12px; }
.chart text { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); }
.board-note { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* Section scaffolding */
section { padding-block: 56px; }
.sec-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 62ch; }
.sec-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.sec-head p { color: var(--muted); }

/* Path */
.path { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.track { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.track h3 { font-size: 20px; font-weight: 700; }
.track p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.steps li { font-family: var(--font-mono); font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.steps li.arrow { border: 0; background: none; padding: 0; color: var(--muted); }

/* Courses */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { font: 500 14px var(--font-body); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.dur { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.card h3 { font-size: 24px; font-weight: 700; }
.card .blurb { color: var(--muted); font-size: 15px; }
.learn { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.learn li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.learn li::before { content: ""; width: 10px; height: 10px; margin-top: 7px; border-radius: 3px; background: var(--accent); }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.price { font-family: var(--font-display); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.price-note { font-size: 13px; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions .btn { flex: 1 1 auto; }
details.syl { border-top: 1px solid var(--line); padding-top: 12px; }
details.syl summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.syl ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }

.bundle { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 22px; }
.bundle h3 { font-size: 22px; font-weight: 700; }
.bundle p { opacity: 0.8; font-size: 14px; margin-top: 4px; max-width: 56ch; }

/* Tools */
.tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tool { font-family: var(--font-mono); font-size: 13px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

/* Method */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.method > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.method h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.method p { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin-top: 10px; font-size: 15px; }

/* Closing */
.close { background: var(--accent); color: var(--accent-ink); border-radius: 20px; padding: 40px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.close h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; max-width: 22ch; }
footer { padding-block: 32px 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Enroll panel */
.overlay { position: fixed; inset: 0; background: rgba(5, 15, 11, 0.6); z-index: 40; display: grid; place-items: center; padding: 16px; }
.panel { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: 24px; display: grid; gap: 14px; }
.panel h3 { font-size: 24px; font-weight: 800; }
.panel .sub { color: var(--muted); font-size: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select { font: 16px var(--font-body); padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; min-height: 44px; }
.out { background: var(--surface-2); border-radius: 10px; padding: 12px; font-family: var(--font-mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row .btn { flex: 1 1 auto; }
.close-x { justify-self: end; }
.err { color: #B3261E; font-size: 13px; min-height: 18px; }
:root[data-theme="dark"] .err { color: #FF8A80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #FF8A80; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 36px 36px; }
  .path, .method { grid-template-columns: 1fr; }
  .nav a.link { display: none; }
  section { padding-block: 40px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* WordPress additions */
.screen-reader-text { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.admin-bar .top { top: 32px; }
@media (max-width: 782px) { .admin-bar .top { top: 46px; } }
.entry { max-width: 720px; padding-block: 48px; }
.entry h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; margin-bottom: 20px; }
.entry h2 { font-size: 28px; margin: 28px 0 12px; }
.entry p, .entry ul, .entry ol { margin: 0 0 16px; }
.entry a { color: var(--accent); }
.entry img { max-width: 100%; height: auto; border-radius: 12px; }
.course-page { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 40px; padding-block: 48px; align-items: start; }
.course-page h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; margin: 10px 0 16px; }
.course-page h2 { font-size: 24px; margin: 28px 0 12px; }
.course-side { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 14px; min-width: 0; }
.course-main { min-width: 0; }
.course-main ol { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.page-head { padding-block: 48px 8px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; }
.posts { display: grid; gap: 16px; padding-block: 24px 56px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.post h2 { font-size: 22px; }
.post h2 a { text-decoration: none; }
.pagination { padding-bottom: 40px; display: flex; gap: 12px; }
@media (max-width: 860px) { .course-page { grid-template-columns: 1fr; } .course-side { position: static; } }

/* Base reset (the standalone page got this from its host) */
[hidden] { display: none !important; }
body { margin: 0; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
