/*!
 * UnysonPlus Frontend Grid — Bootstrap 5 spec under the .fw-* prefix.
 *
 * The .fw- prefix keeps this grid in its own namespace so it cannot collide
 * with a theme's own .container / .row / .col-* rules (the original Unyson's
 * intentional design). The plugin therefore ships a self-contained BS5 grid
 * that works on any theme regardless of whether the theme already loads
 * Bootstrap.
 *
 * Sites migrating from the original Unyson plugin whose content uses BS3
 * widths under the same .fw-* selectors can enable the
 * "Load Bootstrap 3 Legacy Stylesheet" option in the page-builder settings;
 * the legacy file overrides this one by cascade order.
 *
 * How to override this file:
 *   http://manual.unyson.io/en/latest/extension/builder/index.html#changing-the-grid
 */


/* Box-sizing baseline
-------------------------------------------------- */
.fw-container,
.fw-container-fluid,
.fw-container-sm,
.fw-container-md,
.fw-container-lg,
.fw-container-xl,
.fw-container-xxl,
.fw-row,
.fw-row > * {
	box-sizing: border-box;
}


/* Containers
-------------------------------------------------- */
.fw-container,
.fw-container-fluid,
.fw-container-sm,
.fw-container-md,
.fw-container-lg,
.fw-container-xl,
.fw-container-xxl {
	width: 100%;
	padding-right: 12px;
	padding-left: 12px;
	margin-right: auto;
	margin-left: auto;
}

@media (min-width: 576px) {
	.fw-container,
	.fw-container-sm { max-width: 540px; }
}
@media (min-width: 768px) {
	.fw-container,
	.fw-container-sm,
	.fw-container-md { max-width: 720px; }
}
@media (min-width: 992px) {
	.fw-container,
	.fw-container-sm,
	.fw-container-md,
	.fw-container-lg { max-width: 960px; }
}
@media (min-width: 1200px) {
	.fw-container,
	.fw-container-sm,
	.fw-container-md,
	.fw-container-lg,
	.fw-container-xl { max-width: 1140px; }
}
@media (min-width: 1400px) {
	.fw-container,
	.fw-container-sm,
	.fw-container-md,
	.fw-container-lg,
	.fw-container-xl,
	.fw-container-xxl { max-width: 1320px; }
}


/* Row (flexbox)
--------------------------------------------------
   `.fw-row` is the plugin's standalone Bootstrap-grid clone. We declare
   `--bs-gutter-x` / `--bs-gutter-y` (Bootstrap's own custom-property names)
   rather than a private `--fw-` namespace so:

     1. The Theme Settings → Gaps overrides in
        framework/includes/css-tokens.php — which write `.row, .fw-row {
        --bs-gutter-x: var(--gap-N); }` — actually reach this rule's
        downstream `.fw-row > *` padding calc. Without the namespace
        unification the override was invisible on .fw-row.

     2. `.fw-row` and Bootstrap's `.row` become interchangeable — same
        variable contract, same gap utilities apply to either.

   `--fw-gutter-x/y` survive as a legacy fallback so any custom CSS that
   sets `--fw-gutter-x` on a parent element keeps working: it cascades
   into the var(... , 1.5rem) chain and seeds `--bs-gutter-x` for the
   row's children. The presets-css override (which writes `--bs-gutter-x`
   directly) wins via the cascade when it's set. */

.fw-row {
	--bs-gutter-x: var(--fw-gutter-x, 1.5rem);
	/* Vertical gutter defaults to the SAME 1.5rem as the horizontal one (was 0, the
	   inherited Bootstrap-5 default). The negative-margin offset below makes this
	   net-zero for single-line rows, so only rows whose columns WRAP onto a second
	   line gain the vertical gap — fixing "no space between wrapped column rows"
	   without touching non-wrapping layouts. Section Gap / Default Gap / Gap-Y all
	   still override --bs-gutter-y where set. */
	--bs-gutter-y: var(--fw-gutter-y, 1.5rem);
	display: flex;
	flex-wrap: wrap;
	margin-top: calc(-1 * var(--bs-gutter-y));
	margin-right: calc(-.5 * var(--bs-gutter-x));
	margin-left: calc(-.5 * var(--bs-gutter-x));
}

.fw-row > * {
	flex-shrink: 0;
	width: 100%;
	max-width: 100%;
	padding-right: calc(var(--bs-gutter-x) * .5);
	padding-left: calc(var(--bs-gutter-x) * .5);
	margin-top: var(--bs-gutter-y);
}


