/*!
Theme Name: Atik Islam
Theme URI: https://atikislam.com/
Author: Atik Islam
Author URI: https://atikislam.com/
Description: A custom WordPress theme for Atik Islam — web designer, developer, and creative professional based at atikislam.com.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
Requires at least: 6.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: atik-islam
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/*
 * This file intentionally contains only the WordPress theme header comment above.
 *
 * ALL styling is handled by Tailwind CSS, compiled and served from:
 *   assets/css/tailwind.css (~22 KB, minified)
 *
 * The Underscores/boilerplate CSS that was here has been removed to prevent
 * conflicts with Tailwind utility classes and the custom design system.
 *
 * To add global custom CSS, edit:
 *   _html-source/src/css/input_tailwind.css  (inside @layer base or @layer components)
 *   Then run: cd _html-source && npm run deploy
 *
 * WordPress accessibility helpers (screen-reader-text, skip-link) are minimal
 * and defined below to keep them functional without polluting the Tailwind cascade.
 */

/* ── WordPress Accessibility Helpers ───────────────────────────────────────── */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* ── WordPress alignment helpers (used by Gutenberg) ───────────────────────── */

.alignleft {
	float: left;
	margin-right: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin: 0 auto;
}

.alignwide {
	max-width: 100%;
}

.alignfull {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* ── Note ────────────────────────────────────────────────────────────────────
   Custom component CSS (e.g. WP editor typography) lives in:
   Tailwind utilities and component output are loaded from assets/css/tailwind.css.
   This ensures reliable override of Tailwind's heading reset without !important.
*/

/* ─────────────────────────────────────────────────────────────────────────────
   Portfolio Card — Screenshot Preview Mosaic
   Replaces the old slider. Fixed 220px tall container.
   Layouts:
     1 image  →  .gallery-solo (full-width fill)
     2 images →  .gallery-pair   (50/50 split)
     3–4 imgs  →  .gallery-grid (60% left + 40% stacked right)
───────────────────────────────────────────────────────────────────────────── */

.gallery-mosaic {
	height: 220px;
	background: #f1f5f9;
	/* slate-100 fallback */
	overflow: hidden;
	position: relative;
}

/* ── Card thumbnail zoom on hover (case studies + home featured cards) ── */
/* Targets the img inside the overflow-hidden wrapper, within the .group card */
.group:hover .overflow-hidden>img,
.group:hover .overflow-hidden img {
	transform: scale(1.05);
}

.group .overflow-hidden {
	overflow: hidden;
}

.group .overflow-hidden>img,
.group .overflow-hidden img {
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	display: block;
	width: 100%;
}

/* ── Single image ──────────────────────────────────────────────────────── */
.gallery-solo {
	width: 100%;
	height: 100%;
}

.gallery-solo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform 0.4s ease;
	cursor: pointer;
}

.gallery-solo:hover img {
	transform: scale(1.03);
}

/* ── Two images side by side ───────────────────────────────────── */
.gallery-pair {
	display: flex;
	height: 100%;
	gap: 2px;
}

.gallery-pair img {
	flex: 1 1 50%;
	width: 0;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform 0.4s ease;
	cursor: pointer;
}

.gallery-pair img:hover {
	transform: scale(1.04);
	z-index: 1;
}

/* ── Mosaic: 1 large + 2–3 stacked ───────────────────────────────── */
.gallery-grid {
	display: flex;
	height: 100%;
	gap: 2px;
}

.gallery-hero {
	flex: 0 0 60%;
	height: 100%;
	overflow: hidden;
	position: relative;
	/* establishes containing block for absolute img */
}

.gallery-hero img {
	position: absolute;
	/* fills .gallery-hero exactly — no height% chain issue */
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	cursor: pointer;
	transition: transform 0.4s ease;
}

.gallery-hero:hover img {
	transform: scale(1.04);
}

.gallery-stack {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow: hidden;
}

