/* Dimitsal theme – Digital Heritage Creations
   Colours: black #0A0A0A, gold #CEB07C, light #EFEFEF, ink #161922
   Fonts: Tinos (text, headings), Play (menus, buttons, labels) */

:root {
	--dt-gold: #ceb07c;
	--dt-gold-dark: #8a6d3b;
	--dt-black: #0a0a0a;
	--dt-ink: #161922;
	--dt-light: #efefef;
	--dt-pad: clamp(1rem, 4vw, 2rem);
	--dt-section: clamp(3.5rem, 8vw, 6.5rem);
	--dt-content: 1100px;
	--dt-ui: Play, "Segoe UI", Roboto, Arial, sans-serif;
	--dt-header-h: 76px;
}

html { scroll-padding-top: var(--dt-header-h); }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; }
img { height: auto; }

.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;
}

/* ------------------------------------------------------------ header */
.dt-header { background: var(--dt-black); color: #fff; position: relative; }

.dt-header-inner {
	display: flex; align-items: center; justify-content: space-between; gap: 2rem;
	max-width: 1320px; margin: 0 auto; padding: 0 var(--dt-pad);
	min-height: var(--dt-header-h);
}
.dt-brand { display: block; line-height: 0; flex-shrink: 0; }
.dt-brand img { height: 48px; width: auto; max-width: 260px; object-fit: contain; transition: height .3s; }
.dt-header-inner { transition: min-height .3s; }
header.wp-block-template-part:has(.dt-header) { position: sticky; top: 0; z-index: 100; transition: box-shadow .3s; }
.admin-bar header.wp-block-template-part:has(.dt-header) { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part:has(.dt-header) { top: 46px; } }
@media (max-width: 600px) { .admin-bar header.wp-block-template-part:has(.dt-header) { top: 0; } }
html.dt-scrolled { --dt-header-h: 56px; }
html.dt-scrolled .dt-brand img { height: 36px; }
html.dt-scrolled header.wp-block-template-part:has(.dt-header) { box-shadow: 0 4px 14px rgba(0,0,0,.28); }
/* no gaps between header, content and footer */
.wp-site-blocks > *, .wp-site-blocks > * + *, .dt-main > *, .dt-main > * + *,
.wp-block-post-content > *, .wp-block-post-content > * + * { margin-block: 0 !important; }
.dt-header, .dt-footer { margin: 0 !important; }
/* back to top */
.dt-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 44px; height: 44px; border: 0; cursor: pointer;
	background: var(--dt-black); color: var(--dt-gold); opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .3s, transform .3s, visibility .3s; display: flex; align-items: center; justify-content: center; }
.dt-top.is-on { opacity: .9; visibility: visible; transform: none; }
.dt-top:hover { opacity: 1; }