/* Columns — base tier (applies at any viewport)
-------------------------------------------------- */
.fw-col       { flex: 1 0 0%; }

.fw-col-1     { flex: 0 0 auto; width:  8.33333333%; }
.fw-col-2     { flex: 0 0 auto; width: 16.66666667%; }
.fw-col-3     { flex: 0 0 auto; width: 25%; }
.fw-col-4     { flex: 0 0 auto; width: 33.33333333%; }
.fw-col-5     { flex: 0 0 auto; width: 41.66666667%; }
.fw-col-6     { flex: 0 0 auto; width: 50%; }
.fw-col-7     { flex: 0 0 auto; width: 58.33333333%; }
.fw-col-8     { flex: 0 0 auto; width: 66.66666667%; }
.fw-col-9     { flex: 0 0 auto; width: 75%; }
.fw-col-10    { flex: 0 0 auto; width: 83.33333333%; }
.fw-col-11    { flex: 0 0 auto; width: 91.66666667%; }
.fw-col-12    { flex: 0 0 auto; width: 100%; }

/* UnysonPlus extension: 1/5 column (20%) — used by builder widths 1_5/2_5/3_5/4_5 */
.fw-col-15    { flex: 0 0 auto; width: 20%; }

.fw-offset-1  { margin-left:  8.33333333%; }
.fw-offset-2  { margin-left: 16.66666667%; }
.fw-offset-3  { margin-left: 25%; }
.fw-offset-4  { margin-left: 33.33333333%; }
.fw-offset-5  { margin-left: 41.66666667%; }
.fw-offset-6  { margin-left: 50%; }
.fw-offset-7  { margin-left: 58.33333333%; }
.fw-offset-8  { margin-left: 66.66666667%; }
.fw-offset-9  { margin-left: 75%; }
.fw-offset-10 { margin-left: 83.33333333%; }
.fw-offset-11 { margin-left: 91.66666667%; }

.fw-order-first { order: -1; }
.fw-order-last  { order: 13; } /* after the max explicit order (12) so "Last" is truly last */
.fw-order-0 { order: 0; }
.fw-order-1 { order: 1; }
.fw-order-2 { order: 2; }
.fw-order-3 { order: 3; }
.fw-order-4 { order: 4; }
.fw-order-5 { order: 5; }
/* Extended base-tier order utilities so the column's Mobile Order supports up to
   12 (a row can hold twelve 1/12 columns). Mobile Order applies at the base tier
   (xs) and resets via .fw-order-sm-0 from sm up, so only the base tier needs these. */
.fw-order-6  { order:  6; }
.fw-order-7  { order:  7; }
.fw-order-8  { order:  8; }
.fw-order-9  { order:  9; }
.fw-order-10 { order: 10; }
.fw-order-11 { order: 11; }
.fw-order-12 { order: 12; }


/* sm (≥ 576px)
-------------------------------------------------- */
@media (min-width: 576px) {
	.fw-col-sm       { flex: 1 0 0%; }

	.fw-col-sm-1     { flex: 0 0 auto; width:  8.33333333%; }
	.fw-col-sm-2     { flex: 0 0 auto; width: 16.66666667%; }
	.fw-col-sm-3     { flex: 0 0 auto; width: 25%; }
	.fw-col-sm-4     { flex: 0 0 auto; width: 33.33333333%; }
	.fw-col-sm-5     { flex: 0 0 auto; width: 41.66666667%; }
	.fw-col-sm-6     { flex: 0 0 auto; width: 50%; }
	.fw-col-sm-7     { flex: 0 0 auto; width: 58.33333333%; }
	.fw-col-sm-8     { flex: 0 0 auto; width: 66.66666667%; }
	.fw-col-sm-9     { flex: 0 0 auto; width: 75%; }
	.fw-col-sm-10    { flex: 0 0 auto; width: 83.33333333%; }
	.fw-col-sm-11    { flex: 0 0 auto; width: 91.66666667%; }
	.fw-col-sm-12    { flex: 0 0 auto; width: 100%; }
	.fw-col-sm-15    { flex: 0 0 auto; width: 20%; }

	.fw-offset-sm-0  { margin-left: 0; }
	.fw-offset-sm-1  { margin-left:  8.33333333%; }
	.fw-offset-sm-2  { margin-left: 16.66666667%; }
	.fw-offset-sm-3  { margin-left: 25%; }
	.fw-offset-sm-4  { margin-left: 33.33333333%; }
	.fw-offset-sm-5  { margin-left: 41.66666667%; }
	.fw-offset-sm-6  { margin-left: 50%; }
	.fw-offset-sm-7  { margin-left: 58.33333333%; }
	.fw-offset-sm-8  { margin-left: 66.66666667%; }
	.fw-offset-sm-9  { margin-left: 75%; }
	.fw-offset-sm-10 { margin-left: 83.33333333%; }
	.fw-offset-sm-11 { margin-left: 91.66666667%; }

	.fw-order-sm-first { order: -1; }
	.fw-order-sm-last  { order:  6; }
	.fw-order-sm-0 { order: 0; }
	.fw-order-sm-1 { order: 1; }
	.fw-order-sm-2 { order: 2; }
	.fw-order-sm-3 { order: 3; }
	.fw-order-sm-4 { order: 4; }
	.fw-order-sm-5 { order: 5; }
}


