/* Black Friday page (proposal A). Classes are added in Divi: Advanced → Attributes → class. */

/* ---------- Text ---------- */
/* Display lines never wrap inside a word */
#page-container .dl-bf-display :is(h1, h2, p) { overflow-wrap: normal; word-break: keep-all; }
/* Text over the aurora stays readable */
#page-container .dl-bf-shadow :is(h1, h2, p) { text-shadow: 0 2px 28px rgb(0 0 0 / .45); }
#page-container .dl-bf-shadow .et_pb_button { text-shadow: none; }
/* Always-dark block (hero, final CTA): white text in light mode too (mirror of dl-on-gradient) */
#page-container .dl-bf-dark { color: #fff; --gcid-heading-color: #fff; --dl-text-main: #fff; }
/* Section headings: balanced line breaks, the Libre subtitle close under the title (as a block), narrower paragraphs,
   the same gap (spacing M) between the heading and the text below */
#page-container .dl-bf-tight :is(h1, h2) { text-wrap: balance; }
#page-container .dl-bf-tight :is(h1, h2) span.libre.small { display: block; margin-top: .65em; line-height: 1.3 !important; }
/* DL Motion text-reveal splits the heading into one div per line (each with its own copy of the span): only the first Libre line gets the gap */
#page-container .dl-bf-tight :is(h1, h2) > div:has(> span.libre.small) ~ div > span.libre.small { margin-top: 0; }
#page-container .dl-bf-tight :is(h1, h2, h3) { padding-bottom: 0 !important; margin-bottom: 0 !important; }
#page-container .dl-bf-tight :is(h1, h2, h3) + p { margin-top: var(--gvid-nxthc18tfy, 30px) !important; }
#page-container .dl-bf-tight p { max-width: 780px; margin-inline: auto; }
#page-container .dl-bf-balance :is(p, h1, h2, h3) { text-wrap: balance; }
/* Words that must stay on one line (also after DL Motion splits a heading into words) */
#page-container .dl-nowrap { white-space: nowrap; }

/* ---------- Prices (products and courses: one size) ---------- */
#page-container :is(.dl-bf-course-price, .dl-bf-license .dl-bf-price p) { font-size: var(--gvid-ix03tf8sw0, 30px) !important; font-weight: 900; line-height: 1; }
#page-container .dl-bf-course-price { margin-top: 8px; }
#page-container .dl-bf-course-price strong { color: var(--gcid-primary-color, #ff6699); font-weight: 900; }
#page-container :is(.dl-bf-course-price, .dl-bf-license .dl-bf-price) s { color: var(--dl-text-main); font-size: .62em; margin-right: .15em; text-decoration-thickness: 2px; }
/* "excl. VAT" next to prices: small and quiet */
#page-container .dl-bf-vat { font-size: var(--gvid-i8pms10aho, 14px); font-weight: 400; letter-spacing: 0; color: var(--dl-text-main); -webkit-text-fill-color: currentColor; opacity: .8; white-space: nowrap; }

