/*
 * Felles stil for alle sider. Lastes sist i <head>, etter sidens egen <style>,
 * slik at den vinner ved lik spesifisitet.
 *
 * Hver side hadde sin egen kopi av CSS-en, og kopiene hadde glidd fra hverandre:
 * forsiden brukte Jost 300 i overskriftene, undersidene systemfonten i 600, og
 * luften mellom seksjonene varierte fra 32 til 88 px. Her står det én gang.
 */

:root {
  --gap-hero-top: 24px;
  --gap-hero-bottom: 20px;
  --gap-section: 32px;
}
@media (max-width: 900px) {
  :root { --gap-hero-top: 20px; --gap-hero-bottom: 16px; --gap-section: 24px; }
}

/* ── Overskrifter: samme uttrykk som forsiden ───────────────────────── */
h1, .article-title, .sec-title, .project-title, .next-title, .sub-name,
.article-content h2, .article-content h3 {
  font-family: var(--font, 'Jost', sans-serif);
}
main h1:not(.hero-title), .page-hero h1, .contact-hero h1, .article-title, h1.project-title {
  font-family: var(--font, 'Jost', sans-serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: #111;
  font-size: 2.6rem;
  margin-bottom: 0.7rem;
}
main h1:not(.hero-title) strong, .page-hero h1 strong, .article-title strong { font-weight: 600; }
.article-title { max-width: 840px; }
.article-content h2 { font-weight: 400; font-size: 1.45rem; line-height: 1.25; margin: 1.5rem 0 0.625rem; }
.article-content h3 { font-weight: 500; font-size: 1.1rem; line-height: 1.3; margin: 1.25rem 0 0.5rem; }

@media (max-width: 900px) {
  main h1:not(.hero-title), .page-hero h1, .contact-hero h1, .article-title, h1.project-title { font-size: 2.1rem; }
}
@media (max-width: 600px) {
  main h1:not(.hero-title), .page-hero h1, .contact-hero h1, .article-title, h1.project-title { font-size: 1.75rem; }
}

/* ── Sidetopp: lik på alle undersider ───────────────────────────────── */
.page-hero, .article-header {
  padding: var(--gap-hero-top) 0 var(--gap-hero-bottom);
  text-align: left;
}
.breadcrumb { margin-bottom: 1rem; }
.ph-label, .article-cat { margin-bottom: 0.6rem; }
.ph-desc { max-width: 600px; }
.project-header { padding-top: var(--gap-hero-top); }
.project-summary { line-height: 1.6; margin-bottom: 16px; }
.pmeta { margin-top: 16px; }
.pmeta .pf { padding-top: 12px; padding-bottom: 12px; }
.pmeta .pf-l { margin-bottom: 6px; }
@media (max-width: 700px) {
  .pmeta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pmeta .pf { overflow-wrap: anywhere; }
}
.article-meta { column-gap: 20px; row-gap: 8px; }
@media (max-width: 600px) {
  .article-author { flex-basis: 100%; }
}

/* ── Seksjoner: kompakt og lik luft ─────────────────────────────────── */
.section { padding-top: var(--gap-section); padding-bottom: var(--gap-section); }
.article-layout {
  padding: var(--gap-section) 0 calc(var(--gap-section) + 8px);
  gap: 24px;
}

/* ── Bloggartikkel ──────────────────────────────────────────────────── */
/* Fallback image follows the approved filled project frame; click opens original. */
.article-cover {
  display: block; width: 256px; max-width: 100%; height: 256px;
  object-fit: cover; margin: 0 0 1rem; border-radius: 10px; cursor: zoom-in;
  background: #f1f1f1;
}
.article-content img { cursor: zoom-in; }
.article-content { line-height: 1.6; overflow-wrap: break-word; }
.article-content p { margin: 0 0 0.75rem; }
.article-content figure { margin: 1.25rem 0; }
.article-content p > img, .article-content > img { margin: 1.25rem auto; }
.article-content ul, .article-content ol { margin-bottom: 0.75rem; }
.article-content li { margin-bottom: 0.25rem; }

/* Ramiz valgte A 03.10.2026: én samlet lesespalte uten sidefelt.
   Samme container for tittel, bilde, tekst og relaterte artikler. */
.article-layout, .article-layout:not(:has(.article-sidebar :is(a, input, button))) { grid-template-columns: minmax(0, 1fr); }
.article-sidebar { display: none; }
.article-layout > div { min-width: 0; }
/* Ramiz chose the original project gallery: filled equal frames; full image on click. */
.gallery, .art-gallery .art-gal {
  display: flex; gap: 14px; align-items: start;
}
.gallery .g-item, .art-gallery .art-g { width: clamp(200px, 70vw, 256px); flex: 0 0 auto; }
.art-gallery .art-g-btn { width: 100%; }
.gallery .g-item img, .art-gallery .art-g-btn img {
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; background: #f1f1f1;
}
@media (max-width: 560px) {
  .gallery, .art-gallery .art-gal { gap: 8px; }
}
body:has(.article-header) .container { max-width: 1160px; }
.article-content { max-width: 760px; }
.article-share { margin-top: 1.5rem; padding-top: 1rem; }
.legal-table { max-width: 100%; }
@media (max-width: 600px) {
  .legal-table { display: block; overflow-x: auto; }
}

/* Tomme sidefelt-bokser («Recent posts», «Tags» uten innhold) skjules. */
.article-sidebar > div:not(:has(a, input, img, button)),
aside > .sb-widget:not(:has(a, input, img, button)) { display: none; }

/* ── Kontakt: venstrestilt som resten av sidene ─────────────────────── */
.contact-hero .ph-eyebrow { justify-content: flex-start; }
.contact-hero .ph-desc { margin-left: 0; margin-right: 0; text-align: left; }
.form-card { margin-left: 0; margin-right: auto; }

/* ── Bloggliste ─────────────────────────────────────────────────────── */
/* Kortbildet vises helt, uten å kutte toppen av motivet. */
.blog-card { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 24px 0; }
.blog-img { aspect-ratio: auto; width: 100%; height: auto; max-height: 280px; object-fit: contain; object-position: center top; }
@media (max-width: 900px) {
  .blog-card { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .blog-img { width: auto; max-width: 100%; max-height: 320px; margin-inline: auto; }
}
/* Kategorilinjen er støy når det bare finnes én kategori. */
.blog-list > nav:not(:has(a + a)) { display: none; }

/* ── Lysboks for bilder i artikler (samme uttrykk som prosjektsidene) ── */
.zoom-box { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; background: rgba(18,18,20,0.88); padding: 5vh 5vw; cursor: zoom-out; }
.zoom-box.open { display: flex; }
.zoom-box img { max-width: 90vw; max-height: 85vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 24px 70px rgba(0,0,0,0.55); }
.zoom-close { position: absolute; top: 1.3rem; right: 1.5rem; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; font-size: 1.15rem; cursor: pointer; }
.zoom-close:hover { background: rgba(255,255,255,0.25); }
body.zoom-open { overflow: hidden; }

/* Shared site shell, approved direction 03.10.2026.
   Same menu as the homepage, with more breathing room. No gallery overrides. */
:root { --site-width:1160px; --site-gutter:24px; --site-nav-gap:32px; }
body { --bg:#fafaf8; --border:#e4e4df; background:var(--bg); }
:is(body,body.home-modern) > nav {
  height:68px; padding:0 max(var(--site-gutter),calc((100vw - var(--site-width))/2));
  background:rgba(255,255,255,.97); border-bottom:1px solid #e4e4df;
  display:flex; align-items:center; gap:0;
}
:is(body,body.home-modern) > nav .nav-logo { flex-shrink:0; }
:is(body,body.home-modern) > nav .nav-logo .logo-full { display:block; height:30px; width:auto; }
:is(body,body.home-modern) > nav .nav-logo .logo-mark { display:none; height:30px; width:auto; }
:is(body,body.home-modern) > nav .nav-links {
  display:flex; align-items:center; justify-content:center; flex:1;
  gap:var(--site-nav-gap); margin:0 28px; list-style:none;
}
:is(body,body.home-modern) > nav .nav-links a {
  display:inline-flex; align-items:center; min-height:44px;
  font-family:var(--font,'Jost',sans-serif); font-size:14px; font-weight:500;
  text-transform:none; letter-spacing:0; color:#40433f; white-space:nowrap;
}
:is(body,body.home-modern) > nav .nav-links a:hover,
:is(body,body.home-modern) > nav .nav-links a.active { color:#111; }
:is(body,body.home-modern) > nav .nav-links a[href$='/contact'] {
  padding:10px 17px; border-radius:6px; background:#171a18; color:#fff;
}
:is(body,body.home-modern) > nav .nav-links a[href$='/contact']:hover { background:#30362f; }
:is(body,body.home-modern) > nav .nav-links a[href$='/contact']::after { display:none; }
:is(body,body.home-modern) > nav .nav-toggle { display:none; min-width:44px; min-height:44px; align-items:center; justify-content:center; }
:is(body,body.home-modern) .container { max-width:var(--site-width); padding-inline:var(--site-gutter); }
:is(body,body.home-modern) .section { padding-block:32px; }
:is(body,body.home-modern) .sec-label { font-size:11px; letter-spacing:.08em; margin-bottom:5px; }
:is(body,body.home-modern) .sec-title { font-size:30px; line-height:1.2; letter-spacing:-.025em; margin-bottom:20px; }
.contact-hero { padding-block:var(--gap-hero-top) var(--gap-hero-bottom); text-align:left; }
:is(body,body.home-modern) > footer { padding:24px 0 18px; background:#fff; }
:is(body,body.home-modern) .footer-bar { gap:20px; }
:is(body,body.home-modern) .footer-logo img { max-width:200px; max-height:30px; height:auto; width:auto; }
:is(body,body.home-modern) .footer-icons { gap:14px; }
:is(body,body.home-modern) .footer-meta { margin-top:12px; letter-spacing:.06em; }
body > nav a:focus-visible, body > nav button:focus-visible { outline:2px solid #506246; outline-offset:4px; }
main h1:not(.hero-title), .page-hero h1, .contact-hero h1, .article-title, h1.project-title { font-weight:400; }
h1.project-title { max-width:840px; }
:is(body,body.home-modern) .drawer-links a { font-size:17px; font-weight:500; text-transform:none; letter-spacing:0; }
:is(body,body.home-modern) .drawer-cta { border-radius:6px; text-transform:none; letter-spacing:0; font-size:14px; }
:is(body,body.home-modern) main .btn-dark, :is(body,body.home-modern) main .btn-ghost {
  border-radius:6px; padding:11px 19px; font-size:14px; font-weight:500;
  letter-spacing:0; text-transform:none;
}
@media(max-width:1100px) {
  :is(body,body.home-modern) > nav .nav-links { display:none; }
  :is(body,body.home-modern) > nav .nav-right { margin-left:auto; }
  :is(body,body.home-modern) > nav .nav-toggle { display:flex; }
}
@media(max-width:600px) {
  :root { --site-gutter:20px; }
  :is(body,body.home-modern) > nav { height:60px; }
  :is(body,body.home-modern) > nav .nav-logo .logo-full { display:none; }
  :is(body,body.home-modern) > nav .nav-logo .logo-mark { display:block; }
  :is(body,body.home-modern) .section { padding-block:24px; }
  :is(body,body.home-modern) .sec-title { font-size:27px; }
}
