/**
 * return.cz – detail portfolia (projekt i 3D tisk se sdílením).
 * Vlastní, soběstačný soubor: nezávisí na rt-portfolio(.css) výpisu.
 * Prefix všech tříd: rtpf-. Mobile first, zlomy 640px a 991px. Žádné vodorovné scrollování.
 */

.rtpf-detail {
	--rtpf-navy: #141A3C;
	--rtpf-indigo: #3D47A0;
	--rtpf-indigo-light: #8F97E6;
	--rtpf-signal: #F2A23C;
	--rtpf-paper: #F5F4EF;
	--rtpf-line: #D9D8D0;
	--rtpf-text: #3E4055;
	--rtpf-muted: #5A5C70;

	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 16px 64px;
	color: var(--rtpf-text);
	font-family: 'IBM Plex Sans', sans-serif;
	box-sizing: border-box;
}

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

.rtpf-detail img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Specificita proti globálnímu #g-mainbody h1,h2,...,strong {color:#141A3C} šablony NORMAN. */
.rtpf-detail h1:not(#_),
.rtpf-detail h2:not(#_),
.rtpf-detail h3:not(#_),
.rtpf-detail dt:not(#_) {
	color: var(--rtpf-navy);
}

.rtpf-detail strong:not(#_) {
	color: inherit;
}

/* ---------- Sdílené prvky ---------- */

.rtpf-icon {
	flex: none;
}

.rtpf-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin-bottom: 20px;
	color: var(--rtpf-indigo);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
}

.rtpf-back:hover {
	color: var(--rtpf-navy);
}

.rtpf-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.rtpf-chip__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: none;
}

.rtpf-year {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 13px;
	color: var(--rtpf-muted);
}

.rtpf-title {
	margin: 0;
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.rtpf-lead {
	font-size: 17px;
	line-height: 1.6;
	color: var(--rtpf-text);
}

.rtpf-lead p {
	margin: 0 0 0.8em;
}

.rtpf-lead p:last-child {
	margin-bottom: 0;
}

.rtpf-body {
	font-size: 16px;
	line-height: 1.7;
}

.rtpf-body :is(h2, h3) {
	font-family: 'Space Grotesk', sans-serif;
	letter-spacing: -0.01em;
}

.rtpf-body img {
	border-radius: 16px;
}

.rtpf-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rtpf-tag {
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--rtpf-line);
	background: #ffffff;
	font-size: 13px;
	color: var(--rtpf-muted);
}

.rtpf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 20px;
	border: 1px solid var(--rtpf-line);
	border-radius: 12px;
	background: #ffffff;
	color: var(--rtpf-navy);
	font-family: 'IBM Plex Sans', sans-serif;
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.rtpf-btn:hover {
	border-color: var(--rtpf-indigo-light);
}

.rtpf-btn--cta {
	border: 0;
	background: var(--rtpf-signal);
	color: var(--rtpf-navy);
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	font-size: 16px;
}

.rtpf-btn--cta:hover {
	transform: translateY(-1px);
}

.rtpf-btn--ghost {
	background: #ffffff;
}

.rtpf-btn--icon {
	padding: 0 18px;
}

.rtpf-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 9999;
	transform: translate(-50%, 12px);
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--rtpf-navy);
	color: var(--rtpf-paper);
	font-size: 14px;
	font-weight: 600;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.rtpf-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- Detail projektu (weby / instalace / ai-projekty) ---------- */

.rtpf-project-header {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 24px;
}

.rtpf-project-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rtpf-title {
	font-size: 34px;
}

.rtpf-hero-figure {
	margin: 0 0 28px;
	border-radius: 20px;
	overflow: hidden;
	background: var(--rtpf-line);
}

.rtpf-hero-image {
	width: 100%;
	object-fit: cover;
	max-height: 520px;
}

.rtpf-dl {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0 0 28px;
	padding: 20px;
	border-radius: 18px;
	background: #ffffff;
	border: 1px solid var(--rtpf-line);
}

.rtpf-dl__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4px;
}

.rtpf-dl__label {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--rtpf-muted);
}

.rtpf-dl__value {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
}

.rtpf-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 28px;
}

.rtpf-gallery__item {
	display: block;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--rtpf-line);
}

.rtpf-gallery__item img {
	width: 100%;
	height: 160px;
	object-fit: cover;
}

.rtpf-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
	padding-top: 20px;
	border-top: 1px solid var(--rtpf-line);
}

/* ---------- Detail 3D tisku ---------- */

