/* ==========================================================================
   Innkjøpskontoret v2 - Main Theme Stylesheet
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-primary: #006179;
    --color-secondary: #0d7377;
    --color-accent: #e7883c;
    --color-white: #ffffff;
    --color-light-gray: #f5f5f5;
    --color-dark: #252834;
    --color-medium-gray: #6b7280;
    --color-border: #e5e7eb;

    --font-family: 'Lato', sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;

    --header-height: 80px;
    --container-max: 1236px;
    --container-padding: 1.5rem;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #02364B;
    line-height: 1.2;
    margin-top: 0;
}

h1 { font-size: 2.5rem; }
h2 {
    font-size: 48px;
    line-height: 65.6px;
    letter-spacing: 0;
}

/* Utility: keep .has-text-align-center centered on desktop/tablet, but
   left-align on mobile. Add "left-on-mobile" via Gutenberg's "Avansert →
   Ekstra CSS-klasse" eller i HTML direkte. */
@media (max-width: 768px) {
    .left-on-mobile,
    .left-on-mobile.has-text-align-center {
        text-align: left !important;
    }
}

body:not(.home) h2:not(.has-text-align-center) {
    text-align: left;
}
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

h3.is-style-italic-accent,
.is-style-italic-accent h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: 30px;
    line-height: 47px;
    letter-spacing: 0;
    text-align: center;
    color: #006179;
    text-box-trim: trim-start;
    text-box-edge: cap;
}

/* Default Gutenberg paragraph — only top-level, not inside ACF blocks */
.site-main > .wp-block-paragraph,
.site-main > .wp-block-group .wp-block-paragraph,
.site-main > .container p,
.single-content p,
.single-post__content p,
.is-style-narrow-content p {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24.6px;
    letter-spacing: 0;
    color: #001918;
}

body:not(.home) .site-main > .wp-block-paragraph:not(.has-text-align-center),
body:not(.home) .site-main > .wp-block-group .wp-block-paragraph:not(.has-text-align-center),
body:not(.home) .site-main > .container p:not(.has-text-align-center),
body:not(.home) .single-content p:not(.has-text-align-center),
body:not(.home) .single-post__content p:not(.has-text-align-center) {
    text-align: left;
}

/* ---------- Utility: Narrow Content (1030px centered) ---------- */
.medium-content,
.is-style-medium-content {
    max-width: 1022px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding, 1.5rem);
    padding-right: var(--container-padding, 1.5rem);
}

.narrow-content,
.is-style-narrow-content {
    max-width: 1030px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding, 1.5rem);
    padding-right: var(--container-padding, 1.5rem);
}

/* ---------- WordPress Global Styles Overrides ---------- */
/* Remove root padding that theme.json generates */
body {
    --wp--style--root--padding-top: 0px;
    --wp--style--root--padding-right: 0px;
    --wp--style--root--padding-bottom: 0px;
    --wp--style--root--padding-left: 0px;
}

.wp-site-blocks {
    padding: 0 !important;
}

.wp-site-blocks > *,
.site > * {
    margin-block-start: 0 !important;
}

/* Allow alignfull to break out of is-layout-constrained */
.is-layout-constrained > .alignfull {
    max-width: none !important;
}

/* Prevent constrained layout from limiting direct children in our templates */
.site-main:not(.is-layout-constrained) > :where(:not(.alignfull):not(.is-style-narrow-content):not(.narrow-content):not(.is-style-medium-content):not(.medium-content):not(.container):not(.page-hero)) {
    max-width: none;
}

/* ---------- Layout ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

.site-main {
    flex: 1;
    min-width: 0;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-family);
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.4;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn--primary:hover {
    background: #d47a31;
    border-color: #d47a31;
    color: var(--color-white);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn--outline-white {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn--outline-white:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn--accent {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn--accent:hover {
    background: #d47a31;
    border-color: #d47a31;
    color: var(--color-white);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: var(--header-height);
    flex-shrink: 0;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-header__logo {
    display: flex;
    align-items: center;
}

.site-header__logo-img {
    height: 40px;
    width: auto;
}

.site-header__logo .custom-logo {
    height: 40px;
    width: auto;
}

/* Mobile toggle */
.site-header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.site-header__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: all 0.3s;
}

.site-header__toggle--active .site-header__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.site-header__toggle--active .site-header__toggle-bar:nth-child(2) {
    opacity: 0;
}

.site-header__toggle--active .site-header__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation */
.nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav__list .menu-item {
    position: relative;
}

.nav__list .menu-item a {
    display: block;
    padding: 0.5rem 1rem;
    color: #001918;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: 0;
    white-space: nowrap;
    text-decoration: none;
}

/* Top-level desktop links: no hover/active styling — only submenu items get those */
.nav__list > .menu-item > a:hover,
.nav__list > .menu-item.current-menu-item > a {
    color: #001918;
    background: transparent;
}

/* Dropdown - both custom (.has-dropdown/.nav__dropdown) and WP default (.menu-item-has-children/.sub-menu) */
.nav__list .has-dropdown,
.nav__list .menu-item-has-children {
    position: relative;
}

.nav__list .has-dropdown > a::after,
.nav__list .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 6px;
    margin-left: 6px;
    vertical-align: middle;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none'><path d='M1 1.5l7 7 7-7' stroke='%23001918' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center;
    background-size: contain;
    border: none;
    transform: none;
    position: static;
    transition: transform 0.2s;
}

.nav__list .has-dropdown:hover > a::after,
.nav__list .menu-item-has-children:hover > a::after {
    transform: scaleY(-1);
}

.nav__dropdown,
.nav__list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #006179;
    border-radius: 10px;
    min-width: 220px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 100;
    overflow: hidden;
}

.nav__list .has-dropdown:hover > .nav__dropdown,
.nav__list .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.nav__dropdown-item,
.nav__list .sub-menu .menu-item {
    width: 100%;
}

.nav__dropdown-item a,
.nav__list .sub-menu .menu-item a {
    padding: 15px 20px !important;
    font-family: 'Nunito Sans', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 100% !important;
    letter-spacing: 0 !important;
    color: #FBFCFC !important;
    white-space: normal !important;
}

.nav__dropdown-item a:hover,
.nav__list .sub-menu .menu-item a:hover {
    background: #ACEDD9 !important;
    color: #006179 !important;
}

