/* ==========================================================================
   CSR — "Patient Support Initiatives" and "Patient Awareness Programs"

   The two cards at the foot of the Corporate Social Responsibility page, each
   ending in a strip of four tiles:

     card A   cb89fe4   "Supporting Patient Communities"     4 society names
     card B   187c974   "Raising Awareness, Improving Lives" 4 icon + label

   Layout and spacing only. No text, no images, no colours, no type family,
   weight or size; the overlays, the 420px photo panel and the -40px pull that
   laps the tiles over the white strip are all left exactly as they were.

   --------------------------------------------------------------------------
   WHY THE TEXT LOOKED CLUTTERED — MEASURED, NOT GUESSED

   At 1440 the page container is 1240 wide, the two cards take 586 each, and
   the tile row inside them resolves to 506. The row was `display:flex;
   gap:8px; flex-wrap:nowrap`, so its four tiles came out 112, 112, 114, 114.

   The labels do not fit in 112px, and the way they failed is the bug:

     tile 8c35aeb   x 172 -> 284   (112 wide)
     its <h3>       x 161 -> 295   (134 wide)

   The heading is WIDER THAN THE TILE THAT CONTAINS IT. A column flex
   container with `align-items:center` does not constrain its items' cross
   size, so the h3 took its max-content width — "Neurological" alone is 122px
   at 20px with the 1px tracking this heading carries — and centred itself,
   overhanging 11px on each side. The next tile starts at 292, so the two
   headings overlapped by 3px and crowded each other for far more than that.
   Three of the four tiles did this; only "Saudi Cancer Society" (90px) fit.

   So the crowding was never a spacing value that needed nudging. It was text
   rendering outside its own box.

   --------------------------------------------------------------------------
   WHY FOUR ACROSS IS GIVEN UP, AND WHY THAT IS NOT A REDESIGN

   Constraining the headings to their tiles (`max-inline-size:100%`) stops the
   overlap but does not fix the reading, because the box is too small for the
   words. A tile of 112px carries ~92px of text once its 10px side padding is
   taken, and the longest unbreakable words need more than that:

     Neurological   122px        Association   112px
     Colorectal     104px        Awareness     100px

   A word longer than its line does not wrap — it breaks mid-word, and
   `overflow-wrap:break-word` is already in force on these headings, so the
   result would have been "Neurologic-al". Widening within four columns cannot
   reach it either: reclaiming every pixel of padding gives ~130px a tile,
   still short of 134 and with nothing left over, which is the squeezed look
   this is meant to cure.

   Four across is therefore not achievable at this card width without changing
   the type, and the type is what the brief protects. Two across is, and it is
   the SAME conclusion tablet-fixes.css already reached for the same tiles one
   breakpoint down: that rule drops the cards to full width at 768-1024 to buy
   each tile ~175px, "which is what they were drawn for". Two columns here buy
   234px, comfortably past that figure.

   The one visible consequence: the tile strip gets taller, so each card grows
   by roughly 150px. Both cards grow together and stay level, the photo panel
   is untouched at 420px, and the tiles still lap 40px over the white strip.

   --------------------------------------------------------------------------
   BREAKPOINTS

     >= 1025   cards sit in pairs, 586 wide   -> 2 x 2, ~234px a tile
     768-1024  tablet-fixes gives each card the full width -> 4 across fits at
               ~175px, so the existing arrangement is left alone
     <= 767    one column of cards, narrow    -> 2 x 2 again

   Everything is scoped to `.elementor-121` and to these element ids, so it
   reaches two sections of one page and nothing else. Logical properties
   throughout, so Arabic needs no separate rule — and the RTL block in
   csr-partnerships-rtl.css, which sets `--justify-content` and clears four
   hand-nudged image margins, keeps working against a grid exactly as it did
   against the flex row.
   ========================================================================== */

/* ---------------------------------------------------------------- the row --
   Grid rather than flex: equal tracks by construction, so the tiles can no
   longer come out 112/112/114/114, and `minmax(0, 1fr)` lets a track be
   narrower than its content instead of being pushed open by it.
   -------------------------------------------------------------------------- */

.elementor-121 .elementor-element.elementor-element-da21920,
.elementor-121 .elementor-element.elementor-element-b85ff90 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 20px;
	align-items: start;
	block-size: auto;
}

