/*
Theme Name: SmartLearn
Theme URI: https://smartlearn.co/
Author: SmartLearn
Author URI: https://smartlearn.co/
Description: A modern monochrome + teal WordPress theme for AI-powered online learning platforms. Ships with a Course CPT, 15 Elementor widgets including the SmartLearn Experience suite (Diagnostic, Skill Atlas, AI Calendar, Live Pulse, Outcome Paths, Comparison, Hero), full SEO + JSON-LD schema, core sitemap, form-plugin styling, and pre-built Elementor pages that auto-install on activation.
Version: 1.5.1
Requires at least: 6.0
Tested up to: 6.5
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: smartlearn
Tags: education, blog, custom-logo, custom-menu, featured-images, full-site-editing, threaded-comments, translation-ready, elementor, e-learning, courses, seo
*/

/* ============================================================
   SmartLearn theme styles — warm editorial palette
   Loaded on all front-end pages; Elementor inherits these tokens.
   ============================================================ */

:root {
  /* Grayscale */
  --gray-0:    #ffffff;
  --gray-50:   #fafafa;
  --gray-100:  #f1f1f1;
  --gray-200:  #e3e3e3;
  --gray-300:  #dfdfdf;
  --gray-400:  #929292;
  --gray-500:  #666666;
  --gray-600:  #484848;
  --gray-700:  #333333;
  --gray-800:  #222222;
  --gray-900:  #111111;
  --gray-1000: #000000;

  /* Semantic */
  --background:        var(--gray-0);
  --foreground:        var(--gray-600);
  --muted:             var(--gray-200);
  --muted-foreground:  var(--gray-400);

  /* Primary — monochrome */
  --primary-lighter:    var(--gray-200);
  --primary:            var(--gray-900);
  --primary-dark:       var(--gray-1000);
  --primary-foreground: var(--gray-0);

  /* Secondary — violet */
  --secondary-lighter:    #cfe6ee;
  --secondary:            #136a8a;
  --secondary-dark:       #0f5a77;
  --secondary-foreground: #ffffff;

  /* Semantic roles */
  --red:    #ee0000; --red-dark: #c50000; --red-lighter: #f7d4d6;
  --orange: #f5a623; --orange-dark: #ab570a; --orange-lighter: #ffefcf;
  --blue:   #136a8a; --blue-dark: #0f5a77; --blue-lighter: #136a8a;
  --green:  #11a849; --green-dark: #11843c; --green-lighter: #b9f9cf;

  /* Compatibility shims for existing rules */
  --bg:           var(--background);
  --bg-alt:       var(--gray-50);
  --bg-card:      var(--gray-0);
  --ink:          var(--gray-900);
  --ink-soft:     var(--foreground);
  --ink-muted:    var(--gray-500);
  --rule:         var(--gray-200);
  --rule-strong:  var(--gray-300);
  --accent:       var(--secondary);
  --accent-ink:   var(--secondary-dark);
  --accent-soft:  var(--secondary-lighter);
  --highlight:    var(--orange-lighter);
  --success:      var(--green-dark);

  /* Type */
  --font-display: "Lexend Deca", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --space-section: 120px;
  --space-block: 64px;
  --container: 1240px;
  --gutter: 32px;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.04), 0 2px 8px rgba(17, 17, 17, 0.04);
  --shadow-md: 0 4px 12px rgba(17, 17, 17, 0.06), 0 12px 32px rgba(17, 17, 17, 0.08);
  --shadow-accent: 0 8px 24px rgba(19, 106, 138, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.sl-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sl-section { padding: var(--space-section) 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--rule-strong); }

.sl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap; text-decoration: none;
}
.sl-btn--primary { background: var(--ink); color: var(--bg); }
.sl-btn--primary:hover { background: var(--accent); transform: translateY(-1px); color: #fff; }
.sl-btn--accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.sl-btn--accent:hover { background: var(--accent-ink); transform: translateY(-1px); color: #fff; }
.sl-btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.sl-btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

.sl-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--bg-alt); color: var(--ink-soft);
  font-size: 12.5px; border: 1px solid var(--rule);
  white-space: nowrap;
}
.sl-chip--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* ── Navigation ── */
.sl-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.sl-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 12px rgba(17, 17, 17, 0.04);
}
.admin-bar .sl-nav { top: 32px; }
.sl-nav__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.sl-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.025em; color: var(--ink);
}
.sl-logo:hover { color: var(--ink); }
.sl-logo__mark {
  width: 32px; height: 32px;
  background: var(--ink); color: var(--bg);
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  position: relative;
  transition: transform 0.3s cubic-bezier(.22,.61,.36,1);
}
.sl-logo:hover .sl-logo__mark { transform: rotate(-8deg); }
.sl-logo__mark::after {
  content: ""; position: absolute; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  bottom: 4px; right: 4px;
}
.sl-menu {
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; margin-left: 24px;
  list-style: none; padding: 0; margin-block: 0;
}
.sl-menu a {
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s, background 0.2s;
}
.sl-menu a:hover { color: var(--ink); background: rgba(17,17,17,0.04); }
.sl-menu .current-menu-item > a,
.sl-menu .current_page_item > a {
  color: var(--ink); background: var(--bg-alt);
}
.sl-menu .current-menu-item > a::after,
.sl-menu .current_page_item > a::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 2px;
  background: var(--accent);
  border-radius: 999px;
}
.sl-nav__cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sl-nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  border-radius: 999px;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  cursor: pointer;
}
.sl-nav__toggle span {
  width: 16px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}
