/**
 * Modenhetstest landing — editorial layout, quiz focus, brand nav.
 */

/* —— Page shell: full width + hero under header —— */
body:has(.hg-modenhetstest-landing) {
  background-color: var(--primary-dark, #092724);
}

body:has(.hg-modenhetstest-landing) .theme-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky, 1020);
  width: 100%;
  max-width: none;
  background: transparent;
  border-bottom: none;
}

body:has(.hg-modenhetstest-landing) .theme-header .header {
  background-color: color-mix(
    in srgb,
    var(--primary-dark, #092724) 72%,
    transparent
  ) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: color-mix(
    in srgb,
    var(--text-white, #fffdf7) 12%,
    transparent
  ) !important;
}

body:has(.hg-modenhetstest-landing) .theme-header .header.scrolled {
  background-color: color-mix(
    in srgb,
    var(--primary-dark, #092724) 94%,
    transparent
  ) !important;
  box-shadow: 0 10px 28px rgba(9, 39, 36, 0.22);
}

body:has(.hg-modenhetstest-landing) .theme-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
  background-color: var(--background-cream, #f0eadc);
}

body:has(.hg-modenhetstest-landing) .hg-modenhetstest-landing,
body:has(.hg-modenhetstest-landing) .hg-modenhetstest-landing .container-fluid,
body:has(.hg-modenhetstest-landing) .hg-modenhetstest-landing .row-fluid-wrapper,
body:has(.hg-modenhetstest-landing) .hg-modenhetstest-landing .row-fluid,
body:has(.hg-modenhetstest-landing) .hg-modenhetstest-landing .dnd-area,
body:has(.hg-modenhetstest-landing) .hg-modenhetstest-landing .dnd-section {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Dark heroes edge-to-edge (fixes cream/white gutters on sides) */
.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhets-hero-slot]) {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-block: 0 !important;
  padding-inline: 0 !important;
  overflow: hidden;
  border: none !important;
}

.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhets-hero-slot]) .dnd-row,
.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhets-hero-slot]) .dnd-column,
.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhets-hero-slot]) .dnd-module,
.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhets-hero-slot]) .widget-type-cell {
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhets-hero-slot]) [data-hg-modenhets-hero-slot] {
  width: 100%;
  min-height: clamp(20rem, 38vh, 30rem);
}

#modenhetstest,
#om-testen,
#veiledning,
#betyr,
#ikke,
#hvorfor,
#retning,
#strategi,
#salg,
#kanaler,
#maling,
#feil,
#oss,
#faq-modenhet,
#klar {
  scroll-margin-top: calc(var(--header-height, 64px) + 5rem);
}

/* —— Rhythm: less generic module padding on this page —— */
.hg-modenhetstest-landing .dnd-section {
  padding-block: clamp(2.5rem, 5vw, 4rem) !important;
}

.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhetstest-slot]) {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) !important;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--background-cream, #f0eadc) 92%, #fffdf7) 0%,
    var(--background-cream, #f0eadc) 100%
  ) !important;
}

.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhetstest-slot]) .dnd-row,
.hg-modenhetstest-landing .dnd-section:has([data-hg-modenhetstest-slot]) .dnd-module {
  min-height: 0 !important;
}

