/* ============================================================
   Skribenter — listan och profilvyn (author app)
   Sandband-hero, hårfina skribentkort, pil-only hover.
   Följer claude-design/ui_kits/skribenter/ (WritersPage, WriterProfilePage).
   Artikelrutnätet återanvänder sajtens befintliga .all-content__grid /
   .card--small (post/modules/post.html) — ingen egen kortstil för artiklar.
   ============================================================ */

.skrib-list,
.skrib-detail {
  --sk-paper: #ffffff;
  --sk-sand: #f5f3f2;
  --sk-mint: #e7f2ea;
  --sk-ink: #000000;
  --sk-graphite: #54646a;
  --sk-green-brand: #49b170;
  --sk-green-link: #1e7a48;
  --sk-green-deep: #0f5132;
  --sk-border-card: rgba(28, 58, 64, 0.12);
  --sk-border-grid: rgba(0, 0, 0, 0.1);
  --sk-rule: rgba(0, 0, 0, 0.08);
  --sk-radius: 12px;
  --sk-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Hero runs full-bleed; the rest of the page stays inside main.container. */
body.page-home main.container:has(.skrib-hero) {
  padding-top: 0;
}

/* Om oss profile (/om-oss/<author>/) has no content below the hero, so the
   newsletter (a sibling after <main>) sits flush against it. */
body.page-home main.container:has(.skrib-detail--team) + .newsletter {
  margin-top: 0;
}

/* ---------- Hero band (sand + satin texture) ---------- */
.skrib-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-color: var(--sk-sand);
  background-image: url("../media/images/skribenter-hero-satin.jpg");
  background-size: cover;
  background-position: center 42%;
  border-bottom: 1px solid var(--sk-rule);
}

.skrib-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.skrib-hero__crumb {
  padding: 22px 0 36px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--sk-graphite);
}

.skrib-hero__crumb a {
  color: inherit;
  text-decoration: none;
  transition: color var(--hr-dur-color, 0.15s) var(--sk-ease);
}

.skrib-hero__crumb a:hover {
  color: var(--sk-green-link);
}

.skrib-hero__crumb .skrib-hero__crumb-sep {
  margin: 0 8px;
  color: rgba(28, 58, 64, 0.3);
}

.skrib-hero__body {
  padding-bottom: 56px;
}

.skrib-hero__kicker {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sk-green-link);
}

.skrib-hero__title {
  margin: 0 0 18px;
  max-width: 22ch;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  color: var(--sk-ink);
}

/* pages.css resets `.page-home h1` (font-size/margin) with class+element
   specificity that beats a plain class selector — out-specify it here. */
body.page-home main h1.skrib-hero__title {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 44px);
}

.skrib-hero__lead {
  margin: 0;
  max-width: 760px;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--sk-ink);
}

/* Profile hero: text left, portrait right */
.skrib-hero__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px 56px;
}

.skrib-hero__text {
  flex: 1 1 380px;
  min-width: 0;
}

.skrib-hero__role {
  margin: 0 0 20px;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  color: var(--sk-ink);
}

.skrib-hero__bio {
  margin: 0 0 26px;
  max-width: 640px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--sk-ink);
}

.skrib-hero__portrait-slot {
  flex: 0 1 300px;
  min-width: 220px;
}

@media (max-width: 768px) {
  .skrib-hero__portrait-slot {
    flex-basis: 100%;
  }
}

/* ---------- Contact row (LinkedIn / Instagram / Facebook / E-post) ---------- */
.skrib-contact-kicker {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sk-graphite);
}

.skrib-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.skrib-iconlink,
.skrib-iconlink:visited {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--sk-green-link);
  text-decoration: none;
  transition: color var(--hr-dur-color, 0.15s) var(--sk-ease);
}

.skrib-iconlink svg {
  flex: none;
}

.skrib-iconlink:hover,
.skrib-iconlink:visited:hover {
  color: var(--sk-green-deep);
}

/* ---------- Portrait (shared by grid cards + profile hero) ---------- */
.skrib-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--sk-mint);
  border-radius: var(--sk-radius);
}

.skrib-portrait--framed {
  border: 1px solid var(--sk-border-card);
}

.skrib-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skrib-portrait__initials {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -0.01em;
  color: var(--sk-green-deep);
  opacity: 0.42;
}

.skrib-portrait--lg .skrib-portrait__initials {
  font-size: 72px;
}

/* ---------- Section heads ---------- */
.skrib-section {
  padding-top: 48px;
}

.skrib-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.skrib-section__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 28px;
  color: var(--sk-ink);
}

/* pages.css resets `.page-home main h2` font-size to 20px and margin to
   `0 !important` — out-specify (and, for margin, out-important) it here. */
body.page-home main h2.skrib-section__title {
  margin: 0 !important;
  font-size: 28px;
}

.skrib-section__count {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--sk-graphite);
}

/* ---------- Writer grid + card (list page, "Andra skribenter") ---------- */
.skrib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
}

.skrib-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--sk-paper);
  border: 1px solid var(--sk-border-grid);
  border-radius: var(--sk-radius);
}

.skrib-card .skrib-portrait {
  border-radius: 0;
}

.skrib-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.skrib-card__name {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.18;
  color: var(--sk-ink);
  transition: color var(--hr-dur-title, 0.16s) var(--sk-ease);
}

.skrib-card__role {
  margin: 0;
  min-height: 48px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--sk-graphite);
}

.skrib-card__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 22px;
  margin-top: auto;
  padding-top: 18px;
}

