/**
 * Dewilliams – main stylesheet.
 *
 * Mobile-first. Written with logical properties (margin-inline-start,
 * padding-block...) so the layout mirrors automatically in RTL.
 * Colors and fonts come from CSS variables printed by inc/enqueue.php
 * from the Customizer (and synced with Elementor Global Colors).
 *
 * Contents
 *  1. Design tokens
 *  2. Base & reset
 *  3. Typography
 *  4. Layout utilities
 *  5. Buttons
 *  6. Forms
 *  7. Section title
 *  8. Cards & shared components
 *  9. WordPress core classes
 * 10. Animations
 * 11. Accessibility helpers
 */

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	/* Colors: the palette itself is printed inline from the Customizer. */
	--dw-color-white: #ffffff;
	--dw-color-black: #05101f;
	--dw-color-success: #1e7b3c;
	--dw-color-error: #b42318;
	--dw-color-muted: #6b6e76;
	--dw-color-overlay: rgba(35, 42, 52, 0.72);

	/* Text on brand-color fills (blue, call-to-action). The default blue and
	   red-orange are tuned so white passes WCAG AA. */
	--dw-color-on-primary: #ffffff;
	--dw-color-on-cta: #ffffff;

	/* Small eyebrow labels above headings. */
	--dw-color-eyebrow: var(--dw-color-primary);

	/* Tinted backgrounds derived from the palette (no hard-coded colors). */
	--dw-tint-primary: color-mix(in srgb, var(--dw-color-primary) 12%, transparent);
	--dw-tint-accent: color-mix(in srgb, var(--dw-color-accent) 22%, transparent);

	/* Spacing scale (4px base). */
	--dw-space-1: 0.25rem;
	--dw-space-2: 0.5rem;
	--dw-space-3: 0.75rem;
	--dw-space-4: 1rem;
	--dw-space-5: 1.5rem;
	--dw-space-6: 2rem;
	--dw-space-7: 3rem;
	--dw-space-8: 4rem;
	--dw-space-9: 6rem;

	/* Section vertical rhythm. */
	--dw-section-space: clamp(4rem, 2.5rem + 6vw, 7.5rem);

	/* Type scale (fluid). */
	/* One ladder for the whole site:
	   hero 72 · section heading 48 · lead headline 40 · card title 24 · body 17. */
	--dw-fs-xs: 0.8125rem;
	--dw-fs-sm: 0.9375rem;
	--dw-fs-base: 1.0625rem;
	--dw-fs-md: 1.1875rem;
	--dw-fs-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	--dw-fs-xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
	--dw-fs-display-sm: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
	--dw-fs-2xl: clamp(2rem, 1.4rem + 2.2vw, 3rem);
	--dw-fs-3xl: clamp(2.5rem, 1.5rem + 3.6vw, 4.5rem);

	--dw-lh-tight: 1.12;
	--dw-lh-base: 1.7;

	/* Display voice: the heading font slightly widened (Archivo's width
	   axis; fonts without one simply ignore it). */
	--dw-heading-stretch: 108%;
	--dw-heading-tracking: -0.022em;

	/* Shape: flat, square corporate style; only buttons are pill-shaped. */
	--dw-radius-sm: 0;
	--dw-radius: 0;
	--dw-radius-lg: 0;
	--dw-radius-pill: 999px;

	--dw-shadow-sm: 0 1px 2px rgba(35, 42, 52, 0.06);
	--dw-shadow: 0 10px 30px rgba(35, 42, 52, 0.08);
	--dw-shadow-lg: 0 20px 50px rgba(35, 42, 52, 0.12);

	/* Layout. */
	--dw-container: 1103px; /* Boxed content width; Elementor's Content Width matches (inc/elementor.php). */
	--dw-gutter: 16px;

	/* Motion. Strong curves: ease-out for things arriving or responding,
	   ease-in-out for things moving across the screen. */
	--dw-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--dw-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--dw-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
	--dw-duration: 0.3s;
	--dw-duration-fast: 0.16s;

	/* Browser surfaces carry the palette too. */
	accent-color: var(--dw-color-primary);
	caret-color: var(--dw-color-primary);
	scrollbar-color: color-mix(in srgb, var(--dw-color-secondary) 55%, transparent) transparent;
}

