/*
Theme Name: MKP
Theme URI: https://www.melkuskejla.cz/
Description: Block theme for MELKUS KEJLA & PARTNERS. Design direction 1b "Inkoust" (redesign round 1).
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: mkp
*/

/* Small eyebrow label: uppercase, wide tracking (design: 13px / 0.2em). */
.mkp-eyebrow {
	font-size: var(--wp--preset--font-size--eyebrow);
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

/* Header, main and footer sit flush (no root block gap between template parts). */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------- Header ---------- */
.mkp-logo-chip {
	background: #fff;
	padding: 11px 16px;
	line-height: 0;
}
.mkp-logo-chip a {
	display: block;
}
/* Fixed sizes only: a percentage max-width here makes the flex item size itself to the PNG's 700px. */
.mkp-logo-chip img {
	display: block;
	width: 334px; /* 22px tall, as in the design */
	height: auto;
}
@media (max-width: 420px) {
	.mkp-logo-chip img {
		width: 280px;
	}
}
/* Header: logo, language and button on the first row; the menu gets its own row below a hairline
   (seven items don't fit beside the logo). On phones the menu collapses into the burger on the first row. */
.mkp-header-row > .mkp-logo-chip {
	margin-right: auto;
}
@media (min-width: 600px) {
	.mkp-header-row > .wp-block-navigation {
		order: 3;
		flex-basis: 100%;
		margin-top: 4px;
		padding-top: 16px;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}
}
@media (max-width: 599px) {
	.mkp-header-row > .wp-block-navigation {
		order: 2;
		margin-left: auto;
	}
}
.mkp-header .wp-block-navigation a,
.mkp-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--on-ink);
}
.mkp-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--on-ink);
}

/* Language switcher rendered as "CS / EN"; current language highlighted. */
.mkp-lang.wp-block-polylang-language-switcher {
	width: auto;
	flex: none;
}
.mkp-lang li {
	display: flex;
	align-items: baseline;
	margin: 0;
}
.mkp-lang ul {
	display: flex;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.mkp-lang li + li::before {
	content: "/";
	padding: 0 0.35em;
	color: #7f8f92;
}
.mkp-lang a {
	color: #95a3a6;
}
.mkp-lang .current-lang a {
	color: var(--wp--preset--color--secondary);
}

/* ---------- Practice-area cards: 1px hairline grid, whole card clickable ---------- */
.mkp-cards {
	gap: 1px !important;
	background: var(--wp--preset--color--line);
	border: 1px solid var(--wp--preset--color--line);
}
.mkp-cards > .wp-block-group {
	position: relative;
	margin: 0 !important;
	transition: background-color 0.15s;
}
.mkp-cards > .wp-block-group:hover {
	background: #f6f8f8 !important;
}
.mkp-cards h3 a {
	color: inherit;
}
.mkp-cards h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.mkp-cards h3 a:hover {
	text-decoration: none;
}
.mkp-cards > .wp-block-group:focus-within {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -2px;
}

/* ---------- Partner portraits: crop from the top (faces) ---------- */
.mkp-portraits .wp-block-image {
	margin: 0;
}
.mkp-portraits img {
	object-position: top;
	width: 100%;
}

/* ---------- News band (Query Loop) ---------- */
.mkp-news .wp-block-post-template > li {
	border-top: 1px solid rgba(255, 255, 255, 0.4);
	padding-top: 18px;
}
.mkp-news .wp-block-post-title a {
	color: #fff;
}

/* ---------- Careers list rows ---------- */
.mkp-row {
	border-bottom: 1px solid var(--wp--preset--color--line-dark);
	padding-bottom: 14px;
}
.mkp-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
.mkp-row a {
	color: var(--wp--preset--color--contrast);
}

/* ---------- Footer ---------- */
.mkp-footer a {
	color: var(--wp--preset--color--on-ink-muted);
}
.mkp-footer a:hover {
	color: #fff;
}

/* ---------- Practice-area cards from a Query Loop: hairline grid + 01, 02 … counter ---------- */
.mkp-cards-query .wp-block-post-template {
	gap: 1px !important;
	background: var(--wp--preset--color--line);
	border: 1px solid var(--wp--preset--color--line);
	counter-reset: mkp-area;
}
.mkp-cards-query .wp-block-post-template > li {
	position: relative;
	margin: 0 !important;
	background: #fff;
	padding: 28px 26px 30px;
	counter-increment: mkp-area;
	transition: background-color 0.15s;
}
.mkp-cards-query .wp-block-post-template > li::before {
	content: counter(mkp-area, decimal-leading-zero);
	display: block;
	margin-bottom: 14px;
	font-size: 12.5px;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--muted);
}
.mkp-cards-query .wp-block-post-template > li:hover {
	background: #f6f8f8;
}
.mkp-cards-query .wp-block-post-title a {
	color: var(--wp--preset--color--contrast);
}
.mkp-cards-query .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.mkp-cards-query .wp-block-post-title a:hover {
	text-decoration: none;
}
.mkp-cards-query .wp-block-post-template > li:focus-within {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -2px;
}
.mkp-cards-query .wp-block-post-excerpt__excerpt {
	margin: 0;
}
/* Cards on a teal band (EN/CS homepage variant uses the same white cards). */