.sl-nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.sl-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sl-nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.sl-nav__mobile {
  display: none;
  position: absolute;
  top: 72px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 20px;
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.sl-nav__mobile.is-open { max-height: 600px; }
.sl-nav__mobile ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.sl-nav__mobile a {
  padding: 12px 16px;
  border-radius: 12px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 17px; color: var(--ink);
}
.sl-nav__mobile li.current-menu-item > a,
.sl-nav__mobile li.current_page_item > a { background: var(--bg-alt); color: var(--accent); }

/* ── Footer ── */
.sl-footer {
  background: var(--ink); color: var(--bg);
  padding: 80px 0 32px; margin-top: 80px;
}
.sl-footer h4 {
  font-family: var(--font-body); font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5); margin-bottom: 18px; font-weight: 500;
}
.sl-footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 64px;
}
.sl-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sl-footer ul a { color: rgba(255, 255, 255, 0.75); font-size: 14.5px; }
.sl-footer ul a:hover { color: var(--accent); }
.sl-footer__bottom {
  display: flex; justify-content: space-between;
  padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px; color: rgba(255, 255, 255, 0.5);
}

/* ── Hero ── */
.sl-hero { padding: 72px 0 96px; border-bottom: 1px solid var(--rule); }
.sl-hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.sl-hero h1 { font-size: clamp(56px, 6.6vw, 96px); margin-bottom: 24px; font-weight: 400; }
.sl-hero h1 em { font-style: italic; color: var(--accent); }
.sl-hero__lede { font-size: 19px; color: var(--ink-soft); margin-bottom: 32px; max-width: 540px; }
.sl-hero__search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--rule-strong);
  border-radius: 999px; padding: 6px 6px 6px 22px;
  box-shadow: var(--shadow-sm); max-width: 580px;
}
.sl-hero__search input {
  flex: 1; border: 0; background: transparent; outline: none;
  padding: 12px 0; font-size: 16px; font-family: inherit; color: var(--ink);
}
.sl-hero__stats { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.sl-hero__stat-n { font-family: var(--font-display); font-size: 28px; font-weight: 500; }
.sl-hero__stat-l { color: var(--ink-muted); font-size: 13.5px; }
.sl-hero__visual { position: relative; aspect-ratio: 4 / 5; }
.sl-placeholder {
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(17, 17, 17, 0.04) 9px 10px),
    var(--bg-alt);
  border: 1px solid var(--rule); border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--ink-muted); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  position: relative; overflow: hidden;
}
.sl-placeholder--portrait {
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(17, 17, 17, 0.05) 9px 10px),
    linear-gradient(180deg, var(--gray-200) 0%, var(--gray-300) 100%);
  color: rgba(17, 17, 17, 0.55);
}

/* ── Section head ── */
.sl-sechead { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.sl-sechead__left { max-width: 640px; }
.sl-sechead h2 { font-size: clamp(34px, 4vw, 52px); margin-top: 14px; }
.sl-sechead__sub { color: var(--ink-muted); font-size: 18px; margin-top: 16px; max-width: 560px; }

/* ── Category grid ── */
.sl-cats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule);
  border-radius: 20px; overflow: hidden;
}
.sl-cat { padding: 36px; background: var(--bg); display: flex; flex-direction: column; gap: 16px; min-height: 240px; transition: background 0.2s; }
.sl-cat:hover { background: var(--bg-card); }
.sl-cat__n { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.sl-cat h3 { font-size: 28px; margin-top: auto; margin-bottom: 0; }
.sl-cat__blurb { color: var(--ink-muted); font-size: 14.5px; }
.sl-cat__foot { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-top: 8px; color: var(--accent-ink); }

/* ── Course card ── */
.sl-courses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sl-courses-grid--3 { grid-template-columns: repeat(3, 1fr); }
.sl-course-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 16px; transition: transform 0.2s, box-shadow 0.2s;
  color: var(--ink); text-decoration: none;
}
.sl-course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--ink); }
.sl-course-card__cover {
  aspect-ratio: 16/10; border-radius: 10px;
  background: var(--accent-soft);
  position: relative; overflow: hidden;
  border: 1px solid var(--rule);
}
.sl-course-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.sl-course-card__chips { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.sl-course-card__chips .sl-chip { background: rgba(255,255,255,0.85); height: 24px; font-size: 11.5px; }
.sl-course-card h3 { font-size: 19px; line-height: 1.2; margin: 0; }
.sl-course-card__by { color: var(--ink-muted); font-size: 13.5px; margin: 0; }
.sl-course-card__meta { display: flex; gap: 14px; font-size: 13px; color: var(--ink-soft); margin-top: auto; }
.sl-course-card__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--rule); }
.sl-course-card__price { font-family: var(--font-display); font-size: 20px; }