::selection {
	background: var(--dw-color-primary);
	color: var(--dw-color-on-primary);
}

@media (min-width: 768px) {
	:root {
		--dw-gutter: 24px;
	}
}

/* ==========================================================================
   2. Base & reset
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: var(--dw-color-white);
	color: var(--dw-color-text);
	font-family: var(--dw-font-body);
	font-size: var(--dw-fs-base);
	line-height: var(--dw-lh-base);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img,
video {
	height: auto;
}

img {
	vertical-align: middle;
	border-style: none;
}

figure {
	margin: 0;
}

hr {
	height: 1px;
	margin-block: var(--dw-space-6);
	border: 0;
	background: var(--dw-color-border);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-block-end: var(--dw-space-5);
}

th,
td {
	padding: var(--dw-space-3) var(--dw-space-4);
	border-block-end: 1px solid var(--dw-color-border);
	text-align: start;
}

th {
	color: var(--dw-color-heading);
	font-weight: 700;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 0 var(--dw-space-4);
	color: var(--dw-color-heading);
	font-family: var(--dw-font-heading);
	font-weight: 700;
	font-stretch: var(--dw-heading-stretch);
	line-height: var(--dw-lh-tight);
	letter-spacing: var(--dw-heading-tracking);
	text-wrap: balance;
}

h1 { font-size: var(--dw-fs-3xl); font-weight: 800; }
h2 { font-size: var(--dw-fs-2xl); }
h3 { font-size: var(--dw-fs-xl); }
h4 { font-size: var(--dw-fs-lg); }
h5 { font-size: var(--dw-fs-md); }
h6 { font-size: var(--dw-fs-base); }

p,
ul,
ol,
dl,
blockquote,
pre {
	margin-block: 0 var(--dw-space-5);
}

/* No single orphaned word on the last line of a paragraph. */
p,
li,
blockquote {
	text-wrap: pretty;
}

ul,
ol {
	padding-inline-start: 1.25em;
}

a {
	color: var(--dw-color-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--dw-duration) var(--dw-ease);
}

a:hover {
	color: var(--dw-color-primary-dark);
}

strong,
b {
	color: var(--dw-color-heading);
	font-weight: 700;
}

/* A pull quote: larger, quieter text led by the short call-to-action rule
   used across the theme (no thick side bar). */
blockquote {
	position: relative;
	margin-inline: 0;
	padding: var(--dw-space-6) var(--dw-space-6) var(--dw-space-5);
	background: var(--dw-color-light);
	color: var(--dw-color-heading);
	font-size: var(--dw-fs-lg);
	line-height: 1.55;
}

blockquote::before {
	content: "";
	display: block;
	width: 32px;
	height: 2px;
	margin-block-end: var(--dw-space-4);
	background: var(--dw-color-cta);
}

blockquote p:last-child {
	margin-block-end: 0;
}

code,
kbd,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

pre {
	overflow-x: auto;
	padding: var(--dw-space-4);
	border-radius: var(--dw-radius);
	background: var(--dw-color-secondary-dark);
	color: #e6edf6;
}

/* Text on dark backgrounds. */
.dw-on-dark,
.dw-on-dark h1,
.dw-on-dark h2,
.dw-on-dark h3,
.dw-on-dark h4,
.dw-on-dark h5,
.dw-on-dark h6,
.dw-on-dark strong {
	color: var(--dw-color-white);
}

.dw-on-dark {
	--dw-color-eyebrow: var(--dw-color-accent);
	color: rgba(255, 255, 255, 0.86);
}

.dw-on-dark a:not(.dw-btn) {
	color: var(--dw-color-white);
}

/* ==========================================================================
   4. Layout utilities
   ========================================================================== */

