/* ==========================================================================
   ARTICLES.CSS - Article-specific styles
   ========================================================================== */

/* ARTICLE VARIABLES - Override main.css for article pages */
:root {
  --color-magenta: #d92fbd;
  --color-purple: #813cb6;
  --purple: #d92fbd;
  --blue: #813cb6;
  --heart: #813cb6;
  --gray: #666;
  --white: #fff;
  --dark: #1a1a1a;
  --nav-h: 88px;
  --radius: 16px;
  --shadow: 0 8px 40px rgb(138 63 252 / 10%);
  --shadow-card: 0 4px 24px rgb(51 51 51 / 8%);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --soft: #f8f9fa;
}

/* ARTICLE NAVBAR */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgb(255 255 255 / 97%);
  backdrop-filter: none;
  border-bottom: 1px solid rgb(138 63 252 / 8%);
  transition: var(--transition);
}

#navbar.scrolled {
  height: 64px;
  box-shadow: 0 4px 30px rgb(138 63 252 / 10%);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.nav-logo-img {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  margin-left: 110px;
  margin-top: 8px;
  align-self: center;
}

.nav-logo-image {
  height: calc(var(--nav-h) * 0.85);
  width: auto;
  display: block;
  object-fit: contain;
  transition: var(--transition);
}

#navbar.scrolled .nav-logo-image {
  height: calc(64px * 0.85);
}

.nav-logo-image:hover {
  opacity: 85%;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: 8px;
}

.nav-back:hover {
  color: var(--purple);
  background: rgb(138 63 252 / 7%);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--soft);
  border-radius: 50px;
  padding: 4px;
  gap: 2px;
}

.lang-btn {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 50px;
  color: var(--gray);
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
}

.lang-btn.active {
  background: var(--purple);
  color: var(--white);
}

/* ARTICLE HERO */
.article-hero {
  padding-top: 30px;
  padding-bottom: 30px;
  background: linear-gradient(160deg, rgb(42 166 224 / 5%) 0%, rgb(107 47 191 / 4%) 100%);
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgb(42 166 224 / 7%) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: center;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.meta-tag {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray);
  opacity: 50%;
}

.meta-text {
  font-size: 13px;
  color: var(--gray);
}

.hero-content h1 {
  font-size: clamp(26px, 3.5vw, 40px);
  margin-bottom: 28px;
  line-height: 1.25;
  font-weight: 700;
}

.article-subtitle {
  font-size: 18px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 540px;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.author-name {
  display: block;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.author-role {
  display: block;
  font-size: 12px;
  color: var(--gray);
}

.hero-illustration {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-illus-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  box-shadow:
    0 20px 60px rgb(138 63 252 / 12%),
    0 4px 20px rgb(0 0 0 / 6%);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.hero-illus-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--blue), var(--purple));
}

.main-illustration {
  width: 100%;
  height: auto;
  display: block;
}

/* ARTICLE CONTAINER */
.article-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.article-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  padding: 48px 0 64px;
  align-items: start;
}

.article-body {
  max-width: 720px;
}

.article-intro {
  font-size: 17px;
  line-height: 1.85;
  color: var(--dark);
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 2px solid rgb(138 63 252 / 8%);
}

.article-section {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgb(138 63 252 / 7%);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.article-section:last-child {
  border-bottom: none;
}

.article-section h2 {
  font-size: 26px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.article-section p {
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 20px;
  font-size: 15.5px;
}

.article-section h3 {
  font-size: 18px;
  margin: 32px 0 14px;
  color: var(--heart);
}

/* PILLAR GRID */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 28px 0;
}

.pillar-card {
  background: var(--soft);
  border-radius: 14px;
  padding: 24px 20px;
  border: 1px solid rgb(138 63 252 / 8%);
  transition: var(--transition);
  text-align: center;
}

.pillar-card:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.pillar-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.pillar-label {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
}

/* SENSORY GRID */
.sensory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.sensory-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sensory-item {
  background: white;
  border: 1px solid rgb(138 63 252 / 10%);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sensory-item.trigger {
  border-left: 3px solid #e53e3e;
}

.sensory-item.solution {
  border-left: 3px solid #38a169;
}

.sensory-emoji {
  font-size: 22px;
  flex-shrink: 0;
}

.sensory-text {
  font-size: 13.5px;
  color: var(--dark);
  font-weight: 500;
  line-height: 1.4;
}

/* STRATEGY GRID */
.strategy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}

.strategy-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid rgb(138 63 252 / 10%);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.strategy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--blue), var(--purple));
}