.nav__dropdown .nav__dropdown-item.is-current > a,
.nav__dropdown .nav__dropdown-item.current-menu-item > a,
.nav__dropdown .nav__dropdown-item.current_page_item > a,
.nav__list .sub-menu .menu-item.current-menu-item > a,
.nav__list .sub-menu .menu-item.current_page_item > a {
    background: #02364B !important;
    color: #ACEDD9 !important;
}

/* "Alle tjenester" — main entry, separated from sub-items with a white rule */
.nav__dropdown-item--main {
    border-bottom: 1px solid #FBFCFC;
}

.nav__dropdown-item--main a {
    font-weight: 700 !important;
}

/* ---------- Page Hero ---------- */
.page-hero {
    position: relative;
    z-index: 0;
    isolation: isolate;
    background-image: url('../img/Topp%20banner-Desktop.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #FBFCFC;
    display: flex;
    align-items: flex-end;
    padding-top: 157px;
    padding-bottom: 62px;
    overflow: hidden;
    margin-top: 0;
}

.page-hero.page-hero--has-image {
    background-image: var(--hero-bg);
}

@media (min-width: 993px) {
    .page-hero.page-hero--has-image {
        background-image: var(--hero-bg-desktop);
    }
}

@media (max-width: 768px) {
    .page-hero.page-hero--has-image {
        background-image: var(--hero-bg-mobile);
    }
}

.page-hero--has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(89.9deg, rgba(0, 97, 121, 0.6664) 26.34%, rgba(41, 128, 128, 0.2244) 72.87%);
    pointer-events: none;
}

.page-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding: 0 var(--container-padding, 1.5rem);
}

.page-hero + .container,
.page-hero + .page-content {
    padding-top: 96px;
}

/* Allow alignfull blocks to break out of page container */
.page-content {
    overflow: visible;
}

.page-content > .alignfull {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    margin-right: 0;
}

.page-hero__title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 72px;
    line-height: 50px;
    letter-spacing: 0;
    color: #FBFCFC;
    margin: 0;
}

body.search-results .page-hero__title {
    line-height: 1.2;
}

/* ---------- Archive / Blog ---------- */
body.blog .archive-header {
    padding: 0 0 120px;
}

.archive-header__title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 65.6px;
    text-align: left;
    color: #02364B;
    margin: 0 0 96px;
    max-width: 1022px;
}

.category-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.category-filter__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    min-width: 0;
    min-height: 181px;
    padding: 25px 40px;
    background: #006179;
    color: #ACEDD9;
    border-radius: 15px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 38.2px;
    letter-spacing: 0;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
    overflow-wrap: break-word;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
}

.category-filter__btn:hover,
.category-filter__btn--active {
    background: #004d5e;
    color: #ACEDD9;
}

/* Archive layout: content + sidebar */
.archive-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 100px;
}

.archive-layout__sidebar .search-form,
.single-layout__sidebar .search-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
}

.archive-layout__sidebar .search-form label,
.single-layout__sidebar .search-form label {
    display: block;
    width: 100%;
    position: relative;
}

.archive-layout__sidebar .search-form label::before,
.single-layout__sidebar .search-form label::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', 'FontAwesome';
    font-weight: 300;
    font-size: 22px;
    color: #6D736F;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.archive-layout__sidebar .search-field,
.single-layout__sidebar .search-field {
    width: 100%;
    padding: 12px 16px 12px 46px;
    border: 2px solid #006179;
    border-radius: 15px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    color: #6D736F;
}

.archive-layout__sidebar .search-field::placeholder,
.single-layout__sidebar .search-field::placeholder {
    color: #6D736F;
}

.archive-layout__sidebar .search-submit,
.single-layout__sidebar .search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: #006179;
    color: #ACEDD9;
    border: 2px solid #006179;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    line-height: 19.1px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.archive-layout__sidebar .search-submit:hover,
.single-layout__sidebar .search-submit:hover {
    background: #ACEDD9;
    border-color: #006179;
    color: #006179;
}

.archive-layout__sidebar .search-submit:active,
.single-layout__sidebar .search-submit:active {
    background: #02364B;
    border-color: #02364B;
    color: #ACEDD9;
}

.archive-layout__sidebar .search-submit:disabled,
.archive-layout__sidebar .search-submit[aria-disabled="true"],
.archive-layout__sidebar .search-submit.is-disabled,
.single-layout__sidebar .search-submit:disabled,
.single-layout__sidebar .search-submit[aria-disabled="true"],
.single-layout__sidebar .search-submit.is-disabled {
    background: #C0C0C0;
    border-color: #C0C0C0;
    color: #FBFCFC;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-latest__title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 32.7px;
    letter-spacing: 0;
    color: #006179;
    margin-bottom: 16px;
}

.sidebar-latest__list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}

.sidebar-latest__list li {
    margin-bottom: 0;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 32px;
    letter-spacing: 0;
}

.sidebar-latest__list a {
    color: #001918;
    text-decoration: none;
}

.sidebar-latest__list a:hover {
    color: #006179;
}

/* ---------- Post List ---------- */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 3rem;
}

@media (min-width: 993px) {
    body.category .post-list {
        margin-bottom: 96px;
    }
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    background: #EAFAF5;
    border-radius: 15px;
}

.post-card + .post-card {
    margin-top: 40px;
}

.post-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 1rem;
}

.post-card__title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 34px;
    letter-spacing: 0;
    color: #006179;
    margin: 0;
    text-align: left !important;
    max-width: 65%;
}

.post-card__title a {
    color: #006179;
    text-decoration: none;
}

.post-card__title a:hover {
    color: #006179;
}

.post-card__date {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 19.1px;
    letter-spacing: 0;
    color: #006179;
    white-space: nowrap;
    text-transform: uppercase;
    flex-shrink: 0;
    align-self: flex-start;
}

.post-card__body {
    display: flex;
    gap: 30px;
}

.post-card__image {
    flex-shrink: 0;
    width: 258px;
}

.post-card__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

