/* ==========================================
   DREAMNOOS PREMIUM EDITORIAL ARTICLE TEMPLATE
   Integrated with existing site design tokens
========================================== */

/* Import theme tokens from main.css if available */
@import url("../css/main.css");

.dn-article-page {
  --article-width: 780px;
  --article-text: var(--text-primary, #202020);
  --article-muted: var(--text-secondary, #777);
  --article-border: var(--border-color, #e8e8e8);
  --article-surface: var(--surface-color, #fff);
  --article-accent: var(--accent-color, #b28a48);
  --article-surface-secondary: var(--surface-color, #f7f7f7);

  width: min(1320px, calc(100% - 48px));
  margin-inline: auto;
  color: var(--article-text);
  font-family: inherit;
}

/* Dark theme support */
.dn-article-page.dn-article-dark {
  --article-text: #f0eee9;
  --article-muted: #aaa49c;
  --article-border: #393632;
  --article-surface: #191919;
  --article-accent: #c69b6d;
  --article-surface-secondary: #202020;
}

/* BREADCRUMB */

.dn-article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0;
  font-size: 12px;
  color: var(--article-muted);
}

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

.dn-article-breadcrumb a:hover {
  color: var(--article-text);
}

.dn-article-breadcrumb span:last-child {
  color: var(--article-text);
}

/* ARTICLE HEADER */

.dn-article-header {
  max-width: 940px;
  margin: 40px auto 30px;
}

.dn-article-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--article-muted);
}

.dn-article-kicker a {
  color: var(--article-accent);
  text-decoration: none;
}

.dn-kicker-dot {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.dn-article-header .article__title {
  max-width: 950px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.dn-article-header .article__lede {
  max-width: 820px;
  margin: 22px 0 28px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
  color: var(--article-muted);
}

/* AUTHOR BYLINE */

.dn-article-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--article-border);
  border-bottom: 1px solid var(--article-border);
}

.dn-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dn-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--article-surface-secondary);
}

.dn-author-info > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dn-author-label {
  font-size: 11px;
  color: var(--article-muted);
}

.article__meta__author {
  font-size: 13px;
  font-weight: 700;
  color: var(--article-text);
  text-decoration: none;
}

.article__meta__author:hover {
  color: var(--article-accent);
}

.dn-article-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--article-muted);
}

.dn-meta-separator {
  opacity: .5;
}

/* ACTIONS */

.dn-article-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.dn-article-actions button,
.dn-article-share-bottom button {
  border: 1px solid var(--article-border);
  border-radius: 30px;
  padding: 9px 16px;
  background: transparent;
  color: var(--article-text);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.dn-article-actions button:hover,
.dn-article-share-bottom button:hover {
  background: var(--article-text);
  color: white;
}

/* HERO IMAGE */

.dn-article-hero {
  margin: 30px 0 50px;
  position: relative;
}

.dn-article-hero img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 5px;
}

.dn-article-hero figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--article-muted);
}

/* MAIN GRID */

.dn-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(220px, 280px);
  gap: 70px;
  align-items: start;
  max-width: 1130px;
  margin: 0 auto;
}

.dn-article-main {
  min-width: 0;
}

/* TABLE OF CONTENTS */

.dn-article-toc {
  padding: 20px 22px;
  margin-bottom: 38px;
  background: var(--article-surface-secondary);
  border-radius: 5px;
  border: 1px solid var(--article-border);
}

.dn-toc-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--article-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

#dn-article-toc-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

#dn-article-toc-list li {
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.5;
}

#dn-article-toc-list a {
  color: var(--article-muted);
  text-decoration: none;
}

#dn-article-toc-list a:hover {
  color: var(--article-text);
}

/* ARTICLE BODY */

.dn-article-content {
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: break-word;
}

.dn-article-content p {
  margin: 0 0 25px;
}