.dw-container {
	width: 100%;
	max-width: calc(var(--dw-container) + var(--dw-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--dw-gutter);
}

.dw-section {
	padding-block: var(--dw-section-space);
}

.dw-section--light {
	background: var(--dw-color-light);
}

.dw-section--dark {
	background: var(--dw-color-secondary);
}

.dw-grid {
	display: grid;
	gap: var(--dw-grid-gap, var(--dw-space-6));
	grid-template-columns: repeat(var(--dw-cols-mobile, 1), minmax(0, 1fr));
}

@media (min-width: 768px) {
	.dw-grid {
		grid-template-columns: repeat(var(--dw-cols-tablet, 2), minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	.dw-grid {
		grid-template-columns: repeat(var(--dw-cols, 3), minmax(0, 1fr));
	}
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.dw-btn,
.wp-block-button__link,
.comment-form .submit,
.search-submit,
.post-password-form input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--dw-space-2);
	min-height: 48px;
	padding: 0.75rem 2.25rem;
	/* Pill-shaped call-to-action button (white on the CTA color is AA). */
	border: 2px solid var(--dw-color-cta);
	border-radius: var(--dw-radius-pill);
	background: var(--dw-color-cta);
	color: var(--dw-color-on-cta);
	font-family: var(--dw-font-heading);
	font-size: var(--dw-fs-sm);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.05em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		background-color 0.2s var(--dw-ease-out),
		border-color 0.2s var(--dw-ease-out),
		color 0.2s var(--dw-ease-out),
		transform var(--dw-duration-fast) var(--dw-ease-out),
		box-shadow 0.25s var(--dw-ease-out);
}

.dw-btn:hover,
.wp-block-button__link:hover,
.comment-form .submit:hover,
.search-submit:hover,
.post-password-form input[type="submit"]:hover {
	border-color: var(--dw-color-secondary);
	background: var(--dw-color-secondary);
	color: var(--dw-color-white);
}

/* Lift only where hovering is real (mouse), never as a sticky tap state. */
@media (hover: hover) and (pointer: fine) {
	.dw-btn:hover {
		transform: translateY(-2px);
		box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--dw-color-secondary) 55%, transparent);
	}
}

/* Pressed: the button gives way under the finger. */
.dw-btn:active,
.wp-block-button__link:active {
	transform: scale(0.97);
	box-shadow: none;
	transition-duration: 0.08s;
}

/* Trailing arrow leans toward where the button goes. */
.dw-btn svg {
	transition: transform 0.25s var(--dw-ease-out);
}

.dw-btn:hover svg:last-child,
.dw-btn:focus-visible svg:last-child {
	transform: translateX(3px);
}

[dir="rtl"] .dw-btn:hover svg:last-child,
[dir="rtl"] .dw-btn:focus-visible svg:last-child {
	transform: translateX(-3px);
}

.dw-btn[disabled],
.dw-btn.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

/* Blue pill (e.g. "View all"). */
.dw-btn--secondary {
	border-color: var(--dw-color-primary);
	background: var(--dw-color-primary);
	color: var(--dw-color-on-primary);
}

.dw-btn--secondary:hover {
	border-color: var(--dw-color-secondary);
	background: var(--dw-color-secondary);
	color: var(--dw-color-white);
}

.dw-btn--outline {
	border-color: currentColor;
	background: transparent;
	color: var(--dw-color-primary);
}

.dw-btn--outline:hover {
	border-color: var(--dw-color-secondary);
	background: var(--dw-color-secondary);
	color: var(--dw-color-white);
}

.dw-on-dark .dw-btn--outline,
.dw-btn--outline-light {
	border-color: var(--dw-color-white);
	background: transparent;
	color: var(--dw-color-white);
}

.dw-on-dark .dw-btn--outline:hover,
.dw-btn--outline-light:hover {
	border-color: var(--dw-color-white);
	background: var(--dw-color-white);
	color: var(--dw-color-secondary);
}

.dw-btn--sm {
	min-height: 40px;
	padding: 0.5rem 1.125rem;
	font-size: var(--dw-fs-xs);
}