/* Quiz module: single card (avoid double box) */
.hg-modenhetstest-landing [data-hg-modenhetstest-slot] {
  position: relative;
  max-width: 44rem;
  margin-inline: auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.hg-modenhetstest-landing [data-hg-modenhetstest-slot] .card {
  border: 1px solid color-mix(in srgb, var(--primary-color, #102c2a) 12%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent-color, #c4ff61) 35%, transparent),
    0 24px 56px rgba(16, 44, 42, 0.1);
}

.hg-modenhetstest-landing [data-hg-modenhetstest-slot] .progressFill {
  background: var(--accent-color, #c4ff61) !important;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent-color, #c4ff61) 45%, transparent) !important;
}

.hg-modenhetstest-landing [data-hg-modenhetstest-slot] input[type='radio'] {
  accent-color: var(--primary-color, #102c2a) !important;
}

.hg-modenhetstest-landing [data-hg-modenhetstest-slot] .btnPrimary {
  background: var(--accent-color, #c4ff61) !important;
  color: var(--text-dark, #102c2a) !important;
}

.hg-mt-quiz-stage-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  max-width: 44rem;
  margin: 0 auto 1rem;
  text-align: center;
  font-family: var(--font-family-base, 'Manrope', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark, #102c2a);
}

/* Sticky page nav — on-brand (override module default blue hover) */
.hg-modenhetstest-landing .anchorLinks {
  --anchor-accent: var(--accent-color, #c4ff61);
  position: sticky;
  top: calc(var(--header-height, 64px) + 0.35rem);
  z-index: 40;
  margin: 0 auto 0.75rem;
  max-width: 72rem;
  padding: 0.65rem clamp(0.75rem, 2vw, 1.25rem);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary-color, #102c2a) 12%, transparent);
  background: color-mix(in srgb, #fbf8ef 92%, #fffdf7);
  box-shadow: 0 10px 32px rgba(16, 44, 42, 0.1);
}

.hg-modenhetstest-landing .navTitle {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light, #2a6d6d);
  margin: 0 0 0.5rem;
  padding: 0;
  border: none;
}

.hg-modenhetstest-landing .layoutHorizontal .linksList {
  gap: 0.35rem 0.5rem;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
}

.hg-modenhetstest-landing .anchorLink {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-body, #284542);
  background: transparent;
}

.hg-modenhetstest-landing .anchorLink:hover,
.hg-modenhetstest-landing .anchorLink:focus-visible {
  color: var(--text-dark, #102c2a) !important;
  background: color-mix(in srgb, var(--accent-color, #c4ff61) 48%, transparent) !important;
}

/* Tighten gap between top hero and quiz (not bottom CTA hero) */
.hg-modenhetstest-landing .dnd-area:first-of-type .dnd-section:has([data-hg-modenhets-hero-slot]),
.hg-modenhetstest-landing .dnd-section:has([data-hg-maturity-hero-personalized]) {
  margin-bottom: 0 !important;
}

.hg-modenhetstest-landing .dnd-area-label-mt_nav + .dnd-section,
.hg-modenhetstest-landing .dnd-section:has(.anchorLinks) {
  padding-block: 0.5rem 0.75rem !important;
}

/* Guide bridge between quiz and long read */
.hg-mt-guide-bridge {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  padding-bottom: 0.5rem;
}

.hg-mt-guide-bridge h2 {
  font-family: var(--font-family-heading, 'Fraunces', Georgia, serif);
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-dark, #102c2a);
  margin: 0.35rem 0 0.75rem;
}

.hg-mt-guide-bridge p:last-child {
  margin: 0;
  color: var(--text-body, #284542);
  line-height: 1.6;
}

.hg-mt-guide-bridge a {
  color: var(--primary-light, #2a6d6d);
  font-weight: 700;
}

/* Eyebrow + prose */
.hg-mt-eyebrow {
  display: block;
  margin: 0 0 0.65rem;
  font-family: var(--font-family-base, 'Manrope', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-light, #2a6d6d);
}

.hg-modenhetstest-prose {
  max-width: 40rem;
  margin-inline: auto;
  line-height: 1.68;
  color: var(--text-body, #284542);
}

.hg-modenhetstest-prose h2 {
  font-family: var(--font-family-heading, 'Fraunces', Georgia, serif);
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  font-weight: 700;
  color: var(--text-dark, #102c2a);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.18;
  text-wrap: balance;
}

.hg-modenhetstest-prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.65rem;
  color: var(--text-dark, #102c2a);
}

.hg-modenhetstest-prose p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.hg-modenhetstest-prose ul,
.hg-modenhetstest-prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.hg-modenhetstest-prose li {
  margin-bottom: 0.4rem;
}

.hg-modenhetstest-prose a {
  color: var(--primary-light, #2a6d6d);
  font-weight: 600;
  text-underline-offset: 0.15em;
}

.hg-mt-pullquote {
  margin: 1.5rem 0 0;
  padding: 1.15rem 1.25rem 1.15rem 1.1rem;
  border-left: 3px solid var(--accent-color, #c4ff61);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--accent-color, #c4ff61) 14%, #fffdf7);
}

.hg-mt-pullquote p {
  margin: 0;
  font-family: var(--font-family-heading, 'Fraunces', Georgia, serif);
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-dark, #102c2a);
}

.hg-mt-benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .hg-mt-benefit-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1.25rem;
  }
}

.hg-mt-benefit-list li {
  margin: 0;
  padding-left: 1.35rem;
  position: relative;
}

.hg-mt-benefit-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-color, #c4ff61);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color, #102c2a) 12%, transparent);
}

.hg-modenhetstest-prose--on-dark,
.hg-modenhetstest-prose--on-dark h2,
.hg-modenhetstest-prose--on-dark h3 {
  color: #fffdf4;
}

.hg-modenhetstest-prose--on-dark .hg-mt-eyebrow {
  color: color-mix(in srgb, var(--accent-color, #c4ff61) 88%, #fffdf4);
}

.hg-modenhetstest-prose--on-dark a {
  color: var(--accent-color, #c4ff61);
}

/* Flatten icon-column cards on this page (less AI grid) */
.hg-modenhetstest-landing .iconColumn,
.hg-modenhetstest-landing .iconColumnsSection .iconColumn {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  transform: none !important;
}

.hg-modenhetstest-landing .iconColumn:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* FAQ band */
.hg-modenhetstest-landing .faqSection {
  max-width: 44rem;
  margin-inline: auto;
}

/* Slim variant */
.hg-modenhetstest-landing--slim .hg-modenhetstest-prose {
  max-width: 36rem;
}

.hg-modenhetstest-landing--slim .dnd-section:has([data-hg-modenhetstest-slot]) {
  padding-block: clamp(2rem, 4vw, 3rem) !important;
}

@media (max-width: 1024px) {
  body:has(.hg-modenhetstest-landing) .theme-main {
    padding-top: 0 !important;
  }

  body:has(.hg-modenhetstest-landing) .theme-header .header {
    background-color: color-mix(
      in srgb,
      var(--primary-dark, #092724) 88%,
      transparent
    ) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hg-modenhetstest-landing .anchorLink,
  .hg-modenhetstest-landing [data-hg-modenhetstest-slot] {
    transition: none;
  }
}
