/* Root Media — Apple-aligned polish.
   Elevation = colour differential, not shadow (Apple's flat-lit gallery).
   ============================================================ */

html { scroll-behavior: smooth; }
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* ---- Buttons ---- */
.wp-block-button__link { transition: background-color .2s ease, transform .1s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Secondary (outline) button -> Apple ghost: ink text, hairline border */
.wp-block-button.is-style-outline .wp-block-button__link {
	color: #1d1d1f;
	border: 1px solid #d2d2d7;
	background: transparent;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: #f5f5f7;
	border-color: #c7c7cc;
}

/* ---- Cards: 28px radius, hairline, NO shadow ---- */
.rootmedia-card,
.rm-card {
	border-radius: 28px;
}
.rootmedia-card { transition: border-color .2s ease; }
.rootmedia-card:hover { border-color: #c7c7cc; }
.rm-blog-card { overflow: hidden; }
.rm-blog-card .wp-block-post-featured-image { margin: 0; }

/* ---- Visual / showcase surfaces ---- */
.rm-hero-bg { background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%); }

.rm-visual-card {
	background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 60%, #f0f0f2 100%);
	border: 1px solid #e8e8ed;
	border-radius: 28px;
	overflow: hidden;
}
.rm-visual-card svg { display: block; width: 100%; height: auto; }

/* Theatrical product-style gradient backdrop (Apple "finish" gradient) */
.rm-gradient-green {
	background: linear-gradient(184deg, #1d1d1f 8%, #15643a 55%, #1a7a45 80%, #34c759 100%);
}

/* Dark stage (pure black, max contrast) */
.rm-dark { background: #000000; }
.rm-dark :where(h1, h2, h3, p, a),
.rm-gradient-green :where(h1, h2, h3, p) {
	color: #f5f5f7;
}

/* Big statistics */
.rm-stat-num {
	font-size: clamp(2.75rem, 1.6rem + 4.6vw, 4.5rem) !important;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
}
.rm-dark .rm-stat-label { color: #86868b !important; }

/* Pull-quote */
.rm-quote {
	font-size: clamp(1.5rem, 1rem + 2.4vw, 2.5rem) !important;
	font-weight: 600;
	letter-spacing: -0.022em;
	line-height: 1.28;
}

/* Service icon chip */
.rm-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 18px;
	background: #eef7f0;
	margin-bottom: 10px;
}
.rm-icon svg { display: block; }

/* Category labels as pills ("Premium" shows up automatically) */
.wp-block-post-terms { margin: 0 0 10px; }
.wp-block-post-terms a {
	display: inline-block;
	font-size: 13px;
	line-height: 1;
	padding: 6px 12px;
	border-radius: 999px;
	background: #eef7f0;
	color: #15643a !important;
	text-decoration: none;
	margin: 0 6px 6px 0;
}
.wp-block-post-terms a:hover { background: #dff0e6; text-decoration: none; }
.wp-block-post-terms .wp-block-post-terms__separator { display: none; }

/* Navigation hover */
.wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-underline-offset: 5px;
	text-decoration-thickness: 1px;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.wp-block-button__link, .rootmedia-card { transition: none; }
}

/* ============================================================
   Horizontal card row ("Giải pháp" tiles, Apple offers-style)
   ============================================================ */
.rm-cardrow {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
	padding-bottom: 12px;
	scrollbar-width: thin;
}
.rm-cardrow.is-layout-flex { flex-wrap: nowrap !important; }
.rm-cardrow > .wp-block-group {
	flex: 0 0 auto !important;
	width: 80%;
	scroll-snap-align: start;
}
@media (min-width: 700px) { .rm-cardrow > .wp-block-group { width: 46%; } }
@media (min-width: 1040px) { .rm-cardrow > .wp-block-group { width: 31%; } }
.rm-tile {
	border-radius: 28px;
	transition: transform .3s ease, box-shadow .3s ease;
}
.rm-tile:hover {
	transform: translateY(-6px);
	box-shadow: 0 22px 50px rgba(0, 0, 0, .12);
}
.rm-tile--dark :where(h2, h3, p) { color: #f5f5f7; }
.rm-eyebrow {
	font-size: 13px !important;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #86868b !important;
	margin-bottom: 6px;
}
@media (prefers-reduced-motion: reduce) {
	.rm-tile { transition: none; }
}

/* ---- Card row: hide scrollbar, arrow chips, fix mark highlight ---- */
.rm-cardrow-wrap { position: relative; }
.rm-cardrow { scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 0; }
.rm-cardrow::-webkit-scrollbar { width: 0; height: 0; display: none; }

.rm-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: none;
	background: rgba(210, 210, 215, 0.72);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: #1d1d1f;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	transition: background-color .2s ease;
}
.rm-arrow:hover { background: rgba(188, 188, 194, 0.92); }
.rm-arrow--prev { left: 6px; display: none; }
.rm-arrow--next { right: 6px; }
@media (max-width: 600px) { .rm-arrow { display: none !important; } }

/* Inline two-tone heading colour must not render as a yellow highlight */
:where(h1, h2, h3, h4) mark,
mark.has-inline-color { background-color: transparent; }

/* ---- Card row: full-bleed to the right edge (Apple offers style) ---- */
.rm-cardrow > .wp-block-group { width: min(360px, 82vw); }   /* slightly wider tiles */

.rm-cardrow-wrap.rm-cardrow-bleed {
	--rm-gutter: max(24px, calc((100vw - 1200px) / 2));
	padding-left: var(--rm-gutter);
}
.rm-cardrow-bleed .rm-cardrow { padding-right: var(--rm-gutter); }
.rm-cardrow-bleed .rm-arrow--prev { left: calc(var(--rm-gutter) + 4px); }
.rm-cardrow-bleed .rm-arrow--next { right: calc(var(--rm-gutter) + 4px); }