.dw-btn--lg {
	min-height: 56px;
	padding: 1rem 2.25rem;
}

.dw-btn--block {
	width: 100%;
}

/* Icon-only round button. */
.dw-btn--icon {
	width: 48px;
	min-height: 48px;
	padding: 0;
	border-radius: 50%;
}

.dw-btn .dw-icon {
	flex-shrink: 0;
	transition: transform var(--dw-duration) var(--dw-ease);
}

.dw-btn:hover .dw-icon--arrow-right {
	transform: translateX(4px);
}

[dir="rtl"] .dw-btn .dw-icon--arrow-right {
	transform: scaleX(-1);
}

[dir="rtl"] .dw-btn:hover .dw-icon--arrow-right {
	transform: scaleX(-1) translateX(4px);
}

/* Plain text link with arrow. */
.dw-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: var(--dw-space-2);
	color: var(--dw-color-primary);
	font-family: var(--dw-font-heading);
	font-size: var(--dw-fs-sm);
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.dw-link-arrow svg {
	transition: transform 0.25s var(--dw-ease-out);
}

a.dw-link-arrow:hover svg,
a.dw-link-arrow:focus-visible svg,
.dw-card:hover .dw-link-arrow svg {
	transform: translateX(4px);
}

[dir="rtl"] .dw-link-arrow svg {
	transform: scaleX(-1);
}

.dw-link-arrow:hover {
	color: var(--dw-color-primary-dark);
}

.dw-link-arrow:hover .dw-icon {
	transform: translateX(4px);
}

.dw-link-arrow .dw-icon {
	transition: transform var(--dw-duration) var(--dw-ease);
}

/* Loading spinner inside buttons. */
.dw-spinner {
	display: inline-block;
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-inline-end-color: transparent;
	border-radius: 50%;
	animation: dw-spin 0.7s linear infinite;
}

@keyframes dw-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   6. Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea,
.dw-input {
	width: 100%;
	min-height: 52px;
	padding: 0.75rem 1rem;
	border: 1px solid var(--dw-color-border);
	border-radius: var(--dw-radius);
	background: var(--dw-color-white);
	color: var(--dw-color-heading);
	font-size: var(--dw-fs-base);
	line-height: 1.4;
	transition: border-color var(--dw-duration) var(--dw-ease), box-shadow var(--dw-duration) var(--dw-ease);
	appearance: none;
}

textarea {
	min-height: 140px;
	resize: vertical;
}

select {
	padding-inline-end: 2.75rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 16px;
}

[dir="rtl"] select {
	background-position: left 1rem center;
}

input::placeholder,
textarea::placeholder {
	color: var(--dw-color-muted);
	opacity: 1;
}

input:focus,
select:focus,
textarea:focus,
.dw-input:focus {
	border-color: var(--dw-color-primary);
	outline: none;
	box-shadow: 0 0 0 3px var(--dw-tint-accent);
}

input[type="checkbox"],
input[type="radio"] {
	width: 1.125rem;
	height: 1.125rem;
	accent-color: var(--dw-color-primary);
}

label {
	display: inline-block;
	margin-block-end: var(--dw-space-2);
	color: var(--dw-color-heading);
	font-size: var(--dw-fs-sm);
	font-weight: 600;
}

.dw-form {
	display: grid;
	gap: var(--dw-space-4);
}

.dw-form__row {
	display: grid;
	gap: var(--dw-space-4);
}