.gallery-thumb-item {
	flex: 1 1 0;
	overflow: hidden;
	position: relative;
}

.gallery-thumb-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform 0.4s ease;
	cursor: pointer;
}

.gallery-thumb-item:hover img {
	transform: scale(1.06);
}

/* “+N more” overlay on the last stacked thumb when extra images exist */
.gallery-thumb-more::after {
	content: attr(data-extra);
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	letter-spacing: 0.01em;
	pointer-events: none;
}

/* ── No-image placeholder ───────────────────────────────────────────── */
.gallery-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-no-img {
	font-size: 0.75rem;
	color: #94a3b8;
	/* slate-400 */
	letter-spacing: 0.03em;
}

/* ─────────────────────────────────────────────────────────────────────────────
   “View Design” button
   Unique pill with gradient border + icon. Contrasts cleanly with the
   solid “Live Site” button next to it.
───────────────────────────────────────────────────────────────────────────── */

.view-design-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 16px;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	font-size: 0.8125rem;
	/* 13px */
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	/* Gradient border via box-shadow + background */
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	color: #0f172a;
	/* slate-900 */
	box-shadow:
		inset 0 0 0 1.5px transparent,
		0 0 0 1.5px #cbd5e1,
		/* slate-300 border */
		0 1px 3px rgba(15, 23, 42, 0.08);
	transition:
		background 0.22s ease,
		box-shadow 0.22s ease,
		transform 0.15s ease,
		color 0.22s ease;
	position: relative;
	overflow: hidden;
}

/* Shimmer layer on hover */
.view-design-btn::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg,
			transparent 0%,
			rgba(255, 255, 255, 0.55) 50%,
			transparent 100%);
	transform: translateX(-100%);
	transition: transform 0.45s ease;
	pointer-events: none;
}


.view-design-btn:hover {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	color: #ffffff;
	box-shadow:
		0 0 0 1.5px #0f172a,
		0 4px 14px rgba(15, 23, 42, 0.22);
	transform: translateY(-1px);
}

.view-design-btn:hover::before {
	transform: translateX(100%);
}

.view-design-btn:active {
	transform: translateY(0);
}

.btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

.view-design-btn:hover .btn-icon {
	transform: scale(1.15) rotate(5deg);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Lightbox
───────────────────────────────────────────────────────────────────────────── */


#site-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	z-index: 50000;
	display: flex;
	align-items: center;
	justify-content: center;
}

#site-lightbox.lightbox-hidden {
	display: none;
}

.lb-img-wrap {
	position: relative;
	z-index: 0;
	max-width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lb-img {
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 8px;
	display: block;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-drag: none;
	transition: transform 0.24s ease, opacity 0.24s ease;
	will-change: transform, opacity;
}

#site-lightbox.lb-dragging .lb-img {
	cursor: grabbing;
}