.strategy-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.strategy-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.strategy-card h4 {
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--heart);
}

.strategy-card p {
  font-size: 13.5px;
  color: var(--gray);
  line-height: 1.65;
  margin: 0;
}

/* ARTICLE LIST */
.article-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.article-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  font-size: 15px;
  color: var(--gray);
  line-height: 1.7;
  border-bottom: 1px solid rgb(138 63 252 / 5%);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
}

/* CALLOUT */
.callout {
  background: linear-gradient(135deg, rgb(42 166 224 / 7%), rgb(138 63 252 / 7%));
  border-left: 4px solid var(--blue);
  border-radius: 0 14px 14px 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.callout p {
  color: var(--dark);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* FAQ */
.faq-list {
  margin: 24px 0;
}

.faq-item {
  background: var(--soft);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 16px;
  border: 1px solid rgb(138 63 252 / 8%);
}

.faq-item h4 {
  font-size: 15px;
  color: var(--heart);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-q {
  color: var(--purple);
  font-weight: 800;
  flex-shrink: 0;
}

.faq-item p {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.75;
  margin: 0;
}

/* ARTICLE CLOSING */
.article-closing {
  background: linear-gradient(135deg, var(--heart), var(--purple));
  border-radius: 20px;
  padding: 48px;
  margin: 48px 0 0;
  text-align: center;
  color: white;
}

.article-closing p {
  font-size: 19px;
  line-height: 1.65;
  font-style: italic;
  color: rgb(255 255 255 / 92%);
  margin: 0;
}

.article-closing cite {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: rgb(255 255 255 / 60%);
  font-style: normal;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* SIDEBAR */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.sidebar-card {
  background: white;
  border: 1px solid rgb(138 63 252 / 10%);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.sidebar-card h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 20px;
  font-weight: 700;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  margin-bottom: 4px;
}

.toc-list a {
  font-size: 13.5px;
  color: var(--gray);
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  transition: var(--transition);
  border-left: 2px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--purple);
  background: rgb(138 63 252 / 6%);
  border-left-color: var(--purple);
}

.key-takeaway {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.takeaway-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 7px;
}

.takeaway-text {
  font-size: 13.5px;
  color: var(--gray);
  line-height: 1.6;
}

.sidebar-author {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.sidebar-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.sidebar-author-name {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.sidebar-author-role {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.4;
  margin-top: 2px;
}

.sidebar-bio {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 16px;
}

.sidebar-btn {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--purple), var(--heart));
  color: white;
  padding: 12px;
  border-radius: 10px;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.sidebar-btn:hover {
  opacity: 90%;
  transform: translateY(-1px);
  color: white;
}

.related-article {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgb(138 63 252 / 7%);
}

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

.related-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.related-title {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  transition: var(--transition);
}

.related-article:hover .related-title {
  color: var(--purple);
}

.related-tag {
  font-size: 11px;
  color: var(--gray);
  margin-top: 3px;
}

/* ARTICLE CTA */
.article-cta {
  background: linear-gradient(135deg, var(--heart) 0%, var(--purple) 60%, var(--blue) 100%);
  padding: 80px 0;
  text-align: center;
  color: white;
}

.article-cta h2 {
  font-size: 32px;
  color: white;
  margin-bottom: 16px;
}

.article-cta p {
  font-size: 17px;
  color: rgb(255 255 255 / 80%);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-white {
  background: white;
  color: var(--heart);
  padding: 14px 32px;
  border-radius: 50px;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
  color: var(--heart);
}

.btn-outline-white {
  border: 2px solid rgb(255 255 255 / 50%);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-outline-white:hover {
  border-color: white;
  background: rgb(255 255 255 / 10%);
  color: white;
}

/* READING PROGRESS */
#reading-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--blue), var(--purple));
  z-index: 999;
  width: 0%;
  transition: width 0.1s linear;
}

/* RESPONSIVE */
@media (width <= 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-illustration {
    display: none;
  }

  .article-wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .article-sidebar {
    position: static;
  }

  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .strategy-grid {
    grid-template-columns: 1fr;
  }
}

@media (width <= 768px) {
  .article-hero {
    padding-top: calc(var(--nav-h) + 40px);
  }

  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sensory-grid {
    grid-template-columns: 1fr;
  }
}

@media (width <= 480px) {
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-closing {
    padding: 32px 24px;
  }
}