@media (min-width: 640px) {
	.dw-form__row--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dw-form__row--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.dw-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.dw-field__required {
	color: var(--dw-color-error);
	margin-inline-start: 2px;
}

.dw-field__help {
	margin-block-start: var(--dw-space-1);
	color: var(--dw-color-muted);
	font-size: var(--dw-fs-xs);
}

.dw-field__error {
	margin-block-start: var(--dw-space-1);
	color: var(--dw-color-error);
	font-size: var(--dw-fs-xs);
	font-weight: 600;
}

.dw-field.has-error input,
.dw-field.has-error select,
.dw-field.has-error textarea,
[aria-invalid="true"] {
	border-color: var(--dw-color-error);
}

.dw-field--check {
	flex-direction: row;
	align-items: flex-start;
	gap: var(--dw-space-2);
}

.dw-field--check label {
	margin: 0;
	font-weight: 400;
	color: var(--dw-color-text);
}

.dw-field--check input {
	margin-block-start: 0.2em;
	flex-shrink: 0;
}

/* Honeypot: hidden from people and assistive tech, visible to bots. */
.dw-hp {
	position: absolute !important;
	inset-inline-start: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Form status message. */
.dw-form-message {
	display: flex;
	align-items: flex-start;
	gap: var(--dw-space-3);
	padding: var(--dw-space-4);
	border-radius: var(--dw-radius);
	font-weight: 600;
}

.dw-form-message:empty {
	display: none;
}

.dw-form-message--success {
	background: #e6f4ea;
	color: var(--dw-color-success);
}

.dw-form-message--error {
	background: #fdecea;
	color: var(--dw-color-error);
}

.dw-form-message .dw-icon {
	flex-shrink: 0;
	margin-block-start: 2px;
}

/* ==========================================================================
   7. Section title
   ========================================================================== */

/* Same gap from every section title to its content (56px, 40px on phones). */
.dw-section-title {
	max-width: 760px;
	margin-block-end: clamp(2.5rem, 1.8rem + 2vw, 3.5rem);
}

.dw-section-title--center {
	margin-inline: auto;
	text-align: center;
}

.dw-section-title--end {
	margin-inline-start: auto;
	text-align: end;
}

/* Small label above a heading: smaller and firmer than body text. */
.dw-eyebrow {
	display: inline-block;
	margin-block-end: var(--dw-space-3);
	color: var(--dw-color-eyebrow);
	font-family: var(--dw-font-heading);
	font-size: var(--dw-fs-xs);
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.4;
	text-transform: uppercase;
}

.dw-section-title__heading {
	margin-block-end: var(--dw-space-4);
	font-size: var(--dw-fs-2xl);
}

/* Uppercase centered section headings ("CORE CAPABILITIES"). */
.dw-section-title--upper .dw-section-title__heading {
	font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.dw-section-title__heading mark,
.dw-highlight {
	background: none;
	color: var(--dw-color-primary);
}

.dw-on-dark .dw-section-title__heading mark,
.dw-on-dark .dw-highlight {
	color: var(--dw-color-accent);
}

/* Short accent underline under left-aligned headings ("Who We Are"). */
.dw-section-title__divider {
	display: block;
	width: 56px;
	height: 2px;
	margin-block: calc(-1 * var(--dw-space-1)) var(--dw-space-5);
	background: var(--dw-color-cta);
}

.dw-on-dark .dw-section-title__divider {
	background: var(--dw-color-white);
}

/* Ornament divider under centered headings: arrows around a compass. */
.dw-section-title__ornament {
	display: block;
	width: 112px;
	height: 24px;
	margin: calc(-1 * var(--dw-space-2)) auto var(--dw-space-5);
	color: color-mix(in srgb, var(--dw-color-heading) 45%, transparent);
}

.dw-section-title--start .dw-section-title__ornament {
	margin-inline: 0;
}

.dw-section-title--end .dw-section-title__ornament {
	margin-inline: auto 0;
}

.dw-on-dark .dw-section-title__ornament {
	color: rgba(255, 255, 255, 0.6);
}

.dw-section-title--center .dw-section-title__divider {
	margin-inline: auto;
}

.dw-section-title--end .dw-section-title__divider {
	margin-inline-start: auto;
}

.dw-section-title__desc {
	max-width: 60ch;
	margin: 0;
	font-size: var(--dw-fs-md);
	line-height: 1.6;
}

.dw-section-title--center .dw-section-title__desc {
	margin-inline: auto;
}

/* Split header: heading on one side, description and link on the other. */
.dw-section-title--split {
	display: grid;
	gap: var(--dw-space-5);
	max-width: none;
}

.dw-section-title--split .dw-section-title__divider {
	margin-block-end: 0;
}

.dw-section-title--split .dw-section-title__heading {
	margin-block-end: var(--dw-space-4);
}

.dw-section-title__aside .dw-section-title__desc {
	margin-block-end: var(--dw-space-4);
}

@media (min-width: 1025px) {
	.dw-section-title--split {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		gap: clamp(2rem, 5vw, 5rem);
		align-items: end;
	}

	.dw-section-title--split .dw-section-title__heading {
		margin-block-end: var(--dw-space-4);
	}
}

/* Responsive alignment overrides (Elementor tablet ≤1024px, mobile ≤767px). */
@media (max-width: 1024px) {
	.dw-section-title--tablet-start { margin-inline: 0 auto; text-align: start; }
	.dw-section-title--tablet-center { margin-inline: auto; text-align: center; }
	.dw-section-title--tablet-end { margin-inline: auto 0; text-align: end; }
	.dw-section-title--tablet-start .dw-section-title__divider { margin-inline: 0 auto; }
	.dw-section-title--tablet-center .dw-section-title__divider { margin-inline: auto; }
	.dw-section-title--tablet-end .dw-section-title__divider { margin-inline: auto 0; }
}

@media (max-width: 767px) {
	.dw-section-title--mobile-start { margin-inline: 0 auto; text-align: start; }
	.dw-section-title--mobile-center { margin-inline: auto; text-align: center; }
	.dw-section-title--mobile-end { margin-inline: auto 0; text-align: end; }
	.dw-section-title--mobile-start .dw-section-title__divider { margin-inline: 0 auto; }
	.dw-section-title--mobile-center .dw-section-title__divider { margin-inline: auto; }
	.dw-section-title--mobile-end .dw-section-title__divider { margin-inline: auto 0; }
}

/* ==========================================================================
   8. Cards & shared components
   ========================================================================== */

.dw-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 0;
	border-radius: var(--dw-radius-lg);
	background: var(--dw-color-white);
	transition: transform var(--dw-duration) var(--dw-ease), box-shadow var(--dw-duration) var(--dw-ease);
}

.dw-card:hover {
	box-shadow: var(--dw-shadow-lg);
	transform: translateY(-4px);
}

/*
 * Notch: a small triangle pointing out of a box edge, used on info boxes,
 * numbered tiles, team cards and testimonials.
 *   .dw-notch--start  points left (into the box from its start edge)
 *   .dw-notch--top    points up out of the top edge
 */
.dw-notch {
	position: relative;
}

.dw-notch::before {
	content: "";
	position: absolute;
	z-index: 2;
	width: 0;
	height: 0;
	border: 8px solid transparent;
}

.dw-notch--start::before {
	top: 40px;
	inset-inline-start: 0;
	border-inline-start-color: var(--dw-color-white);
}

.dw-notch--top::before {
	top: -16px;
	inset-inline-start: calc(50% - 8px);
	border-block-end-color: var(--dw-color-white);
}

.dw-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 10 / 7;
	background: var(--dw-color-light);
}

.dw-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--dw-ease);
}