.rtpf-3d {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.rtpf-3d-media {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rtpf-3d-photo {
	position: relative;
	border-radius: 22px;
	overflow: hidden;
	background: var(--rtpf-navy);
	aspect-ratio: 1 / 1;
}

.rtpf-3d-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rtpf-3d-photo--placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: var(--rtpf-paper);
	border: 1px dashed var(--rtpf-line);
	color: var(--rtpf-muted);
}

.rtpf-3d-photo--placeholder .rtpf-icon {
	color: var(--rtpf-indigo-light);
}

.rtpf-3d-photo--placeholder span {
	font-size: 14px;
	font-weight: 600;
}

.rtpf-3d-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.rtpf-3d-thumb {
	width: 72px;
	height: 72px;
	padding: 0;
	border-radius: 12px;
	border: 1px solid var(--rtpf-line);
	background: var(--rtpf-paper);
	overflow: hidden;
	cursor: pointer;
	flex: none;
}

.rtpf-3d-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rtpf-3d-thumb.is-active,
.rtpf-3d-thumb[aria-current="true"] {
	border-color: #38C8B0;
	border-width: 3px;
}

.rtpf-3d-info {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.rtpf-3d-heading {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rtpf-3d-heading .rtpf-title {
	font-size: 32px;
}

.rtpf-specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
}

.rtpf-spec-card {
	padding: 12px 14px;
	border-radius: 14px;
	background: #ffffff;
	border: 1px solid var(--rtpf-line);
}

.rtpf-spec-card dt {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.12em;
}

.rtpf-spec-card dd {
	margin: 6px 0 0;
	font-weight: 600;
	font-size: 15px;
}

.rtpf-share-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	border-radius: 20px;
	background: #ffffff;
	border: 1px solid var(--rtpf-line);
}

.rtpf-share-card__head {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.rtpf-share-card__title {
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	font-size: 18px;
	color: var(--rtpf-navy);
}

.rtpf-share-card__hint {
	font-size: 13px;
	color: var(--rtpf-muted);
}

.rtpf-share-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.rtpf-share-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 10px;
	border-radius: 12px;
	border: 1px solid var(--rtpf-line);
	background: #ffffff;
	color: var(--rtpf-navy);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}

.rtpf-share-btn--copy.is-done {
	border: 0;
	background: #E6F8F4;
	color: #0F7A66;
}

.rtpf-download-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
	color: var(--rtpf-indigo);
	text-decoration: none;
}

.rtpf-download-link:hover {
	color: var(--rtpf-navy);
}

.rtpf-og-preview {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 12px;
	border-radius: 14px;
	background: var(--rtpf-paper);
}

.rtpf-og-thumb {
	flex: none;
	width: 96px;
	height: 54px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--rtpf-navy);
}

.rtpf-og-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rtpf-og-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.rtpf-og-domain {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rtpf-muted);
}

.rtpf-og-title {
	font-weight: 600;
	font-size: 14px;
	color: var(--rtpf-navy);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rtpf-og-caption {
	font-size: 12px;
	color: var(--rtpf-muted);
}

.rtpf-cta-row {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rtpf-cta-row .rtpf-btn {
	width: 100%;
}

/* ---------- Zlom 640px: širší telefony / malé tablety ---------- */

@media (min-width: 640px) {
	.rtpf-detail {
		padding-left: 24px;
		padding-right: 24px;
	}

	.rtpf-title {
		font-size: 40px;
	}

	.rtpf-3d-heading .rtpf-title {
		font-size: 38px;
	}

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

	.rtpf-specs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rtpf-share-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rtpf-cta-row {
		flex-direction: row;
	}

	.rtpf-cta-row .rtpf-btn {
		width: auto;
	}

	.rtpf-cta-row .rtpf-btn--cta {
		flex: 1;
	}
}

/* ---------- Zlom 991px: desktop – dvousloupé rozvržení 3D detailu ---------- */

@media (min-width: 991px) {
	.rtpf-detail {
		padding-top: 48px;
	}

	.rtpf-title {
		font-size: 48px;
	}

	.rtpf-dl {
		padding: 24px 28px;
	}

	.rtpf-dl__row {
		grid-template-columns: 110px 1fr;
		gap: 16px;
	}

	.rtpf-3d {
		flex-direction: row;
		align-items: flex-start;
		gap: 56px;
	}

	.rtpf-3d-media {
		flex: 0 0 460px;
		position: sticky;
		top: 24px;
	}

	.rtpf-3d-info {
		flex: 1;
		min-width: 0;
	}

	.rtpf-3d-heading .rtpf-title {
		font-size: 44px;
	}
}

/* ---------- Přístupnost ---------- */

.rtpf-detail a:focus-visible,
.rtpf-detail button:focus-visible {
	outline: 2px solid var(--rtpf-indigo);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.rtpf-detail * {
		transition: none !important;
		animation: none !important;
	}
}

/* NORMAN barví odkazy v #g-mainbody – tlačítka a odkazy detailu potřebují vyšší specificitu */
.rtpf-detail a.rtpf-btn--cta:not(#_), .rtpf-detail a.rtpf-btn--ghost:not(#_), .rtpf-detail a.rtpf-share-btn:not(#_) { color: #141A3C; }
.rtpf-detail a.rtpf-back:not(#_), .rtpf-detail a.rtpf-download-link:not(#_) { color: #3D47A0; }
.rtpf-detail a.rtpf-back:not(#_):hover, .rtpf-detail a.rtpf-download-link:not(#_):hover { color: #141A3C; }

/* Snímky webů bývají velmi vysoké – velký obrázek se ořízne od horního okraje */
.rtpf-hero-image { max-height: 640px; object-fit: cover; object-position: center top; width: 100%; }
.rtpf-share-grid:not(#_) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Gantry: menší odsazení nad detailem (hlavní sekce má vlastní 64 px) */
#g-mainbody:has(.rtpf-detail) { padding-top: 16px; }

/* CLS: rezervovat místo pro velký obrázek projektu, než se načte */
.rtpf-hero-image { aspect-ratio: 16 / 9; height: auto; }
