/* ==========================================================================
   Linyi Mincai Stationery - News Detail Page Stylesheet
   Cartoon & Playful Style, Unified Content Width, Clean Typography
   ========================================================================== */

:root {
  --news-orange: #ff621f;
  --news-orange-hover: #ff7d42;
  --news-navy: #10264f;
  --news-blue: #168cff;
  --news-text: #4a5d78;
  --news-muted: #7e91aa;
  --news-bg-card: #ffffff;
  --news-border-card: #edf2f8;
}

.news-detail-page {
  background: #fdfdfe;
  color: var(--news-text);
  font-size: 15px;
  line-height: 1.7;
  min-height: 80vh;
}

/* ==========================================================================
   1. News Hero Banner Section (Matches News Index Page)
   ========================================================================== */
.news-hero {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: #c5edff url('../images/about-banner.png') left center / cover no-repeat;
  display: flex;
  align-items: center;
}

.news-hero-art {
  position: absolute;
  height: 100%;
  width: 58%;
  max-width: 820px;
  right: 0;
  top: 0;
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
}

.news-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1480px, calc(100% - 64px));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;
  box-sizing: border-box;
}

.news-hero h1 {
  font-family: 'Fredoka', 'Arial Rounded MT Bold', sans-serif;
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 700;
  color: #0088ff;
  margin: 0 0 10px;
  line-height: 1.1;
  letter-spacing: -1.5px;
}

.news-hero h1 span {
  color: var(--news-orange);
}

.news-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--news-navy);
  max-width: 80%;
  flex-wrap: wrap;
}

.news-breadcrumb a {
  color: var(--news-navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-breadcrumb a:hover {
  color: var(--news-orange);
}

.news-breadcrumb i {
  font-size: 13px;
  color: #8fa5c2;
}

.news-breadcrumb span[aria-current="page"] {
  color: var(--news-orange);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

/* ==========================================================================
   2. Layout & Width (Unified Standard Content Width)
   ========================================================================== */
.article-width {
  width: min(1480px, calc(100% - 64px));
  margin-inline: auto;
  box-sizing: border-box;
}

@media (min-width: 1680px) {
  .article-width,
  .news-hero-inner {
    max-width: 1568px;
  }
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 40px;
  padding: 48px 0 76px;
  align-items: start;
}

/* ==========================================================================
   3. Main Article Card
   ========================================================================== */
.article-main {
  background: var(--news-bg-card);
  border: 2px solid var(--news-border-card);
  border-radius: 24px;
  padding: 42px 48px;
  box-shadow: 0 10px 36px rgba(16, 38, 79, 0.05);
}

/* Article Meta Header */
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.article-meta time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--news-orange);
  background: #fff3ec;
  border: 1px solid #ffd8c2;
  border-radius: 50px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.article-meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: 50px;
  background: #eff6ff;
  border: 1px solid #d4e8ff;
  color: var(--news-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-meta a:hover {
  background: #dceeff;
  border-color: #badcff;
}

.article-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6a7c98;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
}

/* Article Main Title */
.article-main > h1 {
  font-family: 'Fredoka', 'Arial Rounded MT Bold', sans-serif;
  color: var(--news-navy);
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}

/* Share Toolbar */
.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #f8fbff;
  border-radius: 14px;
  margin-bottom: 28px;
  border: 1px solid #eaf1fa;
}

.article-share-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--news-navy);
  font-size: 13.5px;
  font-weight: 700;
  margin-right: 4px;
}

.article-share a,
.article-share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease;
  text-decoration: none;
}

.article-share a[data-share="facebook"] {
  background: #1877f2;
}

.article-share a[data-share="twitter"] {
  background: #0f1419;
}

.article-share a[data-share="linkedin"] {
  background: #0077b5;
}

.article-share button#article-copy-link {
  background: var(--news-orange);
}

.article-share a:hover,
.article-share button:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

/* Featured Header Image */
.article-main-image {
  display: block;
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(16, 38, 79, 0.07);
}

/* Article Body Typography */
#article-content {
  font-size: 15.5px;
  line-height: 1.75;
  color: #435570;
}

#article-content p {
  margin: 0 0 20px;
}

.article-intro {
  font-size: 17px;
  line-height: 1.7;
  color: #243b60;
  background: #f0f7ff;
  border-left: 5px solid var(--news-blue);
  padding: 20px 26px;
  border-radius: 0 16px 16px 0;
  margin-bottom: 28px !important;
  font-weight: 500;
}

/* Numbered Factors List */
.article-factors {
  list-style: none;
  margin: 32px 0 32px;
  padding: 0;
  display: grid;
  gap: 20px;
}

.article-factors li {
  display: flex;
  gap: 22px;
  background: #ffffff;
  border: 1.5px solid #edf2f9;
  border-radius: 18px;
  padding: 22px 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.article-factors li:hover {
  transform: translateY(-3px);
  border-color: #ffd8c2;
  box-shadow: 0 8px 24px rgba(255, 98, 31, 0.08);
}

.factor-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #ffffff;
  background: var(--news-orange);
  font-family: 'Fredoka', 'Arial Rounded MT Bold', sans-serif;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 98, 31, 0.3);
}

.article-factors li:nth-child(2) .factor-number {
  background: #168cff;
  box-shadow: 0 4px 14px rgba(22, 140, 255, 0.3);
}