.lb-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.lb-close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.lb-prev,
.lb-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	cursor: pointer;
	width: 52px;
	height: 52px;
	padding: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.lb-nav-icon {
	width: 22px;
	height: 22px;
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.6;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.lb-prev {
	left: 16px;
}

.lb-next {
	right: 16px;
}

@media (hover: hover) and (pointer: fine) {

	.lb-prev:hover,
	.lb-next:hover {
		background: rgba(255, 255, 255, 0.22);
	}
}

.lb-counter {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	color: rgba(255, 255, 255, 0.65);
	font-size: 13px;
	white-space: nowrap;
}

@media (max-width: 767px) {

	.lb-close,
	.lb-prev,
	.lb-next {
		background: rgba(15, 23, 42, 0.72);
		backdrop-filter: blur(4px);
	}

	.lb-close {
		top: 12px;
		right: 12px;
		width: 38px;
		height: 38px;
		font-size: 22px;
	}

	.lb-prev,
	.lb-next {
		width: 36px;
		height: 36px;
	}

	.lb-nav-icon {
		width: 20px;
		height: 20px;
	}

	.lb-prev {
		left: 8px;
	}

	.lb-next {
		right: 8px;
	}

	.lb-img-wrap {
		padding: 0;
	}

	.lb-img {
		max-width: 94vw;
		max-height: 82vh;
	}
}

/* ─────────────────────────────────────────────────────────────────────────────
   Read More / Read Less
───────────────────────────────────────────────────────────────────────────── */

.excerpt-text {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.excerpt-wrap.open .excerpt-text {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

.read-more-btn {
	display: inline-block;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-size: 0.8125rem;
	/* 13px */
	color: #64748b;
	/* slate-500 */
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	margin-top: 4px;
	transition: color 0.15s;
}

.read-more-btn:hover {
	color: #334155;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Blinking availability dot (hero section — "Available for new projects")
   Uses CSS animation only — zero JS, zero performance cost.
───────────────────────────────────────────────────────────────────────────── */

@keyframes dot-blink {

	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}

	50% {
		opacity: 0.3;
		transform: scale(0.85);
	}
}

.dot-blink {
	animation: dot-blink 2s ease-in-out infinite;
	display: inline-block;
	/* needed for transform to work on inline elements */
}

/* ─────────────────────────────────────────────────────────────────────────────
   Portfolio Admin — Gallery Preview (in meta box)
───────────────────────────────────────────────────────────────────────────── */

.ai-gallery-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.ai-gallery-item {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}

.ai-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ai-gallery-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Case Study screenshot gallery (single page)
   Uses the same gallery-mosaic classes as portfolio cards but with
   height: auto — images rendered at natural proportions, no fixed container.
───────────────────────────────────────────────────────────────────────────── */

/* Base screenshot item — used for all layouts (1, 2, or mosaic) */
.screenshot-item {
	cursor: pointer;
	overflow: hidden;
}

/* ── Hero (left 60%) — natural auto height, not absolute ── */
.screenshot-gallery .gallery-hero {
	position: relative;
	/* override absolute-positioning from base .gallery-hero */
	flex: 0 0 60%;
	height: auto;
	overflow: hidden;
}

.screenshot-gallery .gallery-hero img {
	position: static;
	/* override position:absolute from base .gallery-hero img */
	width: 100%;
	height: auto;
	/* natural image height — no white gap */
	display: block;
	object-fit: unset;
	cursor: pointer;
	transition: transform 0.25s ease;
}

.screenshot-gallery .gallery-hero:hover img {
	transform: scale(1.03);
}

/* ── Stacked thumbs (right 40%) — fixed aspect ratio so they fill cleanly ── */
.screenshot-gallery .gallery-thumb-item {
	flex: 1 1 0;
	overflow: hidden;
	position: relative;
	aspect-ratio: 16 / 5;
	/* consistent height per thumb regardless of image */
}

.screenshot-gallery .gallery-thumb-item img {
	position: absolute;
	/* fill the aspect-ratio box */
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	cursor: pointer;
	transition: transform 0.25s ease;
}

.screenshot-gallery .gallery-thumb-item:hover img {
	transform: scale(1.05);
}

/* ── Single image (1 screenshot) — full width, auto height ── */
.screenshot-gallery .gallery-solo {
	height: auto;
}

.screenshot-gallery .gallery-solo img {
	width: 100%;
	height: auto;
	display: block;
	cursor: pointer;
	object-fit: unset;
	transition: transform 0.25s ease;
}

/* ── Two images side by side — auto height ── */
.screenshot-gallery .gallery-pair img {
	height: auto;
	object-fit: unset;
}

/* ── Screenshot gallery — top corners must match the outer .rounded-3xl box (1.5rem) ──
   Problem: using border-radius:inherit causes a DOUBLE clip — the outer box clips at
   1.5rem, AND the screenshot-gallery self-clips at 1.5rem but 1px inset (due to the
   outer 1px border), producing a hairline white gap in the corners.
   Fix: set the radius EXPLICITLY on .screenshot-gallery only. Bottom corners = 0
   because the "Real results" footer bar sits below the gallery inside the same box. ── */
.screenshot-gallery {
	overflow: hidden;
	border-radius: 1.5rem 1.5rem 0 0;
	/* top-left, top-right match outer rounded-3xl */
}

/* Layout containers need overflow:hidden to contain their own images — no radius needed */
.screenshot-gallery .gallery-solo,
.screenshot-gallery .gallery-pair,
.screenshot-gallery .gallery-grid {
	overflow: hidden;
}

/* Mosaic: also contain the hero and stack columns */
.screenshot-gallery .gallery-grid .gallery-hero,
.screenshot-gallery .gallery-grid .gallery-stack {
	overflow: hidden;
}

/* ── Frontend testimonials gallery — image borders + grid padding ──────────
   These styles apply only to the homepage testimonials screenshot gallery
   (NOT the backend admin uploader).
── */

/* Padding inside the mosaic grid so images have breathing room */
.screenshot-gallery .gallery-grid {
	padding: 20px;
}

/* 1px black border on the hero (large left) image */
/* .screenshot-gallery .gallery-hero img {
	border: 1px solid #000;
} */

/* 1px black border on each stacked thumbnail image */
.screenshot-gallery .gallery-thumb-item img {
	border: 1px solid #000;
}

.screenshot-gallery .gallery-hero {
	border: 1px solid #000;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Testimonial Slider  (.tslider-wrap)
───────────────────────────────────────────────────────────────────────────── */

/* All slides hidden by default; JS adds .tslide--active to show one */
.tslide {
	display: none;
}

.tslide--active {
	display: block;
}

/* Stars */
.tslide-stars {
	color: #f59e0b;
	font-size: 1rem;
	letter-spacing: 0.05em;
}

/* Description: 2 lines clamped; "Read more" sits flush on line 3 */
.tslide-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.6;
	margin-bottom: 0;
	/* remove any gap between text and button */
}

.tslide-text--expanded {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

/* Read more button — sits directly under the 2-line clamp as the 3rd line */
.tslide-read-more {
	display: block;
	/* new line, not inline — sits on its own line */
	background: none;
	border: none;
	padding: 0;
	margin-top: 2px;
	/* hairline gap so it touches line 3 cleanly */
	cursor: pointer;
	font-size: 0.75rem;
	line-height: 1.6;
	/* same line-height → button occupies exactly 1 line-height slot */
	color: #0f172a;
	text-decoration: none;
	transition: text-decoration 0.15s ease;
}

.tslide-read-more:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tslider-nav {
	gap: 1rem;
}

.tslider-dots {
	display: flex;
	gap: 0.5rem;
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
	white-space: nowrap;
	padding-block: 2px;
}

.tslider-dots::-webkit-scrollbar {
	display: none;
}

/* Dot navigation */
.tslider-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e2e8f0;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background 0.25s ease, transform 0.25s ease;
}

.tslider-dot--active {
	background: #0f172a;
	transform: scale(1.2);
}

/* Slider prev/next arrow buttons */
.tslider-prev,
.tslider-next {
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.tslider-prev:hover,
.tslider-next:hover {
	background: #0f172a !important;
	border-color: #0f172a !important;
	color: #ffffff;
}

.tslider-prev:hover svg,
.tslider-next:hover svg {
	stroke: #ffffff;
}

/* Directional slide animations */
.tslider-wrap {
	overflow: hidden;
}

.tslide--enter-left {
	animation: tslide-from-left 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.tslide--enter-right {
	animation: tslide-from-right 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes tslide-from-right {
	from {
		opacity: 0;
		transform: translateX(40px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes tslide-from-left {
	from {
		opacity: 0;
		transform: translateX(-40px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ─────────────────────────────────────────────────────────────────────────────
   Contact Form 7 — styled to match the theme's form design
   Scoped to .cf7-wrapper to avoid touching any other CF7 instances
───────────────────────────────────────────────────────────────────────────── */

.cf7-wrapper .wpcf7-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
	/* row-gap  col-gap */
	align-items: start;
}

/* Label above each field */
.cf7-wrapper .wpcf7-form label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #0f172a;
	margin-bottom: 0;
}

/* Row grouping — CF7 wraps fields in <p> tags by default.
   Margin removed: grid gap handles all row spacing. */
.cf7-wrapper .wpcf7-form>p {
	margin: 0;
}

/* All text/email/url/tel inputs */
.cf7-wrapper .wpcf7-text,
.cf7-wrapper .wpcf7-email,
.cf7-wrapper .wpcf7-url,
.cf7-wrapper .wpcf7-tel,
.cf7-wrapper .wpcf7-date,
.cf7-wrapper .wpcf7-number,
.cf7-wrapper .wpcf7-select,
.cf7-wrapper .wpcf7-textarea {
	display: block;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.50rem 1rem;
	border: 1px solid #cbd5e1;
	border-radius: 0.75rem;
	font-size: 0.875rem;
	color: #0f172a;
	background: #ffffff;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.cf7-wrapper .wpcf7-text:focus,
.cf7-wrapper .wpcf7-email:focus,
.cf7-wrapper .wpcf7-url:focus,
.cf7-wrapper .wpcf7-select:focus,
.cf7-wrapper .wpcf7-textarea:focus {
	outline: none;
	border-color: #94a3b8;
	box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.cf7-wrapper .wpcf7-textarea {
	height: 8rem;
	resize: vertical;
}

/* Submit button */
.cf7-wrapper .wpcf7-submit {
	width: 100%;
	border-radius: 0.75rem;
	background: #0f172a;
	color: #ffffff;
	padding: 0.75rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 500;
	border: none;
	cursor: pointer;
	transition: background 0.2s ease;
	margin-top: 0.25rem;
}

.cf7-wrapper .wpcf7-submit:hover {
	background: #1e293b;
}

/* Validation messages */
.cf7-wrapper .wpcf7-not-valid-tip {
	display: block;
	font-size: 0.75rem;
	color: #dc2626;
	margin-top: 0.25rem;
}

.cf7-wrapper .wpcf7-response-output {
	border-radius: 0.75rem;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	margin-top: 1rem;
	border: 1px solid #e2e8f0;
}

.cf7-wrapper .wpcf7-mail-sent-ok {
	background: #ecfdf5;
	border-color: #34d399;
	color: #065f46;
}

.cf7-wrapper .wpcf7-validation-errors,
.cf7-wrapper .wpcf7-mail-sent-ng {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #991b1b;
}

/* Two-column grid for paired fields (Name+Email, Service+Budget, URL+Deadline)
   The form itself is now a grid, so .field-row-2 is kept only as a fallback
   for any legacy HTML that wraps pairs in a div. */
.cf7-wrapper .wpcf7-form .field-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

/* ── Full-width rows: textarea + submit button + validation output ──────────
   Uses :has() so position is content-based, not fragile nth-child indexes.
   Supported: Chrome 105+, Firefox 121+, Safari 15.4+  (all modern browsers).
── */
.cf7-wrapper .wpcf7-form>p:has(.wpcf7-textarea),
.cf7-wrapper .wpcf7-form>p:has(.wpcf7-submit) {
	grid-column: 1 / -1;
}

/* Response output (success/error banner) also spans full width */
.cf7-wrapper .wpcf7-response-output {
	grid-column: 1 / -1;
}


/* ── Mobile: single-column below 640 px ── */
@media (max-width: 640px) {
	.cf7-wrapper .wpcf7-form {
		grid-template-columns: 1fr;
	}

	.cf7-wrapper .wpcf7-form .field-row-2 {
		grid-template-columns: 1fr;
	}
}