/* ---------- Team grid ---------- */
.mkp-team .wp-block-post-featured-image img,
.mkp-portrait img,
.mkp-portraits img {
	object-position: top;
}
.mkp-team .wp-block-post-featured-image a {
	display: block;
	overflow: hidden;
}
.mkp-team .wp-block-post-featured-image img {
	transition: transform 0.3s;
}
.mkp-team li:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

/* ---------- Job rows ---------- */
.mkp-jobs .wp-block-post-template > li {
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 20px 0;
	margin: 0 !important;
}
.mkp-jobs .wp-block-post-template > li:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.mkp-jobs .wp-block-post-template p {
	flex: none;
	margin: 0;
}

/* ---------- News grid ---------- */
.mkp-news-grid .wp-block-post-template > li {
	border-top: 2px solid var(--wp--preset--color--contrast);
	padding-top: 18px;
}

/* ---------- Long-form text (bios, practice areas, articles, pages) ---------- */
.mkp-prose,
.mkp-bio {
	line-height: 1.7;
	color: var(--wp--preset--color--body-muted);
}
.mkp-prose > * + *,
.mkp-bio > * + * {
	margin-block-start: 1.1em;
}
.mkp-prose h2,
.mkp-prose h3 {
	color: var(--wp--preset--color--contrast);
	margin-block-start: 1.8em;
	line-height: 1.25;
}
.mkp-prose h2 {
	font-size: var(--wp--preset--font-size--x-large);
}
.mkp-prose h3 {
	font-size: var(--wp--preset--font-size--large);
}
.mkp-prose ul,
.mkp-prose ol {
	padding-left: 1.2em;
}
.mkp-prose li + li {
	margin-top: 0.35em;
}
.mkp-prose img {
	height: auto;
}
.mkp-bio > p:first-child {
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Sidebar box sticks while scrolling long texts ---------- */
@media (min-width: 782px) {
	.mkp-sticky {
		position: sticky;
		top: 32px;
	}
}

/* ---------- Person profile ---------- */
.mkp-person-aside .wp-block-post-featured-image {
	margin: 0;
}
.mkp-person-facts p {
	margin: 0;
}

/* ---------- Map placeholder (consent decision pending, next phase) ---------- */
.mkp-map-placeholder {
	aspect-ratio: 1 / 1;
	background: repeating-linear-gradient(135deg, #eceeed 0 9px, #e3e7e6 9px 18px);
	display: flex;
	align-items: flex-end;
	padding: 10px;
	font-family: ui-monospace, monospace;
	font-size: 11px;
	color: #5f6a6c;
}

/* Row gaps for grids (block gap must be a single value for WordPress' grid column calc). */
.mkp-team .wp-block-post-template {
	row-gap: 44px;
}
.mkp-news-grid .wp-block-post-template {
	row-gap: 52px;
}

/* People without a portrait: initials on a soft panel (see inc/placeholders.php). */
.mkp-no-photo {
	aspect-ratio: 4 / 5;
	margin: 0 0 14px;
	background: var(--wp--preset--color--mist);
	border: 1px solid var(--wp--preset--color--line);
}
.mkp-person-aside .mkp-no-photo {
	margin: 0;
}
.mkp-no-photo a,
.mkp-no-photo .mkp-initials {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}
.mkp-initials {
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 300;
	letter-spacing: 0.06em;
	color: #8a9799;
}

/* ---------- Contact forms (Contact Form 7) ---------- */
.mkp-form-card .wpcf7 p {
	margin: 0 0 18px;
}
.mkp-form-card label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--body-muted);
}
.mkp-form-card input[type="text"],
.mkp-form-card input[type="email"],
.mkp-form-card input[type="tel"],
.mkp-form-card textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-top: 6px;
	padding: 12px 14px;
	border: 1px solid #c9d1d0;
	border-radius: 0;
	background: #fff;
	font: inherit;
	font-size: 17px;
	color: var(--wp--preset--color--contrast);
}
.mkp-form-card textarea {
	height: 150px;
	resize: vertical;
}
.mkp-form-card input:focus,
.mkp-form-card textarea:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -1px;
	border-color: var(--wp--preset--color--primary);
}
.mkp-form-card .wpcf7-acceptance label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	line-height: 1.5;
}
.mkp-form-card .wpcf7-list-item {
	margin: 0;
}
.mkp-form-card .wpcf7-submit {
	padding: 15px 26px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font: inherit;
	font-size: 17px;
	cursor: pointer;
}
.mkp-form-card .wpcf7-submit:hover {
	background: var(--wp--preset--color--primary-dark);
}
.mkp-form-card .wpcf7-not-valid-tip {
	color: #a4262c;
	font-size: 14px;
	margin-top: 4px;
}
.mkp-form-card .wpcf7 form .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 12px 14px;
}

/* ---------- Reference client lists ---------- */
.mkp-clients {
	list-style: none;
	padding: 0;
	margin: 0;
	line-height: 1.5;
}
.mkp-clients li + li {
	margin-top: 8px;
}

/* ---------- Teal CTA band ---------- */
.mkp-cta .wp-block-columns {
	align-items: center;
}
@media (max-width: 781px) {
	.mkp-cta .wp-block-buttons {
		justify-content: flex-start !important;
	}
}

/* Phones: two people per row (one-column portraits are too large). */
@media (max-width: 599px) {
	.mkp-team .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		column-gap: 16px;
		row-gap: 28px;
	}
	.mkp-team .wp-block-post-title {
		font-size: 16px !important;
	}
}
