/* Klubik: sektionerne fra biblioteket og valgene pr. sektion (baggrund, afstand osv.). */

.klubik-public .kbx-text,
.klubik-public .kbx-cards-sec,
.klubik-public .kbx-faq,
.klubik-public .kbx-gallery,
.klubik-public .kbx-video-sec { padding-top: 70px; padding-bottom: 70px; }
.kbx-text > p { max-width: 760px; font-size: 18px; line-height: 1.7; color: var(--ink, #203842); }
.klubik-public .kbx-media .feature-text, .klubik-public .kbx-address .feature-text { padding: 0; }
.kbx-media .feature-text > p:not(.eyebrow), .kbx-address .feature-text > p:not(.eyebrow) { max-width: 480px; }
.kbx-address .feature-text > p:not(.eyebrow) { margin: 10px 0 4px; }

/* Topbillede med teksten i midten */
.wp-block-cover.hero-panel.kbx-hero-center { justify-content: center; align-items: center; text-align: center; }
.wp-block-cover.hero-panel.kbx-hero-center .hero-copy { margin-left: auto; margin-right: auto; max-width: 860px; text-align: center; }
.wp-block-cover.hero-panel.kbx-hero-center .hero-copy > p { margin-left: auto; margin-right: auto; }
.wp-block-cover.hero-panel.kbx-hero-center .hero-buttons { justify-content: center; }
.wp-block-cover.hero-panel.kbx-hero-center .hero-kicker::before { display: none; }

/* Tekst og billede */
.kbx-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding: 70px clamp(24px, 5.3vw, 80px); }
.kbx-media .kbx-media-img { margin: 0; }
.kbx-media .kbx-media-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; display: block; }
.kbx-media.kbx-flip .kbx-media-text { order: 2; }

