/* ==========================================================================
   33-news.css
   Scoped: body.page-news
   Matches markup in /nyheter/index.astro + /nyheter/[...slug].astro
   ========================================================================== */

body.page-news {
  background: var(--bg);
}

/* Page head */
body.page-news .page-head {
  margin: 18px 0 22px;
}

body.page-news .page-title {
  margin: 0;
  font-family: serif;
  font-weight: 650;
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: #111;
}

body.page-news .page-lead {
  margin: 12px 0 0;
  max-width: 70ch;
  color: rgba(0, 0, 0, 0.65);
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Layout spacing */
body.page-news .news-content {
  padding: 0 clamp(18px, 4vw, 56px) 80px;
}

body.page-news .news-section {
  margin-bottom: 80px;
}

/* Section title bar */
body.page-news .h2-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.1rem;
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}

body.page-news .h2-bar::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--b23);
}

/* CTA pill */
body.page-news .pill-btn {
  display: inline-block;
  padding: 12px 35px;
  background-color: var(--b23);
  color: white;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 0.85rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  transition: transform 160ms ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

@media (hover: hover) {
  body.page-news .pill-btn:hover {
    transform: scale(1.03);
  }
}

body.page-news .pill-btn--small {
  padding: 8px 22px;
  font-size: 0.75rem;
}

/* Mer luft mellan text och "LÄS MER" i grid-korten */
body.page-news .card-body .pill-btn {
  margin-top: 14px;
}

/* Om du vill att knappen alltid hamnar längst ner i kortet */
body.page-news .card-body .pill-btn {
  margin-top: auto;
}

/* Date tag */
body.page-news .date-tag {
  font-size: 0.8rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* HERO */
body.page-news .hero-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
}

body.page-news .hero-link {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  text-decoration: none;
  color: inherit;
}

body.page-news .hero-media {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
}

body.page-news .hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 35%;
  transition: transform 260ms ease;
}

@media (hover: hover) {
  body.page-news .hero-link:hover .hero-media img {
    transform: scale(1.02);
  }
}

body.page-news .hero-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(0, 0, 0, 0.012);
}

body.page-news .hero-headline {
  font-family: serif;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.1;
  margin: 15px 0;
  font-weight: 900;
  color: #111;
}

body.page-news .hero-text {
  font-size: 1.1rem;
  color: rgba(0, 0, 0, 0.68);
  margin-bottom: 30px;
  line-height: 1.6;
}

/* GRID */
body.page-news .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

body.page-news .card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 180ms ease,
    box-shadow 220ms ease;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.05);
}

@media (hover: hover) {
  body.page-news .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1);
  }
}

body.page-news .card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

body.page-news .card-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
}

body.page-news .card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 35%;
}

body.page-news .card-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

body.page-news .card-body h3 {
  margin: 10px 0;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.2;
  color: #111;
}

body.page-news .desc {
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.68);
  line-height: 1.5;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* ARCHIVE (UPPDATERAD – mindre "svagt") */
body.page-news .archive-container {
  border-top: 2px solid rgba(0, 0, 0, 0.12);
  padding-top: 40px;
  margin-top: 10px;
}

body.page-news .archive-header {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

body.page-news .btn-archive-toggle {
  background: #fff;
  border: 2px solid #111;
  padding: 12px 34px;
  font-weight: 900;
  cursor: pointer;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

body.page-news .archive-list {
  max-width: 1000px;
  margin: 18px auto 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

body.page-news .archive-row {
  display: grid;
  grid-template-columns: 160px 1fr 30px;
  padding: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: rgba(0, 0, 0, 0.92);
  align-items: center;
}

body.page-news .archive-row:last-child {
  border-bottom: 0;
}

body.page-news .archive-date {
  font-weight: 900;
  color: rgba(0, 0, 0, 0.65);
}

body.page-news .archive-title {
  font-weight: 900;
  color: #111;
}

body.page-news .archive-arrow {
  color: rgba(0, 0, 0, 0.55);
  font-weight: 900;
}

@media (hover: hover) {
  body.page-news .archive-row:hover {
    background: rgba(0, 0, 0, 0.03);
  }
}

body.page-news .hidden {
  display: none;
}

/* Article page tweaks */
body.page-news .content-inner--news {
  padding: 40px 0 80px;
}

/* News excerpt (article ingress) */
body.page-news .news-excerpt {
  margin: 14px 0 0;
  max-width: 72ch;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.68);
}

/* If excerpt is used inside hero-body */
body.page-news .hero-body .news-excerpt {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.7);
}

/* Responsive */
@media (max-width: 1100px) {
  body.page-news .hero-link {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body.page-news .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body.page-news .news-grid {
    grid-template-columns: 1fr;
  }

  body.page-news .hero-card {
    border-radius: 18px;
  }

  body.page-news .card {
    border-radius: 16px;
  }

  body.page-news .hero-body {
    padding: 18px;
  }

  body.page-news .card-body {
    padding: 14px;
  }

  body.page-news .archive-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.page-news .news-excerpt {
    font-size: 1.02rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.page-news .card,
  body.page-news .hero-media img,
  body.page-news .pill-btn {
    transition: none;
  }
}
/* News: gör CTA-text normal (inte bold) */
body.page-news .pill-btn,
body.page-news .pill-btn--small {
  font-weight: 600; /* eller 500 om du vill ännu lättare */
}
/* Mer luft före CTA i hero */
body.page-news .hero-text {
  margin-bottom: 18px; /* var 30px – justera om du vill */
}
body.page-news .hero-body .pill-btn {
  margin-top: 14px;
}

/* Mer luft före CTA i korten */
body.page-news .desc {
  margin-bottom: 18px; /* var 25px – justera */
}
body.page-news .card-body .pill-btn--small {
  margin-top: 10px;
}
/* Ta bort "fet" text i nyhetsartiklar (Directus kan ha <strong>/<b> överallt) */
body.page-news .news-body strong,
body.page-news .news-body b {
  font-weight: inherit;
}
/* Gör brödtexten lite lättare (om den ändå känns för "heavy") */
body.page-news .news-body {
  font-weight: 400;
}
/* Ta bort fetstil även i excerpt/ingress */
body.page-news .news-excerpt strong,
body.page-news .news-excerpt b {
  font-weight: inherit;
}
/* Excerpt/ingress ska vara normal/lätt text */
body.page-news .news-excerpt {
  font-weight: 400;
}
/* Ta bort fetstil i ingress + artikeltext (även på mobil) */
body.page-news .news-body strong,
body.page-news .news-body b,
body.page-news .news-excerpt strong,
body.page-news .news-excerpt b {
  font-weight: 400 !important;
}
body.page-news .news-body h1 strong,
body.page-news .news-body h2 strong,
body.page-news .news-body h3 strong,
body.page-news .news-body h1 b,
body.page-news .news-body h2 b,
body.page-news .news-body h3 b {
  font-weight: inherit !important;
}
