/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* Neutralize ACSS's default :where(body > header) / :where(body > footer)
   vertical padding. The #brx-header / #brx-footer wrappers have no
   background, so that padding renders as an empty gap above/below the
   header and footer sections. The sections provide their own internal
   spacing, so zero the wrappers. */
#brx-header,
#brx-footer {
	padding-block: 0;
	padding-inline: 0;
}

/* Wrapper gutter removed above, so the section backgrounds span full width.
   Keep the header/footer CONTENT off the screen edges on small viewports by
   capping the inner containers at ACSS's --content-width-safe (= content-width
   on desktop, auto-inset by the gutter on narrow screens). */
#brx-header > * > .brxe-container,
#brx-footer > * > .brxe-container {
	max-width: var(--content-width-safe);
}

/* Contact form fields — prototype Input/Select styling (labels + hairline inputs
   + peach pill submit). Scoped to the form via the .balder-form class. */
.balder-form .form-group { margin-bottom: 18px; }
.balder-form label {
	display: block;
	font-size: .8125rem;
	font-weight: 600;
	color: var(--secondary);
	margin-bottom: 7px;
}
.balder-form input,
.balder-form select,
.balder-form textarea {
	width: 100%;
	padding: 13px 16px;
	font-size: .9375rem;
	color: var(--secondary);
	background: #fff;
	border: 1px solid var(--neutral-light);
	border-radius: 8px;
}
.balder-form input:focus,
.balder-form select:focus,
.balder-form textarea:focus {
	border-color: var(--secondary);
	outline: none;
}
.balder-form button[type="submit"] {
	background: var(--primary);
	color: #fff;
	border: none;
	border-radius: 100vmax;
	padding: 13px 26px;
	font-weight: 600;
	font-size: .9375rem;
	width: fit-content;
	cursor: pointer;
	transition: filter .2s ease;
}
.balder-form button[type="submit"]:hover { filter: brightness(.95); }

/* Om-page story-column label with flanking hairlines (prototype .belief__lbl) */
.story-label { display: flex; align-items: center; gap: 10px; }
.story-label::before, .story-label::after {
	content: ""; flex: 1; height: 1px; background: var(--neutral-light);
}

/* Heart watermark — centered, faint, behind section content (hero + testimonials) */
.heart-watermark {
	position: absolute;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	width: 600px; max-width: 80%;
	opacity: .4;
	z-index: 0;
	pointer-events: none;
	user-select: none;
}

/* Product cards — full-bleed photo with petrol gradient + glass icon tile
   (prototype ProductCard). rgba/backdrop-blur/multi-stop gradient can't be
   expressed with ACSS tokens, so they live here; structure stays in Bricks. */
.product-card { transition: transform .3s ease; }
.product-card:hover { transform: translateY(-3px); }
.product-card__photo { transition: transform .5s ease; }
.product-card:hover .product-card__photo { transform: scale(1.05); }
.product-card__overlay {
	background: linear-gradient(to top,
		rgba(0,42,56,.84) 0%, rgba(0,52,68,.62) 28%, rgba(0,62,82,.34) 52%,
		rgba(0,62,82,.12) 76%, rgba(0,62,82,0) 100%);
}
.product-card__icon {
	background: rgba(255,255,255,.16);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,.38);
}
/* Testimonial slider (Splide) — on-brand arrows + dots */
.testimonial-slider .splide__arrow {
	background: transparent;
	opacity: 1;
	width: 2.6rem; height: 2.6rem;
}
.testimonial-slider .splide__arrow svg { fill: var(--secondary); width: 1.1rem; height: 1.1rem; }
.testimonial-slider .splide__arrow:hover:not(:disabled) svg { fill: var(--primary); }
.testimonial-slider .splide__arrow:disabled { opacity: .3; }
.testimonial-slider .splide__pagination { position: relative; margin-top: var(--space-m); }
.testimonial-slider .splide__pagination__page {
	background: var(--neutral-light);
	opacity: 1; margin: 0 5px;
	transition: background .2s ease, transform .2s ease;
}
.testimonial-slider .splide__pagination__page.is-active {
	background: var(--primary);
	transform: scale(1.35);
}

