/* ========================================================
   SkillForage — Host Guide (/learn/)
   ======================================================== */

/* Layout */
.learn-wrap {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  padding: 2rem 0 4rem;
  overflow-x: hidden;
}

/* Sidebar */
.learn-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 1rem;
}

.learn-sidebar-brand {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.learn-sidebar-brand:hover {
  color: #1a1a1a;
}

.learn-sidebar-search {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.learn-sidebar-search input {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  outline: none;
}

.learn-sidebar-search input:focus {
  border-color: #888;
}

.learn-sidebar-search button {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  background: #f5f5f5;
  cursor: pointer;
}

.learn-nav-sections {
  list-style: none;
  padding: 0;
  margin: 0;
}

.learn-nav-section {
  margin-bottom: 0.25rem;
}

.learn-nav-section-link {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  line-height: 1.35;
  transition: color 0.15s, background 0.15s;
}

.learn-nav-section-link:hover {
  color: #1a1a1a;
  background: #f0f0f0;
}

.learn-nav-section.active > .learn-nav-section-link {
  color: #1a1a1a;
  font-weight: 700;
}

.learn-nav-articles {
  list-style: none;
  padding: 0 0 0 0.75rem;
  margin: 0.15rem 0 0.4rem;
}

.learn-nav-article-link {
  display: block;
  font-size: 0.78rem;
  color: #666;
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  line-height: 1.4;
  transition: color 0.15s, background 0.15s;
}

.learn-nav-article-link:hover {
  color: #1a1a1a;
  background: #f0f0f0;
}

.learn-nav-article-link.current {
  color: #1a1a1a;
  font-weight: 600;
  background: #efefef;
}

/* Mobile sidebar toggle */
.learn-sidebar-toggle {
  display: none;
  font-size: 0.85rem;
  font-weight: 600;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  width: 100%;
  text-align: left;
}

/* Main content area */
.learn-main {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}

/* Article typography */
.learn-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1f1f1f;
  overflow-x: auto;
}

.learn-body h1,
.learn-body h2,
.learn-body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.learn-body h1 { font-size: 2rem; }
.learn-body h2 { font-size: 1.45rem; }
.learn-body h3 { font-size: 1.15rem; }

.learn-body p { margin-bottom: 1.2rem; }

.learn-body ul,
.learn-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}

.learn-body li { margin-bottom: 0.4rem; }

.learn-body a {
  color: #2a5caa;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.learn-body a:hover { color: #1a3d7c; }

.learn-body strong { font-weight: 700; }

/* Callout blocks — HTML divs in markdown */
.learn-body .try-this,
.learn-body .watch-out,
.learn-body .shop-example {
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  margin: 1.75rem 0;
  font-size: 0.97rem;
}

.learn-body .try-this {
  background: #eef6ee;
  border-left: 4px solid #3a9b48;
}

.learn-body .try-this::before {
  content: "Try this";
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2d7c38;
  margin-bottom: 0.4rem;
}

.learn-body .watch-out {
  background: #fff7eb;
  border-left: 4px solid #d97706;
}

.learn-body .watch-out::before {
  content: "Watch out";
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b45309;
  margin-bottom: 0.4rem;
}

.learn-body .shop-example {
  background: #f4f1fd;
  border-left: 4px solid #7c3aed;
}

.learn-body .shop-example::before {
  content: "In practice";
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6d28d9;
  margin-bottom: 0.4rem;
}

/* Download link button */
.learn-download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2a5caa;
  background: #eef2fb;
  border: 1px solid #c5d4f0;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  margin: 0.25rem 0;
  transition: background 0.15s, border-color 0.15s;
}

.learn-download-link:hover {
  background: #dce9fc;
  border-color: #a3bde8;
  color: #1a3d7c;
}

/* Article footer nav */
.learn-article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.88rem;
}

.learn-article-nav a {
  color: #2a5caa;
  text-decoration: none;
  font-weight: 600;
  max-width: 48%;
}

.learn-article-nav a:hover { text-decoration: underline; }

/* Article header */
.learn-article-header {
  margin-bottom: 2rem;
}

.learn-article-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  margin-bottom: 0.6rem;
}

.learn-article-title {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #111;
  margin: 0 0 0.75rem;
}

.learn-article-summary {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.55;
  margin: 0;
}

/* Hub page */
.learn-hub-intro {
  max-width: 640px;
  margin-bottom: 3rem;
}

.learn-hub-title {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #111;
  margin-bottom: 0.75rem;
}

.learn-section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.learn-section-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.learn-section-card:hover {
  border-color: #bbb;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  color: inherit;
}

.learn-section-card-num {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 0.4rem;
}

.learn-section-card-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.learn-section-card-summary {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* Search */
.learn-search-bar {
  display: flex;
  gap: 0.5rem;
  max-width: 520px;
  margin-bottom: 2rem;
}

.learn-search-bar input {
  flex: 1;
  font-size: 1rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 7px;
  outline: none;
}

.learn-search-bar input:focus { border-color: #888; }

.learn-search-bar button {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 7px;
  cursor: pointer;
}

.learn-search-result {
  border-bottom: 1px solid #ebebeb;
  padding: 1.25rem 0;
}

.learn-search-result:last-child { border-bottom: none; }

.learn-search-result-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.learn-search-result-title a { color: #1a1a1a; text-decoration: none; }
.learn-search-result-title a:hover { text-decoration: underline; }

.learn-search-result-section {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 0.35rem;
}

.learn-search-result-summary {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

/* Section index list */
.learn-section-article-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.learn-section-article-list li {
  border-bottom: 1px solid #ebebeb;
}

.learn-section-article-list li:last-child { border-bottom: none; }

.learn-section-article-list a {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
}

.learn-section-article-list a:hover .learn-article-list-title { text-decoration: underline; }

.learn-article-list-title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.2rem;
}

.learn-article-list-summary {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.45;
  margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
  .learn-wrap { flex-direction: column; gap: 0; }
  .learn-sidebar { width: 100%; position: static; max-height: none; padding-right: 0; }
  .learn-sidebar-toggle { display: block; }
  .learn-nav-sections { display: none; }
  .learn-nav-sections.open { display: block; }
}
