/* ===========================================================================
 * DigiDollar Enhancements — "Liquid gold on calm dark"
 * Additive styling for the live stats bar, marketing sections & mobile CTA.
 * Light = default · Dark = html[data-dracula-scheme="dark"]
 * ======================================================================== */

:root {
	--dd-gold: #e0be00;
	--dd-gold-2: #fdb837;
	--dd-gold-bright: #ffbf2f;
	--dd-gold-deep: #9a7d00;
	--dd-grad: linear-gradient(135deg, #fdb837 0%, #ffbf2f 45%, #e0be00 100%);
	--dd-grad-text: linear-gradient(100deg, #c79a00 0%, #fdb837 60%, #ffd366 100%);

	--dd-ink: #18181c;
	--dd-muted: #6c6c78;
	--dd-bg-soft: #faf7ef;

	--dd-card: rgba(255, 255, 255, 0.74);
	--dd-card-brd: rgba(20, 20, 35, 0.08);
	--dd-hair: rgba(224, 190, 0, 0.28);

	--dd-radius: 18px;
	--dd-radius-lg: 26px;
	--dd-shadow: 0 14px 38px -16px rgba(25, 22, 50, 0.22);
	--dd-glow: 0 18px 60px -26px rgba(224, 190, 0, 0.55);

	--dd-up: #1ea97c;
	--dd-down: #e2554e;

	--dd-space: clamp(40px, 5vw, 74px);
	--dd-gap: clamp(14px, 1.8vw, 22px);
}

html[data-dracula-scheme="dark"] {
	--dd-ink: #f4f1e8;
	--dd-muted: #9a9aa8;
	--dd-bg-soft: #15151a;
	--dd-card: rgba(255, 255, 255, 0.045);
	--dd-card-brd: rgba(255, 255, 255, 0.09);
	--dd-shadow: 0 22px 55px -22px rgba(0, 0, 0, 0.7);
	--dd-glow: 0 22px 70px -28px rgba(253, 184, 55, 0.4);
}

/* ---------- shared section scaffolding ---------------------------------- */

.dd-section,
.dd-stats {
	position: relative;
	/* Full-bleed: escape the theme's narrow blog content column (.text inside
	   .left-content.grid-70) so these sections span the full viewport width.
	   !important defeats the column's inherited sizing without guessing the
	   exact wrapper selector. */
	box-sizing: border-box;
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding: var(--dd-space) clamp(16px, 4vw, 40px);
	color: var(--dd-ink);
	font-family: inherit;
	overflow: hidden;
}

.dd-section__inner,
.dd-stats__inner {
	max-width: 1180px;
	margin-inline: auto;
	position: relative;
	z-index: 1;
}

/* faint gold dotted texture + radial glow on marketing sections */
.dd-section::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(224, 190, 0, 0.16) 1px, transparent 1.6px);
	background-size: 26px 26px;
	-webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 0%, transparent 72%);
	mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 0%, transparent 72%);
	opacity: 0.5;
	pointer-events: none;
}
.dd-section::after {
	content: "";
	position: absolute;
	top: -22%;
	left: 50%;
	width: 70%;
	height: 60%;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgba(253, 184, 55, 0.16), transparent 70%);
	filter: blur(20px);
	pointer-events: none;
}

.dd-section__head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto clamp(28px, 4vw, 52px);
}

.dd-eyebrow {
	display: inline-block;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--dd-gold-deep);
	padding: 6px 16px;
	border-radius: 999px;
	background: linear-gradient(135deg, rgba(253, 184, 55, 0.18), rgba(224, 190, 0, 0.08));
	border: 1px solid var(--dd-hair);
	margin-bottom: 16px;
}
html[data-dracula-scheme="dark"] .dd-eyebrow {
	color: var(--dd-gold-bright);
}

