/* ==========================================================================
   Learning Paths Detail Page - Editorial Redesign (Archivist Look)
   ========================================================================== */

:root {
  --lpd-bg: var(--tf-bg);
  --lpd-ink: #1b1c15;
  --lpd-ink-soft: #4a4c44;
  --lpd-accent: #173124;
  --lpd-stone: #727973;
  --lpd-border: rgba(27, 28, 21, 0.1);
  --lpd-sequence-width: min(760px, 100%);
  --manrope: "Manrope", sans-serif;
  --newsreader: "Newsreader", serif;
}

.tf-page--learning-detail {
  background: var(--lpd-bg);
  min-height: 100vh;
  color: var(--lpd-ink);
  padding-top: 10px;
}

.editorial-container {
  width: var(--tf-public-w);
  max-width: var(--tf-public-max-w);
  margin: 0 auto;
  padding-inline: 0;
  padding-block: clamp(24px, 4vw, 42px);
}

/* ------------------------------
   Hero Section
   ------------------------------ */
.lpd-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 36px);
  margin-bottom: 28px;
  border-bottom: 1px solid var(--lpd-ink);
  padding-bottom: 28px;
}

.lpd-hero__main {
  flex: 1;
  max-width: 950px;
}

.lpd-breadcrumb {
  font-family: var(--manrope);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lpd-stone);
  margin-bottom: 16px;
}

.lpd-breadcrumb a {
  text-decoration: none;
  color: inherit;
}

.lpd-breadcrumb a:hover {
  color: var(--lpd-ink);
}

.lpd-title {
  font-family: var(--newsreader);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  color: var(--lpd-ink);
}

.lpd-sub {
  font-family: var(--manrope);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--lpd-ink-soft);
  max-width: 72ch;
  margin-bottom: 20px;
  text-align: left !important;
}

.lpd-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.lpd-meta__item {
  font-family: var(--manrope);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lpd-stone);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lpd-meta__item::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--lpd-accent);
  border-radius: 50%;
}

/* ------------------------------
   Hero Actions
   ------------------------------ */
.lpd-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  padding-top: 4px;
}

/* Reactions deferred to global base.css system settings */

.lpd-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.lpd-share__label {
  font-family: var(--manrope);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--lpd-stone);
}

.lpd-share__links {
  display: flex;
  gap: 10px;
}

.lpd-share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--lpd-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lpd-ink);
  background: #f2f1e4; /* Matching reaction buttons */
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.lpd-share-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lpd-ink);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.lpd-share-btn:hover::before {
  transform: translateY(0);
}

.lpd-share-btn svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
  transition: color 0.3s;
}

.lpd-share-btn:hover svg {
  color: #fff;
}

.lpd-share-btn[aria-label*="WhatsApp"]:hover {
  border-color: #25D366;
}
.lpd-share-btn[aria-label*="WhatsApp"]:hover::before {
  background: #25D366;
}

.lpd-share-btn[aria-label*="Telegram"]:hover {
  border-color: #0088cc;
}
.lpd-share-btn[aria-label*="Telegram"]:hover::before {
  background: #0088cc;
}

/* ------------------------------
   Quote Section
   ------------------------------ */
.lpd-quote {
  margin-bottom: 34px;
  display: flex;
  justify-content: center;
}

.lpd-quote__text {
  font-family: var(--newsreader);
  font-style: italic;
  font-size: clamp(1.12rem, 1.8vw, 1.55rem);
  line-height: 1.32;
  color: var(--lpd-ink);
  text-align: center;
  max-width: 576px;
  margin: 0;
}

/* ------------------------------
   Tabs Navigation
   ------------------------------ */
.lpd-tabs {
  margin-bottom: 20px;
  width: var(--lpd-sequence-width);
  max-width: 100%;
}

.lpd-tabs__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 4px;
  margin: 0;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(27, 28, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 250, 0.42);
}

.lpd-tabs__btn {
  width: 100%;
  min-height: 38px;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 9px 10px;
  font-family: var(--newsreader);
  font-size: 1rem;
  color: var(--lpd-stone);
  cursor: pointer;
  position: relative;
  transition: background 0.2s var(--tf-ease), color 0.2s var(--tf-ease), box-shadow 0.2s var(--tf-ease);
  text-align: center;
  white-space: nowrap;
}