/* ============ Product page (Bricks "Produktside" template + product-body element) ============ */
.prod-sec { padding-block: var(--space-xl); background: #fff; }
.prod-sec--cream { background: var(--accent); }
.prod-wrap { max-width: var(--content-width); margin-inline: auto; padding-inline: var(--gutter); }
.prod-wrap--narrow { max-width: 760px; }
.prod-head { max-width: 600px; margin-bottom: var(--space-l); }
.prod-head--center { max-width: 640px; margin-inline: auto; text-align: center; }
.prod-eyebrow { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .18em; font-weight: 700; color: var(--primary); margin: 0 0 var(--space-xs); }
.prod-h2 { color: var(--secondary); margin: 0 0 var(--space-xs); line-height: 1.14; }
.prod-lead { color: var(--info); font-size: var(--text-m); line-height: 1.7; margin: 0; }
.prod-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--secondary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.prod-ic svg { width: 22px; height: 22px; }

/* Coverage grid */
.prod-cov { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.prod-cov-card { background: #fff; border: 1px solid var(--neutral-light); border-radius: 24px; padding: var(--space-m); }
.prod-cov-card .prod-ic { margin-bottom: var(--space-s); }
.prod-cov-card h4 { color: var(--secondary); font-size: var(--text-l); margin: 0 0 8px; }
.prod-cov-card p { color: var(--info); font-size: var(--text-s); line-height: 1.6; margin: 0; }

/* Tier cards */
.prod-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 760px; margin-inline: auto; }
.prod-tier { position: relative; background: #fff; border: 1px solid var(--neutral-light); border-radius: 24px; padding: var(--space-l); display: flex; flex-direction: column; }
.prod-tier.is-featured { border-color: var(--primary); }
.prod-tier-badge { position: absolute; top: -12px; left: var(--space-l); background: color-mix(in srgb, var(--primary) 22%, #fff); color: var(--primary); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 12px; border-radius: 100vmax; }
.prod-tier h3 { color: var(--secondary); font-size: var(--text-xl); margin: 0 0 8px; }
.prod-tier-blurb { color: var(--info); font-size: var(--text-s); line-height: 1.55; margin: 0; }
.prod-tier-feats { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; flex-direction: column; gap: 11px; }
.prod-tier-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-s); color: var(--secondary); }
.prod-check { color: var(--success); flex-shrink: 0; display: inline-flex; }
.prod-check svg { width: 18px; height: 18px; }
.prod-tier-btn { margin-top: auto; background: var(--primary); color: #fff; text-align: center; font-weight: 600; font-size: var(--text-s); padding: 13px 26px; border-radius: 100vmax; }

/* FAQ accordion */
.prod-faq-item { border-bottom: 1px solid var(--neutral-light); }
.prod-faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: var(--text-m); font-weight: 600; color: var(--secondary); }
.prod-faq-item summary::-webkit-details-marker { display: none; }
.prod-faq-plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.prod-faq-plus::before, .prod-faq-plus::after { content: ""; position: absolute; background: var(--primary); border-radius: 2px; }
.prod-faq-plus::before { top: 7px; left: 0; width: 16px; height: 2px; }
.prod-faq-plus::after { left: 7px; top: 0; width: 2px; height: 16px; transition: transform .2s ease; }
.prod-faq-item[open] .prod-faq-plus::after { transform: scaleY(0); }
.prod-faq-a { color: var(--info); font-size: var(--text-s); line-height: 1.65; padding-bottom: 22px; }
.prod-faq-a p { margin: 0 0 10px; }

@media (max-width: 860px) {
  .prod-cov, .prod-tiers { grid-template-columns: 1fr; }
}

/* Category page — sub-product cards (name + Les mer) */
.cat-prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-prod-card { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-m); min-height: 150px; background: #fff; border: 1px solid var(--neutral-light); border-radius: 24px; padding: var(--space-m); transition: transform .2s ease, border-color .2s ease; }
.cat-prod-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.cat-prod-card h3 { color: var(--secondary); font-size: var(--text-l); margin: 0; }
.cat-prod-more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: var(--text-s); }
.cat-prod-more svg { width: var(--space-xs); height: var(--space-xs); }
@media (max-width: 860px) { .cat-prod-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cat-prod-grid { grid-template-columns: 1fr; } }

/* Om oss — dynamic leader cards (employee CPT) */
.leaders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }
.leader-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-m); background: #fff; border: 1px solid var(--neutral-light); border-radius: 24px; padding: var(--space-l); }
.leader-avatar img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; display: block; }
.leader-txt { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); }
.leader-role { font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin: 0; }
.leader-card h3 { color: var(--secondary); font-size: var(--text-xl); margin: 0; }
.leader-bio { color: var(--info); font-size: var(--text-s); line-height: 1.65; max-width: 560px; }
.leader-bio p { margin: 0 0 10px; }
.leader-contacts { display: flex; gap: var(--space-xs); margin-top: auto; }
.leader-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--secondary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.leader-ic svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .leaders-grid { grid-template-columns: 1fr; } }