.skrib-card__arrow {
  display: flex;
  color: var(--sk-ink);
  transition: color var(--hr-dur-title, 0.16s) var(--sk-ease);
}

.skrib-card:hover .skrib-card__name,
.skrib-card:hover .skrib-card__arrow,
.skrib-card:focus-visible .skrib-card__name,
.skrib-card:focus-visible .skrib-card__arrow {
  color: var(--sk-green-brand);
}

/* "Andra skribenter": always exactly one row — 4 → 2 → 1, never wraps. */
.skrib-others-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 1000px) {
  .skrib-others-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skrib-others-grid > *:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 560px) {
  .skrib-others-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .skrib-others-grid > *:nth-child(n + 2) {
    display: none;
  }
}

/* ---------- "Vill du skriva för HRnytt?" CTA (list page) ---------- */
.skrib-cta {
  padding: 34px 0 72px;
  margin-top: 64px;
  border-top: 1px solid var(--sk-rule);
}

.skrib-cta__title {
  margin: 0 0 20px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 28px;
  color: var(--sk-ink);
}

/* Same override as .skrib-section__title — see comment there. */
body.page-home main h2.skrib-cta__title {
  margin: 0 0 20px !important;
  font-size: 28px;
}

/* Same size/line-height as an article's body paragraph (--article-body-font-size, pages.css). */
.skrib-cta__text {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--sk-ink);
}

/* ---------- Pagination (same look as the category list pages, pages.css) ---------- */
.skrib-detail .pagination {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.skrib-detail .pagination a,
.skrib-detail .pagination .disabled,
.skrib-detail .pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  text-decoration: none;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
}

.skrib-detail .pagination a:hover {
  border-color: transparent;
  background: rgba(94, 175, 107, 0.1);
  color: #1a502c;
}

.skrib-detail .pagination .current {
  background: #5eaf6b1f;
  border-color: transparent;
  color: #1a502c;
  font-weight: 600;
}

.skrib-detail .pagination .disabled {
  opacity: 0.55;
}

@media (max-width: 600px) {
  .skrib-detail .pagination .pagination__first,
  .skrib-detail .pagination .pagination__last {
    display: none;
  }
}

/* ---------- Profile: quote / intro / experience / other sections ---------- */
.skrib-section--rule {
  padding-top: 34px;
  padding-bottom: 72px;
  margin-top: 64px;
  border-top: 1px solid var(--sk-rule);
}

/* Quote, presentation, erfarenhet, utbildning. No sidebar on this page (unlike an
   article), so this runs the full column width like every other section instead
   of being capped to article reading-width with empty space beside it. */
.skrib-read {
  max-width: none;
}

.skrib-read p {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--sk-ink);
}

/* Same box as article quotes: pages.css, .post-detail-2026 .main article p:has(> em:first-child). */
.skrib-quote {
  overflow: hidden;
  margin: 0 0 40px;
  padding: var(--space-6) var(--space-6) var(--space-5);
  border-radius: 16px;
  background: #FBEEE3;
}

.skrib-quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: #C05A2A;
  margin: 0 0 -6px;
}

.skrib-quote .skrib-quote__text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
  color: #15201A;
}

.skrib-quote .skrib-quote__kicker {
  margin: var(--space-3) 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
}

@media (max-width: 768px) {
  .skrib-quote {
    padding: var(--space-5) var(--space-5) var(--space-4);
  }

  .skrib-quote::before {
    font-size: 38px;
  }
}

@media (max-width: 480px) {
  .skrib-quote {
    padding: var(--space-4) var(--space-4) var(--space-3);
  }

  .skrib-quote::before {
    font-size: 32px;
  }
}

.skrib-read-block {
  margin-top: 40px;
}

.skrib-block-title {
  margin: 0 0 18px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 28px;
  color: var(--sk-ink);
}

/* Same override as .skrib-section__title — see the comment there. */
body.page-home main h2.skrib-block-title {
  margin: 0 0 18px !important;
  font-size: 28px;
}

.skrib-experience-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skrib-experience-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.skrib-experience-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--sk-green-brand);
  transform: translateY(-3px);
}

.skrib-experience-list li span {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--sk-ink);
}

/* {Förnamn}s urval — handplockade artiklar, text only, no image. */
.skrib-read__lead {
  margin: 0 0 28px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--sk-ink);
}

/* Fixed 3-up (not auto-fill): with exactly 3 featured posts, auto-fill would
   size tracks for a 4th column that never arrives, leaving the row short of
   the full column width. Same breakpoints as .all-content__grid below it. */
.skrib-textcard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 1200px) {
  .skrib-textcard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .skrib-textcard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.skrib-textcard {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  color: inherit;
  text-decoration: none;
  background: var(--sk-paper);
  border: 1px solid var(--sk-border-grid);
  border-radius: var(--sk-radius);
}

.skrib-textcard__title {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.18;
  color: var(--sk-ink);
  transition: color var(--hr-dur-title, 0.16s) var(--sk-ease);
}

.skrib-textcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.skrib-textcard__meta {
  font-family: var(--font-body);
  font-size: 12.5px;
  text-align: left;
  color: var(--sk-graphite);
}

.skrib-textcard__arrow {
  display: flex;
  flex: none;
  color: var(--sk-ink);
  transition: color var(--hr-dur-title, 0.16s) var(--sk-ease);
}

.skrib-textcard:hover .skrib-textcard__title,
.skrib-textcard:hover .skrib-textcard__arrow,
.skrib-textcard:focus-visible .skrib-textcard__title,
.skrib-textcard:focus-visible .skrib-textcard__arrow {
  color: var(--sk-green-brand);
}