/* ---------- Product rows ---------- */
/* Name link keeps the heading colour */
#page-container #et-boc .dl-bf-name h3 a { color: inherit; background: none; padding: 0; margin: 0; }
/* License boxes: always half the row (minus half the gap), so Base's single box is as wide as the others; full width on narrow phones */
#page-container .et_pb_group.dl-bf-license { flex: 0 1 calc(50% - var(--gvid-cqzq0t85t2, 20px) / 2); min-width: 0; container-type: inline-size; }
@media (max-width: 479px) { #page-container .et_pb_group.dl-bf-license { flex-basis: 100%; } }
/* When two boxes side by side are too narrow for the full price + "excl. VAT", they stack (full width) instead of shrinking the price */
#page-container .et_pb_group:has(> .dl-bf-license) { container: dllic / inline-size; }
@container dllic (max-width: 580px) { #page-container .et_pb_group.dl-bf-license { flex-basis: 100%; } }
/* Safety net for very narrow boxes only */
@container (max-width: 170px) { #page-container .dl-bf-license .dl-bf-price p { font-size: calc(var(--gvid-ix03tf8sw0, 30px) * .74) !important; } }

/* ---------- Effects (bf-effects.js) ---------- */
#page-container :is(.dl-fx-aurora, .dl-fx-magnetic) { position: relative; isolation: isolate; overflow: hidden; }
#page-container .dl-fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; border-radius: inherit; corner-shape: inherit; }
/* No WebGL: a static glow instead of the aurora */
#page-container .dl-fx-aurora.dl-fx--nogl { background-image: linear-gradient(170deg, rgb(255 102 153 / .35), rgb(255 153 102 / .2) 40%, transparent 70%); }
/* Magnetic letters */
#page-container .dl-fx-letters .dl-fx-word { display: inline-block; white-space: nowrap; }
#page-container .dl-fx-letters .dl-fx-ch { display: inline-block; will-change: transform; }

/* ---------- Library card: the site's light-mode colours apply inside, whatever the mode ---------- */
#page-container .dl-bf-lightvars {
	--dl-text-main: #19191a; --dl-text-mid: #6A6E7B; --dl-panel-mid: #A2A5AF; --dl-canvas: #ffffff; --dl-canvas-reversed: #2B2F3B;
	--dl-panel: #EEF2F2; --dl-border: #D3D6DF; --dl-panel-reversed: #363B4A; --dl-text-reversed: #fff;
	--gcid-xtiw7t0xuu: #363B4A; --gcid-ykuiv4zec0: #fff; --gcid-c5guu1wom2: #A2A5AF; --gcid-q4g3lm637n: #ffffff; --gcid-bdgqqbgc9s: #EEF2F2;
}
/* Course rows keep the see-through background during the hover (beats the site rule that sets --dl-tile-bg on the tile) */
#page-container #et-boc .et-l .dl-bf-lightvars .et_pb_group[data-course][role="link"]:not(.dl-no-slide) { --dl-tile-bg: rgba(43, 47, 59, .3); }

/* ---------- Course cards: layout by the width the list really has (container queries) ---------- */
#page-container .dl-bf-clist-wrap { container: dlclist / inline-size; }
#page-container #et-boc .et-l .dl-bf-clist { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
#page-container #et-boc .et-l .dl-bf-ccard {
	display: grid !important; padding: 0 !important; column-gap: 0 !important; row-gap: 0 !important;
	grid-template-columns: 150px minmax(0, 1fr) !important; grid-template-rows: auto 1fr !important;
	grid-template-areas: "icon title" "icon body" !important; align-items: stretch !important;
}
/* Colour band: touches the card edges, all four corners rounded, icon at the top level with the title */
#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-cicon {
	grid-area: icon; min-height: 100%; border-radius: var(--gvid-cqzq0t85t2, 20px) !important;
	justify-content: flex-start !important; padding-top: var(--gvid-nxthc18tfy, 30px) !important;
}
#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-ctitle { grid-area: title; padding: var(--gvid-nxthc18tfy, 30px) var(--gvid-nxthc18tfy, 30px) 0 !important; margin: 0 !important; }
#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-cbody { grid-area: body; padding: var(--gvid-mn23ldw859, 10px) var(--gvid-nxthc18tfy, 30px) var(--gvid-nxthc18tfy, 30px) !important; display: flex !important; flex-direction: column !important; gap: var(--gvid-cqzq0t85t2, 20px) !important; }
#page-container .dl-bf-ctitle h3 { padding: 0 !important; margin: 0 !important; }
/* Icon: the drawing always fits its white card (Divi gives the inner svg a fixed width) */
#page-container #et-boc .et-l .dl-bf-cicon .et_pb_svg { box-sizing: border-box; }
#page-container #et-boc .et-l .dl-bf-cicon .et_pb_svg_inner, #page-container #et-boc .et-l .dl-bf-cicon .et_pb_svg_inner svg { width: 100% !important; max-width: 100% !important; height: auto !important; }
/* Price + button row */
#page-container .dl-bf-cbuy { flex-wrap: wrap; margin-top: auto; }
#page-container .dl-bf-cbuy .dl-bf-course-price { margin: 0; }
#page-container .dl-bf-cbuy .et_pb_button_module_wrapper, #page-container .dl-bf-cbuy .et_pb_button { margin: 0 !important; }

