/*
Theme Name: LearningHub
Theme URI: https://learninghub.nirmalbhattarai12.com.np/
Author: Nirmal Bhattarai
Author URI: https://nirmalbhattarai12.com.np/
Description: A custom theme built for Learning Hub — CA notes for every subject, made for students in Nepal. Colourful subject cards, clean reading pages for long notes, and search.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: learninghub
Tags: education, notes, blog, custom-colors, responsive, accessibility-ready
*/

/* ============ Tokens ============ */
:root{
  --lh-navy:#0f2a44;
  --lh-indigo:#1b2a6b;
  --lh-violet:#6d28d9;
  --lh-amber:#f59e0b;
  --lh-amber-soft:#fef3c7;
  --lh-teal:#0f766e;
  --lh-rose:#be123c;
  --lh-ink:#17202b;
  --lh-muted:#5b6774;
  --lh-bg:#f6f7fb;
  --lh-card:#ffffff;
  --lh-line:#e5e8f0;
  --lh-radius:16px;
  --lh-shadow:0 10px 30px rgba(15,42,68,.10);
  --lh-shadow-sm:0 4px 14px rgba(15,42,68,.08);
}

/* ============ Base ============ */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
  color:var(--lh-ink);
  background:var(--lh-bg);
  line-height:1.65;
  font-size:17px;
}
img{max-width:100%;height:auto}
a{color:var(--lh-indigo);text-decoration:none}
a:hover{color:var(--lh-violet);text-decoration:underline}
h1,h2,h3,h4{line-height:1.25;color:var(--lh-navy)}
.lh-container{max-width:1140px;margin:0 auto;padding:0 20px}
.lh-screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ============ Header ============ */
.lh-site-header{
  position:sticky;top:0;z-index:50;
  background:linear-gradient(90deg,var(--lh-navy),var(--lh-indigo) 60%,var(--lh-violet));
  color:#fff;
  box-shadow:0 4px 18px rgba(15,42,68,.25);
}
.lh-header-inner{display:flex;align-items:center;gap:24px;min-height:64px}
.lh-brand{display:flex;align-items:center;gap:12px;color:#fff}
.lh-brand:hover{color:#fff;text-decoration:none}
.lh-brand-mark{
  width:42px;height:42px;border-radius:12px;flex:0 0 42px;
  display:flex;align-items:center;justify-content:center;
  background:var(--lh-amber);color:var(--lh-navy);
  font-weight:800;font-size:22px;
}
.lh-brand-name{font-size:21px;font-weight:800;letter-spacing:.2px;line-height:1.1}
.lh-brand-tag{font-size:12px;opacity:.85;line-height:1.2}
.lh-nav{margin-left:auto}
.lh-nav ul{display:flex;gap:4px;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.lh-nav a{
  display:block;padding:8px 13px;border-radius:999px;color:#fff;font-weight:600;font-size:15px;
}
.lh-nav a:hover{background:rgba(255,255,255,.16);color:#fff;text-decoration:none}
.lh-nav .current-menu-item a{background:var(--lh-amber);color:var(--lh-navy)}
.lh-header-search{margin-left:8px}
.lh-header-search input{
  border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.14);color:#fff;
  border-radius:999px;padding:8px 14px;font-size:14px;width:170px;outline:none;
}
.lh-header-search input::placeholder{color:rgba(255,255,255,.75)}

/* ============ Hero ============ */
.lh-hero{
  background:
    radial-gradient(700px 260px at 85% -40px,rgba(245,158,11,.45),transparent 60%),
    radial-gradient(600px 260px at 5% 0,rgba(109,40,217,.5),transparent 60%),
    linear-gradient(120deg,var(--lh-navy),var(--lh-indigo) 55%,var(--lh-violet));
  color:#fff;padding:64px 0 72px;
}
.lh-hero h1{color:#fff;font-size:clamp(30px,4.6vw,52px);margin:0 0 14px}
.lh-hero p.lh-hero-sub{font-size:19px;max-width:640px;opacity:.92;margin:0 0 26px}
.lh-hero-search{display:flex;gap:10px;max-width:560px}
.lh-hero-search input{
  flex:1;border:none;border-radius:999px;padding:14px 20px;font-size:16px;outline:none;
}
.lh-btn{
  display:inline-block;border:none;cursor:pointer;
  background:var(--lh-amber);color:var(--lh-navy);
  font-weight:800;font-size:16px;padding:14px 26px;border-radius:999px;
}
.lh-btn:hover{background:#fbbf24;color:var(--lh-navy);text-decoration:none}
.lh-hero-stats{display:flex;gap:28px;flex-wrap:wrap;margin-top:34px}
.lh-hero-stats div strong{display:block;font-size:26px;line-height:1.1}
.lh-hero-stats div span{font-size:13px;opacity:.85}

/* ============ Sections ============ */
.lh-section{padding:52px 0 8px}
.lh-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:22px}
.lh-section-head h2{margin:0;font-size:28px}
.lh-section-head p{margin:0;color:var(--lh-muted)}

/* Subject cards */
.lh-subjects{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.lh-subject{
  background:var(--lh-card);border:1px solid var(--lh-line);border-radius:var(--lh-radius);
  padding:24px 20px 20px;box-shadow:var(--lh-shadow-sm);
  border-top:6px solid var(--lh-teal);
  display:flex;flex-direction:column;min-height:230px;
  transition:transform .18s ease,box-shadow .18s ease;
}
.lh-subject:hover{transform:translateY(-4px);box-shadow:var(--lh-shadow);text-decoration:none}
.lh-subject-icon{
  width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;
  font-size:26px;font-weight:800;color:#fff;margin-bottom:14px;
}
.lh-subject h3{margin:0 0 6px;font-size:19px}
.lh-subject p{margin:0;color:var(--lh-muted);font-size:14.5px;flex:1}
.lh-subject-count{margin-top:14px;font-size:13px;font-weight:700;color:var(--lh-indigo)}
.lh-subject--teal{border-top-color:var(--lh-teal)}
.lh-subject--teal .lh-subject-icon{background:var(--lh-teal)}
.lh-subject--amber{border-top-color:var(--lh-amber)}
.lh-subject--amber .lh-subject-icon{background:var(--lh-amber);color:var(--lh-navy)}
.lh-subject--rose{border-top-color:var(--lh-rose)}
.lh-subject--rose .lh-subject-icon{background:var(--lh-rose)}
.lh-subject--violet{border-top-color:var(--lh-violet)}
.lh-subject--violet .lh-subject-icon{background:var(--lh-violet)}

/* Note cards */
.lh-notes-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.lh-note-card{
  background:var(--lh-card);border:1px solid var(--lh-line);border-radius:var(--lh-radius);
  overflow:hidden;box-shadow:var(--lh-shadow-sm);display:flex;flex-direction:column;
  transition:transform .18s ease,box-shadow .18s ease;
}
.lh-note-card:hover{transform:translateY(-4px);box-shadow:var(--lh-shadow)}
.lh-note-card-body{padding:20px;display:flex;flex-direction:column;flex:1}
.lh-note-cat{
  display:inline-block;font-size:12px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;
  color:var(--lh-teal);background:#e6f3f0;border-radius:999px;padding:4px 10px;margin-bottom:10px;
}
.lh-note-card h3{margin:0 0 8px;font-size:18.5px}
.lh-note-card h3 a{color:var(--lh-navy)}
.lh-note-card h3 a:hover{color:var(--lh-violet);text-decoration:none}
.lh-note-card p{margin:0;color:var(--lh-muted);font-size:14.5px;flex:1}
.lh-note-meta{margin-top:14px;font-size:13px;color:var(--lh-muted);display:flex;gap:12px}
.lh-note-more{margin-top:12px;font-weight:700;font-size:14.5px}

/* ============ Archive / list ============ */
.lh-page-head{
  background:linear-gradient(120deg,var(--lh-navy),var(--lh-indigo) 60%,var(--lh-violet));
  color:#fff;padding:44px 0;
}
.lh-page-head h1{color:#fff;margin:0 0 8px;font-size:34px}
.lh-page-head p{margin:0;opacity:.9;max-width:680px}
.lh-list{padding:36px 0 56px}
.lh-empty{
  background:var(--lh-card);border:1px dashed var(--lh-line);border-radius:var(--lh-radius);
  padding:36px;text-align:center;color:var(--lh-muted);
}
.lh-pagination{margin-top:28px;text-align:center}
.lh-pagination .page-numbers{
  display:inline-block;padding:9px 15px;border-radius:10px;background:#fff;border:1px solid var(--lh-line);
  margin:0 3px;font-weight:700;
}
.lh-pagination .page-numbers.current{background:var(--lh-indigo);color:#fff;border-color:var(--lh-indigo)}

/* ============ Single note ============ */
.lh-article{background:var(--lh-card);border:1px solid var(--lh-line);border-radius:var(--lh-radius);
  box-shadow:var(--lh-shadow-sm);margin:36px auto 24px;padding:40px 44px;max-width:860px}
.lh-article h1{font-size:32px;margin:0 0 10px}
.lh-article-meta{color:var(--lh-muted);font-size:14px;margin-bottom:26px;display:flex;gap:14px;flex-wrap:wrap}
.lh-article .lh-note-content{font-size:17px}
.lh-article .lh-note-content img{border-radius:12px}
.lh-article-nav{display:flex;justify-content:space-between;gap:16px;max-width:860px;margin:0 auto 48px}
.lh-article-nav a{background:#fff;border:1px solid var(--lh-line);border-radius:12px;padding:14px 18px;flex:1;font-weight:600}
.lh-article-nav a:last-child{text-align:right}
.lh-related{max-width:860px;margin:0 auto 56px}
.lh-related h2{font-size:22px}

/* Group headings on the home page */
.lh-group-title{margin:30px 0 16px;font-size:21px;color:var(--lh-navy)}
.lh-group-title:first-of-type{margin-top:0}

/* Single note pages: the note designs its own full page, so the theme
   only frames it — no card, no width squeeze. The note's own .wrap
   controls its width, and its sticky contents sidebar clears the
   sticky site header. */
.lh-note-page{background:var(--lh-bg)}
.lh-note-page .lh-note .toc{top:82px}

/* Note content wrapper: long study notes render inside here */
.lh-note-content{overflow-wrap:break-word}
.lh-note-content table{border-collapse:collapse;width:100%;margin:18px 0}
.lh-note-content th,.lh-note-content td{border:1px solid var(--lh-line);padding:9px 12px;text-align:left}
.lh-note-content th{background:#eef1f8}

/* ============ How strip ============ */
.lh-how{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:8px}
.lh-how-step{background:var(--lh-card);border:1px solid var(--lh-line);border-radius:var(--lh-radius);padding:22px;box-shadow:var(--lh-shadow-sm)}
.lh-how-step b{display:block;font-size:15px;color:var(--lh-indigo);margin-bottom:6px}
.lh-how-step p{margin:0;color:var(--lh-muted);font-size:14.5px}

/* ============ Footer ============ */
.lh-site-footer{background:var(--lh-navy);color:#cbd5e1;margin-top:56px}
.lh-footer-inner{display:grid;grid-template-columns:2fr 1fr 1fr;gap:28px;padding:44px 0 30px}
.lh-site-footer h4{color:#fff;margin:0 0 12px;font-size:16px}
.lh-site-footer p{margin:0 0 10px;font-size:14.5px}
.lh-site-footer ul{list-style:none;margin:0;padding:0}
.lh-site-footer li{margin-bottom:8px}
.lh-site-footer a{color:#cbd5e1}
.lh-site-footer a:hover{color:#fff}
.lh-footer-bottom{border-top:1px solid rgba(255,255,255,.14);padding:16px 0;font-size:13.5px;text-align:center}

/* ============ Search page ============ */
.lh-search-form{display:flex;gap:10px;max-width:520px;margin:20px 0}
.lh-search-form input{flex:1;border:1px solid var(--lh-line);border-radius:999px;padding:12px 18px;font-size:16px}
.lh-search-form button{border:none;cursor:pointer;background:var(--lh-indigo);color:#fff;font-weight:700;padding:12px 22px;border-radius:999px}

/* ============ Responsive ============ */
@media (max-width:960px){
  .lh-subjects{grid-template-columns:repeat(2,1fr)}
  .lh-notes-grid{grid-template-columns:repeat(2,1fr)}
  .lh-how{grid-template-columns:1fr}
  .lh-footer-inner{grid-template-columns:1fr 1fr}
  .lh-header-search{display:none}
}
@media (max-width:620px){
  body{font-size:16px}
  .lh-subjects,.lh-notes-grid{grid-template-columns:1fr}
  .lh-nav{display:none}
  .lh-article{padding:24px 20px;margin-top:20px}
  .lh-article-nav{flex-direction:column}
  .lh-footer-inner{grid-template-columns:1fr}
  .lh-hero{padding:44px 0 52px}
}
