/* ==========================================================================
   Project SmartSpend - Secondary Article layout Stylesheet
   ========================================================================== */

/* Reading progress bar at top */
.progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  z-index: 1100;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--accent-emerald), var(--accent-blue));
  transition: width 0.1s ease-out;
}

/* 3-Column Article Layout */
.health-container {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 300px;
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.health-sidebar-left {
  position: relative;
}

.health-sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.sticky-sidebar-wrapper {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.health-main-content {
  min-width: 0; /* Prevent grid breakout */
}

/* Article Styling details */
.article-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-wrap: wrap;
}

/* TTS and Font sizing buttons */
.tts-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-family);
  transition: var(--transition-fast);
}

.tts-btn:hover {
  background: var(--accent-emerald);
  color: #000;
}

.bookmark-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.bookmark-btn:hover, .bookmark-btn.active {
  color: var(--accent-rose);
  border-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.05);
}

.font-adjuster {
  display: flex;
  gap: 0.4rem;
}

.font-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.font-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Article Body content elements */
.article-body {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.75;
}

.article-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 2rem 0 1rem 0;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

/* Table of Contents scrollspy widget */
.toc-widget h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toc-list a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.toc-list a:hover, .toc-list a.active {
  color: var(--accent-emerald);
}

/* Saved items layout */
.saved-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.saved-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.saved-list a {
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}

.saved-list a:hover {
  color: var(--accent-emerald);
}

.btn-remove-saved {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.btn-remove-saved:hover {
  color: var(--accent-rose);
}

/* Sticky banners ads placements */
.sticky-sponsor-block {
  width: 100%;
  height: 600px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

/* Next up article navigations */
.next-up-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.next-up-title-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.next-up-card {
  display: flex;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.next-up-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.next-up-img {
  width: 140px;
  background-size: cover;
  background-position: center;
}

.next-up-info {
  padding: 1.2rem;
  flex-grow: 1;
}

.next-up-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.next-up-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Responsive sidebars collapsing */
@media (max-width: 1350px) {
  .health-container {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
  }
  .health-sidebar-left {
    display: none;
  }
}

@media (max-width: 1024px) {
  .health-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .health-sidebar-right {
    display: none;
  }
}

/* FAQ Accordion Styles */
.faq-category-section {
  margin-bottom: 2.5rem;
}

.faq-category-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

details.faq-item {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

details.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

details.faq-item[open] {
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.05);
}

details.faq-item summary {
  padding: 1.2rem;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  color: var(--text-main);
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

details.faq-item[open] summary::after {
  transform: rotate(180deg);
  color: var(--accent-emerald);
}

details.faq-item .faq-answer {
  padding: 0 1.2rem 1.2rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  border-top: 1px solid transparent;
  transition: var(--transition-smooth);
}

details.faq-item[open] .faq-answer {
  border-top-color: var(--border-color);
  color: var(--text-muted);
}

/* Stories Filter Tab Styles */
.stories-filter-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.story-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 0.3rem;
  gap: 0.3rem;
  max-width: 100%;
  overflow-x: auto;
}

.story-filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.story-filter-btn:hover {
  color: var(--text-main);
}

.story-filter-btn.active {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
  color: #000;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

/* Stories list layouts */
.stories-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.story-wrapper {
  transition: var(--transition-smooth);
  animation: cardFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.story-wrapper.hidden {
  display: none !important;
}

.story-card-premium {
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.story-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-emerald);
  opacity: 0.8;
}

.story-card-premium.comparison-card::before {
  background: var(--accent-blue);
}

.story-card-premium.hustle-card::before {
  background: var(--accent-gold);
}

.story-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.story-title-area h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.story-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.story-tag-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.story-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.story-badge.debt {
  background: rgba(244, 63, 94, 0.12);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.story-badge.comp {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.story-badge.wealth {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Story Metrics visual block */
.story-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.metric-item {
  text-align: center;
}

.metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.metric-value.good {
  color: var(--accent-emerald);
}

.metric-value.bad {
  color: var(--accent-rose);
}

.metric-value.neutral {
  color: var(--accent-blue);
}

.comparison-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.comp-column {
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 1rem;
}

.comp-column h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.comp-column.good h4 {
  color: var(--accent-emerald);
}

.comp-column.bad h4 {
  color: var(--accent-rose);
}

/* Interactive story text layout */
.story-narrative {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-top: 1rem;
}

.story-narrative p {
  margin-bottom: 1rem;
}

.story-narrative p:last-child {
  margin-bottom: 0;
}

.story-narrative blockquote {
  border-left: 3px solid var(--accent-emerald);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--text-main);
}

.story-card-premium.comparison-card blockquote {
  border-left-color: var(--accent-blue);
}

/* Timeline display */
.story-timeline {
  margin-top: 1.5rem;
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
}

.timeline-step {
  position: relative;
  margin-bottom: 1rem;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-emerald);
}

.story-card-premium.comparison-card .timeline-step::before {
  border-color: var(--accent-blue);
}

.story-card-premium.hustle-card .timeline-step::before {
  border-color: var(--accent-gold);
}

.timeline-step-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
}

.timeline-step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* E-E-A-T Editorial Profiles Glassmorphic Card */
.author-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.author-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  border-radius: 50%;
  font-size: 1.2rem;
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.author-byline {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
}

.author-byline strong {
  color: var(--accent-emerald);
  font-weight: 700;
}

.author-reviewer {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive grid stacking for comparison cards */
@media (max-width: 1024px) {
  .comparison-columns {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

