/* Fixes from the IDEA team bug list / SEO audit (Nov 2026). Tracked in website-fixes/PLAN.md. */

/* U3: any text in posts that isn't wrapped in <p> must still be light on the dark background. */
.entry-content {
	color: var(--color-text, #e9e4e0);
}

/* A-11: step-form progress "Step 1 of 8" was #666 on black (3.66:1). #a3a3a3 on #000 ≈ 8.6:1. */
.wpcf7 .wpsf-progress {
	color: #a3a3a3;
}
.wpsf-btn:focus-visible,
.wpsf-choice:focus-visible,
.wpcf7 input:focus-visible,
.wpcf7 textarea:focus-visible {
	outline: 2px solid #e9e4e0;
	outline-offset: 2px;
}

/* U1: project info columns (Материали / Цветове / Обзавеждане / Осветление): heading came after the text, so the
   four headings sat at different heights. Show heading first on all widths (mobile already did) and uppercase. */
.gallery__items .gallery__item {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
}
.gallery__items .gallery__item > h2 {
	margin-top: 0;
	margin-bottom: 0.75em;
	text-transform: uppercase;
}

/* U2 / Careers: form submit buttons were unreadable.
   - global `button:hover { background: black #e9e4e0 }` is invalid → bg stays light while text turns light on hover/focus;
   - <button class="btn-primary"> gets the label/overlay spans from JS, but the colors only exist for a.btn-primary,
     and the global `span { color: light }` made the label light-on-light. Mirror a.btn-primary for form buttons. */
.wpcf7 button[type="submit"] {
	background: #e9e4e0;
	color: #000;
	-webkit-text-fill-color: currentColor;
}
.wpcf7 button[type="submit"]:not(.btn-primary):hover,
.wpcf7 button[type="submit"]:not(.btn-primary):focus-visible {
	background: #000;
	color: #e9e4e0;
	outline: 1px solid #e9e4e0;
}
.wpcf7 button.btn-primary {
	position: relative;
	overflow: hidden;
}
.wpcf7 button.btn-primary > .btn-primary__label {
	display: block;
	color: #000 !important;
}
.wpcf7 button.btn-primary .btn-primary__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	clip-path: inset(0 100% 0 0);
	pointer-events: none;
}
.wpcf7 button.btn-primary .btn-primary__overlay .btn-primary__label {
	color: #fff !important;
}

/* U7: project gallery cropped every photo to a fixed 500px box (object-fit: cover). Show natural proportions
   so vertical and horizontal shots stay whole. */
/* Masonry via CSS columns: mixed vertical/horizontal shots without gaps. */
body .r1zn-project-gallery {
	display: block;
	columns: 2;
	column-gap: 15px;
}
@media (max-width: 768px) {
	body .r1zn-project-gallery {
		columns: 1;
	}
}
.r1zn-project-gallery .r1zn-project-gallery__item {
	height: auto;
	break-inside: avoid;
	margin: 0 0 15px;
}
.r1zn-project-gallery .r1zn-project-gallery__item img {
	height: auto;
	object-fit: contain;
}

/* A-14: "Пропусни видеото / Skip" sat under the enter overlay (z-index 2), so it took two actions to reach the
   content. Show it on the first screen. */
.intro .intro__skip {
	z-index: 3;
}

/* U5: long blog card titles must wrap, never be clipped. */
.blog .gb-text-f1817af9,
.archive .gb-text-f1817af9 {
	overflow-wrap: anywhere;
	white-space: normal;
}

/* A-17: related project card image (same look as the previous hard-coded GB media). */
.our-projects_img .idea-related__img {
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: cover;
	display: block;
}

/* Blog list: the card photo is a link to the post (deploy/fix-blog-cards.php) */
a.gb-element-450b5abe { display: block; }
a.gb-element-450b5abe:hover { opacity: .9; }

/* A-10: visible form labels (Careers, newsletter, quick contact), same look as the step form labels. */
.wpcf7 .idea-field-label {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #e9e4e0;
}