/* md (≥ 768px)
-------------------------------------------------- */
@media (min-width: 768px) {
	.fw-col-md       { flex: 1 0 0%; }

	.fw-col-md-1     { flex: 0 0 auto; width:  8.33333333%; }
	.fw-col-md-2     { flex: 0 0 auto; width: 16.66666667%; }
	.fw-col-md-3     { flex: 0 0 auto; width: 25%; }
	.fw-col-md-4     { flex: 0 0 auto; width: 33.33333333%; }
	.fw-col-md-5     { flex: 0 0 auto; width: 41.66666667%; }
	.fw-col-md-6     { flex: 0 0 auto; width: 50%; }
	.fw-col-md-7     { flex: 0 0 auto; width: 58.33333333%; }
	.fw-col-md-8     { flex: 0 0 auto; width: 66.66666667%; }
	.fw-col-md-9     { flex: 0 0 auto; width: 75%; }
	.fw-col-md-10    { flex: 0 0 auto; width: 83.33333333%; }
	.fw-col-md-11    { flex: 0 0 auto; width: 91.66666667%; }
	.fw-col-md-12    { flex: 0 0 auto; width: 100%; }
	.fw-col-md-15    { flex: 0 0 auto; width: 20%; }

	.fw-offset-md-0  { margin-left: 0; }
	.fw-offset-md-1  { margin-left:  8.33333333%; }
	.fw-offset-md-2  { margin-left: 16.66666667%; }
	.fw-offset-md-3  { margin-left: 25%; }
	.fw-offset-md-4  { margin-left: 33.33333333%; }
	.fw-offset-md-5  { margin-left: 41.66666667%; }
	.fw-offset-md-6  { margin-left: 50%; }
	.fw-offset-md-7  { margin-left: 58.33333333%; }
	.fw-offset-md-8  { margin-left: 66.66666667%; }
	.fw-offset-md-9  { margin-left: 75%; }
	.fw-offset-md-10 { margin-left: 83.33333333%; }
	.fw-offset-md-11 { margin-left: 91.66666667%; }

	.fw-order-md-first { order: -1; }
	.fw-order-md-last  { order:  6; }
	.fw-order-md-0 { order: 0; }
	.fw-order-md-1 { order: 1; }
	.fw-order-md-2 { order: 2; }
	.fw-order-md-3 { order: 3; }
	.fw-order-md-4 { order: 4; }
	.fw-order-md-5 { order: 5; }
	.fw-order-md-6 { order: 6; }
	.fw-order-md-7 { order: 7; }
	.fw-order-md-8 { order: 8; }
	.fw-order-md-9 { order: 9; }
	.fw-order-md-10 { order: 10; }
	.fw-order-md-11 { order: 11; }
	.fw-order-md-12 { order: 12; }
}


