/* ===========================
   FINNKORT – Guide / Article CSS
   Bergsø AS © 2026
   =========================== */

/* ---- BREADCRUMB ---- */
.breadcrumb-bar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-dim);
}
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-dim); }

/* ---- ARTICLE PAGE LAYOUT ---- */
.article-page { padding: 56px 0 88px; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

/* ---- ARTICLE HEADER ---- */
.article-header { margin-bottom: 40px; }

.article-header .article-tag {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--accent); background: var(--accent-bg);
  padding: 3px 10px; border-radius: 100px; width: fit-content;
  margin-bottom: 16px; display: inline-block;
}

.article-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; line-height: 1.2;
  letter-spacing: -0.02em; margin-bottom: 14px;
  color: var(--text);
}

.article-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text-dim); margin-bottom: 24px;
}

.article-intro {
  font-size: 1.05rem; line-height: 1.7;
  color: #374151;
  background: #f0f5ff;
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 0 0 32px;
}

/* ---- ARTICLE BODY PROSE ---- */
.article-body h2 {
  font-size: 1.35rem; font-weight: 700;
  margin: 40px 0 14px; color: var(--text);
  letter-spacing: -0.02em;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.article-body h2:first-of-type { border-top: none; }

.article-body h3 {
  font-size: 1.05rem; font-weight: 600;
  margin: 28px 0 10px; color: var(--text);
}

.article-body p {
  font-size: 0.975rem; line-height: 1.75;
  color: var(--text-2); margin-bottom: 18px;
}

.article-body ul, .article-body ol {
  padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 24px;
}
.article-body ul li, .article-body ol li {
  font-size: 0.95rem; color: var(--text-2);
  padding-left: 24px; position: relative; line-height: 1.6;
}
.article-body ul li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--accent); font-weight: 600;
}
.article-body ol { counter-reset: list; }
.article-body ol li::before {
  content: counter(list); counter-increment: list;
  position: absolute; left: 0;
  color: var(--accent); font-weight: 700; font-size: 0.85rem;
}

/* ---- INFO BOX ---- */
.info-box {
  background: var(--accent-bg); border: 1px solid var(--accent-bdr);
  border-radius: var(--radius-sm); padding: 18px 22px;
  font-size: 0.9rem; color: var(--text-2); line-height: 1.6;
  margin: 24px 0;
}
.info-box strong { color: var(--accent); }

/* ---- CALC TABLE ---- */
.calc-table {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; margin: 24px 0;
}
.calc-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.calc-row span {
  padding: 12px 16px; font-size: 0.85rem; color: var(--text-2);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.calc-row span:last-child { border-right: none; }
.calc-row:last-child span { border-bottom: none; }
.calc-head span {
  background: var(--bg-2); font-size: 0.75rem; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---- INLINE CTA BOX ---- */
.article-cta-box {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin: 40px 0;
}
.article-cta-text { display: flex; flex-direction: column; gap: 4px; }
.article-cta-text strong { font-size: 1rem; color: var(--text); }
.article-cta-text span { font-size: 0.875rem; color: var(--text-2); }

/* ---- SIDEBAR ---- */
.article-sidebar { position: sticky; top: 88px; }

.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.sidebar-card h4 { font-size: 0.95rem; margin-bottom: 8px; color: var(--text); }
.sidebar-card p { font-size: 0.83rem; line-height: 1.55; }

.toc {
  display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
}
.toc a {
  font-size: 0.82rem; color: var(--text-2); text-decoration: none;
  padding: 6px 10px; border-radius: 6px; transition: background 0.15s, color 0.15s;
  border-left: 2px solid transparent;
}
.toc a:hover {
  background: var(--accent-bg); color: var(--accent);
  border-left-color: var(--accent);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .calc-row { grid-template-columns: repeat(2, 1fr); }
  .calc-row span:nth-child(2) { border-right: none; }
  .calc-row span:nth-child(3) { border-top: none; }
}

@media (max-width: 640px) {
  .article-cta-box { flex-direction: column; align-items: flex-start; }
  .article-cta-box .btn { width: 100%; }
  .calc-row { grid-template-columns: 1fr 1fr; }
}

/* ---- FEATURED IMAGE ---- */
.article-featured-img {
  margin: 0 0 36px;
  border-radius: 12px;
  overflow: hidden;
  height: 360px;
}
.article-featured-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 35%;
  display: block;
}

/* ---- ARTICLE BODY IMAGES ---- */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 24px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: block;
}
.article-body img + em,
.article-body img + p > em:only-child {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: -16px;
  margin-bottom: 24px;
}

/* ---- CALLOUT BOXES (bruk <div class="callout"> i markdown) ---- */
.article-body .callout {
  background: var(--accent-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 0.92rem;
}
.article-body .callout-warning {
  background: #fff8e6;
  border-left-color: #f59e0b;
}
.article-body .callout-success {
  background: #f0fdf4;
  border-left-color: #22c55e;
}

/* ---- PULLQUOTE ---- */
.article-body .pullquote {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding: 12px 24px;
  margin: 32px 0;
  font-style: italic;
}

/* ---- FAKTABOKS ---- */
.article-body .faktaboks {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
}
.article-body .faktaboks h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.article-body .faktaboks ul {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.article-body .faktaboks ul li {
  display: flex; flex-direction: column; gap: 2px;
}
.article-body .faktaboks ul li strong {
  font-size: 1.4rem; font-weight: 800; color: var(--text);
}
.article-body .faktaboks ul li span {
  font-size: 0.78rem; color: var(--text-dim);
}

/* ---- NOKKELINFO (sjekkliste-boks) ---- */
.article-body .nokkelinfo {
  background: #f0f5ff;
  border: 1px solid #c7d9f8;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0;
}
.article-body .nokkelinfo h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin: 0 0 12px;
}
.article-body .nokkelinfo ul {
  margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px;
}
.article-body .nokkelinfo ul li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.92rem; line-height: 1.5; color: var(--text-2);
}
.article-body .nokkelinfo ul li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- ARTICLE CARD EMBED ({% kort %} shortcode) ---- */
.article-card-embed {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-decoration: none; color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.article-card-embed:hover {
  box-shadow: 0 4px 16px rgba(0,102,204,0.12);
  border-color: var(--accent);
}
.ace-annonse {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 0.65rem; font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ace-img {
  flex-shrink: 0;
  width: 100px; height: 65px;
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
}
.ace-img img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.ace-info {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
}
.ace-info strong { font-size: 1rem; color: var(--text); }
.ace-info span { font-size: 0.82rem; color: var(--text-dim); }
.article-card-embed .btn-sm {
  flex-shrink: 0;
  font-size: 0.85rem;
  padding: 8px 18px;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .article-card-embed { flex-wrap: wrap; }
  .article-card-embed .btn-sm { width: 100%; text-align: center; }
}