@media (min-width: 993px) {
    body.blog .post-card__body,
    body.category .post-card__body {
        gap: 30px;
    }

    body.blog .post-card__image,
    body.category .post-card__image {
        width: 258px;
    }

    body.blog .post-card__body img,
    body.category .post-card__body img {
        max-height: 205px;
        height: 205px;
        width: 100%;
        object-fit: cover;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    body.category .archive-layout__sidebar,
    body.blog .archive-layout__sidebar {
        margin-bottom: 72px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 56px;
        align-items: start;
    }

    body.category .archive-layout__sidebar .search-form,
    body.blog .archive-layout__sidebar .search-form {
        margin-bottom: 0;
    }

    body.blog .post-card__body,
    body.category .post-card__body {
        gap: 8.7px;
    }

    body.blog .post-card__image,
    body.category .post-card__image {
        width: 224.37px;
    }

    body.blog .post-card__body img,
    body.category .post-card__body img {
        max-height: 178.28px;
        height: 178.28px;
        width: 100%;
        object-fit: cover;
    }
}

.post-card__text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card__excerpt {
    font-family: 'Nunito Sans', sans-serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    line-height: 24.6px !important;
    letter-spacing: 0 !important;
    color: #001918 !important;
    margin-bottom: 16px;
    flex: 1;
}

.post-card__excerpt p {
    margin: 0;
    text-align: left !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
}

.post-card__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.post-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    padding: 10px 24px;
    border-radius: 50px;
    background: #006179;
    border: 2px solid #006179;
    color: #ACEDD9;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.post-card__link:hover {
    background: #ACEDD9;
    border-color: #006179;
    color: #006179;
}

.post-card__link:active {
    background: #02364B;
    border-color: #02364B;
    color: #ACEDD9;
}

.post-card__link:disabled,
.post-card__link[aria-disabled="true"],
.post-card__link.is-disabled {
    background: #C0C0C0;
    border-color: #C0C0C0;
    color: #FBFCFC;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Single Post ---------- */
.single-post .site-main > .container {
    padding-top: 72px;
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 402px;
    gap: 100px;
    padding-bottom: 3rem;
}

.single-layout__sidebar {
    padding-top: 56.6px;
}

.single-post__date {
    display: block;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24.6px;
    letter-spacing: 0;
    color: #006179;
    margin-bottom: 32px;
    text-transform: uppercase;
}

.single-post__title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 48px !important;
    line-height: 65.6px !important;
    letter-spacing: 0 !important;
    color: #02364B !important;
    margin-bottom: 56px;
    text-align: left !important;
}

.single-post__intro {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24.6px;
    color: #001918;
    margin-bottom: 2rem;
}

.single-post__featured-image {
    margin-bottom: 56px;
}

.single-post__featured-image img {
    border-radius: 15px;
    width: 100%;
}

.single-post__content {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24.6px;
    letter-spacing: 0;
    color: #001918;
}

.single-post__content h2 {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 38px !important;
    line-height: 43.5px !important;
    letter-spacing: 0 !important;
    color: #006179 !important;
    text-align: left !important;
    margin-top: 56px;
}

.single-post__content h2 strong,
.single-post__content h3 strong,
.single-post__content h4 strong {
    font-weight: inherit;
}

.single-post__content h3 {
    font-size: 28px !important;
    margin-top: 2rem;
}

.single-post__content p {
    margin-bottom: 32px;
    font-family: inherit !important;
    font-weight: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    text-align: left !important;
}

.single-post__content img {
    border-radius: 15px;
}

.single-post .rp4wp-related-posts {
    display: none;
}

.single-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.single-post__tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-light-gray);
    color: var(--color-primary);
    border-radius: 3px;
    font-size: 0.8125rem;
}

.single-post__tag:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ---------- Sidebar ---------- */
.sidebar-related {
    margin-top: 2rem;
}

.sidebar-related__title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 38px;
    line-height: 43.5px;
    letter-spacing: 0;
    color: #02364B;
    margin-bottom: 1rem;
}

.sidebar-related__item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-related__item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.sidebar-related__item h4 a {
    color: var(--color-primary);
}

.sidebar-related__item p {
    font-size: 0.8125rem;
    color: var(--color-medium-gray);
    margin: 0;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: 0.8125rem;
    color: var(--color-medium-gray);
    margin-bottom: 1.5rem;
}

.breadcrumbs a {
    color: var(--color-secondary);
}

/* ---------- Pagination ---------- */
.pagination,
.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 56px 0 3rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    line-height: 1;
    background: transparent;
    color: #006179;
    border: 2px solid #006179;
    border-radius: 50%;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.page-numbers.current,
.page-numbers:hover {
    background: #006179;
    color: #ACEDD9;
    border-color: #006179;
}

.page-numbers.next,
.page-numbers.prev {
    background: #006179;
    color: #ACEDD9;
    border-color: #006179;
    font-size: 0;
}

.page-numbers.next::after {
    content: '\f101';
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', 'FontAwesome';
    font-weight: 900;
    font-size: 16px;
}

.page-numbers.prev::before {
    content: '\f100';
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', 'FontAwesome';
    font-weight: 900;
    font-size: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-primary);
    color: #FBFCFC;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24.6px;
    letter-spacing: 0;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 240px auto 167px 280px;
    gap: 137px;
    align-items: center;
    min-width: 1200px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 60px 100px 80px;
}

.site-footer__logo img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.site-footer__contact {
    margin-top: 56px;
}

.site-footer__contact p {
    margin: 0 0 0.25rem;
}

.site-footer__copyright {
    margin-top: 56px;
}

.site-footer__menu {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.site-footer__menu li {
    margin-bottom: 8px;
}

.site-footer__menu a {
    color: #FBFCFC;
    line-height: 42px;
}

.site-footer__menu a:hover {
    color: #ACEDD9;
}

.site-footer__certs {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.site-footer__cert-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.site-footer__cert-row--single {
    width: 100%;
    justify-content: center;
}

.site-footer__cert-row--double {
    width: 100%;
    justify-content: center;
}

.site-footer__cert-img,
.site-footer__cert-img img {
    height: 70px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.site-footer__heading {
    color: #FBFCFC;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 27.3px;
    letter-spacing: 0;
    margin-bottom: 1rem;
}

.site-footer__label {
    display: block;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 24.6px;
    letter-spacing: 0;
    margin-bottom: 24px;
}

.site-footer__label span {
    color: #FBFCFC;
}

.site-footer__input {
    width: 277px;
    max-width: 100%;
    height: 54px;
    padding: 17px 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: #fff;
    color: #6D736F;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    margin-bottom: 0;
}

.site-footer__input::placeholder {
    color: #6D736F;
}

.site-footer__gdpr {
    margin: 24px 0 32px;
}

.site-footer__gdpr p {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 21.8px;
    letter-spacing: 0;
    color: #fff;
    margin: 0 0 0.5rem;
}

.site-footer__gdpr a {
    color: #fff;
    text-decoration: none;
}

.site-footer__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.5rem;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 21.8px;
    letter-spacing: 0;
}

.site-footer__checkbox input {
    margin-top: 2px;
}

.site-footer__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 38px;
    padding: 14px 24px;
    border-radius: 50px;
    background: #ACEDD9;
    border-color: #ACEDD9;
    color: #006179;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    line-height: 19.1px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
}

.site-footer__submit:hover {
    background: #FBFCFC;
    border-color: #FBFCFC;
    color: #006179;
}

.site-footer__submit:active {
    background: #EAFAF5;
    border-color: #EAFAF5;
    color: #006179;
}

.site-footer__submit:disabled,
.site-footer__submit[aria-disabled="true"],
.site-footer__submit.is-disabled {
    background: #F0F1F1;
    border-color: #F0F1F1;
    color: #006179;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Single Tjeneste ---------- */
.tjeneste-hero .page-hero__inner {
    width: 100%;
}

.tjeneste-hero__title-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

.tjeneste-hero__icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.tjeneste-container {
    padding-top: 96px;
    padding-bottom: 96px;
}

.tjeneste-layout {
    display: grid;
    grid-template-columns: minmax(0, 540px) minmax(0, 628px);
    gap: 68px;
    align-items: start;
    margin: 0 0 96px;
}

.tjeneste-layout__body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24.6px;
    color: #001918;
}

.tjeneste-layout__body h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 45.6px;
    letter-spacing: 0;
}