/* lg (≥ 992px)
-------------------------------------------------- */
@media (min-width: 992px) {
	.fw-col-lg       { flex: 1 0 0%; }

	.fw-col-lg-1     { flex: 0 0 auto; width:  8.33333333%; }
	.fw-col-lg-2     { flex: 0 0 auto; width: 16.66666667%; }
	.fw-col-lg-3     { flex: 0 0 auto; width: 25%; }
	.fw-col-lg-4     { flex: 0 0 auto; width: 33.33333333%; }
	.fw-col-lg-5     { flex: 0 0 auto; width: 41.66666667%; }
	.fw-col-lg-6     { flex: 0 0 auto; width: 50%; }
	.fw-col-lg-7     { flex: 0 0 auto; width: 58.33333333%; }
	.fw-col-lg-8     { flex: 0 0 auto; width: 66.66666667%; }
	.fw-col-lg-9     { flex: 0 0 auto; width: 75%; }
	.fw-col-lg-10    { flex: 0 0 auto; width: 83.33333333%; }
	.fw-col-lg-11    { flex: 0 0 auto; width: 91.66666667%; }
	.fw-col-lg-12    { flex: 0 0 auto; width: 100%; }
	.fw-col-lg-15    { flex: 0 0 auto; width: 20%; }

	.fw-offset-lg-0  { margin-left: 0; }
	.fw-offset-lg-1  { margin-left:  8.33333333%; }
	.fw-offset-lg-2  { margin-left: 16.66666667%; }
	.fw-offset-lg-3  { margin-left: 25%; }
	.fw-offset-lg-4  { margin-left: 33.33333333%; }
	.fw-offset-lg-5  { margin-left: 41.66666667%; }
	.fw-offset-lg-6  { margin-left: 50%; }
	.fw-offset-lg-7  { margin-left: 58.33333333%; }
	.fw-offset-lg-8  { margin-left: 66.66666667%; }
	.fw-offset-lg-9  { margin-left: 75%; }
	.fw-offset-lg-10 { margin-left: 83.33333333%; }
	.fw-offset-lg-11 { margin-left: 91.66666667%; }

	.fw-order-lg-first { order: -1; }
	.fw-order-lg-last  { order:  6; }
	.fw-order-lg-0 { order: 0; }
	.fw-order-lg-1 { order: 1; }
	.fw-order-lg-2 { order: 2; }
	.fw-order-lg-3 { order: 3; }
	.fw-order-lg-4 { order: 4; }
	.fw-order-lg-5 { order: 5; }
	.fw-order-lg-6 { order: 6; }
	.fw-order-lg-7 { order: 7; }
	.fw-order-lg-8 { order: 8; }
	.fw-order-lg-9 { order: 9; }
	.fw-order-lg-10 { order: 10; }
	.fw-order-lg-11 { order: 11; }
	.fw-order-lg-12 { order: 12; }
}


/* xl (≥ 1200px)
-------------------------------------------------- */
@media (min-width: 1200px) {
	.fw-col-xl       { flex: 1 0 0%; }

	.fw-col-xl-1     { flex: 0 0 auto; width:  8.33333333%; }
	.fw-col-xl-2     { flex: 0 0 auto; width: 16.66666667%; }
	.fw-col-xl-3     { flex: 0 0 auto; width: 25%; }
	.fw-col-xl-4     { flex: 0 0 auto; width: 33.33333333%; }
	.fw-col-xl-5     { flex: 0 0 auto; width: 41.66666667%; }
	.fw-col-xl-6     { flex: 0 0 auto; width: 50%; }
	.fw-col-xl-7     { flex: 0 0 auto; width: 58.33333333%; }
	.fw-col-xl-8     { flex: 0 0 auto; width: 66.66666667%; }
	.fw-col-xl-9     { flex: 0 0 auto; width: 75%; }
	.fw-col-xl-10    { flex: 0 0 auto; width: 83.33333333%; }
	.fw-col-xl-11    { flex: 0 0 auto; width: 91.66666667%; }
	.fw-col-xl-12    { flex: 0 0 auto; width: 100%; }
	.fw-col-xl-15    { flex: 0 0 auto; width: 20%; }

	.fw-offset-xl-0  { margin-left: 0; }
	.fw-offset-xl-1  { margin-left:  8.33333333%; }
	.fw-offset-xl-2  { margin-left: 16.66666667%; }
	.fw-offset-xl-3  { margin-left: 25%; }
	.fw-offset-xl-4  { margin-left: 33.33333333%; }
	.fw-offset-xl-5  { margin-left: 41.66666667%; }
	.fw-offset-xl-6  { margin-left: 50%; }
	.fw-offset-xl-7  { margin-left: 58.33333333%; }
	.fw-offset-xl-8  { margin-left: 66.66666667%; }
	.fw-offset-xl-9  { margin-left: 75%; }
	.fw-offset-xl-10 { margin-left: 83.33333333%; }
	.fw-offset-xl-11 { margin-left: 91.66666667%; }

	.fw-order-xl-first { order: -1; }
	.fw-order-xl-last  { order:  6; }
	.fw-order-xl-0 { order: 0; }
	.fw-order-xl-1 { order: 1; }
	.fw-order-xl-2 { order: 2; }
	.fw-order-xl-3 { order: 3; }
	.fw-order-xl-4 { order: 4; }
	.fw-order-xl-5 { order: 5; }
}


