/*
 * Divonex demo pages: the Demos hub and its child pages (pricing, comparison, data, booking).
 * Loaded only on those pages (see inc/demos.php). Body class: .dx-demos-page
 */

.dx-demos-page { background: #f6f8fd; }
.dx-demos-page main { background: #f6f8fd; }

/* ---------- Hero ---------- */

.dx-demo-hero {
	position: relative;
	padding: clamp(48px, 7vw, 96px) var(--wp--preset--spacing--edge, 15px) clamp(40px, 5vw, 64px) !important;
	background:
		radial-gradient(50% 60% at 90% 0%, rgba(88, 23, 230, 0.12), transparent 70%),
		radial-gradient(45% 60% at 0% 0%, rgba(43, 89, 255, 0.14), transparent 70%),
		#fbfcff;
	border-bottom: 1px solid #e9edf5;
	overflow: hidden;
	isolation: isolate;
}
.dx-demo-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(11, 15, 28, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(11, 15, 28, 0.045) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 30%, transparent 75%);
}
.dx-demo-hero > * + * { margin-top: 20px !important; }
.dx-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 0 !important; font-size: 0.88rem; color: #8a93a8; }
.dx-crumbs a { color: #4a5268; text-decoration: none; }
.dx-crumbs a:hover { color: #2b59ff; }
.dx-crumbs [aria-current] { color: #0b0f1c; font-weight: 500; }
.dx-demo-h1 {
	margin-top: 16px !important;
	font-size: clamp(2.6rem, 6vw, 4.4rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
	font-weight: 700;
	color: #0b0f1c;
}
.dx-hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0 !important; }
.dx-hero-facts span {
	padding: 6px 12px;
	border: 1px solid #e3e8f4;
	border-radius: 999px;
	background: #fff;
	font-size: 0.85rem;
	color: #4a5268;
}
.dx-hero-facts strong { color: #0b0f1c; }

/* Narrow hero items line up with the left edge of the 1100px content column
   instead of being centered on their own by the constrained layout. */
.dx-demo-hero > :is(.dx-crumbs, .dx-lead, .dx-hero-facts, .dx-cat-switch, .dx-demo-h1) {
	margin-left: max(0px, calc((100% - 1200px) / 2)) !important;
	margin-right: auto !important;
}
.dx-demo-hero > .dx-lead { max-width: 680px; }
.dx-demo-hero > .dx-crumbs,
.dx-demo-hero > .dx-hero-facts { width: min(100%, 1200px); }

/* Category switcher (segmented control) */
.dx-cat-switch {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	width: fit-content;
	max-width: 100%;
	padding: 5px;
	border: 1px solid #e3e8f4;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 8px 24px -6px rgba(11, 15, 28, 0.08);
}
.dx-cat-switch a {
	padding: 9px 16px;
	border-radius: 10px;
	color: #4a5268;
	font-size: 0.93rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}
.dx-cat-switch a:hover { background: #f4f6fc; color: #0b0f1c; }
.dx-cat-switch a.is-active { background: #0b0f1c; color: #fff; }

/* Jump index */
.dx-index-box {
	margin-top: 32px !important;
	padding: 20px !important;
	border: 1px solid #e3e8f4;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.8);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.dx-index-title { margin: 0 0 12px !important; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #2b59ff; }
.dx-index {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 4px 12px;
	margin: 0 !important;
}
.dx-index a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 10px;
	color: #242c42;
	font-size: 0.9rem;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}
.dx-index a span { flex: none; font-variant-numeric: tabular-nums; font-size: 0.78rem; font-weight: 600; color: #8a93a8; }
.dx-index a:hover { background: #f1f4fd; color: #2b59ff; }
.dx-index a:hover span { color: #2b59ff; }

/* ---------- Demo sections ---------- */

/* Every original demo section becomes a framed card on a soft canvas. */
.dx-demos-page main > .entry-content > .wp-block-gutenlayouts-container.alignfull,
.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull {
	--gl-pad: clamp(20px, 3vw, 40px) 15px !important;
	--gl-pad-t: 24px 15px !important;
	--gl-pad-m: 16px 12px !important;
	background: transparent !important;
	--gl-bg: transparent !important;
	--gl-bg-t: transparent !important;
	--gl-bg-m: transparent !important;
	--gl-bg-img: none !important;
	--gl-bg-img-t: none !important;
	--gl-bg-img-m: none !important;
}
.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull > .gl-container-inner {
	position: relative;
	gap: 28px !important;
	padding: clamp(20px, 3.5vw, 44px);
	border: 1px solid #e6eaf3;
	border-radius: 28px;
	background: var(--dx-card-bg, #fff);
	box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 30px 60px -40px rgba(26, 43, 110, 0.35);
	transition: box-shadow 0.4s, border-color 0.4s;
}
.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull > .gl-container-inner:hover {
	border-color: #d6ddef;
	box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 40px 80px -40px rgba(26, 43, 110, 0.45);
}
/* Sections that were designed on a dark or tinted canvas keep it inside their card. */
.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull[style*="--gl-bg:#000"] > .gl-container-inner,
.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull[style*="--gl-bg:#0b0b0d"] > .gl-container-inner { --dx-card-bg: #0b0b0d; border-color: #1d2230; }
.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull[style*="--gl-bg:#fbf9f6"] > .gl-container-inner { --dx-card-bg: #fbf9f6; }
.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull[style*="--gl-bg:#f8fafc"] > .gl-container-inner { --dx-card-bg: #f8fafc; }

.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull:first-of-type,
.dx-demos-page .dx-demo-hero + .wp-block-gutenlayouts-container { margin-top: clamp(24px, 4vw, 48px) !important; }

/* Demo header */
.dx-demo-head {
	width: 100%;
	gap: 16px !important;
	margin: 0 !important;
	padding-bottom: 20px !important;
	border-bottom: 1px dashed #e3e8f4;
	text-align: left;
}
.dx-demo-head.is-compact { padding-bottom: 14px !important; }
.dx-demo-count {
	display: flex;
	align-items: baseline;
	gap: 4px;
	margin: 0 !important;
	padding: 10px 12px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(43, 89, 255, 0.1), rgba(88, 23, 230, 0.1));
	font-variant-numeric: tabular-nums;
	line-height: 1;
	white-space: nowrap;
	flex: none;
}
.dx-demo-num { font-size: 1.25rem; font-weight: 700; color: #2b59ff; letter-spacing: -0.02em; }
.dx-demo-of { font-size: 0.75rem; font-weight: 500; color: #8a93a8; }
.dx-demo-head .dx-demo-title {
	margin: 0 !important;
	font-size: clamp(1.25rem, 2.2vw, 1.6rem) !important;
	line-height: 1.2;
	letter-spacing: -0.02em;
	font-weight: 700 !important;
	color: #0b0f1c;
	text-align: left !important;
}
.dx-demo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 !important; }
.dx-demo-tag {
	padding: 3px 9px;
	border-radius: 999px;
	background: #f1f4fb;
	color: #4a5268;
	font-size: 0.75rem;
	font-weight: 500;
	white-space: nowrap;
}
.dx-demo-up { margin: 0 !important; font-size: 0.85rem; }
.dx-demo-up a { color: #8a93a8; text-decoration: none; transition: color 0.2s; }
.dx-demo-up a:hover { color: #2b59ff; }

/* Dark cards: invert the header colors */
[style*="--gl-bg:#000"] .dx-demo-head,
[style*="--gl-bg:#0b0b0d"] .dx-demo-head { border-bottom-color: rgba(255, 255, 255, 0.12); }
[style*="--gl-bg:#000"] .dx-demo-title,
[style*="--gl-bg:#0b0b0d"] .dx-demo-title { color: #fff !important; }
[style*="--gl-bg:#000"] .dx-demo-tag,
[style*="--gl-bg:#0b0b0d"] .dx-demo-tag { background: rgba(255, 255, 255, 0.08); color: #c3cbe0; }
[style*="--gl-bg:#000"] .dx-demo-count,
[style*="--gl-bg:#0b0b0d"] .dx-demo-count { background: rgba(122, 150, 255, 0.16); }
[style*="--gl-bg:#000"] .dx-demo-num,
[style*="--gl-bg:#0b0b0d"] .dx-demo-num { color: #8ea6ff; }

/* Anchor targets clear the sticky header */
.dx-demo-title, #demo-index { scroll-margin-top: 110px; }
.dx-demo-title:target { animation: dx-target 1.6s ease-out; }
@keyframes dx-target { 0% { color: #2b59ff; } 100% { } }

/* Reveal sections as they scroll in (class added by demos.js) */
.dx-js .dx-demos-page .dx-demo-card { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.dx-js .dx-demos-page .dx-demo-card.is-visible { opacity: 1; transform: none; }

/* ---------- Floating navigator (built by demos.js) ---------- */

.dx-demo-nav {
	position: fixed;
	left: 50%;
	bottom: 20px;
	z-index: 95;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 6px 9px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	background: rgba(11, 15, 28, 0.88);
	color: #fff;
	box-shadow: 0 20px 50px -18px rgba(11, 15, 28, 0.6);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	transform: translate(-50%, 140%);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.dx-demo-nav.is-shown { transform: translate(-50%, 0); }
.dx-demo-nav button,
.dx-demo-nav a {
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 0;
	border-radius: 11px;
	background: transparent;
	color: #c3cbe0;
	font: inherit;
	font-size: 0.88rem;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
.dx-demo-nav button:hover:not(:disabled),
.dx-demo-nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dx-demo-nav button:disabled { opacity: 0.35; cursor: default; }
.dx-demo-nav button:focus-visible,
.dx-demo-nav a:focus-visible { outline: 2px solid #7a96ff; outline-offset: 1px; }
.dx-demo-nav .dx-demo-nav__label {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	max-width: 300px;
	padding: 0 10px;
	font-size: 0.88rem;
	white-space: nowrap;
}
.dx-demo-nav__count { font-variant-numeric: tabular-nums; font-weight: 600; color: #8ea6ff; }
.dx-demo-nav__name { overflow: hidden; text-overflow: ellipsis; color: #fff; }
.dx-demo-nav__bar { position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.dx-demo-nav__bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #2b59ff, #b63cf0); transform: scaleX(var(--dx-p, 0)); transform-origin: left; transition: transform 0.3s; }

/* ---------- Closing CTA ---------- */

.dx-demo-end { background: transparent !important; padding-top: clamp(40px, 6vw, 72px) !important; }
.dx-demo-end > * + * { margin-top: 18px !important; }
.dx-demo-end .dx-kicker { margin-top: clamp(40px, 6vw, 64px) !important; }
.dx-more-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dx-more-cats a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px;
	border: 1px solid #e6eaf3;
	border-radius: 18px;
	background: #fff;
	color: #0b0f1c;
	text-decoration: none;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
}
.dx-more-cats a strong { font-size: 1.1rem; letter-spacing: -0.01em; }
.dx-more-cats a span { color: #2b59ff; font-size: 0.9rem; }
.dx-more-cats a:hover { transform: translateY(-3px); border-color: #d4dcf0; box-shadow: 0 24px 50px -30px rgba(26, 43, 110, 0.45); }

/* ---------- Demos hub ---------- */

.dx-hub-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px !important; }
.dx-hub-grid > * { margin: 0 !important; }
.dx-hub-card {
	position: relative;
	display: flex !important;
	flex-direction: column;
	gap: 14px !important;
	padding: 24px !important;
	border: 1px solid #e6eaf3;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 20px 40px -30px rgba(26, 43, 110, 0.35);
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
}
.dx-hub-card:hover { transform: translateY(-5px); border-color: #d4dcf0; box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 40px 70px -35px rgba(26, 43, 110, 0.5); }
.dx-hub-card > * { margin: 0 !important; }
.dx-hub-card h2 { font-size: 1.4rem !important; letter-spacing: -0.02em; line-height: 1.2; }
.dx-hub-card h2 a { color: #0b0f1c; text-decoration: none; }
/* Whole card is clickable through the heading link */
.dx-hub-card h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.dx-hub-card p { color: #4a5268; font-size: 0.95rem; line-height: 1.6; }
.dx-hub-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.dx-hub-meta span:first-child { padding: 4px 10px; border-radius: 999px; background: #f1f4fb; color: #0b0f1c; font-weight: 600; }
.dx-hub-meta span:last-child { color: #2b59ff; font-weight: 600; transition: transform 0.25s; }
.dx-hub-card:hover .dx-hub-meta span:last-child { transform: translateX(4px); }
.dx-hub-preview {
	padding: 10px !important;
	border: 1px solid #eef1f7;
	border-radius: 16px;
	background: #f8f9fd;
	pointer-events: none;
	transform-origin: top center;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.dx-hub-card:hover .dx-hub-preview { transform: scale(1.02); }
.dx-hub-preview .wp-block-tabilo-table { margin: 0; font-size: 0.82rem; }
.dx-hub-preview .wp-block-button__link { padding: 5px 10px !important; font-size: 0.75rem !important; }

/* ---------- Mobile ---------- */

@media (max-width: 781px) {
	.dx-cat-switch { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.dx-cat-switch a { flex: none; }
	.dx-demo-up { display: none; }
	.dx-demo-head__main { align-items: flex-start !important; }
	.dx-demo-nav__label { max-width: 52vw; }
	.dx-index { grid-template-columns: 1fr; max-height: 260px; overflow-y: auto; }
	.dx-demos-page .wp-block-post-content > .wp-block-gutenlayouts-container.alignfull > .gl-container-inner { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.dx-js .dx-demos-page .dx-demo-card { opacity: 1; transform: none; transition: none; }
	.dx-demo-nav { transition: none; }
}

/* Custom shadows from the original demo designs, kept as classes because the
   content save path strips inline box-shadow values. */
.dx-sh-1 { box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.45); }
.dx-sh-2 { box-shadow: 0 10px 25px -8px rgba(20, 20, 30, 0.08); }
.dx-sh-3 { box-shadow: 0 10px 25px -8px rgba(183, 110, 121, 0.15); }
.dx-sh-4 { box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.35); }
.dx-sh-5 { box-shadow: 0 12px 30px -8px rgba(239, 68, 68, 0.25); }

.dx-demo-end > .dx-kicker { display: flex; justify-content: center; }

/* Hero column matches the 1200px demo cards below it. */
.dx-demo-hero > :where(:not(.alignfull)) { max-width: 1200px !important; }
