/* ==================================================================
   Template layer — classes used by header.php, footer.php,
   inc/sections.php, archive-qc_case.php and single-qc_case.php.
   Enqueued after style.css so the cascade resolves in favour of these.
   ================================================================== */

/* alias buttons (the templates use the single-dash form) */
.dm-btn-primary { background: var(--dm-teal); color: #fff; }
.dm-btn-ghost { background: transparent; color: var(--dm-teal-dark); border: 1.5px solid var(--dm-teal); }
.dm-btn-ghost:hover { background: var(--dm-teal); color: #fff; }
.dm-btn-light { background: #fff; color: var(--dm-teal-dark); }
.dm-btn-light:hover { background: var(--dm-teal-soft); }
.dm-btn-block { display: flex; width: 100%; margin-top: 10px; }

/* accessibility skip link */
.dm-skip {
	position: absolute;
	inset-inline-start: 14px;
	top: -60px;
	background: var(--dm-teal-dark);
	color: #fff;
	padding: 10px 18px;
	border-radius: 0 0 10px 10px;
	z-index: 200;
	transition: top .15s ease;
}
.dm-skip:focus { top: 0; color: #fff; }

.dm-main { min-height: 50vh; }
.dm-ltr { direction: ltr; unicode-bidi: embed; }

/* ---------------------------------------------------------- header */
.dm-brand { flex: 0 0 auto; }
.dm-menu { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.dm-nav ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.dm-tel {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	color: var(--dm-ink);
	font-weight: 700;
	direction: ltr;
	text-align: end;
	white-space: nowrap;
	padding-inline-end: 6px;
}
.dm-tel:hover { color: var(--dm-teal-dark); }
.dm-tel-label { font-size: 11px; font-weight: 400; color: var(--dm-muted); }
.dm-tel-num { font-size: 15px; }
.dm-btn-header { white-space: nowrap; }

/* ---------------------------------------------------------- hero */
.dm-hero-copy { position: relative; z-index: 2; }
.dm-hero-photo,
.dm-hero-img {
	border-radius: 26px;
	overflow: hidden;
	box-shadow: var(--dm-shadow);
	background: var(--dm-bg-alt);
}
.dm-hero-photo img { width: 100%; height: 520px; object-fit: cover; object-position: top center; }
.dm-hero-badge {
	position: absolute;
	inset-inline-start: -18px;
	bottom: 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: var(--dm-shadow);
	padding: 13px 18px;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 330px;
}
.dm-hero-badge-ico {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--dm-teal-soft);
	color: var(--dm-teal-dark);
	display: grid;
	place-items: center;
	font-size: 19px;
	flex: 0 0 auto;
}
.dm-hero-badge strong { display: block; color: var(--dm-ink); font-size: 14.5px; }
.dm-hero-badge em { font-style: normal; font-size: 12.5px; color: var(--dm-muted); line-height: 1.7; display: block; }

/* ---------------------------------------------------------- section shells */
.dm-section-steps { background: var(--dm-bg-alt); }
.dm-section-about { background: var(--dm-bg-alt); }
.dm-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; max-width: none; flex-wrap: wrap; }
.dm-head-row h2, .dm-head-row p { margin-bottom: 8px; }

/* steps: the templates print their own number, so drop the counter badge */
.dm-grid-4 .dm-step::before { display: none; }
.dm-step-num {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: var(--dm-teal);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 12px;
}
.dm-step h3 { margin-top: 0; font-size: 17.5px; }

/* ---------------------------------------------------------- services */
.dm-svc-card {
	background: #fff;
	border: 1px solid var(--dm-line);
	border-radius: var(--dm-radius);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: .2s box-shadow, .2s transform, .2s border-color;
}
.dm-svc-card:hover { box-shadow: var(--dm-shadow); transform: translateY(-3px); border-color: #cfe1e4; }
.dm-svc-card h3 { margin: 0; font-size: 17.5px; }
.dm-svc-card p { margin: 0; font-size: 14.5px; color: var(--dm-muted); }
.dm-svc-time { font-size: 13px; font-weight: 700; color: var(--dm-teal-dark); }
.dm-svc-link { margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 700; }

/* ---------------------------------------------------------- about */
.dm-about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.dm-about-photo { border-radius: 24px; overflow: hidden; box-shadow: var(--dm-shadow); }
.dm-about-photo img { width: 100%; height: 460px; object-fit: cover; object-position: top center; }
.dm-about-body h2 { margin-bottom: 10px; }
.dm-about-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------- portfolio strip */
.dm-emptyfolio {
	background: #fffaf0;
	border: 1px solid #f0e0bd;
	border-radius: var(--dm-radius);
	padding: 26px 28px;
	color: #6b5320;
	display: grid;
	gap: 14px;
	justify-items: start;
}
.dm-emptyfolio p { margin: 0; }
.dm-section-folio .qc-folio-card { box-shadow: var(--dm-shadow-soft); }

/* ---------------------------------------------------------- hours / contact */
.dm-section-contact .dm-info {
	display: block;
	background: #fff;
	border: 1px solid var(--dm-line);
	border-radius: var(--dm-radius);
	padding: 24px;
	box-shadow: var(--dm-shadow-soft);
}
.dm-section-contact .dm-info h3 { font-size: 16px; margin-bottom: 10px; }
.dm-section-contact .dm-info p { font-size: 15px; color: var(--dm-body); }
.dm-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.dm-hours li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--dm-line); padding-bottom: 5px; font-size: 14.5px; }
.dm-hours li:last-child { border-bottom: 0; }
.dm-hours bdi.is-off { color: var(--dm-muted); }
.dm-hint { font-size: 12.5px; color: var(--dm-muted); margin-top: 10px; }
.dm-linkbtn {
	display: inline-flex;
	margin-top: 14px;
	background: var(--dm-teal-soft);
	color: var(--dm-teal-dark);
	border-radius: 999px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
}
.dm-linkbtn:hover { background: var(--dm-teal); color: #fff; }

/* ---------------------------------------------------------- closing CTA */
.dm-ctaband { background: linear-gradient(135deg, #0b6e77, #0e7c86 60%, #10909b); color: #e9f6f7; padding: 54px 0; }
.dm-ctaband-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dm-ctaband h2 { color: #fff; margin-bottom: 6px; }
.dm-ctaband p { margin: 0; color: #d5ecef; font-size: 15.5px; }

/* ---------------------------------------------------------- footer extras */
.dm-foot-tel { direction: ltr; text-align: end; }
.dm-social {
	display: inline-block;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 13.5px;
}
.dm-foot-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dm-foot-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.dm-foot-hours li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed rgba(255, 255, 255, .14); padding-bottom: 5px; }
.dm-foot-hours li:last-child { border-bottom: 0; }
.dm-foot-note { font-size: 12.5px; color: #86a0a8; }

/* ---------------------------------------------------------- page heads */
.dm-pagehead { padding: 52px 0 20px; background: radial-gradient(900px 320px at 88% -20%, #e8f4f5 0%, rgba(232, 244, 245, 0) 70%); }
.dm-pagehead h1 { margin-bottom: 12px; }
.dm-pagehead p { max-width: 760px; color: var(--dm-muted); }
.dm-pagehead-actions { margin-top: 16px; }
.dm-case-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-case-cats a { background: var(--dm-teal-soft); color: var(--dm-teal-dark); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 600; }

/* ---------------------------------------------------------- archive */
.dm-section-archive { padding-top: 34px; }
.dm-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; font-size: 14px; color: var(--dm-muted); }
.dm-chip {
	display: inline-block;
	border: 1px solid var(--dm-line);
	background: #fff;
	border-radius: 999px;
	padding: 6px 15px;
	font-size: 13.5px;
	color: var(--dm-ink);
}
.dm-chip:hover { border-color: var(--dm-teal); color: var(--dm-teal-dark); }
.dm-chip.is-on { background: var(--dm-teal); border-color: var(--dm-teal); color: #fff; }
.dm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.dm-cards .dm-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dm-card-media { display: block; background: var(--dm-bg-alt); position: relative; }
.dm-card-media img { width: 100%; height: 220px; object-fit: cover; }
.dm-card-tag {
	position: absolute;
	inset-inline-start: 12px;
	top: 12px;
	background: rgba(11, 26, 32, .72);
	color: #fff;
	border-radius: 999px;
	padding: 3px 12px;
	font-size: 12px;
}
.dm-card-body { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.dm-card-body h3 { margin: 0; font-size: 17px; }
.dm-card-body h3 a { color: var(--dm-ink); }
.dm-card-body h3 a:hover { color: var(--dm-teal-dark); }
.dm-card-body p { margin: 0; font-size: 14.5px; color: var(--dm-muted); }
.dm-card-cat { align-self: flex-start; background: var(--dm-teal-soft); color: var(--dm-teal-dark); border-radius: 999px; padding: 2px 11px; font-size: 12px; font-weight: 600; }
.dm-card-follow { font-size: 13px; color: var(--dm-teal-dark); }
.dm-card-link { margin-top: 8px; font-size: 14px; font-weight: 700; }
.dm-pager { margin-top: 34px; display: flex; justify-content: center; }
.dm-pager .nav-links { display: flex; gap: 6px; }
.dm-pager .page-numbers { border: 1px solid var(--dm-line); border-radius: 10px; padding: 7px 14px; font-size: 14px; }
.dm-pager .page-numbers.current { background: var(--dm-teal); border-color: var(--dm-teal); color: #fff; }

/* ---------------------------------------------------------- single case */
.dm-case { border: 0; border-radius: 0; background: transparent; display: block; overflow: visible; padding-top: 26px; }
.dm-case-grid { display: grid; grid-template-columns: 1.6fr .9fr; gap: 34px; align-items: start; }
.dm-case-main .qc-ba,
.dm-case-img { border-radius: var(--dm-radius); overflow: hidden; box-shadow: var(--dm-shadow-soft); margin-bottom: 8px; }
.dm-case-img img { width: 100%; height: auto; }
.dm-case-hint { font-size: 13px; color: var(--dm-muted); margin-bottom: 26px; }
.dm-prose { font-size: 16.5px; }
.dm-prose h2, .dm-prose h3 { margin-top: 32px; }
.dm-prose img { border-radius: var(--dm-radius-sm); margin: 16px 0; }
.dm-case-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.dm-case-meta { background: var(--dm-bg-alt); border: 1px solid var(--dm-line); border-radius: var(--dm-radius); padding: 22px; }
.dm-case-meta h2 { font-size: 17px; margin-bottom: 12px; }
.dm-case-meta ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 10px; }
.dm-case-meta li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed var(--dm-line); padding-bottom: 8px; }
.dm-case-meta li:last-child { border-bottom: 0; }
.dm-case-meta span { color: var(--dm-muted); }
.dm-case-meta bdi { color: var(--dm-ink); font-weight: 600; }
.dm-disclaimer { font-size: 12.5px; color: var(--dm-muted); background: #fffaf0; border: 1px solid #f0e0bd; border-radius: var(--dm-radius-sm); padding: 14px 16px; }

/* ---------------------------------------------------------- plain content page */
.dm-section-more { padding-top: 26px; }
.dm-section-more .dm-prose { max-width: 860px; margin-inline: auto; }
.dm-section-page { padding-top: 26px; }
.dm-prose-center { max-width: 980px; margin-inline: auto; }
.dm-page-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

@media (max-width: 980px) {
	.dm-hero-photo img, .dm-about-photo img { height: 400px; }
	.dm-hero-badge { inset-inline-start: 12px; }
	.dm-case-grid { grid-template-columns: 1fr; }
	.dm-case-side { position: static; }
	.dm-header-cta .dm-tel { display: none; }
}
@media (max-width: 560px) {
	.dm-ctaband-inner { flex-direction: column; align-items: flex-start; }
	.dm-head-row { align-items: flex-start; }
	.dm-cards { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------- motion (progressive) */
body.dm-nav-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
	.dm-js .dm-svc-card, .dm-js .dm-step, .dm-js .dm-cards .dm-card { opacity: 0; transform: translateY(14px); transition: opacity .4s ease, transform .4s ease; }
	.dm-js .dm-svc-card.dm-in, .dm-js .dm-step.dm-in, .dm-js .dm-cards .dm-card.dm-in { opacity: 1; transform: none; }
}