.dt-nav { display: flex; align-items: center; gap: 2rem; }
.dt-menu, .dt-lang, .dt-footer-menu, .dt-social {
	list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap;
}
.dt-menu { gap: 0.25rem 1.75rem; }
.dt-menu a, .dt-lang a {
	font-family: var(--dt-ui); font-size: 0.95rem; letter-spacing: 0.03em;
	color: #d9d9d9; text-decoration: none; padding: 0.4rem 0; display: inline-block;
	border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.dt-menu a:hover, .dt-menu a:focus-visible,
.dt-menu .current-menu-item > a, .dt-menu a[aria-current="page"] {
	color: #fff; border-bottom-color: var(--dt-gold);
}
.dt-header .dt-lang { gap: 0.6rem; padding-left: 1.25rem; border-left: 1px solid #333; }
.dt-lang a { font-size: 0.85rem; color: #9a9a9a; }
.dt-lang a.is-active { color: var(--dt-gold); }
.dt-lang a:hover { color: #fff; }

.dt-menu-toggle {
	display: none; background: none; border: 0; padding: 0.75rem; margin-right: -0.75rem; cursor: pointer; color: #fff;
}
.dt-burger, .dt-burger::before, .dt-burger::after {
	display: block; width: 24px; height: 2px; background: currentColor; transition: transform .25s, opacity .25s; content: "";
}
.dt-burger { position: relative; }
.dt-burger::before { position: absolute; top: -7px; }
.dt-burger::after { position: absolute; top: 7px; }
.dt-menu-toggle[aria-expanded="true"] .dt-burger { background: transparent; }
.dt-menu-toggle[aria-expanded="true"] .dt-burger::before { transform: translateY(7px) rotate(45deg); }
.dt-menu-toggle[aria-expanded="true"] .dt-burger::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
	:root { --dt-header-h: 64px; }
	.dt-brand img { height: 40px; }
	html.dt-scrolled { --dt-header-h: 52px; }
	html.dt-scrolled .dt-brand img { height: 32px; }
	.dt-menu-toggle { display: block; }
	.dt-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--dt-black); border-top: 1px solid #222;
		flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--dt-pad) 1.5rem;
		max-height: calc(100vh - var(--dt-header-h)); overflow-y: auto;
	}
	.dt-nav.is-open { display: flex; }
	.dt-menu { flex-direction: column; }
	.dt-menu a { display: block; padding: 0.85rem 0; border-bottom: 1px solid #1f1f1f; font-size: 1.05rem; }
	.dt-header .dt-lang { border: 0; padding: 1rem 0 0; gap: 1.25rem; }
	.dt-lang a { font-size: 1rem; }
}

/* ------------------------------------------------------------ sections */
.dt-main { min-height: 50vh; }
.dt-main > .wp-block-post-content > * { margin-block: 0; }
.dt-section { padding: var(--dt-section) var(--dt-pad); }
.dt-section > * + * { margin-block-start: 1.5rem; }
.dt-section > h2:first-child { margin-top: 0; }
.dt-center { text-align: center; }
.dt-section.has-black-background-color a:not(.wp-block-button__link),
.dt-section.has-charcoal-background-color a:not(.wp-block-button__link) { color: var(--dt-gold); }
.dt-section.has-black-background-color .wp-block-button__link { background: var(--dt-gold); color: var(--dt-black); }
.dt-section.has-gold-background-color a:not(.wp-block-button__link) { color: var(--dt-ink); }

.dt-lead { font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.6; }
.dt-small { font-size: 0.9rem; opacity: 0.8; font-style: italic; }

.dt-cols { gap: clamp(1.5rem, 4vw, 3.5rem); }
.dt-cols .wp-block-image > img, .dt-cols .wp-block-image > a > img { width: 100%; }
.wp-block-image { margin: 0; }
.wp-block-image > img, .wp-block-image > a > img { display: block; }

/* ------------------------------------------------------------ hero + service rows */
.dt-hero, .dt-row {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end;
	min-height: clamp(340px, 62vh, 640px); padding: clamp(2rem, 6vw, 4.5rem) var(--dt-pad);
	background-color: var(--dt-black); background-size: cover; background-position: center;
	box-sizing: border-box;
}
.dt-row { justify-content: center; min-height: clamp(420px, 82vh, 860px); }
.dt-hero--home { min-height: clamp(420px, 78vh, 760px); justify-content: center; background-color: #fff; }

.dt-box {
	background: #fff; color: var(--dt-ink); text-align: center;
	padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3.5vw, 3rem);
	max-width: 440px; width: calc(100% - 2rem); box-sizing: border-box;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
}
.dt-box > * { margin-block: 0; }
.dt-box > * + * { margin-block-start: 0.9rem; }
.dt-box .wp-block-buttons { justify-content: center; margin-top: 1.4rem; }

/* place the box left or right of the content area */
.dt-hero > .dt-box,
.dt-row--left > .dt-box,
.dt-row--left > .wp-block-cover__inner-container > .dt-box {
	margin-left: max(0px, calc((100% - var(--dt-content)) / 2)) !important;
	margin-right: auto !important;
}
.dt-row--right > .dt-box,
.dt-row--right > .wp-block-cover__inner-container > .dt-box {
	margin-left: auto !important;
	margin-right: max(0px, calc((100% - var(--dt-content)) / 2)) !important;
}
.wp-block-cover.dt-row, .wp-block-cover.dt-hero { align-items: center; }
.wp-block-cover.dt-row .wp-block-cover__inner-container,
.wp-block-cover.dt-hero .wp-block-cover__inner-container { width: 100%; max-width: none; color: inherit; }
.wp-block-cover.dt-hero { align-items: flex-end; }

.dt-hero-title { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.dt-hero-sub { font-size: 1.15rem; }
.dt-row-title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 0; }
.dt-row-sub { font-size: 1.15rem; line-height: 1.45; }

/* home intro: text on the white side of the photo, no box */
.dt-hero--home .dt-box { background: transparent; box-shadow: none; max-width: 520px; }
.dt-hero--home .dt-hero-title { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.dt-hero--home .dt-hero-sub { font-size: clamp(1.2rem, 2vw, 1.5rem); }

@media (max-width: 700px) {
	.dt-hero > .dt-box, .dt-row .dt-box { margin-left: auto !important; margin-right: auto !important; }
	.dt-hero--home { background-position: 80% center; }
	.dt-hero--home .dt-box { background: rgba(255, 255, 255, .88); }
}

/* ------------------------------------------------------------ cards, logos, stats */
.dt-cards {
	display: grid; gap: clamp(1rem, 2.5vw, 1.75rem);
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	list-style: none; padding: 0; margin-inline: auto; text-align: left;
}
.dt-section > .dt-cards, .dt-section > .dt-logos, .dt-section > .dt-query { max-width: 1240px !important; }
@media (min-width: 900px) {
	.dt-cols-3 { grid-template-columns: repeat(3, 1fr); }
	.dt-cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.dt-card {
	background: #fff; display: flex; flex-direction: column; margin: 0 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08); transition: box-shadow .25s, transform .25s;
}
.dt-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .14); transform: translateY(-2px); }
.dt-card > * { margin: 0 !important; }
.dt-card figure > img, .dt-card a > img, .dt-card .wp-block-post-featured-image img {
	width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
}
.dt-card .wp-block-post-featured-image { margin: 0; }
.dt-card-body { padding: 1rem 1.25rem 1.3rem; }
.dt-card-body > * { margin: 0; }
.dt-card-body > * + * { margin-top: 0.4rem; }
.dt-card-title { font-size: 1.15rem; line-height: 1.3; }
.dt-card-title a { text-decoration: none; color: inherit; }
.dt-card-title a:hover { color: var(--dt-gold-dark); }
.dt-card-body p { font-size: 0.98rem; line-height: 1.5; color: #444; }
.dt-date { font-family: var(--dt-ui); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: #777; }
.dt-query .wp-block-query-pagination { margin-top: 2.5rem; font-family: var(--dt-ui); }

.dt-logos {
	display: grid; gap: 2rem 1.5rem; margin-inline: auto;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.dt-logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 !important; }
.dt-logo > * { margin: 0 !important; }
.dt-logo figure > img, .dt-logo a > img { width: auto; max-width: 150px; height: 90px; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s; }
.dt-logo a:hover img { transform: scale(1.05); }
.dt-logo .dt-card-body { padding: 0.6rem 0 0; }
.dt-logo .dt-card-title { font-size: 0.95rem; }

.dt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 900px; margin-inline: auto; }
.dt-stats > *, .dt-cards > *, .dt-logos > *, .dt-vgrid > *, .dt-sketchfab-grid > * { margin: 0 !important; }
.dt-stat > * { margin: 0 !important; }
.dt-stat-num { font-variant-numeric: tabular-nums; }
.dt-stat-num { font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; color: var(--dt-gold-dark); }
.dt-stat-label { font-family: var(--dt-ui); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.6rem !important; }

/* ------------------------------------------------------------ media */
.dt-vgrid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); max-width: 1240px !important; }
.dt-vgrid > * { margin: 0 !important; }

