/* ========================================================================
   Stordalssaga AS – prototype styles
   Monokrom palett (sort/grå/hvit) + byggfotografi, Figtree til overskrifter
   ======================================================================== */

:root {
  --black: #000;
  --ink: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --light: #f5f5f5;
  --white: #fff;

  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(17, 24, 39, .08);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, .14);

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --header-h: 128px;
}

/* -------------------- Base -------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font); line-height: 1.12; margin: 0 0 .4em; font-weight: 500; }
h1 { letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 860px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--black); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 4px; }

/* -------------------- Icons (flat, monochrome) -------------------- */
.icon {
  display: inline-block; vertical-align: middle; flex: 0 0 auto;
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.feature-icon .icon { width: 28px; height: 28px; }
.exp-icon .icon { width: 26px; height: 26px; }
.ci-icon .icon { width: 22px; height: 22px; }
.project-facts .icon { width: 16px; height: 16px; stroke: var(--black); stroke-width: 2.2; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: 14px 26px; border-radius: var(--radius-sm); font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.btn-dark { background: var(--black); color: #fff; }
.btn.btn-dark:hover { background: var(--gray-800); box-shadow: var(--shadow); }
.btn.btn-light { background: #fff; color: var(--ink); }
.btn.btn-light:hover { box-shadow: var(--shadow); }
.btn.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.5); backdrop-filter: blur(4px); }
.btn.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }

/* -------------------- Header -------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  transition: background .25s ease, box-shadow .25s ease, height .25s ease;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* Fjern block-gap-margin på nav-blokken så menyen + Kontakt-knappen sentreres vertikalt i headeren */
.site-header .main-nav { margin-block: 0; }
.logo img { height: 70px; width: auto; transition: height .25s ease; }

/* Navigation block (core/navigation) styled to match the custom design */
.main-nav { font-weight: 500; }
.main-nav .wp-block-navigation__container { gap: 30px; align-items: center; flex-wrap: nowrap; }
.main-nav .wp-block-navigation-item__content { color: #fff; font-weight: 500; transition: opacity .2s ease; }
.main-nav .wp-block-navigation-item__content:hover { opacity: .75; }
.main-nav .wp-block-navigation__submenu-icon { margin-left: 2px; }

/* Tjenester-undermeny = mørk, avrundet panel */
.main-nav .wp-block-navigation__submenu-container {
  background: rgba(10,10,10,.98); border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0,0,0,.35); padding: 10px; min-width: 210px; gap: 2px; margin-top: 12px;
}
/* Usynlig "bro" over gapet så dropdownen ikke lukker seg når musen krysser luften */
.main-nav .wp-block-navigation__submenu-container::before {
  content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
}
.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 11px 14px; border-radius: 8px; color: #fff; }
.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: rgba(255,255,255,.1); opacity: 1; }

