/*
 * District landing pages (Figma 4915:5894, mobile 6053:7960). The sections
 * are built by eteria-core (migrations/flexible-district.php); the same
 * sections appear on landing pages that use these layouts.
 */

/* -------------------------------------------------------------------------
 * Shared: eyebrow close above the titles. The titles themselves are H2s
 * with the editor's font size «H1» (has-h-1-font-size, base.css).
 * ---------------------------------------------------------------------- */

:is(.e-district-ratings, .e-district-prices, .e-district-why, .e-district-pillars, .e-district-case, .e-district-split, .e-district-offmarket, .e-district-film, .e-district-contact) .is-style-eyebrow + * {
	margin-block-start: 12px !important;
}

/* Light text on the dark sections (the figures of «Liczba» keep their
 * accent colour). */
:is(.e-district-why, .e-district-offmarket, .e-district-contact) p:not(.is-style-eyebrow, .wp-block-eteria-stat__number) {
	color: var(--wp--preset--color--text-muted);
}

/* -------------------------------------------------------------------------
 * Hero: title, subtitle, text and button; the district's map beside (core
 * columns with their own gaps, the text in «Lead»: no rules of their own)
 * ---------------------------------------------------------------------- */

.e-district-visual {
	margin: 0;
}

.e-district-visual img {
	display: block;
	width: 100%;
	height: auto;
}

/* The street map is decoration in gold lines, at half strength. */
.e-district-visual.is-map img {
	max-height: 487px;
	object-fit: contain;
	opacity: 0.5;
}

@media (max-width: 781px) {

	.e-district-visual.is-map {
		max-width: 360px;
		margin-inline: auto;
	}
}

/* -------------------------------------------------------------------------
 * The district: heading left, points right (core columns 40/60 with their
 * own gaps, as in the case and buying sections); the layout's picture below
 * ---------------------------------------------------------------------- */

.e-district-about__image {
	margin-block: var(--e-gap-lg) 0 !important;
}

.e-district-about__image img {
	display: block;
	width: 100%;
	height: auto;
}

/* -------------------------------------------------------------------------
 * Ratings: dots 1–5 and the category, rows between hairlines
 * ---------------------------------------------------------------------- */

.e-district-ratings > * {
	margin-block: 0;
}

.e-district-ratings > * + * {
	margin-block-start: 36px;
}