/* two per row but tight: slimmer band and padding */
@container dlclist (min-width: 761px) and (max-width: 980px) {
	#page-container #et-boc .et-l .dl-bf-ccard { grid-template-columns: 110px minmax(0, 1fr) !important; }
	#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-cicon { padding-top: var(--gvid-cqzq0t85t2, 20px) !important; }
	#page-container #et-boc .et-l .dl-bf-ccard .dl-bf-cicon .et_pb_svg, #page-container #et-boc .et-l .dl-bf-ccard .dl-bf-cicon svg { width: 66px !important; max-width: 66px !important; }
	#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-ctitle { padding: var(--gvid-cqzq0t85t2, 20px) var(--gvid-cqzq0t85t2, 20px) 0 !important; }
	#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-cbody { padding: var(--gvid-mn23ldw859, 10px) var(--gvid-cqzq0t85t2, 20px) var(--gvid-cqzq0t85t2, 20px) !important; }
}
/* list narrower than ~760px: one card per row; price (with excl. VAT) left, button right, button drops below only if there is no room */
@container dlclist (max-width: 760px) {
	#page-container #et-boc .et-l .dl-bf-clist { grid-template-columns: minmax(0, 1fr) !important; }
	#page-container .dl-bf-cbuy { flex-wrap: wrap !important; justify-content: space-between !important; align-items: center !important; }
	#page-container .dl-bf-cbuy .dl-bf-course-price { white-space: nowrap; font-size: calc(var(--gvid-ix03tf8sw0, 30px) * .85) !important; }
	#page-container #et-boc .et-l .dl-bf-cbuy .et_pb_button { white-space: nowrap; }
}
/* one card per row on mid widths (list 481–760px): smaller band and icon */
@container dlclist (min-width: 481px) and (max-width: 760px) {
	#page-container #et-boc .et-l .dl-bf-ccard { grid-template-columns: 110px minmax(0, 1fr) !important; }
	#page-container #et-boc .et-l .dl-bf-ccard .dl-bf-cicon .et_pb_svg { width: 64px !important; max-width: 64px !important; padding: 9px !important; }
}
/* phones: colour square flush in the card's top-left corner (all corners rounded), title next to it, the rest below */
@container dlclist (max-width: 480px) {
	#page-container #et-boc .et-l .dl-bf-ccard { grid-template-columns: 84px minmax(0, 1fr) !important; grid-template-rows: auto auto !important; grid-template-areas: "icon title" "body body" !important; }
	#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-cicon { min-height: 0; height: 84px; margin: 0 !important; justify-content: center !important; padding-top: 0 !important; }
	#page-container #et-boc .et-l .dl-bf-ccard .dl-bf-cicon .et_pb_svg { width: 52px !important; max-width: 52px !important; padding: 7px !important; }
	#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-ctitle { align-self: center; padding: var(--gvid-cqzq0t85t2, 20px) var(--gvid-cqzq0t85t2, 20px) 0 !important; }
	#page-container #et-boc .et-l .dl-bf-ccard > .dl-bf-cbody { padding: var(--gvid-cqzq0t85t2, 20px) !important; }
	#page-container .dl-bf-cbuy .dl-bf-course-price { font-size: calc(var(--gvid-ix03tf8sw0, 30px) * .74) !important; }
}