/* A-15: "quick contact" vs "detailed brief" choice on the contact pages (toggle: inc/site-fixes.php). */
.idea-contact-choice {
	max-width: 42rem;
	margin: 0 auto 2.5rem;
}
.idea-contact-choice__direct {
	margin: 0 0 1rem;
	color: #a3a3a3;
}
.idea-contact-choice__direct a {
	color: #e9e4e0;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.idea-contact-choice__buttons {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}
@media (min-width: 540px) {
	.idea-contact-choice__buttons {
		grid-template-columns: 1fr 1fr;
	}
}
body .idea-contact-choice__btn,
body .idea-contact-choice__btn:hover {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
	min-height: 3.25rem;
	padding: 0.875rem 1rem;
	border: 1px solid #d8d8d8;
	background: transparent;
	color: #e9e4e0;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
body .idea-contact-choice__btn:hover {
	border-color: #ff98006e;
}
body .idea-contact-choice__btn.is-active {
	border-color: #ff98006e;
	background: #1a1a1a;
}
.idea-contact-choice__btn:focus-visible {
	outline: 2px solid #e9e4e0;
	outline-offset: 2px;
}
.idea-contact-choice__btn strong {
	font-weight: 600;
	color: #e9e4e0;
}
.idea-contact-choice__btn span {
	font-size: 0.875rem;
	color: #a3a3a3;
}
.idea-quick-contact {
	margin-top: 1.75rem;
}
.idea-quick-contact[hidden],
.container-xxl[hidden] {
	display: none !important;
}


/* A-10: required fields = small amber dot after the label (amber = step-form selection colour). */
.wpcf7 .idea-req {
	display: inline-block;
	width: 5px;
	height: 5px;
	margin-left: 0.4em;
	border-radius: 50%;
	background: #ff9800;
	opacity: 0.8;
	vertical-align: middle;
	position: relative;
	top: -1px;
}

/* Unified form look = the contact page (step form): left-aligned labels above boxed fields, dark submit.
   Careers (.custom-contact-form), newsletter (.get-email), quick contact (.idea-quick-form), step form. */
.wpcf7 .custom-contact-form,
.wpcf7 .get-email,
.wpcf7 .idea-quick-form {
	text-align: left;
}
.wpcf7 .custom-contact-form,
.wpcf7 .idea-quick-form {
	max-width: 42rem;
	margin: 0 auto;
}
.wpcf7 .custom-contact-form label,
.wpcf7 .get-email label,
.wpcf7 .idea-quick-form label {
	display: block;
	margin-bottom: 1.6rem;
	text-align: left;
}
.wpcf7 .get-email label {
	margin-bottom: 0;
}
body .wpcf7 .custom-contact-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea),
body .wpcf7 .get-email input[type="email"],
body .wpcf7 .idea-quick-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea),
body .wpcf7 .wpsf-step textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.75rem 0.875rem;
	border: 1px solid #d8d8d8;
	border-radius: 0;
	background: transparent;
	color: #e9e4e0;
	font-size: 1rem;
	text-align: left;
	box-sizing: border-box;
}
body .wpcf7 .custom-contact-form textarea,
body .wpcf7 .idea-quick-form textarea {
	min-height: 7rem;
	resize: vertical;
}
body .wpcf7 :is(.custom-contact-form, .get-email, .idea-quick-form) :is(input, textarea):focus {
	border-color: #e9e4e0;
}
.wpcf7 :is(.custom-contact-form, .get-email, .idea-quick-form) input[type="submit"].wpsf-btn {
	display: inline-flex;
	width: auto;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.625rem 1.5rem;
	border: 1px solid #1a1a1a;
	background: #1a1a1a;
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	-webkit-text-fill-color: #fff;
}
.wpcf7 :is(.custom-contact-form, .get-email, .idea-quick-form) input[type="submit"].wpsf-btn:hover,
.wpcf7 :is(.custom-contact-form, .get-email, .idea-quick-form) input[type="submit"].wpsf-btn:focus-visible {
	opacity: 0.9;
	background: #1a1a1a;
	color: #fff;
	outline: 1px solid #e9e4e0;
	outline-offset: 2px;
}
/* Error text must not move the layout: when it disappears on blur, the submit button would jump away
   between mousedown and mouseup and the click would be lost. */
.wpcf7 :is(.custom-contact-form, .get-email, .idea-quick-form) .wpcf7-form-control-wrap {
	position: relative;
	display: block;
}
.wpcf7 :is(.custom-contact-form, .get-email, .idea-quick-form) .wpcf7-not-valid-tip {
	position: absolute;
	left: 0;
	top: 100%;
	margin-top: 0.2rem;
	font-size: 0.8125rem;
	line-height: 1.2;
	text-align: left;
}
/* Footer newsletter sits on a dark photo: same dark button, outlined like the field so it stays visible. */
.wpcf7 .get-email input[type="submit"].wpsf-btn {
	width: 100%;
	justify-content: center;
	border-color: #d8d8d8;
}
/* Careers + footer newsletter: same look, centered (client). Contact forms stay left-aligned. */
.wpcf7 .custom-contact-form,
.wpcf7 .get-email,
.wpcf7 .custom-contact-form label,
.wpcf7 .get-email label,
body .wpcf7 .custom-contact-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea),
body .wpcf7 .get-email input[type="email"] {
	text-align: center;
}
.wpcf7 :is(.custom-contact-form, .get-email) .wpcf7-not-valid-tip {
	right: 0;
	text-align: center;
}

/* Language switcher: in the menu bar on desktop (sticks with the menu), in the header on mobile. */
@media (min-width: 769px) {
	.inside-header > .r1zn-language-switcher {
		display: none;
	}
	.idea-nav-lang {
		display: flex;
		align-items: center;
		margin-left: 20px;
	}
}
@media (max-width: 768px) {
	#site-navigation .idea-nav-lang {
		display: none !important;
	}
	/* Mobile sticky bar (GeneratePress copies the menu bar into #sticky-navigation): logo · BG EN · menu button. */
	#sticky-navigation .idea-nav-lang {
		display: flex !important;
		align-items: center;
		order: 1;
		margin-left: auto;
		margin-right: 12px;
	}
	#sticky-navigation .idea-nav-lang ul {
		display: flex !important;
	}
	#sticky-navigation .menu-toggle {
		order: 2;
	}
	#sticky-navigation .main-nav {
		order: 3;
	}
}

/* Audit A7: "see also" links to the house/apartment pages under the residential service card. */
.idea-see-also {
	margin-top: 0.75rem;
	font-size: 0.9375rem;
	color: #a3a3a3;
}
.idea-see-also a,
.story-desc a,
.our-projects_txt p a {
	color: #e9e4e0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* C-14: FAQ page (Yoast FAQ block) — readable width, separated questions, visible links */
.entry-content:has(.schema-faq) {
	max-width: 860px;
}
.schema-faq-section {
	padding: 22px 0;
	border-top: 1px solid rgba(233, 228, 224, 0.15);
}
.schema-faq-section:last-child {
	border-bottom: 1px solid rgba(233, 228, 224, 0.15);
}
.schema-faq-question {
	display: block;
	margin-bottom: 10px;
	font-size: 1.2em;
	font-weight: 500;
	letter-spacing: 0.02em;
}
.schema-faq-answer {
	margin: 0;
}
.entry-content:has(.schema-faq) a {
	color: #e9e4e0;
	text-decoration: underline;
	text-underline-offset: 3px;
}
