/**
 * Home page widgets.
 */

/* ---------- feature row ---------- */

.roghan-features { --roghan-icon-size: 26px; --roghan-divider: var(--line); }

.roghan-feature {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}

.roghan-features.is-top .roghan-feature {
	flex-direction: column;
	text-align: center;
}

.roghan-feature-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--roghan-icon-size) * 1.9);
	height: calc(var(--roghan-icon-size) * 1.9);
	border-radius: 14px;
	background: var(--surface);
	color: var(--main);
	font-size: var(--roghan-icon-size);
}

.roghan-feature-icon svg,
.roghan-feature-icon img {
	width: var(--roghan-icon-size);
	height: var(--roghan-icon-size);
	object-fit: contain;
	fill: currentColor;
}

.roghan-feature-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.roghan-feature-title { color: var(--ink); font-size: 14px; font-weight: 800; }
.roghan-feature-text { color: var(--soft); font-size: 12.5px; line-height: 1.8; }
a.roghan-feature:hover .roghan-feature-title { color: var(--main); }

.roghan-features.has-dividers .roghan-feature + .roghan-feature {
	padding-right: var(--roghan-gap);
	border-right: 1px solid var(--roghan-divider);
}

@media (max-width: 767px) {
	.roghan-features.has-dividers .roghan-feature + .roghan-feature {
		padding-right: 0;
		border-right: 0;
	}
}

/* ---------- hero slider ---------- */

.roghan-hero {
	--roghan-hero-h: 520px;
	--roghan-hero-overlay: .35;
	--roghan-dot-color: rgba(255, 255, 255, .55);
	--roghan-dot-active: #fff;
	overflow: hidden;
	border-radius: inherit;
}

.roghan-hero-slide {
	position: relative;
	display: flex;
	min-height: var(--roghan-hero-h);
	background: var(--main);
}

.roghan-hero-media,
.roghan-hero-media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.roghan-hero-media img { object-fit: cover; }

.roghan-hero-overlay {
	position: absolute;
	inset: 0;
	background: #000;
	opacity: var(--roghan-hero-overlay);
	pointer-events: none;
}

.roghan-hero-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	width: 100%;
	padding: 48px clamp(20px, 6vw, 80px) 64px;
}

.roghan-hero-content {
	display: block;
	max-width: 620px;
	margin-left: auto;
	color: #fff;
	text-align: right;
}

.roghan-hero-title,
.roghan-hero-subtitle,
.roghan-hero-text { margin: 0 0 10px; color: inherit; }

.roghan-hero-subtitle { font-size: 14px; font-weight: 700; opacity: .9; }
.roghan-hero-title { font-size: clamp(22px, 4vw, 40px); font-weight: 900; line-height: 1.45; }
.roghan-hero-text { font-size: 15px; line-height: 2; opacity: .92; }
/* Inline, so it follows the text alignment in either direction. */
.roghan-hero-btn { margin-top: 8px; }

.roghan-hero .roghan-hero-nav[data-carousel-prev] { right: 16px; }
.roghan-hero .roghan-hero-nav[data-carousel-next] { left: 16px; }

.roghan-hero-dots {
	position: absolute;
	right: 0;
	bottom: 18px;
	left: 0;
	z-index: 2;
	margin: 0;
}

@media (max-width: 767px) {
	.roghan-hero-inner { padding: 32px 20px 56px; }
	.roghan-hero .roghan-hero-nav { display: none; }
}

/* ---------- category grid ---------- */

.roghan-catcard { color: inherit; text-decoration: none; }
.roghan-catcard .roghan-card-media:empty { background: var(--surface); }
.roghan-catcard .roghan-card-body { align-items: center; text-align: center; }
.roghan-catcard .roghan-card-title { transition: color .2s ease; }
.roghan-catcard:hover .roghan-card-title,
.roghan-catcard:focus-visible .roghan-card-title { color: var(--main); }

/* ---------- brand strip ---------- */

.roghan-brands {
	--roghan-logo-h: 56px;
	--roghan-logo-opacity: .7;
	--roghan-gap: 40px;
}

.roghan-brands-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.roghan-brands.is-static .roghan-brands-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--roghan-gap);
}

.roghan-brand { flex: 0 0 auto; }

.roghan-brand-inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--roghan-logo-h);
	color: var(--soft);
	text-decoration: none;
	opacity: var(--roghan-logo-opacity);
	transition: opacity .25s ease, filter .25s ease;
}

.roghan-brand-inner img {
	display: block;
	width: auto;
	max-width: 180px;
	height: 100%;
	object-fit: contain;
}

.roghan-brand-name { font-size: 16px; font-weight: 800; white-space: nowrap; }

.roghan-brands.is-grayscale .roghan-brand-inner { filter: grayscale(1); }

.roghan-brand-inner:hover,
.roghan-brand-inner:focus-visible {
	opacity: 1;
	filter: none;
}

/* ---------- stats ---------- */

.roghan-stats {
	--roghan-divider: var(--line);
	margin: 0;
	padding: 0;
	list-style: none;
}

.roghan-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 0;
	text-align: center;
}

.roghan-stat-icon {
	display: inline-flex;
	margin-bottom: 4px;
	color: var(--main);
	font-size: 28px;
}

.roghan-stat-icon svg { width: 1em; height: 1em; fill: currentColor; }

.roghan-stat-value {
	color: var(--main);
	font-size: 34px;
	font-weight: 900;
	line-height: 1.3;
	font-variant-numeric: tabular-nums;
}

.roghan-stat-suffix { margin-inline-start: 2px; }
.roghan-stat-title { color: var(--soft); font-size: 13.5px; }

/* Each divider sits half a gap before its item; on the first item of a
   row that is outside the grid and clipped, so it works for any column
   count without knowing it. */
.roghan-stats.has-dividers { overflow: hidden; }
.roghan-stats.has-dividers .roghan-stat { position: relative; }

.roghan-stats.has-dividers .roghan-stat::before {
	content: "";
	position: absolute;
	top: 10%;
	bottom: 10%;
	right: calc(var(--roghan-gap) / -2 - 1px);
	border-right: 1px solid var(--roghan-divider);
}

[dir="ltr"] .roghan-stats.has-dividers .roghan-stat::before {
	right: auto;
	left: calc(var(--roghan-gap) / -2 - 1px);
	border-right: 0;
	border-left: 1px solid var(--roghan-divider);
}

/* ---------- faq ---------- */

.roghan-faq {
	--roghan-faq-gap: 0px;
	display: flex;
	flex-direction: column;
	gap: var(--roghan-faq-gap);
}

.roghan-faq-q { margin: 0; font: inherit; }
.roghan-faq .roghan-acc-icon { color: var(--main); }
.roghan-faq .roghan-acc-icon svg { width: 14px; height: 14px; fill: currentColor; }
.roghan-faq .roghan-acc-panel > :first-child { margin-top: 0; }
.roghan-faq .roghan-acc-panel > :last-child { margin-bottom: 0; }