.tjeneste-layout__body > *:first-child {
    margin-top: 0;
}

.tjeneste-layout__body p {
    margin: 0 0 16px;
}

.tjeneste-layout__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 72px;
}

.tjeneste-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    padding: 0 36px;
    border-radius: 50px;
    background: #006179;
    border: 2px solid #006179;
    color: #ACEDD9;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 20px;
    line-height: 27.3px;
    letter-spacing: 0.02em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tjeneste-btn:hover {
    background: #ACEDD9;
    border-color: #006179;
    color: #006179;
}

.tjeneste-btn:active {
    background: #02364B;
    border-color: #02364B;
    color: #ACEDD9;
}

.tjeneste-btn:disabled,
.tjeneste-btn[aria-disabled="true"],
.tjeneste-btn.is-disabled {
    background: #C0C0C0;
    border-color: #C0C0C0;
    color: #FBFCFC;
    cursor: not-allowed;
    pointer-events: none;
}

.tjeneste-image-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #006179;
    aspect-ratio: 1 / 1;
}

.tjeneste-image-card img,
.tjeneste-image-card .tjeneste-image-card__img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    display: block;
}

.tjeneste-image-card__stat {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #006179;
    color: #FBFCFC;
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tjeneste-image-card__label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 19.71px;
    line-height: 26.93px;
    letter-spacing: 0;
    color: #FBFCFC;
    flex: 1;
    max-width: 230px;
}

.tjeneste-image-card__number {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 65.69px;
    line-height: 89.56px;
    letter-spacing: 0;
    color: #FBFCFC;
    flex-shrink: 0;
}

/* Relevante artikler — produced by [relevante_artikler] shortcode */
.relevante-artikler-section {
    margin: 24px 0 0;
}

.relevante-artikler-section .container {
    padding: 0;
}

.relevante-artikler-section__title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 32px !important;
    line-height: 43.5px !important;
    letter-spacing: 0 !important;
    color: #02364B !important;
    text-align: left !important;
    margin: 0 0 32px !important;
}

body.single-post .relevante-artikler-section__title {
    font-size: 38px !important;
}

.relevante-artikler-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.relevante-artikler-grid.artikler-2 {
    grid-template-columns: repeat(2, 1fr);
}

.relevante-artikler-grid.artikler-1 {
    grid-template-columns: minmax(0, 480px);
}


.artikkel-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.artikkel-card__image {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #EAFAF5;
}

.artikkel-card__image picture,
.artikkel-card__image > img {
    display: block;
    width: 100%;
    height: 100%;
}

.artikkel-card__image picture {
    line-height: 0;
}

.artikkel-card__image img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.artikkel-card__image:hover img {
    transform: scale(1.04);
}

.artikkel-card__title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 24.6px !important;
    letter-spacing: 0 !important;
    color: #006179 !important;
    margin: 24px 0 16px !important;
    text-align: left !important;
}

.artikkel-card__image + .artikkel-card__title {
    margin-top: 24px !important;
}

.artikkel-card__title:first-child {
    margin-top: 0 !important;
}

.artikkel-card__title a {
    color: inherit;
    text-decoration: none;
}

.artikkel-card__title a:hover {
    color: #006179;
}

.artikkel-card__excerpt {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    color: #001918;
    margin: 0;
}

body.single-tjenester .artikkel-card__excerpt {
    display: none;
}

/* Vertical stack when shortcode is rendered inside the single-post sidebar */
.single-layout__sidebar .relevante-artikler-section {
    margin-top: 56px;
}

.single-layout__sidebar .relevante-artikler-section .container {
    padding: 0;
}

.single-layout__sidebar .relevante-artikler-grid,
.single-layout__sidebar .relevante-artikler-grid.artikler-1,
.single-layout__sidebar .relevante-artikler-grid.artikler-2,
.single-layout__sidebar .relevante-artikler-grid.artikler-3 {
    grid-template-columns: 1fr;
    gap: 24px;
}

.single-layout__sidebar .relevante-artikler-section__title {
    margin: 0 0 40px !important;
}

.single-layout__sidebar .artikkel-card {
    gap: 0;
}


.single-layout__sidebar .artikkel-card__excerpt {
    font-size: 14px;
    line-height: 1.5;
}

/* Style any embedded form (Formidable etc.) inside service body to match contact form */
.tjeneste-layout__body .frm_forms,
.tjeneste-layout__body form {
    margin-top: 24px;
}