.dw-card:hover .dw-card__media img {
	transform: scale(1.06);
}

.dw-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: var(--dw-space-6);
}

.dw-card__title {
	margin-block-end: var(--dw-space-3);
	font-size: var(--dw-fs-lg);
}

.dw-card__title a {
	color: inherit;
	text-decoration: none;
}

.dw-card__title a:hover {
	color: var(--dw-color-primary-dark);
}

/* Make the whole card clickable via the title link (keeps one tab stop). */
.dw-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.dw-card__footer {
	margin-block-start: auto;
	padding-block-start: var(--dw-space-4);
}

.dw-service-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: #e9e9ea;
	color: var(--dw-color-heading);
	font-size: 30px;
	transition: background-color var(--dw-duration) var(--dw-ease), color var(--dw-duration) var(--dw-ease);
}

.dw-service-icon img {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.dw-card:hover .dw-service-icon {
	background: var(--dw-color-primary);
	color: var(--dw-color-on-primary);
}

.dw-rating {
	display: inline-flex;
	gap: 2px;
	color: #f2b01e;
}

.dw-badge {
	display: inline-block;
	padding: 0.2rem 0.75rem;
	border-radius: var(--dw-radius-pill);
	background: var(--dw-color-primary);
	color: var(--dw-color-on-primary);
	font-size: var(--dw-fs-xs);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Social icon list. */
.dw-social {
	display: flex;
	flex-wrap: wrap;
	gap: var(--dw-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.dw-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: inherit;
	transition: background-color var(--dw-duration) var(--dw-ease), color var(--dw-duration) var(--dw-ease), transform var(--dw-duration) var(--dw-ease);
}

.dw-social a:hover {
	background: var(--dw-color-primary);
	color: var(--dw-color-on-primary);
	transform: translateY(-2px);
}

/* Swiper navigation shared by all carousels. */
.dw-carousel {
	position: relative;
}

.dw-carousel__nav {
	display: flex;
	gap: var(--dw-space-2);
}

.dw-carousel__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--dw-color-border);
	border-radius: 50%;
	background: var(--dw-color-white);
	color: var(--dw-color-heading);
	transition: background-color var(--dw-duration) var(--dw-ease), color var(--dw-duration) var(--dw-ease), border-color var(--dw-duration) var(--dw-ease);
}

.dw-carousel__btn:hover {
	border-color: var(--dw-color-primary);
	background: var(--dw-color-primary);
	color: var(--dw-color-on-primary);
}

.dw-carousel__btn.swiper-button-disabled {
	opacity: 0.4;
	pointer-events: none;
}

[dir="rtl"] .dw-carousel__btn .dw-icon {
	transform: scaleX(-1);
}

.dw-carousel .swiper-pagination {
	position: static;
	margin-block-start: var(--dw-space-6);
}

.dw-carousel .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	background: var(--dw-color-border);
	opacity: 1;
	transition: width var(--dw-duration) var(--dw-ease), background-color var(--dw-duration) var(--dw-ease);
}

