/* =============================================
   TCF Single Nyhet + Article CSS
   ============================================= */

/* --- ARTICLE HERO --- */
.article-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  background: var(--c-bg-dark);
  overflow: hidden;
}
.article-hero__media {
  position: absolute;
  inset: 0;
}
.article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.5;
}
.article-hero__content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 48px;
}
.article-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}
.article-hero__breadcrumb a {
  color: rgba(255,255,255,0.45);
  transition: color 0.15s;
}
.article-hero__breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.article-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.article-hero__content h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  max-width: 800px;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.article-meta__sep { opacity: 0.3; }

/* --- ARTICLE BODY --- */
.article-body { background: var(--c-bg); }
.article-body__inner {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 760px;
}
.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text-mid);
}
.article-content h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--c-text);
  margin-top: 2em;
  margin-bottom: 0.5em;
}
.article-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--c-text);
  margin-top: 1.5em;
  margin-bottom: 0.4em;
}
.article-content p { margin-bottom: 1.4em; }
.article-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-content ul,
.article-content ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 0.4em; }
.article-content img {
  width: 100%;
  border-radius: var(--r-md);
  margin-block: 1.5em;
}
.article-content blockquote {
  border-left: 3px solid var(--c-accent);
  padding-left: 1.2em;
  margin-left: 0;
  font-style: italic;
  color: var(--c-text-mid);
}

/* --- RELATED POSTS --- */
.related-posts {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--c-border);
}
.related-posts__heading {
  font-size: 1.4rem;
  margin-bottom: 24px;
}
.related-posts .news-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* --- TILLBAKA-LÄNK --- */
.article-back {
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 32px;
  border-top: 1px solid var(--c-border);
}

/* --- PAGINERING --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: clamp(32px, 4vw, 56px);
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text);
  background: var(--c-white);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}
.pagination .page-numbers:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: rgba(232,111,81,0.05);
}
.pagination .page-numbers.current {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

/* --- NEWS CARD PLACEHOLDER (WordPress utan bild) --- */
.news-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ede9e4 25%, #e4e1dc 100%);
}

/* --- PAGE HERO (nyhetsarkiv) --- */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 80px));
  padding-bottom: clamp(32px, 4vw, 56px);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}
.page-hero h1 { margin-bottom: 12px; max-width: 700px; }
.page-hero__sub { font-size: 1.08rem; max-width: 540px; }

/* --- NAV LIGHT --- */
.tcf-nav--light {
  background: rgba(250,250,248,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--c-border);
}
.nav-link--active { color: var(--c-accent); }

/* --- FILTER BAR --- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-mid);
  background: var(--c-bg-soft);
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.filter-btn:hover { background: var(--c-border); color: var(--c-text); }
.filter-btn.is-active {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

/* --- FEATURED CARD --- */
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--c-white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  min-height: 360px;
}
.featured-card__media {
  overflow: hidden;
  display: block;
}
.featured-card__media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.3s ease;
}
.featured-card__media:hover img { transform: scale(1.02); }
.featured-card__body {
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column;
  gap: 12px; justify-content: center;
}
.featured-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.news-tag--featured {
  background: rgba(232,111,81,0.12);
  color: var(--c-accent);
}
.featured-card__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--c-text);
  line-height: 1.2;
  text-wrap: balance;
}
.featured-card__title a {
  color: inherit; text-decoration: none;
  transition: color 0.15s;
}
.featured-card__title a:hover { color: var(--c-accent); }
.featured-card__excerpt { font-size: 1rem; color: var(--c-text-mid); line-height: 1.65; }

/* --- ARCHIVE GRID --- */
.news-archive { background: var(--c-bg-soft); }
.news-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-empty {
  padding: 64px 0; text-align: center;
  color: var(--c-text-mute); font-size: 1rem;
  grid-column: 1 / -1;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; min-height: auto; }
  .featured-card__media { aspect-ratio: 16/9; }
  .news-archive-grid { grid-template-columns: 1fr 1fr; }
  .related-posts .news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .news-archive-grid { grid-template-columns: 1fr; }
  .related-posts .news-grid { grid-template-columns: 1fr; }
  .filter-btn { padding: 7px 14px; font-size: 0.8rem; }
}