/* ── Testimonials ── */
.sl-tcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sl-tcard {
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 16px; padding: 32px;
  display: flex; flex-direction: column; gap: 20px; margin: 0;
}
.sl-tcard blockquote {
  margin: 0; font-family: var(--font-display);
  font-size: 22px; line-height: 1.35;
}
.sl-tcard figcaption { margin-top: auto; display: flex; gap: 12px; align-items: center; padding-top: 20px; border-top: 1px solid var(--rule); }
.sl-tcard__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--rule); }

/* ── FAQ ── */
.sl-faq__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
.sl-faq__item { border-bottom: 1px solid var(--rule); padding: 24px 0; }
.sl-faq__q {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; border: 0; background: transparent; padding: 0;
  text-align: left; cursor: pointer;
  font-family: var(--font-display); font-size: 22px; color: var(--ink);
}
.sl-faq__a { color: var(--ink-muted); font-size: 16px; margin-top: 14px; max-width: 640px; line-height: 1.55; }

/* ── Course catalog search ── */
.sl-catalog__filters {
  background: var(--bg-alt);
  position: sticky; top: 72px; z-index: 20;
  border-bottom: 1px solid var(--rule);
  padding: 32px 0;
}
.admin-bar .sl-catalog__filters { top: 104px; }
.sl-catalog__row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.sl-catalog__search {
  flex: 1; min-width: 280px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--rule-strong);
  border-radius: 999px; padding: 0 22px;
}
.sl-catalog__search input {
  flex: 1; border: 0; background: transparent;
  padding: 14px 0; font-size: 16px; font-family: inherit; outline: none;
}
.sl-select {
  height: 48px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--rule-strong);
  background: var(--bg-card); font-family: inherit; font-size: 14px;
}
.sl-pill {
  height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--bg-card);
  font-family: inherit; font-size: 13.5px; cursor: pointer;
  transition: all 0.15s; color: var(--ink);
}
.sl-pill[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.sl-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ── WP content ── */
.sl-content { margin: 0 auto; padding: 64px 0; font-size: 18px; line-height: 1.7; }
.sl-content h2 { font-size: 38px; margin-top: 1.4em; }
.sl-content h3 { font-size: 28px; margin-top: 1.4em; }
.sl-content a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sl-content blockquote {
  border-left: 3px solid var(--accent); padding: 12px 24px;
  font-family: var(--font-display); font-size: 24px; font-style: italic;
  margin: 32px 0; color: var(--ink-soft);
}
.sl-content img { border-radius: 12px; margin: 24px 0; }
.sl-content ul, .sl-content ol { padding-left: 1.4em; }

/* Breadcrumbs */
.sl-crumbs { font-size: 13px; color: var(--ink-muted); margin-bottom: 24px; }
.sl-crumbs a:hover { color: var(--accent); }
.sl-crumbs span[aria-current] { color: var(--ink); }

/* SR-only */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}

/* WP alignments / gutenberg */
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.alignwide { width: 100vw; max-width: 1400px; margin-left: calc(50% - 50vw); position: relative; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.wp-block-image figcaption { font-size: 13px; color: var(--ink-muted); text-align: center; }

/* Comments minimal */
.sl-comments { max-width: 760px; margin: 64px auto; padding: 0 var(--gutter); }
.sl-comments h3 { font-size: 24px; }
.sl-comments .comment-list { list-style: none; padding: 0; }
.sl-comments .comment-list li { padding: 20px 0; border-bottom: 1px solid var(--rule); }

/* Pagination */
.sl-pagination { display: flex; gap: 8px; justify-content: center; margin: 48px 0; }
.sl-pagination .page-numbers {
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink-soft);
  font-size: 14px;
}
.sl-pagination .current { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* CTA section */
.sl-cta {
  background: var(--accent); color: #fff;
  padding: 80px 64px; border-radius: 24px;
  position: relative; overflow: hidden;
}
.sl-cta::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}
.sl-cta h2 { color: #fff; font-size: clamp(40px, 5vw, 72px); margin-bottom: 20px; }
.sl-cta h2 em { font-style: italic; }
.sl-cta__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }

/* Mobile */
@media (max-width: 900px) {
  :root { --space-section: 64px; --gutter: 20px; }
  .sl-menu { display: none; }
  .sl-nav__cta .sl-btn--ghost { display: none; }
  .sl-nav__toggle { display: flex; }
  .sl-nav__mobile { display: block; }
  .sl-footer__grid { grid-template-columns: 1fr 1fr; }
  .sl-hero__grid { grid-template-columns: 1fr; }
  .sl-cats, .sl-courses-grid, .sl-courses-grid--3, .sl-tcards { grid-template-columns: 1fr; }
  .sl-faq__grid { grid-template-columns: 1fr; gap: 32px; }
  .sl-cta__grid { grid-template-columns: 1fr; }
  .sl-catalog__row { flex-direction: column; align-items: stretch; }
  .sl-catalog__row > * { width: 100%; }
}