/* xxl (≥ 1400px)
-------------------------------------------------- */
@media (min-width: 1400px) {
	.fw-col-xxl       { flex: 1 0 0%; }

	.fw-col-xxl-1     { flex: 0 0 auto; width:  8.33333333%; }
	.fw-col-xxl-2     { flex: 0 0 auto; width: 16.66666667%; }
	.fw-col-xxl-3     { flex: 0 0 auto; width: 25%; }
	.fw-col-xxl-4     { flex: 0 0 auto; width: 33.33333333%; }
	.fw-col-xxl-5     { flex: 0 0 auto; width: 41.66666667%; }
	.fw-col-xxl-6     { flex: 0 0 auto; width: 50%; }
	.fw-col-xxl-7     { flex: 0 0 auto; width: 58.33333333%; }
	.fw-col-xxl-8     { flex: 0 0 auto; width: 66.66666667%; }
	.fw-col-xxl-9     { flex: 0 0 auto; width: 75%; }
	.fw-col-xxl-10    { flex: 0 0 auto; width: 83.33333333%; }
	.fw-col-xxl-11    { flex: 0 0 auto; width: 91.66666667%; }
	.fw-col-xxl-12    { flex: 0 0 auto; width: 100%; }
	.fw-col-xxl-15    { flex: 0 0 auto; width: 20%; }

	.fw-offset-xxl-0  { margin-left: 0; }
	.fw-offset-xxl-1  { margin-left:  8.33333333%; }
	.fw-offset-xxl-2  { margin-left: 16.66666667%; }
	.fw-offset-xxl-3  { margin-left: 25%; }
	.fw-offset-xxl-4  { margin-left: 33.33333333%; }
	.fw-offset-xxl-5  { margin-left: 41.66666667%; }
	.fw-offset-xxl-6  { margin-left: 50%; }
	.fw-offset-xxl-7  { margin-left: 58.33333333%; }
	.fw-offset-xxl-8  { margin-left: 66.66666667%; }
	.fw-offset-xxl-9  { margin-left: 75%; }
	.fw-offset-xxl-10 { margin-left: 83.33333333%; }
	.fw-offset-xxl-11 { margin-left: 91.66666667%; }

	.fw-order-xxl-first { order: -1; }
	.fw-order-xxl-last  { order:  6; }
	.fw-order-xxl-0 { order: 0; }
	.fw-order-xxl-1 { order: 1; }
	.fw-order-xxl-2 { order: 2; }
	.fw-order-xxl-3 { order: 3; }
	.fw-order-xxl-4 { order: 4; }
	.fw-order-xxl-5 { order: 5; }
}


/* UnysonPlus fifths — 2/5 (40%), 3/5 (60%), 4/5 (80%) columns + fifth offsets.
   Siblings of the built-in 1/5 (fw-col-*-15 = 20% / fw-offset-*-15). Kept in one
   block so every breakpoint stays together; equal specificity + later position
   make them behave exactly like the per-tier fw-col / fw-offset rules above.
   Twelfths can't express 40/60/80%, so these complete the fifths family.
-------------------------------------------------- */
.fw-col-25 { flex: 0 0 auto; width: 40%; }
.fw-col-35 { flex: 0 0 auto; width: 60%; }
.fw-col-45 { flex: 0 0 auto; width: 80%; }
.fw-offset-15 { margin-left: 20%; }
.fw-offset-25 { margin-left: 40%; }
.fw-offset-35 { margin-left: 60%; }
.fw-offset-45 { margin-left: 80%; }