/* Citat */
.kbx-quote { padding: 80px clamp(24px, 12vw, 220px); text-align: center; }
.kbx-quote .kbx-quote-mark { font: 800 72px/0.6 var(--serif, Manrope, sans-serif); color: var(--coral, #e4896e); margin: 0 0 18px; }
.kbx-quote .kbx-quote-text { font: 700 clamp(22px, 2.6vw, 34px)/1.35 var(--serif, Manrope, sans-serif); letter-spacing: -0.01em; margin: 0 0 22px; }
.kbx-quote .kbx-quote-by { color: var(--mutedink, #76858a); font-size: 15px; }
.kbx-quote .kbx-quote-by strong { color: inherit; display: inline-block; color: var(--ink, #203842); }

/* Tre kort */
.kbx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.kbx-card { background: var(--paper, #fffef9); border: 1px solid var(--line, #e5e0d5); border-radius: 16px; padding: 26px 24px; }
.kbx-card h3 { margin: 0 0 8px; font-size: 21px; }
.kbx-card p { margin: 0; color: var(--mutedink, #76858a); line-height: 1.6; }

/* Spørgsmål og svar */
.kbx-faq-item { border-top: 1px solid var(--line, #e5e0d5); padding: 18px 0; max-width: 860px; }
.kbx-faq-item:last-child { border-bottom: 1px solid var(--line, #e5e0d5); }
.kbx-faq-item h3 { margin: 0 0 6px; font-size: 19px; }
.kbx-faq-item p { margin: 0; line-height: 1.65; }

/* Stort billede */
.kbx-wide { padding: 0; }
.kbx-wide .wp-block-image { margin: 0; }
.kbx-wide .wp-block-image img { width: 100%; max-height: 640px; object-fit: cover; display: block; }
.kbx-wide .wp-block-image figcaption { text-align: center; color: var(--mutedink, #76858a); font-size: 14px; padding: 10px 24px 0; }

/* Billede med tekst ovenpå */
.wp-block-cover.kbx-banner { padding: 60px clamp(24px, 5.3vw, 80px); text-align: center; justify-content: center; }
.wp-block-cover.kbx-banner .wp-block-cover__inner-container { max-width: 760px; margin: 0 auto; color: #fff; }
.wp-block-cover.kbx-banner h2 { color: #fff; font-size: clamp(30px, 4vw, 54px); margin: 0 0 12px; }
.wp-block-cover.kbx-banner p { font-size: 18px; }
.wp-block-cover.kbx-banner .wp-block-buttons { justify-content: center; }

/* Video */
.kbx-video { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--deep, #173e48); display: grid; place-items: center; max-width: 1100px; }
.kbx-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kbx-video small { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: rgba(255,255,255,.7); font-size: 13px; }
.kbx-video.is-playing small { display: none; }
.kbx-video-play { width: 86px; height: 86px; border-radius: 50%; border: 0; background: var(--lime, #dfef6d); cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.kbx-video-play span { width: 0; height: 0; border-left: 24px solid var(--deep, #173e48); border-top: 15px solid transparent; border-bottom: 15px solid transparent; margin-left: 6px; }
.kbx-video.is-empty { color: rgba(255,255,255,.8); padding: 24px; text-align: center; font-size: 15px; }

/* Kort og adresse */
.kbx-address { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding: 70px clamp(24px, 5.3vw, 80px); }
.kbx-address-text .wp-block-buttons { margin-top: 18px; }
.kbx-address .kbx-address-pin { margin: 0; aspect-ratio: 4 / 3; border-radius: 18px; background:
	radial-gradient(circle at 50% 46%, var(--coral, #e4896e) 0 12px, transparent 13px),
	radial-gradient(circle at 50% 46%, rgba(228,137,110,.25) 0 34px, transparent 35px),
	repeating-linear-gradient(0deg, transparent 0 46px, rgba(23,62,72,.07) 46px 48px),
	repeating-linear-gradient(90deg, transparent 0 46px, rgba(23,62,72,.07) 46px 48px),
	linear-gradient(135deg, #e7efe3, #dfe8ea); }

/* ---------- Valg pr. sektion ---------- */
.kbx-bg-hvid { background: #fff !important; }
.kbx-bg-lys { background: var(--sand, #f7f4eb) !important; }
.kbx-bg-moerk { background: var(--deep, #173e48) !important; color: #fff; }
.kbx-bg-moerk h1, .kbx-bg-moerk h2, .kbx-bg-moerk h3, .kbx-bg-moerk .kbx-quote-by strong { color: #fff !important; }
.kbx-bg-moerk p, .kbx-bg-moerk .eyebrow, .kbx-bg-moerk .kbx-quote-by, .kbx-bg-moerk .kbx-card p { color: rgba(255,255,255,.8) !important; }
.kbx-bg-moerk h2 em { color: var(--lime, #dfef6d); }
.kbx-bg-moerk .kbx-card, .kbx-bg-moerk .kbx-faq-item { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); }
.kbx-bg-moerk .feature-quote p, .kbx-bg-moerk .feature-quote strong, .kbx-bg-moerk .kbx-card h3 { color: var(--ink, #203842) !important; }
.kbx-bg-moerk .feature-quote .quote-person { color: #6c7b7f !important; }
.kbx-bg-moerk .feature-quote .quote-graphic { color: rgba(255,255,255,.75) !important; }
.kbx-bg-moerk .kbx-card h3 { color: #fff !important; }
.kbx-bg-moerk .is-style-outline-klubik .wp-block-button__link { color: #fff !important; border-color: rgba(255,255,255,.55) !important; }
.kbx-bg-moerk .section-heading h2, .kbx-bg-moerk .feature-text h2 { color: #fff !important; }
.kbx-bg-moerk .text-link > a { color: var(--lime, #dfef6d) !important; }
.kbx-bg-moerk .klubik-news .news-card, .kbx-bg-moerk input, .kbx-bg-moerk textarea { color: var(--ink, #203842); }
.kbx-bg-accent { background: var(--lime, #dfef6d) !important; color: var(--deep, #173e48); }
.kbx-bg-accent h2 em { color: var(--deep, #173e48); }
.kbx-sp-lille { padding-top: 34px !important; padding-bottom: 34px !important; }
.kbx-sp-mellem { padding-top: 70px !important; padding-bottom: 70px !important; }
.kbx-sp-stor { padding-top: 120px !important; padding-bottom: 120px !important; }
.split-feature.kbx-flip .feature-text { order: 2; }

@media (max-width: 760px) {
	.kbx-media, .kbx-address { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
	.kbx-media.kbx-flip .kbx-media-text { order: 0; }
	.kbx-cards { grid-template-columns: 1fr; }
	.kbx-quote { padding: 56px 24px; }
	.kbx-mobil-skjul:not(.kbx-is-hidden) { display: none !important; }
	body.kbx-on .kbx-mobil-skjul { display: block !important; opacity: .45; }
	.kbx-sp-stor { padding-top: 70px !important; padding-bottom: 70px !important; }
}

/* Knappen "Rediger forsiden" */
.kbx-start { position: fixed; left: 18px; bottom: 18px; z-index: 9990; display: inline-flex; align-items: center; gap: 8px; background: var(--deep, #173e48); color: #fff !important; text-decoration: none; font: 700 14.5px "DM Sans", system-ui, sans-serif; padding: 12px 18px; border-radius: 999px; box-shadow: 0 8px 26px rgba(10, 30, 40, .28); }
.kbx-start:hover { background: var(--ink, #203842); }
.kbx-start svg { color: var(--lime, #dfef6d); }

/* På almindelige sider står indholdet allerede i en kolonne, så sektionerne skal ikke have ekstra luft i siderne. */
.klubik-public .public-page .entry-content > .home-section,
.klubik-public .public-page .entry-content > .home-news,
.klubik-public .public-page .entry-content > .home-contact,
.klubik-public .public-page .entry-content > .kbx-media,
.klubik-public .public-page .entry-content > .kbx-address,
.klubik-public .public-page .entry-content > .kbx-quote,
.klubik-public .public-page .entry-content > .kbx-wrap > .home-section,
.klubik-public .public-page .entry-content > .kbx-wrap > .kbx-media { padding-left: 0 !important; padding-right: 0 !important; }
.klubik-public .public-page .entry-content > .join-banner { margin-left: 0 !important; margin-right: 0 !important; }
.klubik-public .public-page .entry-content > .kbx-quote { text-align: left; }
.klubik-public .public-page .entry-content > .home-section:first-child { padding-top: 30px; }

:root { --kbx-pad: clamp(24px, 5.3vw, 80px); }
@media (max-width: 760px) { :root { --kbx-pad: 18px; } }

/* Bredde og baggrund på almindelige sider. Hver sektion har sin egen bredde.
   En baggrundsfarve går altid helt ud til kanterne; bredden bestemmer kun, hvor bredt indholdet står:
   Som teksten: i sidens tekstkolonne (760 px, på linje med titlen).
   Bred: 1160 px, centreret.  Fuld bredde: næsten ud til kanterne. */
.klubik-public .public-page .entry-content > :is([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld) {
	width: 100vw !important; max-width: none !important; box-sizing: border-box; border-radius: 0;
	margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important;
	padding-left: calc(50vw - 50%) !important; padding-right: calc(50vw + 50% - min(760px, 100%)) !important;
}
.klubik-public .public-page .entry-content > .kbx-w-bred { padding-left: calc((100vw - min(1160px, 100vw - 2 * var(--kbx-pad))) / 2) !important; padding-right: calc((100vw - min(1160px, 100vw - 2 * var(--kbx-pad))) / 2) !important; }
.klubik-public .public-page .entry-content > .kbx-w-fuld { padding-left: var(--kbx-pad) !important; padding-right: var(--kbx-pad) !important; }
.klubik-public .public-page .entry-content > :is(.kbx-w-bred, .kbx-w-fuld, [class*="kbx-bg-"]) > * { max-width: none !important; }
.klubik-public .public-page .entry-content > .kbx-wide.kbx-w-fuld { padding-left: 0 !important; padding-right: 0 !important; }
.klubik-public .public-page .entry-content > .wp-block-cover:is([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld) { padding-top: 60px; padding-bottom: 60px; }
.klubik-public .public-page .entry-content > :is(p, h2, h3, h4, ul, ol)[class*="kbx-bg-"] { padding-top: 22px; padding-bottom: 22px; margin-top: 0; margin-bottom: 0; }
.klubik-public .public-page .entry-content > [class*="kbx-bg-"] + [class*="kbx-bg-"] { margin-top: 0 !important; }
.klubik-public .public-page .entry-content > :is(.home-section, .kbx-media, .kbx-address, .kbx-quote, .page-body, .kbx-text, .kbx-run, .kbx-wrap)[class*="kbx-bg-"]:not([class*="kbx-sp-"]) { padding-top: 60px; padding-bottom: 60px; }
/* Eventkort har samme størrelse på alle sider som på forsiden. */
.klubik-public .entry-content .kbk-ev-grid:not(.is-list, .is-one) { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.kbx-w-bred .kbx-cards, .kbx-w-fuld .kbx-cards { gap: 20px; }
html, body { overflow-x: clip; }
.kbx-cards > * { margin: 0 !important; }
/* "Indhold" (page-body) på almindelige sider: følger kolonnen i stedet for at centrere sig. */
.klubik-public .public-page .entry-content > .page-body:not([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld),
.klubik-public .public-page .entry-content > .kbx-wrap > .page-body { width: auto; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0; padding-right: 0; }

.klubik-public .public-page .entry-content > .page-body:is([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld) { margin-top: 0; margin-bottom: 0; }
/* Sidens titel følger bredden på den første sektion. */
body:is(.kbx-intro-bred, .kbx-intro-fuld) .public-content.public-page > .page-intro { width: 100vw; max-width: none; box-sizing: border-box; margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important; }
body.kbx-intro-bred .public-content.public-page > .page-intro { padding-left: calc((100vw - min(1160px, 100vw - 2 * var(--kbx-pad))) / 2); padding-right: calc((100vw - min(1160px, 100vw - 2 * var(--kbx-pad))) / 2); }
body.kbx-intro-fuld .public-content.public-page > .page-intro { padding-left: var(--kbx-pad); padding-right: var(--kbx-pad); }
body:has(.public-page > .entry-content > .kbx-w-bred:nth-child(1 of :not(.kbx-ui))) .public-content.public-page > .page-intro { width: 100vw; max-width: none; box-sizing: border-box; margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important; padding-left: calc((100vw - min(1160px, 100vw - 2 * var(--kbx-pad))) / 2); padding-right: calc((100vw - min(1160px, 100vw - 2 * var(--kbx-pad))) / 2); }
body:has(.public-page > .entry-content > .kbx-w-fuld:nth-child(1 of :not(.kbx-ui))) .public-content.public-page > .page-intro { width: 100vw; max-width: none; box-sizing: border-box; margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important; padding-left: var(--kbx-pad); padding-right: var(--kbx-pad); }
/* Slutter siden med en sektion med baggrund, går den helt ned til bunden uden et tomt felt. */
.klubik-public .public-content.public-page:has(> .entry-content > [class*="kbx-bg-"]:nth-last-child(1 of :not(.kbx-ui, p:empty, .wp-block-spacer))) { padding-bottom: 0 !important; }
.klubik-public .public-page .entry-content > [class*="kbx-bg-"]:nth-last-child(1 of :not(.kbx-ui, p:empty, .wp-block-spacer)) { margin-bottom: 0 !important; }
/* Tomme afsnit giver ikke et tomt felt på den udgivne side. */
body:not(.kbx-on) .klubik-public .public-page .entry-content > p:empty, body.klubik-public:not(.kbx-on) .public-page .entry-content > p:empty { display: none; }
/* Sider med topbillede: indholdet står i fuld bredde, så bredde og baggrund styres her. */
.klubik-public .hero-page-content > :is([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld) {
	width: 100% !important; max-width: none !important; box-sizing: border-box; border-radius: 0;
	margin-left: 0 !important; margin-right: 0 !important;
	padding-left: calc((100% - min(1160px, 100%)) / 2 + var(--kbx-pad)) !important; padding-right: calc((100% - min(1160px, 100%)) / 2 + var(--kbx-pad)) !important;
}
.klubik-public .hero-page-content > .kbx-w-bred { padding-left: calc((100% - min(1160px, 100% - 2 * var(--kbx-pad))) / 2) !important; padding-right: calc((100% - min(1160px, 100% - 2 * var(--kbx-pad))) / 2) !important; }
.klubik-public .hero-page-content > .kbx-w-fuld { padding-left: var(--kbx-pad) !important; padding-right: var(--kbx-pad) !important; }
.klubik-public .hero-page-content > .kbx-wide.kbx-w-fuld { padding-left: 0 !important; padding-right: 0 !important; }
.klubik-public .hero-page-content > :is([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld) > :not(.kbx-ui) { max-width: none !important; }
.klubik-public .hero-page-content > :is([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld) > .page-body { width: auto; padding-left: 0; padding-right: 0; margin-left: 0 !important; margin-right: 0 !important; }
.klubik-public .hero-page-content > :is(p, h2, h3, h4, ul, ol, .kbx-run, .kbx-wrap)[class*="kbx-bg-"]:not([class*="kbx-sp-"]) { padding-top: 40px; padding-bottom: 40px; }
.klubik-public .hero-page-content > :is(p, h2, h3, h4, ul, ol, blockquote, figure, table, .wp-block-buttons, .kbx-run, .kbx-wrap):not([class*="kbx-bg-"], .kbx-w-bred, .kbx-w-fuld) { max-width: none; margin-left: calc((100% - min(1160px, 100%)) / 2 + var(--kbx-pad)) !important; margin-right: calc((100% - min(1160px, 100%)) / 2 + var(--kbx-pad)) !important; }