.dd-section__title {
	font-size: clamp(1.5rem, 3.2vw, 2.35rem);
	line-height: 1.3;
	font-weight: 800;
	margin: 0 0 14px;
	background: var(--dd-grad-text);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.dd-section__lead {
	font-size: clamp(0.96rem, 1.4vw, 1.08rem);
	line-height: 2;
	color: var(--dd-muted);
	margin: 0;
}

.dd-section__cta {
	text-align: center;
	margin-top: clamp(28px, 4vw, 48px);
}

/* gold button */
.dd-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-weight: 700;
	border-radius: 999px;
	padding: 14px 34px;
	transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.dd-btn--gold {
	position: relative;
	color: #1a1400;
	background: var(--dd-grad);
	box-shadow: 0 14px 30px -12px rgba(224, 190, 0, 0.7);
	overflow: hidden;
}
.dd-btn--gold::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
	transform: translateX(-130%);
}
.dd-btn--gold:hover {
	transform: translateY(-2px);
	box-shadow: 0 20px 40px -12px rgba(224, 190, 0, 0.85);
	filter: saturate(1.05);
}
.dd-btn--gold:hover::after {
	animation: dd-shine 0.9s ease;
}
@keyframes dd-shine {
	to {
		transform: translateX(130%);
	}
}

/* ---------- live market-stats bar -------------------------------------- */

.dd-stats__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: clamp(16px, 2.4vw, 26px);
}
.dd-stats__title {
	font-size: clamp(1.15rem, 2.2vw, 1.6rem);
	font-weight: 800;
	margin: 0;
	color: var(--dd-ink);
}
.dd-stats__live {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--dd-muted);
}
.dd-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--dd-up);
	box-shadow: 0 0 0 0 rgba(30, 169, 124, 0.5);
	animation: dd-pulse 2s infinite;
}
@keyframes dd-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(30, 169, 124, 0.5);
	}
	70% {
		box-shadow: 0 0 0 9px rgba(30, 169, 124, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(30, 169, 124, 0);
	}
}

.dd-stats__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: var(--dd-gap);
}

.dd-card {
	position: relative;
	padding: clamp(16px, 1.8vw, 22px);
	border-radius: var(--dd-radius);
	background: var(--dd-card);
	border: 1px solid var(--dd-card-brd);
	box-shadow: var(--dd-shadow);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	min-height: 132px;
	display: flex;
	flex-direction: column;
}
.dd-card::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 0;
	height: 3px;
	border-radius: var(--dd-radius) var(--dd-radius) 0 0;
	background: var(--dd-grad);
	opacity: 0.85;
}
.dd-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--dd-shadow), var(--dd-glow);
	border-color: var(--dd-hair);
}

.dd-card__top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
.dd-card__ic {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	color: var(--dd-gold-deep);
	background: linear-gradient(135deg, rgba(253, 184, 55, 0.2), rgba(224, 190, 0, 0.06));
	border: 1px solid var(--dd-hair);
	flex: none;
}
html[data-dracula-scheme="dark"] .dd-card__ic {
	color: var(--dd-gold-bright);
}
.dd-card__label {
	font-size: 0.92rem;
	font-weight: 700;
	margin: 0;
	color: var(--dd-muted);
}
.dd-card__value {
	font-size: clamp(1.35rem, 2.6vw, 1.85rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--dd-ink);
	margin-top: auto;
}
.dd-card__unit {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--dd-muted);
}
.dd-card__foot {
	margin-top: 8px;
	font-size: 0.78rem;
	color: var(--dd-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}
.dd-card__foot--center {
	justify-content: center;
}
.dd-muted {
	color: var(--dd-muted);
	opacity: 0.8;
}
.dd-chg {
	font-weight: 700;
}
.dd-chg.is-up {
	color: var(--dd-up);
}
.dd-chg.is-down {
	color: var(--dd-down);
}

/* dominance */
.dd-dom__rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: auto;
}
.dd-dom__row {
	display: grid;
	grid-template-columns: 38px 1fr auto;
	align-items: center;
	gap: 10px;
}
.dd-dom__name b {
	font-size: 0.8rem;
	color: var(--dd-ink);
	font-weight: 800;
}
.dd-dom__bar {
	height: 7px;
	border-radius: 999px;
	background: rgba(140, 140, 160, 0.18);
	overflow: hidden;
}
.dd-dom__bar i {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--dd-grad);
	transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dd-dom__bar--eth i {
	background: linear-gradient(135deg, #8aa0ff, #6c7cff);
}
.dd-dom__pct {
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--dd-ink);
	min-width: 44px;
	text-align: left;
}

