/* OTB Moderne – navyblåt tema oven på Astra + Beaver Builder.
   Alt er scoped under body.otb-modern, så det kan slås fra i kontrolpanelet. */

body.otb-modern {
	--otb-navy-900: #081a33;
	--otb-navy-800: #0d2447;
	--otb-navy-700: #13305c;
	--otb-navy-600: #1e4a8a;
	--otb-navy-100: #e6edf7;
	--otb-navy-50: #f3f6fb;
	--otb-gold: #d4a84b;
	--otb-text: #1f2a3a;
	--otb-muted: #5b6678;
	--otb-radius: 16px;
	--otb-shadow: 0 1px 2px rgba(8, 26, 51, .06), 0 8px 24px rgba(8, 26, 51, .08);
	--otb-shadow-lg: 0 2px 4px rgba(8, 26, 51, .08), 0 18px 40px rgba(8, 26, 51, .16);

	/* Astra globale farver */
	--ast-global-color-0: var(--otb-navy-700);
	--ast-global-color-1: var(--otb-navy-600);
	--ast-global-color-2: var(--otb-navy-900);
	--ast-global-color-3: var(--otb-text);

	color: var(--otb-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body.otb-modern a { color: var(--otb-navy-600); }
body.otb-modern a:hover { color: var(--otb-navy-800); }
body.otb-modern h1, body.otb-modern h2, body.otb-modern h3,
body.otb-modern h4, body.otb-modern h5, body.otb-modern h6,
body.otb-modern .fl-heading { color: var(--otb-navy-900); letter-spacing: -.01em; }
body.otb-modern ::selection { background: var(--otb-navy-700); color: #fff; }

/* ---------- Header ---------- */
body.otb-modern #masthead { box-shadow: 0 1px 0 rgba(8, 26, 51, .08); position: relative; z-index: 99; }

/* Topbjælke (sociale ikoner + Bliv medlem) → mørk navy */
body.otb-modern .ast-above-header-bar { background: var(--otb-navy-900) !important; border: 0 !important; min-height: 0; }
body.otb-modern .site-above-header-wrap { min-height: 44px !important; }
body.otb-modern .ast-above-header-bar .ast-social-color-type-custom svg,
body.otb-modern .ast-above-header-bar .ast-header-social-wrap svg { fill: #fff !important; }
body.otb-modern .ast-above-header-bar .ast-header-social-wrap a { color: #fff !important; opacity: .85; transition: opacity .2s; }
body.otb-modern .ast-above-header-bar .ast-header-social-wrap a:hover { opacity: 1; }

/* Hovedbjælke */
body.otb-modern .ast-primary-header-bar,
body.otb-modern .main-header-bar { background: rgba(255, 255, 255, .96) !important; border-bottom: 0 !important; }
body.otb-modern .site-title a, body.otb-modern .site-title a:hover { color: var(--otb-navy-900) !important; font-weight: 800; letter-spacing: -.02em; }

body.otb-modern .main-header-menu > .menu-item > .menu-link {
	color: var(--otb-navy-900) !important;
	font-weight: 600;
	position: relative;
	white-space: nowrap;
}
body.otb-modern.ast-desktop .main-header-menu > .menu-item > .menu-link { font-size: 16px !important; padding-left: .95em !important; padding-right: .95em !important; }
body.otb-modern .main-header-menu > .menu-item > .menu-link::after { left: .95em; right: .95em; }
@media (max-width: 1200px) {
	body.otb-modern.ast-desktop .main-header-menu > .menu-item > .menu-link { font-size: 15px !important; padding-left: .6em !important; padding-right: .6em !important; }
	body.otb-modern .main-header-menu > .menu-item > .menu-link::after { left: .6em; right: .6em; }
	body.otb-modern.ast-desktop .site-title { font-size: 22px !important; }
}

/* Undermenuer */
body.otb-modern.ast-desktop .main-header-menu .sub-menu {
	border: 0 !important; border-radius: 12px; padding: 8px 0; overflow: visible;
	box-shadow: var(--otb-shadow-lg); background: #fff;
}
body.otb-modern.ast-desktop .main-header-menu .sub-menu .menu-link { color: var(--otb-text) !important; padding: .6em 1.2em; border: 0 !important; }
body.otb-modern.ast-desktop .main-header-menu .sub-menu .menu-item:hover > .menu-link { background: var(--otb-navy-50); color: var(--otb-navy-700) !important; }

/* Knapper (Bliv medlem m.fl.) */
body.otb-modern .ast-custom-button,
body.otb-modern .ast-header-button-1 .ast-custom-button,
body.otb-modern .ast-button, body.otb-modern button.ast-button,
body.otb-modern .wp-block-button__link,
body.otb-modern .wpforms-submit {
	background: var(--otb-gold) !important; color: var(--otb-navy-900) !important;
	border: 0 !important; border-radius: 999px !important;
	font-weight: 700 !important; letter-spacing: .02em; padding: .6em 1.4em !important;
	transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
body.otb-modern .ast-custom-button:hover,
body.otb-modern .wpforms-submit:hover { background: #e2ba62 !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }

/* Mobilheader */
body.otb-modern .ast-mobile-header-wrap .ast-primary-header-bar { background: #fff !important; }
body.otb-modern .ast-mobile-header-wrap .menu-toggle,
body.otb-modern .ast-mobile-header-wrap .menu-toggle:hover,
body.otb-modern .ast-mobile-header-wrap .menu-toggle:focus { background: var(--otb-navy-700) !important; color: #fff !important; border-radius: 10px !important; border: 0 !important; }
body.otb-modern .ast-mobile-header-wrap .menu-toggle .ast-mobile-svg,
body.otb-modern .ast-mobile-header-wrap .menu-toggle svg { fill: #fff !important; color: #fff !important; }
body.otb-modern .ast-mobile-header-content .main-header-menu .menu-link { color: var(--otb-navy-900) !important; font-weight: 600; }
body.otb-modern .ast-mobile-header-content .main-header-menu .sub-menu .menu-link { font-weight: 400; }
body.otb-modern .ast-mobile-header-content .ast-menu-toggle { color: var(--otb-navy-700) !important; }

/* ---------- Hero (Beaver Builder række med baggrundsfoto) ---------- */
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child > .fl-row-content-wrap {
	min-height: min(82vh, 780px);
	display: flex; flex-direction: column; justify-content: center;
	background-position: center 35% !important;
}
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child > .fl-row-content-wrap > .fl-row-content {
	width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
	padding-left: clamp(20px, 4vw, 40px); padding-right: clamp(20px, 4vw, 40px); box-sizing: border-box;
}
body.otb-modern .fl-row-bg-overlay > .fl-row-content-wrap::after {
	background: linear-gradient(100deg, rgba(8, 26, 51, .92) 0%, rgba(13, 36, 71, .78) 42%, rgba(19, 48, 92, .25) 100%) !important;
}
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child h1,
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child .fl-heading {
	color: #fff !important;
	font-size: clamp(2.4rem, 5.5vw, 4.4rem) !important;
	line-height: 1.05 !important; font-weight: 800 !important; letter-spacing: -.03em;
	margin-bottom: .35em;
}
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child h1::after {
	content: ""; display: block; width: 72px; height: 4px; border-radius: 4px; background: var(--otb-gold); margin-top: .35em;
}
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child .fl-rich-text,
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child .fl-rich-text p {
	color: rgba(255, 255, 255, .9) !important;
	font-size: clamp(1rem, 1.15vw, 1.12rem) !important; line-height: 1.7 !important;
}
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child .fl-module-rich-text { max-width: 640px; }

/* Beaver Builder-knapper */
body.otb-modern .fl-builder-content a.fl-button,
body.otb-modern .fl-builder-content a.fl-button:visited {
	background: #fff !important; color: var(--otb-navy-900) !important;
	border: 0 !important; border-radius: 999px !important;
	padding: 14px 24px !important; font-weight: 700 !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
body.otb-modern .fl-builder-content a.fl-button *,
body.otb-modern .fl-builder-content a.fl-button .fl-button-icon { color: var(--otb-navy-900) !important; }
body.otb-modern .fl-builder-content a.fl-button:hover { background: var(--otb-gold) !important; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child .fl-module-button { display: inline-block; vertical-align: top; margin-right: 12px; }
body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child .fl-module-button .fl-module-content { margin: 8px 0 !important; }

/* ---------- Indholdsrækker ---------- */
body.otb-modern .fl-builder-content > .fl-row.fl-row-bg-color > .fl-row-content-wrap { background-color: var(--otb-navy-50) !important; }
body.otb-modern.home .fl-builder-content > .fl-row:nth-child(2) > .fl-row-content-wrap {
	padding-top: 40px !important; padding-bottom: 48px !important;
}

/* UABB slide-bokse (2026 / Stævner) → kort */
body.otb-modern .uabb-slide-box-wrap .uabb-slide-box { border-radius: var(--otb-radius); overflow: hidden; box-shadow: var(--otb-shadow); transition: box-shadow .2s, transform .2s; }
body.otb-modern .uabb-slide-box-wrap .uabb-slide-box:hover { box-shadow: var(--otb-shadow-lg); transform: translateY(-2px); }
body.otb-modern .uabb-slide-dropdown { border-radius: 999px 999px 0 0; }
body.otb-modern .uabb-slide-front { background: #fff !important; border-top: 4px solid var(--otb-navy-700); }
body.otb-modern .uabb-slide-front .uabb-slide-face-text-title { color: var(--otb-navy-900) !important; font-weight: 800 !important; }
body.otb-modern .uabb-slide-front .uabb-icon i,
body.otb-modern .uabb-slide-front .uabb-icon i::before { color: var(--otb-navy-600) !important; }
body.otb-modern .uabb-slide-down,
body.otb-modern .uabb-slide-dropdown .uabb-slide-down,
body.otb-modern .uabb-slide-box .uabb-slide-dropdown { background: var(--otb-navy-700) !important; }
body.otb-modern .uabb-slide-dropdown i,
body.otb-modern .uabb-slide-dropdown i::before { color: #fff !important; }
body.otb-modern .uabb-slide-back { background: var(--otb-navy-800) !important; }
body.otb-modern .uabb-slide-back, body.otb-modern .uabb-slide-back * { color: #fff !important; }
body.otb-modern .uabb-slide-back a { text-decoration: underline; text-underline-offset: 3px; }

/* Sektionsoverskrifter */
body.otb-modern .fl-builder-content h2.fl-heading {
	font-size: clamp(1.6rem, 3vw, 2.3rem) !important; font-weight: 800 !important; color: var(--otb-navy-900) !important;
}
body.otb-modern .fl-builder-content h2.fl-heading .fl-heading-text { color: inherit !important; }
body.otb-modern.home .fl-builder-content > .fl-row:nth-child(3) > .fl-row-content-wrap { padding-top: 64px !important; }

/* ---------- Facebook-feed ---------- */
body.otb-modern #cff .cff-item {
	background: #fff !important; border: 1px solid var(--otb-navy-100) !important; border-radius: var(--otb-radius) !important;
	box-shadow: var(--otb-shadow); padding: 20px 22px !important; margin-bottom: 20px !important;
	transition: box-shadow .2s, transform .2s;
}
body.otb-modern #cff .cff-item:hover { box-shadow: var(--otb-shadow-lg); transform: translateY(-2px); }
body.otb-modern #cff .cff-author-text .cff-page-name a { color: var(--otb-navy-900) !important; font-weight: 700; }
body.otb-modern #cff .cff-post-links a,
body.otb-modern #cff .cff-view-comments { color: var(--otb-navy-600) !important; }
body.otb-modern #cff .cff-load-more,
body.otb-modern #cff .cff-follow-button,
body.otb-modern #cff .cff-likebox .cff-follow-btn { background: var(--otb-navy-700) !important; color: #fff !important; border-radius: 999px !important; }
body.otb-modern #cff .cff-media-wrap img,
body.otb-modern #cff .cff-photo img { border-radius: 10px; }

/* ---------- Almindelige sider ---------- */
body.otb-modern .entry-title, body.otb-modern .page-title { color: var(--otb-navy-900); font-weight: 800; }
body.otb-modern .fl-builder-content .fl-photo-img,
body.otb-modern .fl-builder-content .fl-mosaicflow-item img,
body.otb-modern .fl-builder-content .fl-gallery-item img { border-radius: 12px; }
body.otb-modern .wpforms-container input:not([type=submit]):focus,
body.otb-modern .wpforms-container textarea:focus { border-color: var(--otb-navy-600) !important; box-shadow: 0 0 0 3px rgba(30, 74, 138, .2) !important; }

/* ---------- Footer ---------- */
body.otb-modern .site-footer,
body.otb-modern .site-below-footer-wrap,
body.otb-modern .site-primary-footer-wrap,
body.otb-modern .site-above-footer-wrap { background: var(--otb-navy-900) !important; border: 0 !important; }
body.otb-modern .site-footer, body.otb-modern .site-footer p,
body.otb-modern .site-footer .ast-footer-copyright { color: rgba(255, 255, 255, .7) !important; }
body.otb-modern .site-footer a { color: #fff !important; }
body.otb-modern .site-below-footer-wrap { padding: 28px 0 !important; }

/* ---------- Undersider: sidebanner + tekst ---------- */
body.otb-modern .ast-single-entry-banner { background: var(--otb-navy-50) !important; border-bottom: 1px solid var(--otb-navy-100); }
body.otb-modern .ast-single-entry-banner .entry-title { text-wrap: balance; }
body.otb-modern .ast-breadcrumbs-wrapper a, body.otb-modern .ast-single-entry-banner a { color: var(--otb-navy-600) !important; }
body.otb-modern .fl-rich-text { overflow-wrap: break-word; }
body.otb-modern .fl-rich-text a { overflow-wrap: anywhere; }
body.otb-modern .fl-rich-text h2, body.otb-modern .fl-rich-text h3, body.otb-modern .fl-rich-text h4 { text-wrap: balance; }
body.otb-modern .fl-rich-text p, body.otb-modern .fl-rich-text li { text-wrap: pretty; }

/* Tabeller (fx Undervisningsplan) */
body.otb-modern .fl-rich-text table { border-collapse: collapse; width: 100%; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--otb-shadow); border: 0; }
body.otb-modern .fl-rich-text th { background: var(--otb-navy-700) !important; color: #fff !important; font-weight: 600; border: 0 !important; padding: 10px 12px; }
body.otb-modern .fl-rich-text td { border: 0 !important; border-top: 1px solid var(--otb-navy-100) !important; padding: 10px 12px; }
body.otb-modern .fl-rich-text tbody tr:nth-child(even) td { background: var(--otb-navy-50); }
body.otb-modern .otb-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* ---------- Mobil ---------- */
@media (max-width: 921px) {
	body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child > .fl-row-content-wrap { min-height: 78vh; }
	body.otb-modern .fl-row-bg-overlay > .fl-row-content-wrap::after {
		background: linear-gradient(180deg, rgba(8, 26, 51, .7) 0%, rgba(8, 26, 51, .88) 100%) !important;
	}
}
@media (max-width: 768px) {
	/* Luft i siderne – Beaver Builder-rækkerne har 0 px på mobil */
	body.otb-modern:not(.home) .fl-builder-content .fl-row-content-wrap { padding-left: 20px !important; padding-right: 20px !important; }
	body.otb-modern:not(.home) .fl-builder-content .fl-row-content-wrap .fl-row-content-wrap { padding-left: 0 !important; padding-right: 0 !important; }
	body.otb-modern:not(.home) .fl-builder-content > .fl-row:first-child > .fl-row-content-wrap { padding-top: 28px !important; }
	body.otb-modern:not(.home) .fl-builder-content > .fl-row:last-child > .fl-row-content-wrap { padding-bottom: 40px !important; }
	body.otb-modern .entry-content > p, body.otb-modern .entry-content > ul { padding-left: 20px; padding-right: 20px; }

	/* Header */
	body.otb-modern .ast-mobile-header-wrap .site-title { font-size: 21px !important; line-height: 1.2 !important; white-space: nowrap; }
	body.otb-modern .ast-mobile-header-wrap .ast-primary-header-bar .site-primary-header-wrap { min-height: 64px !important; }
	body.otb-modern .ast-mobile-header-wrap .menu-toggle { width: 44px; height: 44px; display: inline-flex !important; align-items: center; justify-content: center; }
	body.otb-modern .ast-mobile-header-content .main-header-menu .menu-link { padding-top: 14px !important; padding-bottom: 14px !important; padding-left: 20px !important; }

	/* Sidebanner kompakt */
	body.otb-modern .ast-single-entry-banner { padding: 28px 20px !important; min-height: 0 !important; }
	body.otb-modern .ast-single-entry-banner .entry-title { font-size: 1.6rem !important; line-height: 1.2 !important; margin-bottom: 6px; }

	/* Læsbar tekst */
	body.otb-modern .fl-rich-text, body.otb-modern .fl-rich-text p, body.otb-modern .fl-rich-text li { font-size: 16px !important; line-height: 1.6 !important; }
	body.otb-modern .fl-rich-text h2 { font-size: 1.45rem !important; line-height: 1.25 !important; }
	body.otb-modern .fl-rich-text h3 { font-size: 1.25rem !important; line-height: 1.3 !important; margin-top: 1.4em; }
	body.otb-modern .fl-rich-text h4 { font-size: 1.1rem !important; line-height: 1.3 !important; }
	body.otb-modern .fl-rich-text ul, body.otb-modern .fl-rich-text ol { padding-left: 1.15em !important; margin-left: 0 !important; }
	body.otb-modern .fl-rich-text li { margin-bottom: .45em; }
	body.otb-modern .fl-rich-text p { white-space: normal; }

	/* Skema → ét kort pr. række */
	body.otb-modern table.otb-stack, body.otb-modern table.otb-stack tbody,
	body.otb-modern table.otb-stack tr, body.otb-modern table.otb-stack td { display: block; width: 100%; box-sizing: border-box; }
	body.otb-modern table.otb-stack { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
	body.otb-modern table.otb-stack thead { display: none; }
	body.otb-modern table.otb-stack tr { background: #fff; border: 1px solid var(--otb-navy-100); border-radius: 12px; overflow: hidden; margin-bottom: 12px; box-shadow: var(--otb-shadow); }
	body.otb-modern table.otb-stack tr.otb-row-empty { display: none; }
	body.otb-modern table.otb-stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; text-align: right; padding: 11px 16px !important; background: #fff !important; }
	body.otb-modern table.otb-stack td::before { content: attr(data-label); font-weight: 600; color: var(--otb-navy-900); text-align: left; flex: none; }
	body.otb-modern table.otb-stack td:first-child { background: var(--otb-navy-700) !important; color: #fff; font-weight: 700; justify-content: flex-start; border-top: 0 !important; text-align: left; }
	body.otb-modern table.otb-stack td:first-child::before { content: none; }
	body.otb-modern table.otb-stack td.otb-empty { display: none; }

	/* Forside */
	body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child .fl-module-button { display: block; margin-right: 0; }
	body.otb-modern.home .fl-builder-content > .fl-row-bg-photo:first-child a.fl-button { display: flex !important; justify-content: center; width: 100%; min-height: 48px; align-items: center; }
	body.otb-modern.home .fl-builder-content > .fl-row:nth-child(2) .fl-col { margin-bottom: 16px; }
	body.otb-modern.home .fl-builder-content > .fl-row:not(:first-child) > .fl-row-content-wrap { padding-left: 16px !important; padding-right: 16px !important; }
	body.otb-modern #cff .cff-item { padding: 16px !important; }

	/* Footer */
	body.otb-modern .site-below-footer-wrap .site-footer-section { text-align: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	body.otb-modern *, body.otb-modern *::after { transition: none !important; animation: none !important; }
}