@media (max-width: 992px) {
    .tjeneste-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tjeneste-layout__media {
        max-width: 480px;
    }

    .relevante-artikler-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tjeneste-hero__title-wrap {
        gap: 16px;
    }

    .tjeneste-hero__icon {
        width: 48px;
        height: 48px;
    }

    .tjeneste-container {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .tjeneste-layout {
        gap: 32px;
        margin-bottom: 56px;
    }

    .tjeneste-layout__body h2 {
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 30px;
        line-height: 40.9px;
        letter-spacing: 0;
    }

    .tjeneste-layout__buttons {
        flex-direction: column;
        gap: 32px;
        margin-bottom: 40px;
    }

    .tjeneste-btn {
        width: 100%;
        font-size: 16px;
        text-align: center;
    }

    .tjeneste-image-card__stat {
        padding: 20px 24px;
    }

    .tjeneste-image-card__label {
        font-size: 15px;
        line-height: 1.3;
    }

    .tjeneste-image-card__number {
        font-size: 44px;
    }

    .relevante-artikler-section__title {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    body.single-post .relevante-artikler-section__title {
        font-family: 'Nunito', sans-serif !important;
        font-weight: 700 !important;
        font-size: 28px !important;
        line-height: 37.5px !important;
        letter-spacing: 0 !important;
        text-align: left !important;
    }

    .relevante-artikler-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ---------- FAQ Archive ---------- */
.faq-archive {
    background: #fff;
    padding: 96px 0 96px;
}

.faq-archive__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--container-padding, 1.5rem);
}

.faq-archive__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    align-items: start;
}

.faq-archive__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-archive__item {
    background: #EAFAF5;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq-archive__item.is-open {
    background: #006179;
    border-color: #006179;
}

.faq-archive__item.is-open .faq-archive__question {
    color: #ACEDD9;
}

.faq-archive__item.is-open .faq-archive__icon {
    background: #ACEDD9;
    border-color: #ACEDD9;
}

.faq-archive__item.is-open .faq-archive__icon::before,
.faq-archive__item.is-open .faq-archive__icon::after {
    background: #006179;
}

.faq-archive__item.is-open .faq-archive__icon::before {
    width: 26px;
    height: 2px;
}

.faq-archive__item.is-open .faq-archive__icon::after {
    width: 2px;
    height: 26px;
}

.faq-archive__item.is-open .faq-archive__answer-inner,
.faq-archive__item.is-open .faq-archive__answer-inner p,
.faq-archive__item.is-open .faq-archive__answer-inner li {
    color: #FBFCFC;
}

.faq-archive__item.is-open .faq-archive__answer-inner thead th,
.faq-archive__item.is-open .faq-archive__answer-inner thead td,
.faq-archive__item.is-open .faq-archive__answer-inner tr:first-child th,
.faq-archive__item.is-open .faq-archive__answer-inner tr:first-child td {
    color: #006179;
}

.faq-archive__item.is-open .faq-archive__answer-inner tbody td,
.faq-archive__item.is-open .faq-archive__answer-inner tbody th {
    color: #001918;
}

.faq-archive__item.is-open .faq-archive__answer-inner tbody strong,
.faq-archive__item.is-open .faq-archive__answer-inner tbody td strong,
.faq-archive__item.is-open .faq-archive__answer-inner tbody th strong {
    color: #006179;
}

.faq-archive__item.is-open .faq-archive__answer-inner h2,
.faq-archive__item.is-open .faq-archive__answer-inner h3,
.faq-archive__item.is-open .faq-archive__answer-inner h4,
.faq-archive__item.is-open .faq-archive__answer-inner strong {
    color: #FBFCFC;
}

.faq-archive__item.is-open .faq-archive__answer-inner a {
    color: #ACEDD9;
}

.faq-archive__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: calc(27.3px * 2 + 44px);
    padding: 22px 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 27.3px;
    color: #006179;
    text-align: left;
    gap: 24px;
}

.faq-archive__question-text {
    flex: 1;
    min-width: 0;
}

.faq-archive__icon {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 2px solid #006179;
    border-radius: 50%;
}

.faq-archive__icon::before,
.faq-archive__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #006179;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.faq-archive__icon::before {
    width: 26px;
    height: 2px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.faq-archive__icon::after {
    width: 2px;
    height: 26px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.faq-archive__item.is-open .faq-archive__icon::after {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
}

.faq-archive__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-archive__answer-inner {
    padding: 4px 28px 28px;
    color: #02364B;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.faq-archive__answer-inner > *:first-child {
    margin-top: 0;
}

.faq-archive__answer-inner > *:last-child {
    margin-bottom: 0;
}

.faq-archive__answer-inner p {
    margin: 0 0 16px;
    color: #02364B;
}

.faq-archive__answer-inner strong {
    color: #006179;
    font-weight: 700;
}

.faq-archive__answer-inner h2,
.faq-archive__answer-inner h3,
.faq-archive__answer-inner h4 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #006179;
    margin: 24px 0 12px;
    text-align: left;
}

.faq-archive__answer-inner h2 { font-size: 22px; line-height: 1.3; }
.faq-archive__answer-inner h3 { font-size: 19px; line-height: 1.3; }
.faq-archive__answer-inner h4 { font-size: 17px; line-height: 1.3; }

.faq-archive__answer-inner ul,
.faq-archive__answer-inner ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.faq-archive__answer-inner ul,
.faq-archive__answer-inner ul ul,
.faq-archive__answer-inner ul ul ul {
    list-style-type: disc;
}

.faq-archive__answer-inner li {
    margin-bottom: 6px;
}

.faq-archive__answer-inner li::marker {
    color: currentColor;
}

.faq-archive__answer-inner li > ul,
.faq-archive__answer-inner li > ol {
    margin: 6px 0 0;
}

.faq-archive__answer-inner table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 16px 0;
    background: #EAFAF5;
    border: 1px solid #006179;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

.faq-archive__answer-inner table td,
.faq-archive__answer-inner table th {
    overflow-wrap: break-word;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
}

.faq-archive__answer-inner thead th,
.faq-archive__answer-inner thead td,
.faq-archive__answer-inner tr:first-child th,
.faq-archive__answer-inner tr:first-child td {
    background: #ACEDD9;
    color: #006179;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-align: left;
    padding: 24px 16px;
    border: 1px solid #006179;
}

.faq-archive__answer-inner tbody td,
.faq-archive__answer-inner tbody th {
    padding: 24px 16px;
    border: 1px solid #006179;
    background: #EAFAF5;
    color: #001918;
    font-size: 14px;
    vertical-align: top;
}

.faq-archive__answer-inner tbody th {
    font-weight: 700;
    text-align: left;
}

/* Gutenberg table block wrapper */
.faq-archive__answer-inner .wp-block-table {
    margin: 16px 0;
    overflow-x: auto;
}

.faq-archive__answer-inner .wp-block-table table {
    margin: 0;
}

.faq-archive__empty {
    text-align: center;
    color: #02364B;
    font-size: 18px;
    padding: 40px 0;
}