@media (min-width: 576px) {
	.fw-col-sm-25 { flex: 0 0 auto; width: 40%; }
	.fw-col-sm-35 { flex: 0 0 auto; width: 60%; }
	.fw-col-sm-45 { flex: 0 0 auto; width: 80%; }
	.fw-offset-sm-15 { margin-left: 20%; }
	.fw-offset-sm-25 { margin-left: 40%; }
	.fw-offset-sm-35 { margin-left: 60%; }
	.fw-offset-sm-45 { margin-left: 80%; }
}
@media (min-width: 768px) {
	.fw-col-md-25 { flex: 0 0 auto; width: 40%; }
	.fw-col-md-35 { flex: 0 0 auto; width: 60%; }
	.fw-col-md-45 { flex: 0 0 auto; width: 80%; }
	.fw-offset-md-15 { margin-left: 20%; }
	.fw-offset-md-25 { margin-left: 40%; }
	.fw-offset-md-35 { margin-left: 60%; }
	.fw-offset-md-45 { margin-left: 80%; }
}
@media (min-width: 992px) {
	.fw-col-lg-25 { flex: 0 0 auto; width: 40%; }
	.fw-col-lg-35 { flex: 0 0 auto; width: 60%; }
	.fw-col-lg-45 { flex: 0 0 auto; width: 80%; }
	.fw-offset-lg-15 { margin-left: 20%; }
	.fw-offset-lg-25 { margin-left: 40%; }
	.fw-offset-lg-35 { margin-left: 60%; }
	.fw-offset-lg-45 { margin-left: 80%; }
}
@media (min-width: 1200px) {
	.fw-col-xl-25 { flex: 0 0 auto; width: 40%; }
	.fw-col-xl-35 { flex: 0 0 auto; width: 60%; }
	.fw-col-xl-45 { flex: 0 0 auto; width: 80%; }
	.fw-offset-xl-15 { margin-left: 20%; }
	.fw-offset-xl-25 { margin-left: 40%; }
	.fw-offset-xl-35 { margin-left: 60%; }
	.fw-offset-xl-45 { margin-left: 80%; }
}
@media (min-width: 1400px) {
	.fw-col-xxl-25 { flex: 0 0 auto; width: 40%; }
	.fw-col-xxl-35 { flex: 0 0 auto; width: 60%; }
	.fw-col-xxl-45 { flex: 0 0 auto; width: 80%; }
	.fw-offset-xxl-15 { margin-left: 20%; }
	.fw-offset-xxl-25 { margin-left: 40%; }
	.fw-offset-xxl-35 { margin-left: 60%; }
	.fw-offset-xxl-45 { margin-left: 80%; }
}


/* Row columns — auto-layout: N equal-width columns per row (Bootstrap
   `row-cols-*` equivalent under the .fw- namespace).
-------------------------------------------------- */
.fw-row-cols-1 > * { flex: 0 0 auto; width: 100%; }
.fw-row-cols-2 > * { flex: 0 0 auto; width: 50%; }
.fw-row-cols-3 > * { flex: 0 0 auto; width: 33.33333333%; }
.fw-row-cols-4 > * { flex: 0 0 auto; width: 25%; }
.fw-row-cols-5 > * { flex: 0 0 auto; width: 20%; }
.fw-row-cols-6 > * { flex: 0 0 auto; width: 16.66666667%; }


/* Numeric gutter utilities (Bootstrap `g-0..5` scale). They set the gutter
   custom properties read by `.row` / `.fw-row`. `!important` so an explicit
   gutter on a row beats the Theme Settings default-gap rule (which loads
   later in the cascade). The NAMED gap-scale utilities (`.g-{slug}`) are
   emitted separately by framework/includes/css-tokens.php.
-------------------------------------------------- */
.g-0 { --bs-gutter-x: 0      !important; --bs-gutter-y: 0      !important; }
.g-1 { --bs-gutter-x: .25rem !important; --bs-gutter-y: .25rem !important; }
.g-2 { --bs-gutter-x: .5rem  !important; --bs-gutter-y: .5rem  !important; }
.g-3 { --bs-gutter-x: 1rem   !important; --bs-gutter-y: 1rem   !important; }
.g-4 { --bs-gutter-x: 1.5rem !important; --bs-gutter-y: 1.5rem !important; }
.g-5 { --bs-gutter-x: 3rem   !important; --bs-gutter-y: 3rem   !important; }

.gx-0 { --bs-gutter-x: 0      !important; }
.gx-1 { --bs-gutter-x: .25rem !important; }
.gx-2 { --bs-gutter-x: .5rem  !important; }
.gx-3 { --bs-gutter-x: 1rem   !important; }
.gx-4 { --bs-gutter-x: 1.5rem !important; }
.gx-5 { --bs-gutter-x: 3rem   !important; }

.gy-0 { --bs-gutter-y: 0      !important; }
.gy-1 { --bs-gutter-y: .25rem !important; }
.gy-2 { --bs-gutter-y: .5rem  !important; }
.gy-3 { --bs-gutter-y: 1rem   !important; }
.gy-4 { --bs-gutter-y: 1.5rem !important; }
.gy-5 { --bs-gutter-y: 3rem   !important; }