/* Kontakt — quick-link cards (Meld skade / Min side) hover accent */
.kontakt-quick { transition: border-color .2s ease, transform .2s ease; }
.kontakt-quick:hover { border-color: var(--primary); transform: translateY(-2px); }

/* Min side gateway — two entry cards */
.minside-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); max-width: 920px; margin-inline: auto; }
@media (max-width: 820px) { .minside-grid { grid-template-columns: 1fr; } }
/* feature list — explicit flex so layout can't be disturbed by global rules */
.minside-feats { display: flex; flex-direction: column; gap: 12px; }
.minside-feat { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; }
.minside-feat > .brxe-svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--success); margin-top: 2px; }
.minside-feat > .brxe-text-basic { flex: 1 1 auto; min-width: 0; font-size: var(--text-s); color: var(--secondary); line-height: 1.5; margin: 0; }

/* ===== Animated icons (bai) — sitewide hover micro-animations, wired by bai.js ===== */
@keyframes bai-bob { 0%,100%{transform:translateY(0)} 35%{transform:translateY(-3.5px)} 65%{transform:translateY(0)} 84%{transform:translateY(-1.2px)} }
@keyframes bai-nudge { 0%,100%{transform:translateX(0)} 45%{transform:translateX(3px)} 75%{transform:translateX(-1.2px)} }
@keyframes bai-shake { 0%,100%{transform:rotate(0)} 22%{transform:rotate(-9deg)} 44%{transform:rotate(7deg)} 66%{transform:rotate(-4deg)} 84%{transform:rotate(2deg)} }
@keyframes bai-heartbeat { 0%,100%{transform:scale(1)} 26%{transform:scale(1.18)} 48%{transform:scale(1)} 70%{transform:scale(1.09)} }
@keyframes bai-swing { 0%,100%{transform:rotate(0)} 28%{transform:rotate(-12deg)} 60%{transform:rotate(9deg)} 84%{transform:rotate(-3deg)} }
@keyframes bai-pop { 0%,100%{transform:scale(1)} 45%{transform:scale(1.16) rotate(-4deg)} 75%{transform:scale(.98)} }
@keyframes bai-spin { 0%{transform:rotate(0) scale(1)} 60%{transform:rotate(210deg) scale(1.08)} 100%{transform:rotate(360deg) scale(1)} }
@keyframes bai-slide { 0%,100%{transform:translateX(0)} 50%{transform:translateX(3.5px)} }
.bai { overflow: visible; }
.bai__g { transform-box: fill-box; transform-origin: center; }
.bai--play .bai__g {
	animation-name: var(--bai-anim);
	animation-duration: var(--bai-dur, 1.5s);
	animation-timing-function: var(--bai-ease, cubic-bezier(.37,0,.16,1));
}
@media (prefers-reduced-motion: reduce) { .bai--play .bai__g { animation: none; } }

