/* Baltic Agro Koduaed – page.php (text pages, section I; WPBakery content pages; LearnDash courses), generic archive, 404. */

/* ---------- Text page: 760px column, intro, sections divided by hairlines ---------- */
.ba-textpage { max-width: 760px; }
.ba-textpage__body { font-size: 16px; line-height: 1.75; }
.ba-textpage__body > p:first-child,
.ba-textpage__body > .cmplz-document > p:first-child { font-size: 18px; line-height: 1.65; margin-bottom: 32px; }
.ba-textpage__body h2 { font-size: 20px; line-height: 1.3; font-weight: 800; color: var(--ba-text-strong); margin: 24px 0 8px; padding-top: 24px; border-top: 1px solid var(--ba-divider); }
.ba-textpage__body > h2:first-child, .ba-textpage__body .cmplz-document > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ba-textpage__actions { margin: 28px 0 0; }

/* Complianz legal documents (cookie policy, rules): keep their structure, use the page typography. */
.ba-design-new .ba-textpage #cmplz-document,
.ba-design-new .ba-textpage .cmplz-document { max-width: none; font-family: var(--ba-font); font-size: 16px; line-height: 1.75; color: var(--ba-text); }
.ba-design-new .ba-textpage #cmplz-document h2 { font-size: 20px; font-weight: 800; color: var(--ba-text-strong); margin: 24px 0 8px; padding-top: 24px; border-top: 1px solid var(--ba-divider); }
.ba-design-new .ba-textpage #cmplz-document h3,
.ba-design-new .ba-textpage #cmplz-document .cmplz-subtitle { font-size: 17px; font-weight: 700; color: var(--ba-text-strong); }
.ba-design-new .ba-textpage #cmplz-document p,
.ba-design-new .ba-textpage #cmplz-document li,
.ba-design-new .ba-textpage #cmplz-document td,
.ba-design-new .ba-textpage #cmplz-document span { font-size: inherit; line-height: inherit; }
.ba-design-new .ba-textpage #cmplz-document ol, .ba-design-new .ba-textpage #cmplz-document ul { padding-left: 1.4em; }
.ba-design-new .ba-textpage #cmplz-document details { border: 1px solid var(--ba-border); border-radius: var(--ba-r-md); margin: 0 0 10px; background: #fff; }
.ba-design-new .ba-textpage #cmplz-document details summary { padding: 12px 16px; cursor: pointer; font-weight: 700; color: var(--ba-text-strong); }
.ba-design-new .ba-textpage #cmplz-document details[open] summary { border-bottom: 1px solid var(--ba-divider); }
.ba-design-new .ba-textpage #cmplz-document .cookies-per-purpose { border-color: var(--ba-divider); }

/* ---------- WPBakery content pages (page.php, render mode "builder"; element styles in wpb.css) ---------- */
.ba-builder__title { margin-bottom: 28px; }
/* Content that starts with a full-width row (the /koolitused/ hero, whose H1 is the page title) sits right under the
   breadcrumb strip. */
.ba-builder__inner--untitled:has(.ba-builder__content > .wpb-content-wrapper > .vc_row[data-vc-full-width]:first-child) { padding-top: 0; }
/* …and content that ends with one (a coloured band) meets the footer. */
.ba-builder__inner:has(.ba-builder__content > .wpb-content-wrapper > .vc_row-full-width:last-child) { padding-bottom: 0; }

/* Accessibility fixes for builder/plugin content */
.ba-design-new .gform_wrapper .gform_drop_instructions { color: #5f6066; }
.ba-design-new .gfield_consent_description a, .ba-design-new .gfield_consent_label a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Generic archive (LearnDash course archive and tags, archive-generic.php) ---------- */
.ba-archive__intro { max-width: 760px; }
.ba-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: var(--ba-gap); list-style: none; margin: 8px 0 0; padding: 0; }
.ba-archive-grid > li { display: flex; margin: 0; padding: 0; min-width: 0; }
.ba-archive-card { flex: 1; }
.ba-archive-card__media { aspect-ratio: 3 / 2; background: var(--ba-surface); }
.ba-archive-card__title { font-size: 18px; line-height: 1.3; font-weight: 800; color: var(--ba-text-strong); margin: 0; }
.ba-design-new .ba-archive-card__title a { color: inherit; }
.ba-archive-card__excerpt { font-size: 14.5px; line-height: 1.6; color: var(--ba-text-2); margin: 0; }
.ba-archive__empty { color: var(--ba-text-2); }
.ba-archive .ba-pagination { margin-top: 48px; }
.ba-archive .ba-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ba-archive .ba-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 42px; padding: 8px 14px;
	border: 1px solid var(--ba-control); border-radius: var(--ba-r-xs); font-size: 14.5px; font-weight: 700; color: var(--ba-text-2); background: #fff;
}
.ba-archive .ba-pagination .page-numbers.current { background: var(--ba-green); border-color: var(--ba-green); color: #fff; }

/* ---------- 404 ---------- */
.ba-404 .ba-searchform { margin-top: 8px; }
.ba-404__label { margin: 8px 0 12px; }
.ba-404 .ba-chips { margin-bottom: 36px; }
.ba-404__actions { margin: 0; }
