/* about - «О нас». Loaded after style.css (overrides the older multi-column rules there).
   Principle (same as the approved program pages): ONE reading column, one left edge, stacked white cards 32px apart,
   no multi-column text, no centred paragraphs. Only the hero and the photo+text split use two halves (short text). */

.about-page { --about-col: 60rem; }

/* Everything below the hero hangs on one column that starts at the page's left edge.
   The blocks are .alignwide (auto side margins), so the margins are reset explicitly. */
.about-page > .wp-block-post-content > .about-tiles,
.about-page > .wp-block-post-content > .about-pill,
.about-page > .wp-block-post-content > .card-grid--directions,
.about-page > .wp-block-post-content > .disclaimer,
.about-page .team-section .wp-block-query,
.about-page .team-section .team-join {
	max-width: var(--about-col) !important;
	/* left edge = the wide blocks' edge ((container - 75rem) / 2), never past the container */
	margin-left: max(0px, calc((100% - 75rem) / 2)) !important;
	margin-right: 0 !important;
}

/* Hero: the intro gets the wider half so the lead does not break every 35 characters */
.about-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }

/* The six intro paragraphs: one card, one column, hairlines between them */
.about-tiles {
	display: block;
	padding: 32px 36px;
	background: #fff;
	border: var(--rl-line);
	border-radius: var(--rl-radius);
}

.about-tiles > p {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	font-size: 1.125rem;
	line-height: 1.7;
}

.about-tiles > p + p {
	margin-top: 1.15em;
	padding-top: 1.15em;
	border-top: var(--rl-line);
}

/* Key sentence: left-aligned callout on the same edge */
.about-pill {
	text-align: left;
	padding: 24px 36px;
}

/* Направления: one column of cards, same rhythm as program sections */
.card-grid--directions {
	display: grid;
	columns: auto;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

.card-grid--directions > .card {
	margin: 0;
	padding: 32px 36px;
}

/* the cards are constrained groups (auto side margins, 45rem max): fill the card instead */
.card-grid--directions .card > * { max-width: none !important; margin-inline: 0 !important; }
.card-grid--directions .card h3 { margin: 0 0 0.7em; font-size: 1.4rem; }
.card-grid--directions .card > * + * { margin-top: 1.15em; margin-bottom: 0; }
.card-grid--directions .card h3 + * { margin-top: 0; }
.card-grid--directions .card p,
.card-grid--directions .card li { font-size: 1.125rem; line-height: 1.7; }

/* Team: one row per person (photo left, text right), all rows alike - Julia is simply the first */
.about-page .team-bios {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

.about-page .team-section .team-bios > li,
.about-page .team-section .team-bios > li:first-child {
	grid-column: auto;
	display: grid;
	grid-template-columns: 14rem minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	column-gap: 32px;
	row-gap: 8px;
	align-content: start;
	padding: 32px 36px;
}

.about-page .team-section .team-bios .wp-block-post-featured-image,
.about-page .team-section .team-bios > li:first-child .wp-block-post-featured-image {
	grid-row: 1 / span 2;
	align-self: start;
	position: static;
	max-width: none;
	margin: 0;
}

.about-page .team-section .team-bios .wp-block-post-title,
.about-page .team-section .team-bios > li:first-child .wp-block-post-title {
	align-self: end;
	margin: 0;
	font-size: 1.5rem;
}

.about-page .team-section .team-bios .wp-block-post-content p,
.about-page .team-section .team-bios .wp-block-post-content li { font-size: 1.125rem; line-height: 1.7; }
.about-page .team-section .team-bios .wp-block-post-content p { margin: 0 0 1em; }

/* Phones and small tablets: photo on top, text below */
@media (max-width: 782px) {
	.about-tiles,
	.card-grid--directions > .card { padding: 24px 22px; }
	.about-pill { padding: 18px 22px; }

	.about-page .team-section .team-bios > li,
	.about-page .team-section .team-bios > li:first-child {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		padding: 24px 22px;
	}

	.about-page .team-section .team-bios .wp-block-post-featured-image,
	.about-page .team-section .team-bios > li:first-child .wp-block-post-featured-image {
		grid-row: auto;
		max-width: 16rem;
	}

	.about-page .team-section .team-bios .wp-block-post-title,
	.about-page .team-section .team-bios > li:first-child .wp-block-post-title { align-self: auto; margin-top: 6px; }
}