/* Mobile hamburger nav (balder-mobile-nav) — CSS-only, ≤991px only */
.bmn { display: none; }
.bmn-cb { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.bmn-btn {
	display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
	width: 44px; height: 44px; padding: 10px; margin-left: auto; cursor: pointer;
	border-radius: 10px; z-index: 1002;
}
.bmn-bar { display: block; height: 2px; width: 100%; background: var(--secondary); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
/* hamburger → X */
.bmn-cb:checked ~ .bmn-btn { position: fixed; top: 14px; right: 16px; }
.bmn-cb:checked ~ .bmn-btn .bmn-bar { background: #fff; }
.bmn-cb:checked ~ .bmn-btn .bmn-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bmn-cb:checked ~ .bmn-btn .bmn-bar:nth-child(2) { opacity: 0; }
.bmn-cb:checked ~ .bmn-btn .bmn-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* overlay panel */
.bmn-panel {
	position: fixed; inset: 0; z-index: 1001;
	background: var(--secondary);
	opacity: 0; visibility: hidden; transform: translateY(-8px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
	display: flex; align-items: center; justify-content: center;
	padding: 88px var(--gutter) 40px; overflow-y: auto;
}
.bmn-cb:checked ~ .bmn-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.bmn-links { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); width: 100%; max-width: 420px; }
.bmn-links a { color: #fff; font-size: var(--text-xl); font-weight: 600; text-decoration: none; transition: color .2s ease; }
.bmn-links a:hover { color: var(--primary); }
.bmn-links a.bmn-cta {
	margin-top: var(--space-xs); background: var(--primary); color: #fff;
	padding: 13px 30px; border-radius: 100vmax; font-size: var(--text-m);
}
.bmn-links a.bmn-cta:hover { filter: brightness(.95); color: #fff; }
@media (max-width: 991px) { .bmn { display: flex; align-items: center; justify-content: flex-end; } }

/* Header actions nav (Min side / Meld skade / Be om tilbud).
   Text links: ONLY opacity changes (0.75 base → 1 on hover + active). Colour is CONSTANT
   (secondary in every state — never black/peach), weight constant. The colour rule below is
   scoped high enough to beat both the nav-nested's peach active style AND the per-element
   black :hover on #brxe-lchsne. Button handled separately below. */
#brxe-itdysp .brx-nav-nested-items a.brxe-text-link,
#brxe-itdysp .brx-nav-nested-items a.brxe-text-link:hover,
#brxe-itdysp .brx-nav-nested-items a.brxe-text-link:focus,
#brxe-itdysp .brx-nav-nested-items > li > a.brxe-text-link[aria-current="page"] { color: var(--secondary); font-weight: 500; }
#brxe-itdysp .brx-nav-nested-items a.brxe-text-link { opacity: .75; transition: opacity .2s ease; }
#brxe-itdysp .brx-nav-nested-items a.brxe-text-link:hover,
#brxe-itdysp .brx-nav-nested-items > li > a.brxe-text-link[aria-current="page"] { opacity: 1; }
/* CTA button keeps white text + icon in every state (weight unchanged), and darkens slightly on hover */
#brxe-itdysp .brx-nav-nested-items > li > a.brxe-button[aria-current="page"] { color: var(--white); font-weight: 500; }
#brxe-itdysp .brx-nav-nested-items > li > a.brxe-button[aria-current="page"] svg { stroke: var(--white); }
#brxe-itdysp .brx-nav-nested-items a.brxe-button:hover { filter: brightness(0.93); color: var(--white); }

/* Rådgiver-CTA (balder-radgiver-cta) — reusable "Book en prat" callout */
.brc { display: flex; align-items: center; gap: var(--space-m); background: color-mix(in srgb, var(--secondary) 7%, #fff); border: 1px solid color-mix(in srgb, var(--secondary) 12%, #fff); border-radius: 20px; padding: var(--space-m) var(--space-l); }
.brc-ic { width: 52px; height: 52px; min-width: 52px; border-radius: 50%; background: var(--secondary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brc-ic svg { width: 24px; height: 24px; }
.brc-txt { flex: 1; min-width: 0; }
.brc-h { color: var(--secondary); font-weight: 600; font-size: var(--text-l); margin: 0 0 4px; }
.brc-d { color: var(--info); font-size: var(--text-s); line-height: 1.6; margin: 0; }
.brc-cta { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; font-weight: 600; font-size: var(--text-s); padding: 12px 24px; border-radius: 100vmax; white-space: nowrap; transition: filter .2s ease; }
.brc-cta:hover { filter: brightness(.95); color: #fff; }
.brc-cta svg { width: 16px; height: 16px; }
@media (max-width: 700px) { .brc { flex-direction: column; align-items: flex-start; } .brc-cta { align-self: stretch; justify-content: center; } }

/* Legal / info pages (Personvern, Angrerett, Klagemuligheter) — prose body */
.legal-body { max-width: 760px; margin-inline: auto; color: var(--info); font-size: var(--text-s); line-height: 1.75; }
.legal-body > :first-child { margin-top: 0; }
.legal-body h2, .legal-body h3 { color: var(--secondary); line-height: 1.2; margin: var(--space-l) 0 var(--space-xs); }
.legal-body h2 { font-size: var(--text-xl); }
.legal-body h3 { font-size: var(--text-l); }
.legal-body p { margin: 0 0 var(--space-s); }
.legal-body ul { margin: 0 0 var(--space-m); padding-left: 1.25em; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--primary); text-decoration: underline; }

/* FAQ page (balder-faq element) — narrow accordion list, reuses .prod-faq-* item styles */
.faq-list { max-width: 820px; margin-inline: auto; }
.faq-group + .faq-group { margin-top: var(--space-l); }
.faqcat { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--primary); margin: 0 0 var(--space-xs); }
.faq-list .prod-faq-a ul { margin: 0; padding-left: 20px; }
.faq-list .prod-faq-a li { margin-bottom: 6px; }

/* Meld skade — two-column claims layout (form panel + sticky reassurance aside) */
.skade-shell { display: grid; grid-template-columns: 1fr 360px; gap: var(--space-l); align-items: start; }
.skade-aside { position: sticky; top: var(--space-l); }
@media (max-width: 900px) {
  .skade-shell { grid-template-columns: 1fr; }
  .skade-aside { position: static; }
}