/* =========================================================================
 * Utility classes — the cross-cutting Bootstrap utility subset the plugin's
 * shortcodes emit (flex / display / alignment / sizing / image / radius /
 * shadow). The plugin no longer ships Bootstrap, and several shortcodes
 * (image-content, bleed-section, …) carry NO stylesheet of their own — they
 * shared these helpers via Bootstrap. They are ported here, in the always-
 * loaded grid sheet, so any shortcode that enqueues `fw-ext-builder-frontend-
 * grid` gets them. Component CSS (.btn, tabs, alert, …) stays per-shortcode.
 *
 * These do NOT include `.m-*` / `.p-*` / `.text-{color}` / `.bg-{color}` —
 * those are emitted (with their own scale) by framework/includes/css-tokens.php.
 * ========================================================================= */

/* Display */
.d-none         { display: none !important; }
.d-inline       { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block        { display: block !important; }
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }

/* Flex direction / wrap / grow / shrink */
.flex-row            { flex-direction: row !important; }
.flex-row-reverse    { flex-direction: row-reverse !important; }
.flex-column         { flex-direction: column !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }
.flex-wrap           { flex-wrap: wrap !important; }
.flex-nowrap         { flex-wrap: nowrap !important; }
.flex-fill           { flex: 1 1 auto !important; }
.flex-grow-0         { flex-grow: 0 !important; }
.flex-grow-1         { flex-grow: 1 !important; }
.flex-shrink-0       { flex-shrink: 0 !important; }
.flex-shrink-1       { flex-shrink: 1 !important; }

/* Align items / self */
.align-items-start    { align-items: flex-start !important; }
.align-items-center   { align-items: center !important; }
.align-items-end      { align-items: flex-end !important; }
.align-items-stretch  { align-items: stretch !important; }
.align-items-baseline { align-items: baseline !important; }
.align-self-start     { align-self: flex-start !important; }
.align-self-center    { align-self: center !important; }
.align-self-end       { align-self: flex-end !important; }
.align-self-stretch   { align-self: stretch !important; }
.align-self-baseline  { align-self: baseline !important; }