.lpd-tabs__btn.is-active {
  color: var(--lpd-ink);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 8px 18px rgba(27, 28, 21, 0.06);
}

.lpd-tabs__btn.is-active::after {
  display: none;
}

.lpd-tabs__btn:hover:not(.is-active) {
  color: var(--lpd-ink);
  background: rgba(27, 28, 21, 0.04);
}

/* ------------------------------
   Content Panels & Cards
   ------------------------------ */
.lpd-panel:not(.is-active) {
  display: none;
}

.lpd-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 14px;
  width: var(--lpd-sequence-width);
  max-width: 100%;
}

.lpd-panel__title {
  font-family: var(--newsreader);
  font-size: 1.55rem;
  font-weight: 500;
}

.lpd-panel__count {
  font-family: var(--manrope);
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--lpd-stone);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  text-align: right;
}

.lpd-item-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 44px;
  width: var(--lpd-sequence-width);
  max-width: 100%;
}

.lpd-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-height: 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--lpd-border);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(27, 28, 21, 0.035);
  width: 100%;
  max-width: 100%;
}

.lpd-card__media {
  flex: 0 0 78px;
  position: relative;
}

.lpd-card__media img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #eee;
  box-shadow: 8px 10px 22px rgba(0,0,0,0.12);
}

.lpd-card__number {
  position: absolute;
  top: -15px;
  left: -20px;
  font-family: var(--newsreader);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(27, 28, 21, 0.08);
  pointer-events: none;
}

.lpd-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}

.lpd-card__header {
  margin-bottom: 8px;
}

.lpd-card__title {
  font-family: var(--newsreader);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.12;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.lpd-card__author {
  font-family: var(--manrope);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lpd-stone);
}

.lpd-card__desc {
  font-family: var(--manrope);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--lpd-ink-soft);
  margin-bottom: 14px;
  max-width: 58ch;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
  overflow: hidden;
}

.lpd-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.lpd-btn {
  font-family: var(--manrope);
  font-weight: 700;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 9px 12px;
  border-radius: 2px;
  text-decoration: none;
  transition: all 200ms var(--tf-ease-spring);
  cursor: pointer;
  display: inline-block;
}

.lpd-btn--primary {
  background: var(--lpd-ink);
  color: white;
  border: 1px solid var(--lpd-ink);
}

.lpd-btn--primary:hover {
  background: var(--lpd-accent);
  border-color: var(--lpd-accent);
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(23, 49, 36, 0.22),
    0 2px 4px  rgba(23, 49, 36, 0.12);
}

.lpd-btn--primary:active {
  transform: scale(0.96);
  transition-duration: 80ms;
  box-shadow: none;
}

.lpd-btn--outline {
  border: 1px solid var(--lpd-border);
  color: var(--lpd-ink);
  background: transparent;
}

/* color-mix hover: archival ink wash, deepened border */
.lpd-btn--outline:hover {
  background: color-mix(in oklab, var(--lpd-ink) 8%, transparent);
  border-color: color-mix(in oklab, var(--lpd-ink) 55%, transparent);
  color: var(--lpd-ink);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(27, 28, 21, 0.09);
}

/* ------------------------------
   Social / Comments
   ------------------------------ */
.lpd-social {
  padding-top: 46px;
  border-top: 1px solid var(--lpd-border);
}

/* ------------------------------
   Responsive
   ------------------------------ */
@media (max-width: 1024px) {
  .lpd-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .lpd-hero__actions {
    align-items: flex-start;
    width: 100%;
    padding-top: 0;
  }
  .lpd-quote__text {
    font-size: 1.6rem;
  }
  .lpd-card {
    gap: 18px;
  }
  .lpd-card__media {
    flex: 0 0 78px;
  }
}

@media (max-width: 768px) {
  .lpd-tabs__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .lpd-tabs__btn {
    font-size: 0.92rem;
    padding-inline: 6px;
  }
  .lpd-card {
    flex-direction: column;
  }
  .lpd-card__media {
    flex: 0 0 auto;
    width: 86px;
  }
  .lpd-title {
    font-size: 2.15rem;
  }
}
