/* KMH IT — Shared Article Styles */

.article-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px;
}
.article-header .article-date {
  color: #888;
  font-size: 0.85rem;
  font-weight: 500;
}
.article-header .article-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.article-header .article-category {
  display: inline-flex;
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.15);
  color: #00ff88;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}
.article-body p {
  font-size: 0.95rem;
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 20px;
}
.article-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  color: #ffffff;
  margin-top: 48px;
  margin-bottom: 16px;
}
.article-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  color: #ffffff;
  margin-top: 32px;
  margin-bottom: 12px;
}
.article-body strong {
  color: #ffffff;
}
.article-body a {
  color: #00ff88;
  text-decoration: none;
}
.article-body a:hover {
  text-decoration: underline;
}
.article-body blockquote {
  border-left: 3px solid #00ff88;
  margin: 28px 0;
  padding: 16px 24px;
  background: rgba(0, 255, 136, 0.03);
  border-radius: 0 8px 8px 0;
}
.article-body blockquote p {
  color: #999;
  margin-bottom: 0;
  font-style: italic;
}
.article-body ul,
.article-body ol {
  margin: 20px 0;
  padding-left: 24px;
}
.article-body li {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #bbb;
  line-height: 1.8;
}
.article-body code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88rem;
  color: #00ff88;
}
.article-body .highlight-box {
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  margin: 28px 0;
}
.article-body .highlight-box h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  color: #00ff88;
  margin-bottom: 12px;
}
.article-body .highlight-box p {
  font-size: 0.88rem;
  color: #888;
  margin-bottom: 8px;
}
.article-body .highlight-box p:last-child {
  margin-bottom: 0;
}
.article-body .danger-box {
  background: rgba(255, 68, 68, 0.04);
  border-left: 3px solid #ff4444;
  border-radius: 0 8px 8px 0;
  padding: 16px 24px;
  margin: 16px 0;
}
.article-body .danger-box p {
  font-size: 0.88rem;
  color: #cc8888;
  margin-bottom: 0;
}
.article-body .success-box {
  background: rgba(0, 255, 136, 0.04);
  border-left: 3px solid #00ff88;
  border-radius: 0 8px 8px 0;
  padding: 16px 24px;
  margin: 16px 0;
}
.article-body .success-box p {
  font-size: 0.88rem;
  color: #88ccaa;
  margin-bottom: 0;
}
.article-body .fun-box {
  background: #111118;
  border: 1px solid rgba(255, 68, 68, 0.2);
  border-radius: 12px;
  padding: 24px;
  margin: 28px 0;
  text-align: center;
}
.article-body .fun-box p {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}
.article-body .fun-box p:last-child {
  margin-bottom: 0;
}
.article-body .fun-box img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 12px;
}

.article-back {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 32px;
}
.article-back a {
  color: #00ff88;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.article-back a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .article-header,
  .article-body,
  .article-back {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* === Scenario Accordion (automaatioesimerkit) === */
.scenarios {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scenarios::before {
  content: 'Klikkaa mitä tahansa laatikkoa nähdäksesi vaihe vaiheelta miten automaatio toimii';
  display: block;
  font-size: 0.85rem;
  color: #99bba8;
  font-style: italic;
  padding: 12px 18px;
  background: rgba(0, 255, 136, 0.04);
  border-left: 3px solid rgba(0, 255, 136, 0.5);
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
}
.scenario-group-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #00ff88;
  margin: 24px 0 8px;
}
.scenario-group-label:first-child {
  margin-top: 0;
}
details.scenario {
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
details.scenario:hover {
  border-color: rgba(0, 255, 136, 0.35);
  background: #111118;
  box-shadow: 0 2px 16px rgba(0, 255, 136, 0.05);
}
details.scenario[open] {
  border-color: rgba(0, 255, 136, 0.4);
  background: #111118;
}
details.scenario summary {
  cursor: pointer;
  padding: 18px 22px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Space Grotesk', sans-serif;
}
details.scenario summary::-webkit-details-marker { display: none; }
details.scenario summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 50%;
  color: #00ff88;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s, transform 0.2s;
}
details.scenario:hover summary::before {
  background: rgba(0, 255, 136, 0.2);
}
details.scenario[open] summary::before {
  content: '−';
  background: rgba(0, 255, 136, 0.2);
}
details.scenario summary::after {
  content: 'Avaa yksityiskohdat  ▾';
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
  padding: 8px 14px;
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 20px;
  background: rgba(0, 255, 136, 0.05);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
details.scenario:hover summary::after {
  background: rgba(0, 255, 136, 0.18);
  border-color: rgba(0, 255, 136, 0.6);
}
details.scenario[open] summary::after {
  content: 'Sulje  ▴';
  background: rgba(0, 255, 136, 0.15);
}
.scenario-heading {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.scenario-title {
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}
.scenario-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: #777;
}
.scenario-meta .savings {
  color: #00ff88;
  font-weight: 500;
}
.scenario-body {
  padding: 8px 22px 24px 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.scenario-context {
  font-size: 0.85rem !important;
  color: #888 !important;
  font-style: italic;
  margin: 16px 0 20px !important;
}
.scenario-steps {
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.scenario-steps > li {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 !important;
}
.scenario-steps h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  color: #ffffff;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.step-before,
.step-after {
  font-size: 0.85rem;
  line-height: 1.65;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.step-before {
  background: rgba(255, 68, 68, 0.05);
  border-left: 2px solid rgba(255, 68, 68, 0.5);
  color: #bb9999;
}
.step-after {
  background: rgba(0, 255, 136, 0.04);
  border-left: 2px solid rgba(0, 255, 136, 0.5);
  color: #99bba8;
  margin-bottom: 0;
}
.step-before strong,
.step-after strong {
  display: inline-block;
  min-width: 64px;
  color: #ffffff;
  font-weight: 600;
}
.step-time {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
}
.scenario-summary {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #99bba8;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}
.scenario-summary span strong {
  color: #ffffff;
  font-weight: 600;
}
@media (max-width: 768px) {
  details.scenario summary {
    padding: 16px 18px;
    flex-wrap: wrap;
  }
  details.scenario summary::before {
    width: 28px;
    height: 28px;
    font-size: 1.15rem;
  }
  details.scenario summary::after {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: 4px;
    padding: 10px 14px;
  }
  .scenario-body { padding: 8px 18px 20px 18px; }
  .scenario-steps > li { padding: 14px; }
  .scenarios::before {
    font-size: 0.8rem;
    padding: 10px 14px;
  }
}

/* === Article List Page === */
.article-list,
.article-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  overflow: hidden;
}

.article-card {
  background: #0d0d12;
  padding: 32px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card:hover {
  background: #111118;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0, 255, 136, 0.06);
}


.article-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  margin: 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.article-date {
  color: #888;
  font-weight: 500;
}

.article-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-category {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.15);
  color: #00ff88;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-excerpt {
  color: #888;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 8px 0 0 0;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00ff88;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 12px;
  transition: gap 0.3s;
}

.article-card:hover .article-link {
  gap: 10px;
}

.article-note {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.article-note p {
  color: #888;
  font-size: 0.95rem;
  margin: 0;
}

.article-note a {
  color: #00ff88;
  text-decoration: none;
  transition: color 0.3s;
}

.article-note a:hover {
  color: #00e67a;
}

@media (max-width: 768px) {
  .article-card {
    padding: 24px;
  }

  .article-card h3 {
    font-size: 1.1rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .article-categories {
    flex-direction: column;
    gap: 6px;
  }

  .article-note {
    padding: 32px 20px;
  }
}