/* The wrapper the row sits in was 10px shorter than the row itself (175
   against 185, 224 against 234), clipping nothing but leaving the strip's
   bottom padding visibly uneven. Let it take the height its contents need. */
.elementor-121 .elementor-element.elementor-element-4f2cbf0,
.elementor-121 .elementor-element.elementor-element-02fcbce {
	block-size: auto;
}

/* --------------------------------------------------------------- the tile --
   `min-inline-size: 0` is the one that matters: without it a grid item floors
   at its min-content width and the track stops being equal again.
   -------------------------------------------------------------------------- */

.elementor-121 .elementor-element:is(
	.elementor-element-da21920,
	.elementor-element-b85ff90
) > .e-con.elementor-element {
	min-inline-size: 0;
	inline-size: auto;
	padding-block: 4px 0;
	padding-inline: 4px;
	gap: 14px;   /* icon to label in card B; the only gap inside a tile */
}

/* ------------------------------------------------------------- the label --
   Hold the heading inside its tile. This is the fix for the overlap; the two
   columns above are what make the result readable rather than hyphenated.

   The tracking goes from 1px to 0.2px and the leading from 24px (1.2) to 1.35.
   Both are named in the brief as fair game, both earn their place: at 20px,
   1px of tracking adds 12px to "Neurological" alone, and 1.2 leading on a
   label that wraps to three lines reads as a block rather than as lines. The
   family, size, weight, colour and centring are untouched.
   -------------------------------------------------------------------------- */

.elementor-121 .elementor-element:is(
	.elementor-element-da21920,
	.elementor-element-b85ff90
) > .e-con.elementor-element > h3 {
	inline-size: 100%;
	max-inline-size: 100%;
	min-inline-size: 0;
	margin: 0;
	letter-spacing: .2px;
	line-height: 1.35;
	text-wrap: balance;   /* ignored where unsupported; nothing depends on it */
}

/* ------------------------------------------------------------- the icons --
   Card B's icons are image widgets above the label. They already sit centred
   with no margin of their own; this pins that down so the icon-to-label
   distance is the tile's single `gap` in all four, rather than a gap plus
   whatever margin an individual image carries.

   THE ICON WIDTH IS NOT FIXED ANYWHERE — it is fluid, sized by whatever room
   the tile gives it. Measured before and after, by disabling this stylesheet
   in the live page and re-reading the boxes:

                    tile       icon
     desktop  was   112px      91 x 80
              now   228px     200 x 80     <- 2.2x, purely from the wider tile
     mobile   was   154px     132 x 80
              now   147px     137 x 80     <- already two across; no real change

   So two columns inflate the icons on desktop as a side effect. That is not
   something the brief asked for, and the icons are to be left alone, so the
   desktop rule below caps them back at the 90px they had. Mobile needs no cap
   (5px is not a change) and tablet keeps four across, so neither is touched.
   -------------------------------------------------------------------------- */

.elementor-121 .elementor-element:is(
	.elementor-element-da21920,
	.elementor-element-b85ff90
) > .e-con.elementor-element > .elementor-widget-image {
	margin-block: 0;
}

@media (min-width: 1025px) {
	.elementor-121 .elementor-element:is(
		.elementor-element-da21920,
		.elementor-element-b85ff90
	) > .e-con.elementor-element > .elementor-widget-image {
		inline-size: 90px;
		margin-inline: auto;
	}
}

.elementor-121 .elementor-element:is(
	.elementor-element-da21920,
	.elementor-element-b85ff90
) > .e-con.elementor-element > .elementor-widget-image img {
	display: block;
	margin-inline: auto;
}

/* ------------------------------------------------------ tablet: 4 across --
   tablet-fixes.css already gives each card the full width through this range,
   which leaves ~175px a tile — enough for four, and the arrangement the cards
   were drawn for. Restore it rather than carrying two columns down into a
   width that does not need them.
   -------------------------------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1024px) {
	.elementor-121 .elementor-element.elementor-element-da21920,
	.elementor-121 .elementor-element.elementor-element-b85ff90 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px 12px;
	}
}

/* ------------------------------------------------------------- mobile ---- */

@media (max-width: 767px) {
	.elementor-121 .elementor-element.elementor-element-da21920,
	.elementor-121 .elementor-element.elementor-element-b85ff90 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 14px;
	}
}
