/* assets/css/pages.css — Page-Specific Layouts & Editorial Typography */

/* --- Reading Progress Bar --- */
.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3.5px;
  background: var(--accent);
  width: 0%;
  z-index: 999;
  transition: width 0.1s linear;
}

/* --- Article Editorial Layout --- */
.article-container {
  max-width: 820px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 36px;
}

.article-category {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 16px;
}

.article-headline {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-featured-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 28px 0 36px 0;
  border: 1px solid var(--border-color);
}

/* Table of Contents */
.toc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 0;
}

.toc-item a {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.toc-item a:hover {
  color: var(--accent);
}

/* Editorial Body */
.article-body {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--text-main);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 900;
  margin: 48px 0 16px 0;
  letter-spacing: -0.02em;
  position: relative;
  padding-right: 16px;
}

.article-body h2::before {
  content: "";
  position: absolute;
  right: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: var(--accent);
  border-radius: 4px;
}

.article-body h3 {
  font-size: 19px;
  font-weight: 800;
  margin: 32px 0 14px 0;
}

.article-body p {
  margin-bottom: 22px;
  color: var(--text-main);
  opacity: 0.92;
}

.article-body ul,
.article-body ol {
  margin: 0 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-body li {
  line-height: 1.85;
}

.article-callout {
  background: var(--bg-card-elevated);
  border-right: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 15.5px;
}

.article-callout strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 6px;
}

.article-sources {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.article-sources h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
}

.article-sources ul {
  list-style: none;
  padding: 0;
  gap: 8px;
}

.article-sources li {
  font-size: 14px;
}

.article-sources a {
  color: var(--accent);
}

/* Author Box */
.author-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 48px 0;
}

.author-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.author-card-name {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.author-card-bio {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Offers Layout --- */
.offer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.offer-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--card-shadow-hover);
}

.offer-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.offer-card-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.offer-card-title {
  font-size: 18px;
  font-weight: 800;
}

.offer-card-badge {
  font-size: 12px;
  color: var(--text-muted);
}

.offer-disclosure {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 36px;
}

/* --- Courses Layout --- */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.course-status-badge {
  align-self: flex-start;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.course-status-badge.coming-soon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.course-status-badge.free {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

/* --- Contact & Legal --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: clamp(26px, 3.5vw, 36px);
  margin-bottom: 24px;
}

.legal-content h2 {
  font-size: 20px;
  margin: 36px 0 12px 0;
}

.legal-content p {
  color: var(--text-main);
  opacity: 0.9;
  line-height: 1.85;
  margin-bottom: 18px;
}

/* --- Print Friendly --- */
@media print {
  .sidebar,
  .mobile-header,
  .skip-link,
  .reading-progress,
  .site-footer,
  .btn-primary,
  .btn-secondary,
  .toast-notification {
    display: none !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