.dw-carousel .swiper-pagination-bullet-active {
	width: 28px;
	border-radius: 5px;
	background: var(--dw-color-accent);
}

/* Equal-height carousel slides. */
.dw-carousel .swiper-slide {
	height: auto;
}

/* Vertical room for card hover lift/shadow, which Swiper's overflow would
   clip. Vertical only: a negative side margin could cause sideways scroll. */
.dw-carousel > .swiper {
	padding-block: 12px 24px;
	margin-block: -12px -24px;
}

.dw-carousel__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--dw-space-4);
	margin-block-start: var(--dw-space-6);
}

.dw-carousel__footer .swiper-pagination {
	margin: 0;
	text-align: start;
}

.dw-carousel__footer .dw-carousel__nav {
	margin-inline-start: auto;
}

/* Without Swiper (no JS): fall back to a horizontally scrollable row. */
.dw-carousel--static .swiper-wrapper {
	display: flex;
	gap: var(--dw-space-5);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
}

.dw-carousel--static .swiper-slide {
	flex: 0 0 min(85%, 360px);
	scroll-snap-align: start;
}

/* Filter bar (services, projects). */
.dw-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--dw-space-2);
	margin-block-end: var(--dw-space-7);
}

.dw-filter__btn {
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	border: 1px solid var(--dw-color-border);
	border-radius: var(--dw-radius-pill);
	background: var(--dw-color-white);
	color: var(--dw-color-heading);
	font-family: var(--dw-font-heading);
	font-size: var(--dw-fs-sm);
	font-weight: 600;
	transition: background-color var(--dw-duration) var(--dw-ease), border-color var(--dw-duration) var(--dw-ease), color var(--dw-duration) var(--dw-ease);
}

.dw-filter__btn:hover {
	border-color: var(--dw-color-primary);
}