/* fear & greed gauge */
.dd-card--fng {
	align-items: center;
	text-align: center;
}
.dd-gauge {
	position: relative;
	width: 100%;
	max-width: 190px;
	margin: 4px auto 0;
}
.dd-gauge__knob {
	transition: cx 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), cy 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.dd-gauge__center {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	text-align: center;
}
.dd-gauge__val {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	color: var(--dd-ink);
}

/* skeleton shimmer while values are "—" */
.dd-card [data-dd] {
	transition: color 0.3s ease;
}

/* ---------- features bento --------------------------------------------- */

.dd-bento {
	display: grid;
	/* !important defeats a theme/plugin rule that forced 5×220px columns and
	   left empty cells. 6 cells / 3 cols = a clean 3×2 grid, no gaps. */
	grid-template-columns: repeat(3, 1fr) !important;
	gap: var(--dd-gap);
	align-items: stretch;
}
.dd-bento__cell {
	padding: clamp(22px, 2.4vw, 30px);
	border-radius: var(--dd-radius-lg);
	background: var(--dd-card);
	border: 1px solid var(--dd-card-brd);
	box-shadow: var(--dd-shadow);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.dd-bento__cell:hover {
	transform: translateY(-5px);
	border-color: var(--dd-hair);
	box-shadow: var(--dd-shadow), var(--dd-glow);
}
/* spotlight the first cell with a gold tint — SAME single-column footprint so
   the 3×2 grid stays perfectly filled (no empty cells, no awkward gap) */
.dd-bento__cell--feature {
	background: linear-gradient(135deg, rgba(253, 184, 55, 0.16), var(--dd-card) 60%);
	border-color: var(--dd-hair);
}
.dd-bento__ic {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 16px;
	color: var(--dd-gold-deep);
	background: linear-gradient(135deg, rgba(253, 184, 55, 0.22), rgba(224, 190, 0, 0.05));
	border: 1px solid var(--dd-hair);
	margin-bottom: 18px;
}
html[data-dracula-scheme="dark"] .dd-bento__ic {
	color: var(--dd-gold-bright);
}
.dd-bento__title {
	font-size: 1.12rem;
	font-weight: 800;
	margin: 0 0 10px;
	color: var(--dd-ink);
}
.dd-bento__text {
	font-size: 0.93rem;
	line-height: 1.95;
	color: var(--dd-muted);
	margin: 0;
}

/* ---------- why-us row ------------------------------------------------- */

.dd-why__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: var(--dd-gap);
}
.dd-why__cell {
	text-align: center;
	padding: clamp(22px, 2.4vw, 30px) 18px;
	border-radius: var(--dd-radius-lg);
	background: var(--dd-card);
	border: 1px solid var(--dd-card-brd);
	box-shadow: var(--dd-shadow);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.dd-why__cell:hover {
	transform: translateY(-5px);
	border-color: var(--dd-hair);
	box-shadow: var(--dd-shadow), var(--dd-glow);
}
.dd-why__ic {
	display: inline-grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	color: var(--dd-gold-deep);
	background: linear-gradient(135deg, rgba(253, 184, 55, 0.2), rgba(224, 190, 0, 0.05));
	border: 1px solid var(--dd-hair);
	margin-bottom: 16px;
}
html[data-dracula-scheme="dark"] .dd-why__ic {
	color: var(--dd-gold-bright);
}
.dd-why__title {
	font-size: 1.05rem;
	font-weight: 800;
	margin: 0 0 8px;
	color: var(--dd-ink);
}
.dd-why__text {
	font-size: 0.9rem;
	line-height: 1.9;
	color: var(--dd-muted);
	margin: 0;
}

/* ---------- floating "ورود به پنل" CTA (desktop + mobile) ---------------
   Visible on ALL viewports, pinned bottom-centre, and reveals on scroll.
   Base state = visible so it still works if JS is unavailable; dd-widgets.js
   adds .dd-fab-hidden while the user is at the very top of the page. */

.dd-panel-fab {
	position: fixed;
	left: 50%;
	bottom: calc(16px + env(safe-area-inset-bottom));
	transform: translate(-50%, 0);
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 30px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 1.02rem;
	color: #1a1400;
	text-decoration: none;
	white-space: nowrap;
	background: var(--dd-grad);
	border: 1px solid rgba(255, 255, 255, 0.45);
	box-shadow: 0 16px 36px -8px rgba(224, 190, 0, 0.72), 0 3px 12px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.5);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	overflow: hidden;
	transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.4s ease,
		box-shadow 0.3s ease;
}
/* hidden while at the top of the page (toggled by JS) */
.dd-panel-fab.dd-fab-hidden {
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 26px);
}
/* continuous gold shine sweep */
.dd-panel-fab::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.6) 50%, transparent 68%);
	transform: translateX(-130%);
	animation: dd-fab-shine 5s ease-in-out 1.5s infinite;
}
.dd-panel-fab__ic,
.dd-panel-fab__txt {
	position: relative;
	z-index: 1;
	display: inline-flex;
}
.dd-panel-fab:hover {
	transform: translate(-50%, -3px);
	box-shadow: 0 22px 46px -8px rgba(224, 190, 0, 0.92), 0 5px 16px rgba(0, 0, 0, 0.34),
		inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.dd-panel-fab:active {
	transform: translate(-50%, -1px) scale(0.97);
}
@keyframes dd-fab-shine {
	0% {
		transform: translateX(-130%);
	}
	24%,
	100% {
		transform: translateX(130%);
	}
}
/* mobile: keep the pill clear of the corner buttons */
@media (max-width: 768px) {
	.dd-panel-fab {
		max-width: min(64vw, 230px);
		padding: 12px 22px;
		font-size: 0.95rem;
		bottom: calc(13px + env(safe-area-inset-bottom));
	}
}

/* ---------- non-destructive global polish ------------------------------ */

/* smoother, lifted buttons site-wide */
.wp-block-button__link,
.epcl-button {
	transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease !important;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 30px -14px rgba(224, 190, 0, 0.55);
}

/* harmonise the theme's back-to-top with the gold brand */
#back-to-top.gradient-button {
	background: var(--dd-grad) !important;
	color: #1a1400 !important;
	box-shadow: 0 10px 24px -10px rgba(224, 190, 0, 0.7);
}