@media (max-width: 992px) {
    .faq-archive__columns {
        grid-template-columns: 1fr;
        gap: 20px 0;
    }

    .faq-archive__question {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .faq-archive {
        padding: 72px 0;
    }

    .faq-archive__columns,
    .faq-archive__list,
    .faq-archive__item {
        min-width: 0;
        max-width: 100%;
    }

    .faq-archive__columns {
        gap: 32px;
    }

    .faq-archive__list {
        gap: 32px;
    }

    .faq-archive__item {
        overflow: hidden;
    }

    .faq-archive__question {
        padding: 18px 20px;
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 18px;
        line-height: 24.6px;
        letter-spacing: 0;
        gap: 12px;
    }

    .faq-archive__question-text {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .faq-archive__icon {
        width: 30px;
        height: 30px;
        border-width: 1.5px;
    }

    .faq-archive__icon::before {
        width: 21px;
        height: 1.5px;
    }

    .faq-archive__icon::after {
        width: 1.5px;
        height: 21px;
    }

    .faq-archive__item.is-open .faq-archive__icon::before {
        width: 21px;
        height: 1.5px;
    }

    .faq-archive__item.is-open .faq-archive__icon::after {
        width: 1.5px;
        height: 21px;
    }

    .faq-archive__answer-inner {
        padding: 4px 20px 20px;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 400;
        font-size: 16px;
        line-height: 21.8px;
        letter-spacing: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .faq-archive__answer-inner table {
        width: 100%;
        max-width: 100%;
        table-layout: fixed;
        white-space: normal;
    }

    .faq-archive__answer-inner table td,
    .faq-archive__answer-inner table th {
        padding: 14px 10px;
        font-size: 13px;
    }
}

/* ---------- Error 404 ---------- */
.error-404 {
    text-align: center;
    padding: 72px 0 96px;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.error-404 p {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    line-height: 24.6px;
    color: #001918;
    margin: 0;
}

.error-404 .btn--primary {
    margin: 0;
}

.error-404 .search-form {
    width: 100%;
    max-width: 400px;
    margin: 24px auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.error-404 .search-form label {
    display: block;
    width: 100%;
    position: relative;
    margin: 0;
}

.error-404 .search-form label::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', 'FontAwesome';
    font-weight: 300;
    font-size: 22px;
    color: #6D736F;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.error-404 .search-field {
    width: 100%;
    padding: 12px 16px 12px 46px;
    border: 2px solid #006179;
    border-radius: 15px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    color: #6D736F;
    background: #fff;
}

.error-404 .search-field::placeholder {
    color: #6D736F;
}

.error-404 .search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding: 10px 24px;
    background: #006179;
    color: #ACEDD9;
    border: 2px solid #006179;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    line-height: 19.1px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.error-404 .search-submit:hover {
    background: #ACEDD9;
    border-color: #006179;
    color: #006179;
}

.error-404 .search-submit:active {
    background: #02364B;
    border-color: #02364B;
    color: #ACEDD9;
}

.error-404 .search-submit:disabled,
.error-404 .search-submit[aria-disabled="true"],
.error-404 .search-submit.is-disabled {
    background: #C0C0C0;
    border-color: #C0C0C0;
    color: #FBFCFC;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- No Results ---------- */
.no-results {
    text-align: center;
    padding: 4rem 0;
}

/* ---------- Single Content (pages, kundehistorier) ---------- */
.single-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.single-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.single-featured-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.single-content__body {
    font-size: 1rem;
    line-height: 1.8;
}

/* ---------- Prove oss widget ---------- */
.prove-oss-widget {
    background: #EAFAF5;
    padding: 2rem;
    border-radius: 15px;
    margin-top: 56px;
}

.prove-oss-widget h2,
.prove-oss-widget h3,
.prove-oss-widget .wp-block-heading {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 35px !important;
    line-height: 43.5px !important;
    letter-spacing: 0 !important;
    color: #006179 !important;
    text-align: left !important;
    margin-bottom: 1rem;
}

.prove-oss-widget p {
    font-family: 'Nunito Sans', sans-serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    line-height: 27px !important;
    letter-spacing: 0 !important;
    color: #001918 !important;
    text-align: left !important;
}

.prove-oss-widget .wp-block-button__link,
.prove-oss-widget .wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    background: #006179 !important;
    border: 2px solid #006179;
    color: #ACEDD9 !important;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    line-height: 21.8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
}

.prove-oss-widget .wp-block-button__link:hover,
.prove-oss-widget .wp-element-button:hover {
    background: #FBFCFC !important;
    border-color: #FBFCFC;
    color: #006179 !important;
}

.prove-oss-widget .wp-block-button__link:active,
.prove-oss-widget .wp-element-button:active {
    background: #EAFAF5 !important;
    border-color: #EAFAF5;
    color: #006179 !important;
}

.prove-oss-widget .wp-block-button__link:disabled,
.prove-oss-widget .wp-block-button__link[aria-disabled="true"],
.prove-oss-widget .wp-block-button__link.is-disabled,
.prove-oss-widget .wp-element-button:disabled,
.prove-oss-widget .wp-element-button[aria-disabled="true"],
.prove-oss-widget .wp-element-button.is-disabled {
    background: #F0F1F1 !important;
    border-color: #F0F1F1;
    color: #006179 !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .site-header__inner.container,
    .site-header__inner {
        padding: 0 28px;
    }

    .site-header__toggle {
        display: flex;
        position: relative;
        z-index: 1002;
        padding: 0;
    }

    .site-header__toggle--active .site-header__toggle-bar {
        background: #FBFCFC;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 240px;
        max-width: 240px;
        height: 100vh;
        background: #006179;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: calc(var(--header-height) + 24px) 0 32px;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .site-nav--open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 0;
    }

    .nav__list .menu-item {
        position: static;
    }

    .nav__list .menu-item a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 22px 32px;
        color: #FBFCFC;
        background: transparent;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 700;
        font-size: 16px;
        line-height: 21.8px;
        letter-spacing: 0;
        white-space: normal;
        border: none;
        text-decoration: none;
    }

    .nav__list .menu-item a:hover {
        color: #006179;
        background: #ACEDD9;
    }

    .nav__list .menu-item.is-selected > a,
    .nav__list .menu-item.is-open > a {
        background: #02364B;
        color: #ACEDD9;
    }

    /* Chevron via background-image on parent <a>::after */
    .nav__list .has-dropdown > a::after,
    .nav__list .menu-item-has-children > a::after {
        content: '';
        width: 16px;
        height: 10px;
        margin-left: 12px;
        background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none'><path d='M1 1.5l7 7 7-7' stroke='%23FBFCFC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center;
        background-size: contain;
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }

    .nav__list .has-dropdown > a:hover::after,
    .nav__list .menu-item-has-children > a:hover::after {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none'><path d='M1 1.5l7 7 7-7' stroke='%23006179' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    }

    /* Chevron flip is driven exclusively by the .is-open class — hover never
       moves the arrow on mobile, only the actual expanded state does. */
    .nav__list .has-dropdown > a::after,
    .nav__list .menu-item-has-children > a::after,
    .nav__list .has-dropdown:hover > a::after,
    .nav__list .menu-item-has-children:hover > a::after {
        transform: none !important;
    }

    .nav__list .has-dropdown.is-open > a::after,
    .nav__list .menu-item-has-children.is-open > a::after,
    .nav__list .has-dropdown.is-open:hover > a::after,
    .nav__list .menu-item-has-children.is-open:hover > a::after {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none'><path d='M1 1.5l7 7 7-7' stroke='%23ACEDD9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
        transform: scaleY(-1) !important;
    }

    /* Submenu hidden by default on mobile, shown when parent .is-open */
    .nav__dropdown,
    .nav__list .sub-menu {
        display: none;
        position: static;
        box-shadow: none;
        background: transparent;
        border-radius: 0;
        padding: 0 0 12px;
        margin: 0;
        min-width: 0;
        list-style: none;
        overflow: visible;
    }

    .nav__list .has-dropdown.is-open > .nav__dropdown,
    .nav__list .menu-item-has-children.is-open > .sub-menu {
        display: block;
    }

    .nav__list .has-dropdown:hover > .nav__dropdown,
    .nav__list .menu-item-has-children:hover > .sub-menu {
        display: none;
    }

    .nav__list .has-dropdown.is-open:hover > .nav__dropdown,
    .nav__list .menu-item-has-children.is-open:hover > .sub-menu {
        display: block;
    }

    .nav__dropdown-item a,
    .nav__list .sub-menu .menu-item a {
        padding: 12px 28px !important;
        font-family: 'Nunito Sans', sans-serif !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        line-height: 1.3 !important;
        color: #FBFCFC !important;
        white-space: normal !important;
        background: transparent !important;
    }

    .nav__dropdown-item a:hover,
    .nav__list .sub-menu .menu-item a:hover {
        color: #006179 !important;
        background: #ACEDD9 !important;
    }

    .archive-layout {
        grid-template-columns: 1fr;
    }

    .archive-layout__sidebar {
        order: 2;
    }

    .single-layout {
        grid-template-columns: 1fr;
        gap: 72px;
    }

    .single-layout__sidebar {
        order: 2;
        padding-top: 0;
    }

    /* Tablet footer: three columns on top, certs span the first two columns below */
    .site-footer__inner {
        grid-template-columns: auto auto 1fr;
        grid-template-areas:
            "info  nav   newsletter"
            "certs certs newsletter";
        grid-template-rows: auto auto;
        gap: 40px;
        align-items: start;
        min-width: 0;
        padding: 48px 32px 56px;
    }

    .site-footer__col--info { grid-area: info; }
    .site-footer__col--nav { grid-area: nav; }
    .site-footer__col--newsletter { grid-area: newsletter; }
    .site-footer__col--certs { grid-area: certs; }

    .site-footer__contact {
        margin-top: 24px;
    }

    .site-footer__copyright {
        margin-top: 24px;
    }

}

@media (max-width: 992px) and (min-width: 769px) {
    /* Single post layout on tablet: keep 2-column layout with a narrower sidebar */
    body.single-post .single-layout {
        grid-template-columns: minmax(0, 1fr) 275px;
        gap: 32px;
    }

    body.single-post .single-layout__sidebar {
        order: initial;
    }

    body.single-post .relevante-artikler-section__title {
        font-family: 'Nunito', sans-serif !important;
        font-weight: 700 !important;
        font-size: 20px !important;
        line-height: 27.3px !important;
        letter-spacing: 0 !important;
        text-align: left !important;
    }

    .site-footer__certs {
        flex-direction: row-reverse;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 16px;
        max-width: 100%;
    }

    .site-footer__cert-row {
        width: auto;
        flex: 0 1 auto;
        min-width: 0;
        gap: 8px;
        justify-content: flex-start;
    }

    .site-footer__cert-row--double {
        flex-shrink: 1;
    }

    .site-footer__cert-img,
    .site-footer__cert-img img {
        height: clamp(36px, 8vw, 60px);
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .page-hero {
        background-image: url('../img/Topp%20banner-Tablet.svg');
        height: auto;
        padding-top: 85px;
        padding-bottom: 33px;
    }

    .page-hero__title {
        font-size: 38px;
        line-height: 51.8px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .site-header__inner.container,
    .site-header__inner {
        padding: 0 16px;
    }

    .site-header__logo-img,
    .site-header__logo .custom-logo {
        width: 160px;
        height: auto;
    }

    .site-nav {
        padding-top: calc(var(--header-height) + 16px);
    }

    .nav__list .menu-item a {
        padding: 12px 20px;
    }

    .nav__dropdown-item a,
    .nav__list .sub-menu .menu-item a {
        padding: 12px 20px !important;
    }

    .nav__dropdown-item a,
    .nav__list .sub-menu .menu-item a {
        padding: 11px 22px !important;
        font-size: 15px !important;
    }

    #h-enklere-anskaffelser-for-deg,
    #h-var-visjon {
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 30px;
        line-height: 40.9px;
        letter-spacing: 0;
        text-align: center;
    }

    #h-ditt-innkjopskontor-enkelt-og-effektivt-fra-behov-til-kontrakt {
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-style: italic;
        font-size: 19px;
        line-height: 26px;
        letter-spacing: 0;
        text-align: center;
    }

    .page-hero + .container,
    .page-hero + .page-content {
        padding-top: 42px;
    }

    .prove-oss-widget h2,
    .prove-oss-widget h3,
    .prove-oss-widget .wp-block-heading {
        font-size: 30px !important;
    }

    .single-post .site-main > .container,
    body.single-post .site-main > .container {
        padding-top: 42px;
    }

    .single-post__date {
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 400;
        font-size: 16px;
        line-height: 21.8px;
        letter-spacing: 0;
        margin-bottom: 24px;
    }

    .single-post__title {
        font-family: 'Nunito', sans-serif !important;
        font-weight: 700 !important;
        font-size: 30px !important;
        line-height: 40.9px !important;
        letter-spacing: 0 !important;
        margin-bottom: 40px !important;
    }

    .single-post__featured-image {
        max-height: 246px;
        overflow: hidden;
        margin-bottom: 40px;
    }

    .single-post__featured-image img {
        width: 100%;
        max-width: none;
        height: 246px;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .single-post__content,
    .single-post__content p {
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 400;
        font-size: 16px;
        line-height: 21.8px;
        letter-spacing: 0;
    }

    .single-post__content h2 {
        font-family: 'Nunito', sans-serif !important;
        font-weight: 700 !important;
        font-size: 28px !important;
        line-height: 37.5px !important;
        letter-spacing: 0 !important;
        margin-bottom: 24px !important;
    }

    .single-post__content a {
        text-decoration: underline;
        text-decoration-style: solid;
        text-decoration-skip-ink: auto;
    }

    /* Mobile footer: single centered column. Order: info, nav, newsletter, certs */
    .site-footer__inner {
        grid-template-columns: 1fr;
        grid-template-areas:
            "info"
            "nav"
            "newsletter"
            "certs";
        grid-template-rows: auto;
        gap: 40px;
        text-align: center;
        padding: 48px 24px;
    }

    .site-footer__col--info,
    .site-footer__col--nav,
    .site-footer__col--newsletter,
    .site-footer__col--certs {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer__logo {
        justify-content: center;
    }

    .site-footer__contact,
    .site-footer__copyright {
        margin-top: 24px;
    }

    .site-footer__menu {
        align-items: center;
        text-align: center;
    }

    .site-footer__menu li {
        text-align: center;
    }

    .site-footer__heading,
    .site-footer__label,
    .site-footer__gdpr,
    .site-footer__gdpr p {
        text-align: center;
    }

    .site-footer__newsletter {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .site-footer__input {
        width: 100%;
        max-width: 320px;
    }

    .site-footer__gdpr {
        text-align: left;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .site-footer__certs {
        align-items: center;
    }

    .site-footer__cert-row {
        justify-content: center;
    }

    .page-hero {
        background-image: url('../img/Topp%20banner-Mobil.svg');
        height: auto;
        padding-top: 73px;
        padding-bottom: 30px;
    }

    .post-type-archive-faq .page-hero__title {
        font-size: 27px;
    }

    .page-hero__title {
        font-size: 34px;
        line-height: 48.4px;
    }

    .post-card__header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .post-card__body {
        flex-direction: column;
    }

    .post-card__image {
        width: 100%;
    }

    .post-card__image img {
        height: 180px;
    }

    /* Blog list on mobile: flatten the article so we can reorder children to:
       image → date → excerpt → button. Title is omitted on mobile. */
    body.blog .post-card {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    body.blog .post-card__header,
    body.blog .post-card__body,
    body.blog .post-card__text,
    body.blog .post-card__footer {
        display: contents;
    }

    body.blog .post-card__image    { order: 1; }
    body.blog .post-card__date     { order: 2; }
    body.blog .post-card__title    { order: 3; }
    body.blog .post-card__excerpt  { order: 4; }
    body.blog .post-card__link     { order: 5; align-self: flex-end; }

    body.blog .post-card__title {
        max-width: none;
    }

    .category-filter {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-filter__btn {
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 14px;
        line-height: 19.1px;
        letter-spacing: 0;
        text-align: center;
        padding: 16.5px 20px;
        min-height: 110px;
    }

    body.blog .archive-layout__sidebar,
    body.category .archive-layout__sidebar {
        margin-bottom: 72px;
    }

    body.blog .archive-layout {
        gap: 72px;
    }

    body.blog h2.archive-header__title,
    body.blog .archive-header__title {
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 32px;
        line-height: 43.5px;
        letter-spacing: 0;
        text-align: center !important;
    }

    body.blog .archive-header {
        padding-bottom: 72px;
    }

    body.category h2.archive-header__title,
    body.category .archive-header__title {
        font-family: 'Nunito', sans-serif !important;
        font-weight: 700 !important;
        font-size: 30px !important;
        line-height: 40.9px !important;
        letter-spacing: 0 !important;
    }
}


/* ---------- Formidable Forms ---------- */
#frm_form_10_container {
    max-width: 753px;
    margin: auto;
}

.frm_forms label.frm_primary_label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24.6px;
    letter-spacing: 0;
    color: slategray;
    padding-bottom: 7px;
}

form label {
    padding-bottom: 7px;
}

.frm_forms .frm_required {
    color: slategray;
}

.frm_forms input[type="text"],
.frm_forms input[type="tel"],
.frm_forms input[type="email"],
.frm_forms textarea {
    width: 100% !important;
    height: 70px;
    border: 1px solid #6D736F !important;
    border-radius: 15px !important;
    padding: 12px 20px !important;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    color: #001918;
    background: #fff !important;
}

.frm_forms textarea {
    height: auto;
    min-height: 140px;
}

.frm_forms .frm_half input[type="tel"],
.frm_forms .frm_half input[type="email"] {
    max-width: 100%;
}

.frm_button_submit,
.frm_forms .frm_final_submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 24px !important;
    background: #006179 !important;
    color: #ACEDD9 !important;
    border: 2px solid #006179 !important;
    border-radius: 50px !important;
    cursor: pointer;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    line-height: 19.1px !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.frm_button_submit:hover,
.frm_forms .frm_final_submit:hover {
    background: #ACEDD9 !important;
    border-color: #006179 !important;
    color: #006179 !important;
}

.frm_button_submit:active,
.frm_forms .frm_final_submit:active {
    background: #02364B !important;
    border-color: #02364B !important;
    color: #ACEDD9 !important;
}

.frm_button_submit:disabled,
.frm_button_submit[aria-disabled="true"],
.frm_button_submit.is-disabled,
.frm_forms .frm_final_submit:disabled,
.frm_forms .frm_final_submit[aria-disabled="true"],
.frm_forms .frm_final_submit.is-disabled {
    background: #C0C0C0 !important;
    border-color: #C0C0C0 !important;
    color: #FBFCFC !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ---------- WordPress Core Overrides ---------- */
.wp-block-image img {
    border-radius: 8px;
}

.wp-block-separator {
    border-color: var(--color-border);
}

/* Admin bar offset */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}