/* Justify content */
.justify-content-start   { justify-content: flex-start !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-end     { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around  { justify-content: space-around !important; }
.justify-content-evenly  { justify-content: space-evenly !important; }

/* Align content (wrapped multi-line containers) */
.align-content-start   { align-content: flex-start !important; }
.align-content-center  { align-content: center !important; }
.align-content-end     { align-content: flex-end !important; }
.align-content-between { align-content: space-between !important; }
.align-content-around  { align-content: space-around !important; }
.align-content-stretch { align-content: stretch !important; }

/* Text alignment (sc_alignment_class returns these) */
.text-start  { text-align: left !important; }
.text-center { text-align: center !important; }
.text-end    { text-align: right !important; }
.text-left   { text-align: left !important; }
.text-right  { text-align: right !important; }

/* Sizing */
.w-25  { width: 25% !important; }
.w-50  { width: 50% !important; }
.w-75  { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }
.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }

/* Auto margins (alignment helpers — NOT the m-* spacing scale) */
.mx-auto { margin-right: auto !important; margin-left: auto !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }

/* Gap (numeric scale; the named .g-{slug} is emitted by css-tokens.php) */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* Images */
.img-fluid { max-width: 100%; height: auto; }

/* Aspect-ratio container (media-video etc.) */
.ratio { position: relative; width: 100%; }
.ratio::before { display: block; padding-top: var(--fw-aspect-ratio, 56.25%); content: ""; }
.ratio > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ratio-1x1  { --fw-aspect-ratio: 100%; }
.ratio-4x3  { --fw-aspect-ratio: 75%; }
.ratio-16x9 { --fw-aspect-ratio: 56.25%; }
.ratio-21x9 { --fw-aspect-ratio: 42.85714286%; }
.ratio-9x16 { --fw-aspect-ratio: 177.77777778%; }
.ratio-3x4  { --fw-aspect-ratio: 133.33333333%; }

/* Border radius */
.rounded         { border-radius: .375rem !important; }
.rounded-0       { border-radius: 0 !important; }
.rounded-1       { border-radius: .25rem !important; }
.rounded-2       { border-radius: .375rem !important; }
.rounded-3       { border-radius: .5rem !important; }
.rounded-4       { border-radius: 1rem !important; }
.rounded-5       { border-radius: 2rem !important; }
.rounded-circle  { border-radius: 50% !important; }
.rounded-pill    { border-radius: 50rem !important; }

/* Box shadow */
.shadow-none { box-shadow: none !important; }
.shadow-sm   { box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important; }
.shadow      { box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important; }
.shadow-lg   { box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important; }

/* Screen-reader-only */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Responsive flex/text helpers used by a few shortcodes (md ≥ 768px) */
@media (min-width: 768px) {
	.flex-md-row               { flex-direction: row !important; }
	.flex-md-row-reverse       { flex-direction: row-reverse !important; }
	.flex-md-column            { flex-direction: column !important; }
	.flex-md-column-reverse    { flex-direction: column-reverse !important; }
	.justify-content-md-start   { justify-content: flex-start !important; }
	.justify-content-md-center  { justify-content: center !important; }
	.justify-content-md-end     { justify-content: flex-end !important; }
	.justify-content-md-between { justify-content: space-between !important; }
	.justify-content-md-around  { justify-content: space-around !important; }
	.justify-content-md-evenly  { justify-content: space-evenly !important; }
	.align-items-md-start  { align-items: flex-start !important; }
	.align-items-md-center { align-items: center !important; }
	.align-items-md-end    { align-items: flex-end !important; }
	.align-items-md-stretch  { align-items: stretch !important; }
	.align-items-md-baseline { align-items: baseline !important; }
	.align-self-md-start   { align-self: flex-start !important; }
	.align-self-md-center  { align-self: center !important; }
	.align-self-md-end     { align-self: flex-end !important; }
	.align-self-md-stretch { align-self: stretch !important; }
	.align-self-md-baseline { align-self: baseline !important; }
	.align-content-md-start   { align-content: flex-start !important; }
	.align-content-md-center  { align-content: center !important; }
	.align-content-md-end     { align-content: flex-end !important; }
	.align-content-md-between { align-content: space-between !important; }
	.align-content-md-around  { align-content: space-around !important; }
	.align-content-md-stretch { align-content: stretch !important; }
	.flex-md-wrap        { flex-wrap: wrap !important; }
	.flex-md-nowrap      { flex-wrap: nowrap !important; }
	.flex-grow-md-0      { flex-grow: 0 !important; }
	.flex-grow-md-1      { flex-grow: 1 !important; }
	.text-md-start       { text-align: left !important; }
	.text-md-center      { text-align: center !important; }
	.text-md-end         { text-align: right !important; }
}

@media (min-width: 992px) {
	.flex-lg-row               { flex-direction: row !important; }
	.flex-lg-row-reverse       { flex-direction: row-reverse !important; }
	.flex-lg-column            { flex-direction: column !important; }
	.flex-lg-column-reverse    { flex-direction: column-reverse !important; }
	.justify-content-lg-start   { justify-content: flex-start !important; }
	.justify-content-lg-center  { justify-content: center !important; }
	.justify-content-lg-end     { justify-content: flex-end !important; }
	.justify-content-lg-between { justify-content: space-between !important; }
	.justify-content-lg-around  { justify-content: space-around !important; }
	.justify-content-lg-evenly  { justify-content: space-evenly !important; }
	.align-items-lg-start  { align-items: flex-start !important; }
	.align-items-lg-center { align-items: center !important; }
	.align-items-lg-end    { align-items: flex-end !important; }
	.align-items-lg-stretch  { align-items: stretch !important; }
	.align-items-lg-baseline { align-items: baseline !important; }
	.align-self-lg-start   { align-self: flex-start !important; }
	.align-self-lg-center  { align-self: center !important; }
	.align-self-lg-end     { align-self: flex-end !important; }
	.align-self-lg-stretch { align-self: stretch !important; }
	.align-self-lg-baseline { align-self: baseline !important; }
	.align-content-lg-start   { align-content: flex-start !important; }
	.align-content-lg-center  { align-content: center !important; }
	.align-content-lg-end     { align-content: flex-end !important; }
	.align-content-lg-between { align-content: space-between !important; }
	.align-content-lg-around  { align-content: space-around !important; }
	.align-content-lg-stretch { align-content: stretch !important; }
	.flex-lg-wrap        { flex-wrap: wrap !important; }
	.flex-lg-nowrap      { flex-wrap: nowrap !important; }
	.flex-grow-lg-0      { flex-grow: 0 !important; }
	.flex-grow-lg-1      { flex-grow: 1 !important; }
}


/* Responsive visibility utilities (UnysonPlus shortcode "Hide on" option)
-------------------------------------------------- */
@media (max-width: 767.98px) {
	.hide-xs { display: none !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
	.hide-sm { display: none !important; }
}
@media (min-width: 992px) {
	.hide-md { display: none !important; }
}