.dn-article-content h2 {
  margin: 52px 0 19px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.dn-article-content h3 {
  margin: 34px 0 14px;
  font-size: 21px;
  line-height: 1.35;
}

.dn-article-content h4 {
  margin: 28px 0 12px;
  font-size: 18px;
  line-height: 1.35;
}

.dn-article-content a {
  color: var(--article-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dn-article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 35px auto;
  border-radius: 5px;
}

.dn-article-content blockquote {
  margin: 35px 0;
  padding: 8px 25px;
  border-left: 3px solid var(--article-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1.5;
  color: var(--article-muted);
}

.dn-article-content ul,
.dn-article-content ol {
  padding-left: 25px;
  margin-bottom: 25px;
}

.dn-article-content li {
  margin-bottom: 10px;
}

.dn-article-content figure {
  margin: 35px 0;
}

.dn-article-content figcaption {
  margin-top: 9px;
  font-size: 12px;
  color: var(--article-muted);
}

/* SIDEBAR */

.dn-article-sidebar {
  position: sticky;
  top: 30px;
}

.dn-sidebar-section {
  margin-bottom: 40px;
}

.dn-sidebar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.dn-sidebar-heading h2 {
  white-space: nowrap;
  font-family: Georgia, serif;
  font-size: 20px;
}

.dn-sidebar-heading span {
  width: 100%;
  height: 1px;
  background: var(--article-border);
}

.dn-sidebar-stories {
  display: grid;
  gap: 20px;
}

.dn-sidebar-newsletter {
  padding: 24px;
  background: var(--article-surface-secondary);
  border-radius: 5px;
  border: 1px solid var(--article-border);
}

.dn-newsletter-eyebrow,
.dn-section-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  color: var(--article-accent);
}

.dn-sidebar-newsletter h2 {
  margin: 14px 0;
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1.2;
}

.dn-sidebar-newsletter p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--article-muted);
}

.dn-sidebar-newsletter a {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--article-text);
  text-decoration: none;
}

.dn-sidebar-newsletter a:hover {
  color: var(--article-accent);
}

/* ARTICLE FOOTER */

.dn-article-footer {
  margin-top: 60px;
  padding-top: 25px;
  border-top: 1px solid var(--article-border);
}

.dn-article-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 12px;
}

.dn-article-tags a {
  padding: 7px 12px;
  border: 1px solid var(--article-border);
  border-radius: 30px;
  color: var(--article-muted);
  text-decoration: none;
  font-size: 12px;
}

.dn-article-tags a:hover {
  color: var(--article-text);
  border-color: var(--article-text);
}

.dn-article-share-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 35px;
  padding: 22px;
  background: var(--article-surface-secondary);
  border-radius: 5px;
  border: 1px solid var(--article-border);
}

.dn-article-share-bottom strong {
  font-family: Georgia, serif;
  font-size: 19px;
}

.dn-article-share-bottom span {
  flex: 1;
  font-size: 12px;
  color: var(--article-muted);
}

/* RELATED STORIES */

.dn-related-section {
  max-width: 1130px;
  margin: 100px auto 70px;
  padding-top: 35px;
  border-top: 1px solid var(--article-border);
}

.dn-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
}

.dn-section-heading h2 {
  margin-top: 8px;
  font-family: Georgia, serif;
  font-size: 32px;
}

.dn-section-heading > a {
  font-size: 12px;
  color: var(--article-muted);
  text-decoration: none;
}

.dn-section-heading > a:hover {
  color: var(--article-text);
}

.dn-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

/* MORE SECTION */

.dn-more-section {
  padding: 65px 20px;
  margin-bottom: 50px;
  background: var(--article-surface-secondary);
  text-align: center;
  border: 1px solid var(--article-border);
}

.dn-more-inner > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--article-muted);
}

.dn-more-inner h2 {
  margin: 15px 0 25px;
  font-family: Georgia, serif;
  font-size: clamp(27px, 4vw, 42px);
}

.dn-more-inner a {
  display: inline-block;
  padding: 12px 22px;
  background: var(--article-text);
  color: white;
  border-radius: 3px;
  font-size: 12px;
  text-decoration: none;
}

.dn-more-inner a:hover {
  background: var(--article-accent);
}

/* RESPONSIVE */

@media (max-width: 1050px) {
  .dn-article-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 35px;
  }
}

@media (max-width: 760px) {
  .dn-article-page {
    width: min(100% - 32px, 680px);
  }

  .dn-article-header {
    margin-top: 22px;
  }

  .dn-article-header .article__title {
    font-size: clamp(34px, 8vw, 48px);
  }

  .dn-article-byline {
    align-items: flex-start;
    flex-direction: column;
  }

  .dn-article-hero {
    margin: 25px 0 35px;
  }

  .dn-article-layout {
    display: block;
  }

  .dn-article-sidebar {
    position: static;
    margin-top: 55px;
  }

  .dn-article-content {
    font-size: 16px;
    line-height: 1.8;
  }

  .dn-related-section {
    margin-top: 65px;
  }

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

@media (max-width: 480px) {
  .dn-article-page {
    width: calc(100% - 28px);
  }

  .dn-article-header .article__title {
    font-size: 34px;
  }

  .dn-article-header .article__lede {
    font-size: 16px;
  }

  .dn-article-hero img {
    aspect-ratio: 4 / 3;
  }

  .dn-related-grid {
    grid-template-columns: 1fr;
  }

  .dn-article-share-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .dn-article-share-bottom span {
    flex: initial;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .dn-article-page *,
  .dn-article-page *::before,
  .dn-article-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