/* gentle glass + gold hairline around the existing crypto price tables */
[class*="mcwidget"],
[class*="mcw-table"] {
	border-radius: var(--dd-radius) !important;
	overflow: hidden;
}
[class*="mcwidget"] {
	box-shadow: var(--dd-shadow);
}

/* collapse empty placeholder blocks that leave ugly bordered gaps between
   sections (empty PostX grids, empty groups / button rows / columns) */
.ultp-post-grid-parent:empty,
.wp-block-ultimate-post-post-grid-parent:empty,
.wp-block-group:empty,
.wp-block-buttons:empty,
.wp-block-columns:empty,
.dd-section:empty {
	display: none !important;
}

/* smoother rhythm between stacked sections: a soft gold band on the bento
   section + tightened vertical gaps so transitions don't feel abrupt */
.dd-features {
	background: radial-gradient(125% 80% at 50% 0%, rgba(253, 184, 55, 0.05), transparent 58%);
}
.dd-stats + .dd-section,
.dd-section + .dd-section {
	margin-top: -8px;
}

/* ---------- responsive -------------------------------------------------- */

@media (max-width: 1023px) {
	.dd-stats__grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.dd-bento {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.dd-why__grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 560px) {
	.dd-stats__grid {
		grid-template-columns: 1fr 1fr !important;
	}
	.dd-card--dom,
	.dd-card--fng {
		grid-column: span 2;
	}
	.dd-bento {
		grid-template-columns: 1fr !important;
	}
	.dd-why__grid {
		grid-template-columns: 1fr 1fr !important;
	}
}

/* ---------- accessibility ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.dd-card,
	.dd-bento__cell,
	.dd-why__cell,
	.dd-dom__bar i,
	.dd-gauge__knob,
	.dd-panel-fab,
	.dd-panel-fab::after,
	.dd-btn--gold::after,
	.dd-dot {
		transition: none !important;
		animation: none !important;
	}
}