/* Kontakt-knapp (CTA) */
.main-nav .nav-cta .wp-block-navigation-item__content {
  background: #f5f5f5; color: var(--ink); padding: 11px 20px; border-radius: var(--radius-sm); font-weight: 600;
}
.main-nav .nav-cta .wp-block-navigation-item__content:hover { background: #fff; opacity: 1; }

/* Solid header etter scroll */
.site-header.scrolled { background: rgba(10,10,10,.96); box-shadow: 0 4px 20px rgba(0,0,0,.25); height: 110px; backdrop-filter: blur(6px); }
.site-header.scrolled .logo img { height: 56px; }
.site-header.scrolled .main-nav .wp-block-navigation__container { gap: 24px; }
.site-header.scrolled .main-nav .nav-cta .wp-block-navigation-item__content { padding: 8px 16px; font-size: .9rem; }

/* Mobil hamburger + overlay (core navigation) */
.main-nav .wp-block-navigation__responsive-container-open,
.main-nav .wp-block-navigation__responsive-container-close { color: #fff; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open { background: rgba(10,10,10,.985); }
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { background: transparent; border: 0; box-shadow: none; padding: 0 0 0 14px; min-width: 0; margin-top: 0; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open .nav-cta .wp-block-navigation-item__content { display: inline-block; background: #f5f5f5; color: var(--ink); }

/* Fargesikring – slår core/navigation sine standardfarger (hvite topp-lenker, mørk dropdown) */
.site-header .main-nav .wp-block-navigation-item__content { color: #fff; }
.site-header .main-nav .nav-cta .wp-block-navigation-item__content { color: var(--ink); }
.site-header .main-nav.wp-block-navigation .wp-block-navigation__submenu-container { background-color: rgba(10,10,10,.98); }
.site-header .main-nav.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: #fff; }

/* -------------------- Hero -------------------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  background: #2b2b2b url("https://imagedelivery.net/xaKlCos5cTg_1RWzIu_h-A/7397b188-b976-471e-0a3f-775fd4653400/public") center/cover no-repeat;
  color: #fff;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.72) 100%);
}
.hero-content { position: relative; max-width: 820px; margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  padding: 8px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600; margin: 0 0 22px;
  backdrop-filter: blur(4px);
}
.hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); margin-bottom: .35em; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: rgba(255,255,255,.9); max-width: 640px; margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 30px 0 40px; justify-content: center; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 28px 40px; font-weight: 500; justify-content: center; }
.hero-trust li { display: flex; align-items: center; gap: 12px; }
.trust-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.14); font-size: .9rem;
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: rgba(255,255,255,.8); font-size: .8rem; font-weight: 500;
}
.scroll-hint span { font-size: 1.2rem; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* -------------------- Sections -------------------- */
.section { padding: clamp(60px, 9vw, 110px) 0; position: relative; }
.section-light { background: var(--light); }
/* subtle warm glow accent like reference */
.section::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255, 214, 191, .22), transparent 70%);
}
.section-light::before { background: radial-gradient(60% 100% at 50% 0%, rgba(255, 214, 191, .35), transparent 70%); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); position: relative; }
.badge {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--white); border: 1px solid var(--gray-200);
  padding: 8px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600; margin: 0 0 18px;
  box-shadow: 0 2px 8px rgba(17,24,39,.05);
}
.section-light .badge { background: #fff; }
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
#om-oss .section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }

/* Keep these headings on a single line from tablet width and up */
@media (min-width: 760px) {
  .hero h1, #om-oss .section-head h2 { white-space: nowrap; }
}
.section-lead { color: var(--gray-600); font-size: 1.08rem; }

.section-cta { text-align: center; margin-top: clamp(40px, 5vw, 60px); position: relative; }
.section-cta p { color: var(--gray-600); margin-bottom: 24px; line-height: 1.5; }
.section-cta .btn, .section-cta .wp-block-button__link { margin-top: 0; }

/* -------------------- Grids -------------------- */
.grid { display: grid; gap: 26px; position: relative; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* -------------------- Service cards -------------------- */
.service-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.service-media { position: relative; aspect-ratio: 3/2; overflow: hidden; }
.service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.05) 55%); }
.service-media h3 { position: absolute; left: 20px; bottom: 16px; color: #fff; font-size: 1.35rem; z-index: 1; margin: 0; }
.service-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.service-body > p { color: var(--gray-600); }

.check-list { margin: 4px 0 20px; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.check-list li::before {
  content: "\2713"; flex: 0 0 auto;
  width: 20px; height: 20px; border-radius: 999px; background: var(--black); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .7rem;
}
.service-body .btn { margin-top: auto; }

/* -------------------- Feature cards -------------------- */
.feature-grid { gap: 24px; }
.feature-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 30px; transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 12px; background: var(--black); color: #fff; font-size: 1.5rem; margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.2rem; }
.feature-card p { color: var(--gray-600); margin: 0; font-size: .98rem; }

/* -------------------- Stats -------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin: clamp(48px, 6vw, 72px) 0 0; padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--gray-200);
  text-align: center; position: relative;
}
.stat dt { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.02em; }
.stat dd { margin: 0; color: var(--gray-600); }

/* -------------------- Project cards -------------------- */
.project-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.project-media { aspect-ratio: 4/3; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover .project-media img { transform: scale(1.05); }
.project-body { padding: 22px; }
.project-meta { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.tag { background: var(--black); color: #fff; font-size: .72rem; font-weight: 600; padding: 5px 12px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.year { color: var(--gray-500); font-size: .85rem; }
.project-body h3 { font-size: 1.2rem; }
.project-body > p { color: var(--gray-600); font-size: .96rem; }
.project-facts { display: flex; gap: 18px; color: var(--gray-500); font-size: .85rem; margin-top: 14px; }
.project-facts li { display: flex; align-items: center; gap: 6px; }

/* -------------------- Reviews -------------------- */
.review-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px; margin: 0; display: flex; flex-direction: column; }
.section-light .review-card { background: var(--gray-50); }
.stars { color: var(--black); letter-spacing: 2px; margin-bottom: 14px; }
.review-card blockquote { margin: 0 0 22px; font-style: italic; color: var(--gray-700); flex: 1; }
.review-card figcaption { display: flex; align-items: center; gap: 14px; }
.avatar { width: 46px; height: 46px; border-radius: 8px; background: var(--black); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.review-card figcaption span:last-child { display: flex; flex-direction: column; }
.review-card figcaption small { color: var(--gray-500); }

/* -------------------- Expertise -------------------- */
.expertise-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.expertise-card h3 { display: flex; align-items: center; gap: 14px; font-size: 1.5rem; margin-bottom: 22px; }
.exp-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 10px; background: var(--black); color: #fff; font-size: 1.3rem; }
.arrow-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.arrow-list li { display: flex; align-items: center; gap: 10px; color: var(--gray-700); }
.arrow-list li::before { content: "\203A"; color: var(--gray-500); font-weight: 700; font-size: 1.1rem; }

/* -------------------- FAQ -------------------- */
.faq-list { display: grid; gap: 14px; position: relative; }
.faq-item { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 24px; font-weight: 600; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "\25BE"; color: var(--gray-500); transition: transform .25s ease; flex: 0 0 auto; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 22px; color: var(--gray-600); }
.faq-answer p { margin: 0; }

/* -------------------- Contact -------------------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; position: relative; }
.contact-form-wrap { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.contact-form-wrap h3 { font-size: 1.4rem; margin-bottom: 22px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; }
.field label, .checkbox span { font-size: .92rem; font-weight: 500; }
.req { color: #b91c1c; }
.field input, .field textarea {
  font: inherit; padding: 13px 15px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: var(--gray-50); color: var(--ink); resize: vertical;
}
.field input:focus, .field textarea:focus { background: #fff; border-color: var(--gray-500); outline: none; box-shadow: 0 0 0 3px rgba(17,24,39,.08); }
.field input.invalid, .field textarea.invalid { border-color: #b91c1c; background: #fef2f2; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 22px; }
.checkbox input { margin-top: 4px; }
.checkbox a { text-decoration: underline; }
.form-status { margin: 14px 0 0; font-size: .92rem; min-height: 1.2em; }
.form-status.ok { color: #15803d; }
.form-status.err { color: #b91c1c; }

/* Fluent Forms – match Stordalssaga-design (kontaktskjema, form id 1) */
.contact-form-wrap .fluentform { --fluentform-primary: var(--black); --fluentform-primary-hover: var(--gray-800); }
.contact-form-wrap .fluentform .ff-el-group { margin-bottom: 18px; }
.contact-form-wrap .fluentform .ff-el-input--label label { font-size: .92rem; font-weight: 500; color: var(--ink); padding-bottom: 7px; }
.contact-form-wrap .fluentform input.ff-el-form-control,
.contact-form-wrap .fluentform textarea.ff-el-form-control {
  font: inherit; padding: 13px 15px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--gray-50); color: var(--ink); box-shadow: none; height: auto; line-height: 1.5;
}
.contact-form-wrap .fluentform textarea.ff-el-form-control { resize: vertical; min-height: 130px; }
.contact-form-wrap .fluentform input.ff-el-form-control:focus,
.contact-form-wrap .fluentform textarea.ff-el-form-control:focus {
  background: #fff; border-color: var(--gray-500); outline: none; box-shadow: 0 0 0 3px rgba(17,24,39,.08);
}
.contact-form-wrap .fluentform .ff-el-form-check-label,
.contact-form-wrap .fluentform .ff_t_c label,
.contact-form-wrap .fluentform .ff-el-form-check label { font-size: .9rem; font-weight: 500; color: var(--gray-700); }
.contact-form-wrap .fluentform .ff-btn-submit,
.contact-form-wrap .fluentform button[type="submit"] {
  background-color: var(--black) !important; color: #fff !important; border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 14px 26px; font-weight: 600; font-size: .98rem;
  width: 100%; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.contact-form-wrap .fluentform .ff-btn-submit:hover,
.contact-form-wrap .fluentform button[type="submit"]:hover { background-color: var(--gray-800) !important; transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-form-wrap .fluentform .ff-message-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 14px 16px; border-radius: var(--radius-sm); }

.contact-info {
  border-radius: var(--radius); padding: 38px; color: #fff; position: relative; overflow: hidden;
  background: #111 url("https://imagedelivery.net/xaKlCos5cTg_1RWzIu_h-A/72f03c0c-c3cb-461c-365a-5cefde88f900/public") center/cover;
}
.contact-info::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,14,.92), rgba(8,10,14,.97)); }
.contact-info > * { position: relative; }
.contact-info h3 { font-size: 1.6rem; margin-bottom: 26px; }
.contact-list { display: grid; gap: 24px; }
.contact-list li { display: flex; gap: 16px; }
.contact-list strong { display: block; margin-bottom: 4px; }
.contact-list address, .contact-list p { font-style: normal; margin: 0; color: rgba(255,255,255,.78); }
.contact-list a { color: rgba(255,255,255,.78); }
.contact-list a:hover { color: #fff; }
.ci-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.contact-note { margin: 30px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.7); font-size: .9rem; }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--black); color: #fff; padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.footer-brand img { height: 100px; width: auto; max-width: 100%; margin-bottom: 22px; }
.footer-brand p { color: rgba(255,255,255,.6); max-width: 320px; }
.socials { display: flex; gap: 12px; margin-top: 18px; }
.social { width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .2s ease; }
.social:hover { background: rgba(255,255,255,.22); }
.social .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.footer-contact .icon { width: 18px; height: 18px; stroke: #fff; margin-top: 2px; }
.footer-col h2 { font-size: 1.05rem; margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 12px; }
.footer-col a, .footer-contact li { color: rgba(255,255,255,.6); transition: color .2s ease; }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact address { font-style: normal; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom p { margin: 0; color: rgba(255,255,255,.5); font-size: .9rem; }
.footer-bottom .credit { color: rgba(255,255,255,.8); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom .credit:hover { color: #fff; }
.footer-bottom ul { display: flex; gap: 24px; }
.footer-bottom a { color: rgba(255,255,255,.5); font-size: .9rem; }
.footer-bottom a:hover { color: #fff; }
/* Footer-menyer (core/navigation) */
.footer-col .wp-block-navigation .wp-block-navigation__container { gap: 12px; }
.footer-col .wp-block-navigation .wp-block-navigation-item__content { color: rgba(255,255,255,.6); transition: color .2s ease; }
.footer-col .wp-block-navigation .wp-block-navigation-item__content:hover { color: #fff; }
.footer-bottom .wp-block-navigation { flex-grow: 0; }
.footer-bottom .wp-block-navigation .wp-block-navigation__container { gap: 24px; }
.footer-bottom .wp-block-navigation .wp-block-navigation-item__content { color: rgba(255,255,255,.5); font-size: .9rem; transition: color .2s ease; }
.footer-bottom .wp-block-navigation .wp-block-navigation-item__content:hover { color: #fff; }

/* -------------------- Inner pages -------------------- */
.page-hero {
  position: relative; color: #fff; padding: calc(var(--header-h) + 56px) 0 64px;
  background: #2b2b2b center/cover no-repeat;
}
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.78) 100%); }
.page-hero > .container { position: relative; z-index: 1; max-width: 860px; margin-inline: auto; text-align: center; }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: 14px 0 .35em; }
.page-hero .page-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.9); max-width: 680px; margin-inline: auto; }
.page-hero .hero-actions { margin-top: 30px; }

.breadcrumb { font-size: .88rem; color: rgba(255,255,255,.7); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; list-style: none; margin: 0; padding: 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: rgba(255,255,255,.45); }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb li:last-child, .breadcrumb [aria-current="page"] { color: #fff; }

/* Text + image split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; }
.split-body h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.split-body > p { color: var(--gray-600); }
.split + .split { margin-top: clamp(48px, 7vw, 88px); }

/* Readable prose width */
.prose { max-width: 760px; }
.prose p { color: var(--gray-600); }
.prose h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }

/* Generic content cards row reusing feature look */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* CTA band */
.cta-band { position: relative; background-color: #000; background-size: cover; background-position: center; background-repeat: no-repeat; color: #fff; text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; height: 100%; background: rgba(0,0,0,.72); z-index: 0; }
.cta-band .container { position: relative; z-index: 1; max-width: 720px; }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: #fff; }
.cta-band p { color: rgba(255,255,255,.75); font-size: 1.08rem; margin-bottom: 26px; }
.cta-band .hero-actions { justify-content: center; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }

/* Map embed (kontakt) */
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.map-embed iframe { display: block; width: 100%; height: 440px; border: 0; }

/* Visually hidden (kept for screen readers / heading structure) */
.visually-hidden-head { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Gallery – one row of images (tjenestesider) */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow); transition: transform .25s ease; }
.gallery img:hover { transform: scale(1.03); }

/* Team cards (om oss) */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.team-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px; display: flex; gap: 18px; align-items: flex-start; }
.team-card .avatar { width: 56px; height: 56px; border-radius: 12px; font-size: 1.1rem; }
.team-card h3 { font-size: 1.2rem; margin-bottom: 2px; }
.team-card .role { color: var(--gray-500); font-size: .9rem; margin: 0 0 8px; }
.team-card p { color: var(--gray-600); margin: 0; font-size: .96rem; }

/* -------------------- Responsive -------------------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* Mobilmeny håndteres nå av core/navigation (overlay), styles ligger lenger oppe. */

@media (max-width: 760px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .contact-grid { grid-template-columns: 1fr; }
  .arrow-list { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
  .hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.75)); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .split, .team-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* ========================================================================
   WordPress block compatibility (M4) – editable Hero (core/cover)
   ======================================================================== */
.wp-block-cover.hero-cover { min-height: 92vh; padding-top: calc(var(--header-h) + 40px); padding-bottom: 80px; text-align: center; color: #fff; }
.wp-block-cover.hero-cover .wp-block-cover__inner-container { width: 100%; max-width: 820px; margin-inline: auto; }
.hero-cover .eyebrow { margin-bottom: 22px; }
.hero-cover h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); margin-bottom: .35em; color: #fff; }
.hero-cover .hero-lead { margin-inline: auto; }
.hero-cover .wp-block-buttons,
.page-hero-cover .wp-block-buttons,
.cta-cover .wp-block-buttons { justify-content: center; gap: 16px; margin-top: 30px; }
.hero-cover .hero-trust { justify-content: center; margin-top: 34px; }
@media (min-width: 760px) { .hero-cover h1 { white-space: nowrap; } }

/* Map core buttons to our button look (hero + CTA band + subside-hero + cta-cover) */
.hero-cover .wp-block-button__link,
.cta-band .wp-block-button__link,
.page-hero-cover .wp-block-button__link,
.cta-cover .wp-block-button__link {
  border-radius: var(--radius-sm); padding: 14px 26px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; transition: transform .15s ease, background .2s ease;
}
.hero-cover .wp-block-button__link:hover,
.cta-band .wp-block-button__link:hover,
.page-hero-cover .wp-block-button__link:hover,
.cta-cover .wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.btn-light .wp-block-button__link { background: #fff; color: var(--ink); }
.wp-block-button.btn-dark .wp-block-button__link { background: var(--black); color: #fff; }
.wp-block-button.btn-ghost .wp-block-button__link { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.5); }
/* Konsistent firkantet radius på alle blokk-knapper (overstyrer core sin pille-default 9999px) */
.wp-block-button .wp-block-button__link { border-radius: var(--radius-sm); }

/* Editable Services (core blocks) */
.service-card.wp-block-group { display: flex; flex-direction: column; }
.service-card .service-media { position: relative; }
.service-media .wp-block-image { margin: 0; position: absolute; inset: 0; }
.service-media .wp-block-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.service-body .wp-block-buttons { margin-top: auto; }
.service-body .wp-block-button.btn-block, .service-body .wp-block-button.btn-block .wp-block-button__link { width: 100%; }
.service-body .wp-block-button__link { display: block; text-align: center; }
.service-body .wp-block-list.check-list { margin: 4px 0 20px; }
.service-body .wp-block-button.btn-block .wp-block-button__link { background: var(--black); color: #fff; }

/* Editable Projects (core blocks) */
.project-card.wp-block-group { padding: 0; }
.project-card .project-media { position: relative; }
.project-media .wp-block-image { margin: 0; height: 100%; }
.project-media .wp-block-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.project-body .wp-block-heading { margin-bottom: .35em; }
/* Lik høyde på prosjektkort uansett tekstlengde (fakta justeres til bunn) */
.project-grid { align-items: stretch; }
.project-card { height: 100%; display: flex; flex-direction: column; }
.project-card .project-media { flex-shrink: 0; }
.project-card .project-body { flex: 1 1 auto; display: flex; flex-direction: column; }
.project-card .project-facts { margin-top: auto; }

/* Editable feature cards (core blocks) keep spacing tidy */
.feature-card.wp-block-group > * { margin-block: 0; }
.feature-card.wp-block-group .feature-icon { margin-bottom: 18px; display: inline-flex; }
.feature-card.wp-block-group h3 { margin-bottom: .4em; }

/* Remove default block-gap between header / main / footer (no white strip at top) */
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
.wp-site-blocks > main, .wp-site-blocks > .wp-block-post-content { margin-top: 0; }

/* Slå av WPs globale block-gap (24px margin-block-start på hvert flytlayout-barn).
 * MERK: bare margin-block-start, IKKE margin-block-end – ellers nuller vi ut
 * tilsiktede bunnmarginer som .section-head { margin-bottom: clamp(...) }. */
:root :where(.is-layout-flow) > * { margin-block-start: 0; }
/* Gjenoppretter tilsiktet topmargin på .section-cta (broad-regelen over nullet
 * den, fordi `.section-cta` og `:root :where(...) > *` har lik spesifisitet
 * og broad-regelen kommer senere i kilden). */
:root :where(.is-layout-flow) > .section-cta { margin-block-start: clamp(40px, 5vw, 60px); }

/* Eksplisitte mellomrom i section-head (badge → h2 → lead) når block-gap er av. */
.section-head .badge { margin-bottom: 16px; }
.section-head h2,
.section-head .wp-block-heading { margin-bottom: 18px; }
.section-head .section-lead { margin-top: 0; }

/* Editable subpage hero (core/cover) */
.wp-block-cover.page-hero-cover { min-height: 0 !important; padding-top: calc(var(--header-h) + 56px); padding-bottom: 64px; text-align: center; color: #fff; }
.wp-block-cover.page-hero-cover .wp-block-cover__inner-container { width: 100%; max-width: 860px; margin-inline: auto; }
.page-hero-cover h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: 14px 0 .35em; color: #fff; }
.page-hero-cover .page-lead { margin-inline: auto; }
.page-hero-cover .hero-actions { justify-content: center; margin-top: 30px; }

/* ===== Batch 1: fully-editable homepage sections ===== */
/* Fagområde (core/list) */
.expertise-card .card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.expertise-card .card-head h3 { margin: 0; font-size: 1.5rem; }
.expertise-card .arrow-list { margin: 0; }

/* FAQ (core/details) */
.faq-item .faq-answer { padding: 0 24px 22px; margin: 0; color: var(--gray-600); }
.faq-item > .wp-block-details__summary, .faq-item summary { list-style: none; }

/* Referanser (editable) */
.review-card.wp-block-group { display: flex; flex-direction: column; }
.review-quote { font-style: italic; color: var(--gray-700); flex: 1; margin: 0 0 22px; }
.review-by { display: flex; align-items: center; gap: 14px; }
.review-meta { display: flex; flex-direction: column; gap: 0; }
.review-meta .review-name { margin: 0; }
.review-meta .review-role { margin: 0; color: var(--gray-500); font-size: .9rem; }

/* Statistikk (editable) */
.stats .stat.wp-block-group { text-align: center; }
.stat .stat-num { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.05; }
.stat .stat-label { margin: 4px 0 0; color: var(--gray-600); }

/* Editable gallery (core/image blocks) */
.gallery .wp-block-image { margin: 0; }
.gallery .wp-block-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); }
/* Editable split media (core/image) */
.split-media .wp-block-image { margin: 0; }
.split-media .wp-block-image img { width: 100%; border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; box-shadow: var(--shadow-lg); }
/* Editable CTA (core/cover) */
.wp-block-cover.cta-cover { padding: clamp(60px,9vw,110px) 24px; text-align: center; color: #fff; }
.wp-block-cover.cta-cover .wp-block-cover__inner-container { max-width: 720px; margin-inline: auto; }
.cta-cover h2 { font-size: clamp(1.8rem,4vw,2.6rem); color: #fff; }
.cta-cover p { color: rgba(255,255,255,.75); font-size: 1.08rem; margin-bottom: 26px; }
.cta-cover .hero-actions { justify-content: center; }

/* Lightbox (gallery images → stor visning) */
.gallery img { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 2000; display: none;
  align-items: center; justify-content: center;
  background: rgba(8, 8, 8, .92); padding: clamp(16px, 4vw, 48px);
  opacity: 0; transition: opacity .2s ease;
}
.lightbox-overlay.open { display: flex; opacity: 1; }
.lightbox-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; }
.lightbox-overlay img {
  max-width: 92vw; max-height: 88vh; width: auto; height: auto;
  object-fit: contain; border-radius: var(--radius-sm);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .55); cursor: default;
}
.lightbox-close {
  position: absolute; top: clamp(12px, 2vw, 22px); right: clamp(12px, 2vw, 26px);
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer; transition: background .15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .24); }
body.lightbox-open { overflow: hidden; }

/* Project modal (per-card gallery with prev/next nav). Powered by main.js. */
.project-card .project-images { display: none; }
.project-card .see-images { width: 100%; margin-top: 18px; }
.project-modal {
  position: fixed; inset: 0; z-index: 2100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(0, 0, 0, .94); backdrop-filter: blur(6px);
}
.project-modal.open { display: flex; }
.project-modal .pm-img {
  max-width: 92vw; max-height: 86vh; width: auto; height: auto;
  object-fit: contain; border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.project-modal .pm-close {
  position: absolute; top: 16px; right: 20px; background: transparent;
  color: #fff; border: 0; font-size: 36px; line-height: 1; cursor: pointer;
  padding: 4px 14px;
}
.project-modal .pm-close:hover { opacity: .8; }
.project-modal .pm-prev,
.project-modal .pm-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, .12); color: #fff; border: 0;
  font-size: 30px; width: 54px; height: 54px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.project-modal .pm-prev { left: 18px; }
.project-modal .pm-next { right: 18px; }
.project-modal .pm-prev:hover,
.project-modal .pm-next:hover { background: rgba(255, 255, 255, .24); }
.project-modal .pm-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .9rem; background: rgba(0, 0, 0, .5);
  padding: 6px 14px; border-radius: 999px;
}
@media (max-width: 640px) {
  .project-modal .pm-prev, .project-modal .pm-next { width: 44px; height: 44px; font-size: 26px; }
  .project-modal .pm-prev { left: 8px; }
  .project-modal .pm-next { right: 8px; }
}

/* Sentrer hero-/CTA-tekst direkte på elementene (så block-editor matcher frontend, ikke bare arvet text-align) */
.hero-cover .wp-block-cover__inner-container h1,
.hero-cover .wp-block-cover__inner-container p,
.page-hero-cover .wp-block-cover__inner-container h1,
.page-hero-cover .wp-block-cover__inner-container p,
.cta-cover .wp-block-cover__inner-container h2,
.cta-cover .wp-block-cover__inner-container p { text-align: center; }