.wp-block-gallery { max-width: 1240px !important; }
.wp-block-gallery.has-nested-images { gap: 0.6rem; }
/* even thumbnails (standard WordPress gallery); the lightbox always shows the whole image */
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) > img { aspect-ratio: 4 / 3; }
.wp-lightbox-overlay img { object-fit: contain !important; aspect-ratio: auto !important; }

/* YouTube click-to-play */
.dt-yt-figure { margin: 0; }
.dt-yt { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.dt-yt-link, .dt-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dt-yt img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s, transform .4s; }
.dt-yt-link:hover img { opacity: .85; transform: scale(1.02); }
.dt-yt-play {
	position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%);
	background: rgba(23, 23, 23, .85); border-radius: 12px; transition: background .2s;
}
.dt-yt-play::after {
	content: ""; position: absolute; left: 27px; top: 14px;
	border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff;
}
.dt-yt-link:hover .dt-yt-play, .dt-yt-link:focus-visible .dt-yt-play { background: #f00; }

/* Sketchfab */
.dt-sketchfab-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); max-width: 1240px !important; }
.dt-sketchfab { margin: 0; }
.dt-sketchfab-frame { position: relative; aspect-ratio: 4 / 3; background: #222; }
.dt-sketchfab-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dt-sketchfab figcaption { font-family: var(--dt-ui); font-size: 0.9rem; margin-top: 0.5rem; }

/* ------------------------------------------------------------ related projects */
.dt-related { background: #2b2b2b; color: #fff; padding: var(--dt-section) var(--dt-pad); }
.dt-related-inner { max-width: 1240px; margin: 0 auto; }
.dt-related h2 { margin: 0 0 2rem; color: #fff; }
.dt-related .dt-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (min-width: 1000px) { .dt-related .dt-cards { grid-template-columns: repeat(3, 1fr); } }
.dt-related .dt-card { background: #1e1e1e; box-shadow: none; }
.dt-related .dt-card-title a { color: #fff; }
.dt-related .dt-card-title a:hover { color: var(--dt-gold); }
.dt-related .dt-date { color: #aaa; }

/* ------------------------------------------------------------ archive / 404 */
.dt-archive-head { text-align: center; }
.dt-archive-head h1 { margin: 0; }
.dt-404 .wp-block-search { max-width: 420px; margin-inline: auto; }

/* ------------------------------------------------------------ forms (Contact Form 7) */
.wpcf7 label { display: block; font-family: var(--dt-ui); font-size: 0.9rem; }
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 textarea {
	width: 100%; box-sizing: border-box; margin-top: 0.35rem; padding: 0.75rem 0.9rem;
	border: 1px solid #c9c9c9; border-radius: 0; font: inherit; background: #fff;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--dt-gold); outline-offset: 0; border-color: var(--dt-gold); }
.wpcf7 textarea { min-height: 160px; }
.wpcf7 input[type="submit"] {
	background: var(--dt-black); color: #fff; border: 0; border-radius: 0; cursor: pointer;
	font-family: var(--dt-ui); font-size: 0.95rem; letter-spacing: 0.04em; padding: 0.85em 2em;
}
.wpcf7 input[type="submit"]:hover { background: var(--dt-gold-dark); }

/* ------------------------------------------------------------ social (coloured squares, as on AA3D) */
.dt-social { gap: 10px; }
.dt-social a { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
	background: var(--dt-ink); color: #fff !important; transition: filter .2s, transform .2s; }
.dt-social a:hover { filter: brightness(1.12); transform: translateY(-2px); }
.dt-social--youtube { background: #e62117 !important; }
.dt-social--facebook { background: #1877f2 !important; }
.dt-social--linkedin { background: #0a66c2 !important; }
.dt-social--instagram { background: #c13584 !important; }
.dt-social--academia { background: #41454a !important; }
.dt-icon { width: 24px; height: 24px; }

/* ------------------------------------------------------------ footer */
.dt-footer { background: var(--dt-gold); color: var(--dt-ink); padding: clamp(2.5rem, 6vw, 4rem) var(--dt-pad) 1.5rem; }
.dt-footer-inner { max-width: 1100px; margin: 0 auto; }
.dt-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: center; }
.dt-footer-col:nth-child(2) { display: flex; justify-content: center; }
.dt-footer-col:nth-child(3) { display: flex; justify-content: flex-end; }
.dt-footer-col p { margin: 0; }
.dt-footer-title { font-size: 1.6rem; margin-bottom: 0.4rem !important; }
.dt-mail { color: inherit; display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.dt-mail:hover { text-decoration: underline; color: inherit; }
.dt-footer .dt-lang { gap: 0.8rem; }
.dt-footer .dt-lang a { color: var(--dt-ink); font-size: 1rem; border: 1px solid rgba(0, 0, 0, .25); padding: 0.3rem 0.7rem; }
.dt-footer .dt-lang a.is-active { background: var(--dt-ink); color: var(--dt-gold); border-color: var(--dt-ink); }
.dt-footer-nav { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(0, 0, 0, .15); }
.dt-footer-menu { justify-content: center; gap: 0.4rem 1.5rem; }
.dt-footer-menu a { font-family: var(--dt-ui); font-size: 0.9rem; color: var(--dt-ink); text-decoration: none; }
.dt-footer-menu a:hover { text-decoration: underline; color: var(--dt-ink); }
.dt-copy { text-align: center; font-family: var(--dt-ui); font-size: 0.85rem; margin: 1rem 0 0; opacity: 0.85; }
@media (max-width: 760px) {
	.dt-footer-cols { grid-template-columns: 1fr; text-align: center; }
	.dt-footer-col, .dt-footer-col:nth-child(3) { display: flex; justify-content: center; flex-direction: column; align-items: center; }
}

/* ------------------------------------------------------------ misc */
:focus-visible { outline: 2px solid var(--dt-gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
