/* =========================================================
   LEARNING CENTER PAGE
   Replaces /styles/pages/articles.css on the Learning Center.
   ========================================================= */

main {
  display: flex;
  min-height: 100vh;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 132px 20px 96px;
  box-sizing: border-box;
  background-color: var(--background-color);
  color: var(--text-color-primary);
  font-family: var(--font-family);
}

.content.active {
  margin-left: 0;
}

.content > h1 {
  width: 100%;
  max-width: 1180px;
  margin: 0 0 18px;
  padding: 0;
  color: var(--text-color-primary);
  font-family: var(--font-family);
  font-size: clamp(2.35rem, 4.5vw, 3.3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.article-text.lc {
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: block;
  color: var(--text-color-primary);
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
}

.lc {
  --lc-accent: #c8102e;
  --lc-accent-dark: #ad0e28;
  --lc-ink: #1b1f24;
  --lc-muted: #5b6470;
  --lc-line: #e4e7ec;
  --lc-bg: #ffffff;
  --lc-bg-soft: #f6f8fa;
}

.lc .lc-intro {
  max-width: 62ch;
  margin: 0 0 1.75rem;
  padding: 0;
  color: var(--lc-muted);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
}

.lc .lc-cat {
  width: 100%;
  margin: 2.5rem 0 0;
  padding: 0;
}

.lc .lc-cat:first-of-type {
  margin-top: 1.5rem;
}

.lc .lc-cat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  margin: 0 0 1.1rem;
  padding: 0 0 0.65rem;
  border-bottom: 1px solid var(--lc-line);
}

.lc .lc-cat-head h2 {
  margin: 0;
  padding: 0;
  color: var(--lc-ink);
  font-family: var(--font-family);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.lc .lc-cat-head .lc-sub {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  color: var(--lc-muted);
  font-family: var(--font-family);
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.4;
}

.lc .lc-explore {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  color: var(--lc-accent);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.lc .lc-explore:hover {
  color: var(--lc-accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.lc .lc-explore:active {
  opacity: 0.8;
}

.lc .lc-explore:focus-visible {
  outline: 3px solid rgba(200, 16, 46, 0.2);
  outline-offset: 3px;
  border-radius: 4px;
}

.lc .lc-explore svg {
  display: block;
  width: 1em;
  height: 1em;
  flex: none;
}

.lc .lc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.lc .lc-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--lc-bg);
  border: 1px solid var(--lc-line);
  border-radius: 12px;
  color: var(--lc-ink);
  font-family: var(--font-family);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.lc .lc-card:hover {
  transform: translateY(-3px);
  border-color: var(--lc-accent);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.1);
  color: var(--lc-ink);
  text-decoration: none;
}

.lc .lc-card:active {
  transform: translateY(-1px);
  opacity: 0.92;
}

.lc .lc-card:focus-visible {
  outline: 3px solid rgba(200, 16, 46, 0.22);
  outline-offset: 3px;
}

.content .article-text.lc .lc-card > img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 16 / 10 !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  background-color: var(--lc-bg-soft);
  border: 0 !important;
  border-radius: 0 !important;
}

.lc .lc-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 1rem 1.05rem 1.05rem;
}

.content .article-text.lc .lc-card-body h3 {
  margin: 0 0 6px;
  padding: 0;
  color: var(--lc-ink);
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.012em;
}

.content .article-text.lc .lc-card-body p {
  margin: 0;
  padding: 0;
  color: var(--lc-muted);
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.55;
}

.content .article-text.lc .lc-card-body .lc-go {
  display: inline-block;
  margin: auto 0 0;
  padding: 12px 0 0;
  color: var(--lc-accent);
  font-family: var(--font-family);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
}

.lc .lc-card:hover .lc-go {
  color: var(--lc-accent-dark);
}

@media (max-width: 900px) {
  .content {
    padding-top: 116px;
  }

  .content > h1,
  .article-text.lc {
    max-width: 820px;
  }

  .lc .lc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 94px 14px 64px;
  }

  .content > h1 {
    margin-bottom: 14px;
    font-size: 2.2rem;
    line-height: 1.08;
  }

  .lc .lc-intro {
    margin-bottom: 1.4rem;
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .lc .lc-cat {
    margin-top: 2rem;
  }

  .lc .lc-cat:first-of-type {
    margin-top: 1.1rem;
  }

  .lc .lc-cat-head {
    align-items: flex-start;
    margin-bottom: 0.9rem;
    padding-bottom: 0.55rem;
  }

  .lc .lc-cat-head h2 {
    font-size: 1.18rem;
  }

  .lc .lc-cat-head .lc-sub {
    font-size: 0.8rem;
  }

  .lc .lc-explore {
    font-size: 0.82rem;
  }

  .lc .lc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lc .lc-card {
    border-radius: 10px;
  }

  .content .article-text.lc .lc-card > img {
    aspect-ratio: 16 / 10 !important;
  }

  .lc .lc-card-body {
    padding: 0.78rem 0.72rem 0.82rem;
  }

  .content .article-text.lc .lc-card-body h3 {
    margin-bottom: 5px;
    font-size: 0.92rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .content .article-text.lc .lc-card-body p {
    font-size: 0.77rem;
    line-height: 1.45;
  }

  .content .article-text.lc .lc-card-body .lc-go {
    padding-top: 10px;
    font-size: 0.76rem;
  }
}

@media (max-width: 380px) {
  .content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .lc .lc-cat-head {
    display: block;
  }

  .lc .lc-explore {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lc .lc-card {
    transition: none;
  }

  .lc .lc-card:hover,
  .lc .lc-card:active {
    transform: none;
  }
}