.article-factors li:nth-child(3) .factor-number {
  background: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.article-factors li:nth-child(4) .factor-number {
  background: #ec4899;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.3);
}

.article-factors li:nth-child(5) .factor-number {
  background: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.article-factors h2 {
  color: var(--news-navy);
  font-family: 'Fredoka', 'Arial Rounded MT Bold', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.article-factors p {
  margin: 0 !important;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--news-text);
}

/* Takeaway Box */
.article-takeaway {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 22px 26px;
  background: #fffbf0;
  border: 2px dashed #fcd34d;
  border-radius: 18px;
  margin-top: 28px;
}

.article-takeaway i {
  color: #f59e0b;
  font-size: 32px;
  flex-shrink: 0;
}

.article-takeaway p {
  margin: 0 !important;
  color: #78350f;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.6;
}

/* ==========================================================================
   4. Previous / Next Article Navigation Cards
   ========================================================================== */
.article-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 2px solid #edf2f9;
}

.article-nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 18px;
  background: #f8fbff;
  border: 2px solid #e4ecf8;
  text-decoration: none;
  transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.article-nav-card.next {
  justify-content: flex-end;
  text-align: right;
}

.article-nav-card:hover {
  background: #ffffff;
  border-color: var(--news-orange);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(255, 98, 31, 0.12);
}

.article-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #dce5f2;
  color: var(--news-navy);
  font-size: 15px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.article-nav-card:hover .article-nav-icon {
  background: var(--news-orange);
  border-color: var(--news-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 98, 31, 0.3);
}

.article-nav-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.article-nav-text strong {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--news-orange);
  margin-bottom: 4px;
}

.article-nav-text small {
  font-size: 14px;
  font-weight: 700;
  color: var(--news-navy);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ==========================================================================
   5. Sidebar Styles (Cartoon Cards)
   ========================================================================== */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-card {
  background: var(--news-bg-card);
  border: 2px solid var(--news-border-card);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 10px 28px rgba(16, 38, 79, 0.05);
}

.sidebar-card h2 {
  font-family: 'Fredoka', 'Arial Rounded MT Bold', sans-serif;
  color: #0088ff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #edf2f9;
  line-height: 1.2;
}

.sidebar-card h2 span {
  color: var(--news-orange);
}

/* Sidebar Article Items */
.sidebar-articles-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-article {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f2f6fb;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease;
}

.sidebar-article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-article:hover {
  transform: translateX(4px);
}

.sidebar-article img {
  width: 84px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  background: #eaf3ff;
  transition: transform 0.28s ease;
}

.sidebar-article:hover img {
  transform: scale(1.05);
}

.sidebar-article > div {
  min-width: 0;
  flex-grow: 1;
}

.sidebar-article h3 {
  color: var(--news-navy);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.2s ease;
}

.sidebar-article:hover h3 {
  color: var(--news-orange);
}

.sidebar-article time {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #8fa0b5;
}

.sidebar-article > i {
  color: var(--news-orange);
  background: #fff3ec;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.sidebar-article:hover > i {
  background: var(--news-orange);
  color: #ffffff;
  transform: translateX(3px);
}

/* Sidebar Contact Card */
.sidebar-cta-card {
  background: linear-gradient(135deg, #eaf6ff 0%, #fff1e8 100%);
  border: 2px dashed #ffcaa1;
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
}

.sidebar-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--news-orange);
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(255, 98, 31, 0.18);
}

.sidebar-cta-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--news-navy);
  margin: 0 0 8px;
}

.sidebar-cta-card p {
  font-size: 13.5px;
  color: var(--news-text);
  line-height: 1.55;
  margin: 0 0 18px;
}

.sidebar-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 50px;
  background: var(--news-orange);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 98, 31, 0.32);
  transition: all 0.22s ease;
}

.sidebar-cta-btn:hover {
  background: #e85514;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 98, 31, 0.42);
}

/* Accessibility & Common */
.news-detail-page [hidden] {
  display: none !important;
}

.news-detail-page a:focus-visible,
.news-detail-page button:focus-visible,
.news-detail-page input:focus-visible {
  outline: 3px solid #1687e9;
  outline-offset: 3px;
}

/* ==========================================================================
   6. Responsive Layout Breakpoints
   ========================================================================== */
@media (max-width: 1100px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
  }
  .article-main {
    padding: 32px 30px;
  }
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 36px;
  }
  .article-width {
    width: calc(100% - 40px);
  }
  .news-hero {
    height: 220px;
  }
  .news-hero h1 {
    font-size: 46px;
  }
  .news-breadcrumb {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .article-main {
    padding: 24px 20px;
    border-radius: 18px;
  }
  .article-width {
    width: calc(100% - 28px);
    padding-bottom: 50px;
  }
  .article-main > h1 {
    font-size: 24px;
  }
  .news-hero {
    height: 190px;
  }
  .news-hero-inner {
    padding-left: 10px;
  }
  .news-hero h1 {
    font-size: 38px;
  }
  .news-hero-art {
    width: 55%;
    opacity: 0.8;
  }
  .news-breadcrumb {
    font-size: 13px;
  }
  .article-factors li {
    gap: 14px;
    padding: 16px;
  }
  .factor-number {
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 14px;
  }
  .article-factors h2 {
    font-size: 18px;
  }
  .article-pagination {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .article-nav-card.next {
    justify-content: flex-start;
    text-align: left;
    flex-direction: row-reverse;
  }
  .article-takeaway {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-main,
  .article-factors li,
  .article-nav-card,
  .sidebar-article,
  .sidebar-cta-btn,
  .article-share a,
  .article-share button {
    transition: none !important;
  }
}