.dw-filter__btn.is-active {
	border-color: var(--dw-color-primary);
	background: var(--dw-color-primary);
	color: var(--dw-color-white);
}

.is-filtered-in {
	animation: dw-fade-in 0.4s var(--dw-ease);
}

@keyframes dw-fade-in {
	from {
		opacity: 0;
		transform: scale(0.97);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* Editor-only notice when a widget query finds nothing. */
.dw-empty-notice {
	padding: var(--dw-space-5);
	border: 2px dashed var(--dw-color-border);
	border-radius: var(--dw-radius);
	color: var(--dw-color-muted);
	text-align: center;
}

/* ==========================================================================
   9. WordPress core classes
   ========================================================================== */

.alignleft {
	float: left;
	margin-inline-end: var(--dw-space-5);
	margin-block-end: var(--dw-space-4);
}

.alignright {
	float: right;
	margin-inline-start: var(--dw-space-5);
	margin-block-end: var(--dw-space-4);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption,
.wp-block-image figcaption,
figcaption {
	color: var(--dw-color-muted);
	font-size: var(--dw-fs-xs);
	text-align: center;
}

.wp-caption-text,
figcaption {
	margin-block-start: var(--dw-space-2);
}

.gallery {
	display: grid;
	gap: var(--dw-space-3);
	grid-template-columns: repeat(var(--dw-gallery-cols, 3), 1fr);
	margin-block-end: var(--dw-space-5);
}

.gallery-columns-2 { --dw-gallery-cols: 2; }
.gallery-columns-4 { --dw-gallery-cols: 4; }

.sticky .entry-title::before {
	content: "★ ";
	color: var(--dw-color-primary);
}

.bypostauthor {
	display: block;
}

/* ==========================================================================
   10. Animations
   ========================================================================== */

/*
 * Scroll reveal: elements with .dw-reveal fade/slide in when they enter
 * the viewport (assets/js/main.js adds .is-visible). Elementor's own
 * Motion Effects / Entrance Animations work alongside this.
 */
.js .dw-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s var(--dw-ease), transform 0.7s var(--dw-ease);
	transition-delay: var(--dw-reveal-delay, 0s);
}

.js .dw-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/*
 * Reduced motion removes movement, not feedback: keyframe animations end at
 * once and transitions are limited to colour, opacity and shadow, so hovers
 * and state changes still respond, but nothing slides, zooms or wipes.
 */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-property: color, background-color, border-color, opacity, box-shadow, outline-color, text-decoration-color !important;
	}

	.js .dw-reveal {
		opacity: 1;
		transform: none;
	}
}

/* ==========================================================================
   11. Accessibility helpers
   ========================================================================== */

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

.screen-reader-text:focus {
	top: 8px;
	inset-inline-start: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 1rem 1.5rem;
	clip: auto;
	clip-path: none;
	border-radius: var(--dw-radius);
	background: var(--dw-color-white);
	box-shadow: var(--dw-shadow-lg);
	color: var(--dw-color-secondary);
	font-weight: 700;
	text-decoration: none;
}

/* The skip-link target receives focus programmatically; no outline box. */
.site-content:focus {
	outline: none;
}

/* Clear, consistent keyboard focus everywhere. */
:focus-visible {
	outline: 3px solid var(--dw-color-primary);
	outline-offset: 2px;
}

.dw-btn:focus-visible,
.dw-carousel__btn:focus-visible {
	outline-color: var(--dw-color-secondary);
}

.dw-on-dark :focus-visible {
	outline-color: var(--dw-color-accent);
}

/* Sections on the brand-blue background: decorative sky-blue would vanish, so use white. */
.dw-on-primary {
	--dw-color-accent: #fff;
}

/* White button for use on brand-colour panels. */
.dw-btn--light {
	border-color: var(--dw-color-white);
	background: var(--dw-color-white);
	color: var(--dw-color-secondary);
}

.dw-btn--light:hover {
	border-color: var(--dw-color-secondary);
	background: var(--dw-color-secondary);
	color: var(--dw-color-white);
}