.e-district-ratings > p:not(.is-style-eyebrow) {
	max-width: 900px;

	/* Aligned with the title, not centred by the constrained layout. */
	margin-left: max(0px, (100% - var(--wp--style--global--content-size)) / 2) !important;
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 300;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
 * Prices: text left, the numbers as cream cards right
 * ---------------------------------------------------------------------- */

.wp-block-columns.e-district-prices__grid {
	gap: var(--e-gap-md) clamp(2.5rem, -0.669rem + 13.5211vw, 8.125rem);
	margin-block: 0;
}

.e-district-prices__grid > .wp-block-column > * {
	margin-block: 0;
}

.e-district-prices__grid > .wp-block-column:first-child > * + * {
	margin-block-start: 24px;
}

.e-district-prices__grid > .wp-block-column:first-child > p:not(.is-style-eyebrow, .is-style-arrow-link) {
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 300;
	line-height: 1.5;
}

/* The H3 and the cards (eteria/stat «Karta» in a stack). */
.e-district-prices__grid > .wp-block-column:last-child > * + * {
	margin-block-start: 24px;
}

/* -------------------------------------------------------------------------
 * Offers: heading and link in one row (a «Wiersz»), three dark cards
 * ---------------------------------------------------------------------- */

.e-district-offers-section > .e-district-offers {
	margin-block-start: 48px;
}

.e-district-offers {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

@media (max-width: 1023px) {

	/* A row to swipe on phones and tablets, the next card peeking. */
	.e-district-offers {
		grid-template-columns: none;
		grid-auto-columns: min(85%, 380px);
		grid-auto-flow: column;
		margin-inline: calc(-1 * var(--wp--custom--gutter));
		padding-inline: var(--wp--custom--gutter);
		overflow-x: auto;
		scroll-padding-inline: var(--wp--custom--gutter);
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.e-district-offers > * {
		scroll-snap-align: start;
	}
}

/* -------------------------------------------------------------------------
 * Why us: centred title and text, five figures in a row
 * ---------------------------------------------------------------------- */

.e-district-why {
	text-align: center;
}

/* Title and text in a narrower measure; the figures (a wide «Siatka» of
 * eteria/stat «Duża», 56 px down by its own margin) take the wide width. */
.e-district-why > * {
	margin-block: 0;
}

.e-district-why > :not(.alignwide) {
	max-width: 1070px;
	margin-inline: auto !important;
}

.e-district-why > * + * {
	margin-block-start: 12px;
}

.e-district-why > p:not(.is-style-eyebrow) {
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 300;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
 * Advisors: up to four photo cards in one row, more three a row
 * ---------------------------------------------------------------------- */

/* The title on one line above the cards, not beside an intro. */
.e-district-team .e-team-grid__head {
	grid-template-columns: minmax(0, 1fr);
}

.e-district-team .e-team-grid__heading {
	max-width: 760px;
}

/* The whole team in the carousel (the sales landings): the arrows at the
 * right end of the heading's row, bottoms in line with the intro, instead of
 * above the block (team-carousel/style.css places them for the homepage). */
@media (min-width: 1024px) {

	.e-district-team .wp-block-eteria-team-carousel.e-carousel:has(> .e-team-grid__head) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 32px;
	}

	.e-district-team .e-carousel:has(> .e-team-grid__head) > .e-team-grid__head {
		grid-area: 1 / 1;
	}

	.e-district-team .e-carousel:has(> .e-team-grid__head) > .e-carousel__track {
		grid-area: 2 / 1 / 3 / -1;
	}

	.e-district-team .e-carousel:has(> .e-team-grid__head) > .e-carousel__controls {
		position: static;
		grid-area: 1 / 2;
		align-self: end;
		margin: 0 0 clamp(2rem, 1.2958rem + 3.0047vw, 3.5rem);
	}
}

@media (min-width: 1024px) {

	.e-district-team .e-team-grid__list {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
		gap: 10px;
	}

	/* More than four advisors: three a row, as on /o-nas/ (review of
	 * 02.12.2026). */
	.e-district-team .e-team-grid__list:has(> :nth-child(5)) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* -------------------------------------------------------------------------
 * Pillars: eteria/steps «Filary» 56 px under the title and the lead (the
 * lead's measure is its group's content width)
 * ---------------------------------------------------------------------- */

.e-district-pillars > * {
	margin-block: 0;
}

.e-district-pillars > .wp-block-eteria-steps {
	margin-block-start: 56px;
}

/* -------------------------------------------------------------------------
 * Call to action ("Brzmi dobrze?") and off-market: centred
 * ---------------------------------------------------------------------- */

.e-district-cta,
.e-district-offmarket {
	text-align: center;
}

.e-district-cta > *,
.e-district-offmarket > * {
	max-width: 900px;
	margin-block: 0;
	margin-inline: auto !important;
}

.e-district-cta > * + *,
.e-district-offmarket > * + * {
	margin-block-start: 20px;
}

.e-district-cta {
	padding-block: clamp(3rem, 2.2958rem + 3.0047vw, 5rem);
	background:
		radial-gradient(120% 90% at 50% 0%, rgb(117 24 50 / 0.22) 0%, rgb(14 14 12 / 0) 60%),
		var(--wp--preset--color--graphite-deep);
}

.e-district-cta h3 {
	font-size: var(--wp--preset--font-size--h-4);
	font-weight: 300;
	color: var(--wp--preset--color--text-muted);
}

.e-district-cta > .wp-block-buttons,
.e-district-offmarket > .wp-block-buttons {
	margin-block-start: 32px;
}

.e-district-offmarket > p:not(.is-style-eyebrow) {
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 300;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
 * A case: text on top, the before / after pairs below
 * ---------------------------------------------------------------------- */

.e-district-case > .wp-block-eteria-cases {
	margin-block-start: var(--e-gap-lg);
}

/* -------------------------------------------------------------------------
 * The film and Google reviews
 * ---------------------------------------------------------------------- */

.e-district-film h3 {
	font-size: var(--wp--preset--font-size--h-4);
	font-weight: 400;
	color: var(--wp--preset--color--text-subtle);
}

.e-district-film__clip {
	margin: 0;
}

.e-district-film__clip video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--graphite);
}

.e-district-film > .wp-block-eteria-google-reviews {
	margin-block-start: var(--e-gap-lg);
}

/* -------------------------------------------------------------------------
 * Contact: text and office details left, the form right (dark fields)
 * ---------------------------------------------------------------------- */

.wp-block-columns.e-district-contact__grid {
	gap: var(--e-gap-md) clamp(2.5rem, 1.6197rem + 3.7559vw, 5rem);
	margin-block: 0;
}

.e-district-contact__grid > .wp-block-column:first-child > * {
	margin-block: 0;
}

.e-district-contact__grid > .wp-block-column:first-child > * + * {
	margin-block-start: 20px;
}

.e-district-contact__grid > .wp-block-column:first-child > p:not(.is-style-eyebrow) {
	max-width: 440px;
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 300;
	line-height: 1.5;
}

.e-district-contact :is(b, strong) {
	font-weight: 500;
	color: var(--wp--preset--color--text-inverse);
}

/* "Wolisz spotkania osobiste?" and the office address: production sets this
 * second text off with a gold rule on its left (review of 12.11.2026), the
 * group style «Notatka»; its offset and gaps are the group's own. */
.e-district-contact__grid > .wp-block-column:first-child > .is-style-note {
	max-width: 440px;
}

.e-district-contact__grid .is-style-note p {
	font-size: var(--wp--preset--font-size--body);
	font-weight: 300;
	line-height: 1.6;
}

.e-contact-rows {
	display: grid;
	gap: 8px;
	margin-block-start: 44px !important;
}

.e-contact-rows > div {
	display: flex;
	gap: 16px;
	align-items: baseline;
}

.e-contact-rows dt {
	flex: none;
	width: 80px;
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	color: var(--wp--preset--color--text-muted);
	text-transform: uppercase;
}

.e-contact-rows dd {
	margin: 0;
	font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-inverse);
}

.e-contact-rows a {
	color: inherit;
	text-decoration: none;
}

.e-contact-rows a:hover {
	color: var(--wp--preset--color--gold);
}

/* The form is eteria/contact-form in its «Dzielnica» style (the block's
 * own stylesheet). */

/* -------------------------------------------------------------------------
 * FAQ: a long question for a title, in the narrow column; Mokotów's link
 * to its FAQ page under the questions
 * ---------------------------------------------------------------------- */

.e-district-faq__more {
	margin-block-start: 40px !important;
}

.e-district-faq__more > * {
	margin-block: 0;
}

.e-district-faq__more > * + * {
	margin-block-start: 16px;
}

.e-district-faq__more h3 {
	font-size: var(--wp--preset--font-size--h-4);
}
