/**
 * Homepage 3-tab category bar. Homepage-only (enqueued via is_front_page()
 * in functions.php). Values verified against the exact literal CSS in
 * Design Refrance's TSI Home Canva -Flat-.html's real (non-dead-code)
 * base rules — a "mobile" version of these rules exists in the source
 * too, but it's wrapped in `@media (max-width:1px)`, which never
 * triggers on any real device (broken/dead CSS in the prototype), so a
 * real 768px breakpoint is used here instead, matching every other
 * component on this site.
 *
 * The divider between tabs (source: a literal `.ui-cat-div` element) is
 * done here as a CSS border on non-first tabs instead — same visual
 * result without needing the walker to inject extra divider markup
 * between <a> elements.
 */

.ui-cats {
	display: flex;
	gap: 0;
	padding: var(--spacing-category_tabs-top) var(--spacing-category_tabs-side) var(--spacing-category_tabs-bottom);
	align-items: stretch;
	min-height: 272px;
}

/**
 * Targets the exact class WordPress + Malasiya_Category_Tabs_Walker
 * both contribute: "menu-item menu-item-type-taxonomy
 * menu-item-object-category ui-cat" — per explicit request, vertical
 * padding added on top of the existing horizontal spacing.
 */
.ui-cats .ui-cat {
	flex: 1;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-inline: 28px;
	padding-top: 16px;
	padding-bottom: 16px;
}

.ui-cats .ui-cat:not(:first-child) {
	border-left: 1px solid var(--color-line);
}

.ui-cats .ui-cat:first-child {
	padding-left: 0;
}

/**
 * Title above description, stacked — reverted back to this after a
 * previous round wrongly changed it to side-by-side. Confirmed directly
 * by the user: the homepage tab bar's original stacked layout was
 * correct all along; side-by-side belongs to the nav overlay's Sections
 * list instead (see nav-menu.css). `.cat-row` is emitted by
 * Malasiya_Category_Tabs_Walker for both contexts, styled differently
 * per context via this selector vs. .nm-sections .cat-row.
 */
.ui-cats .cat-row {
	display: block;
}

.ui-cats .ui-cat .cn {
	font-family: var(--font-secondary);
	font-weight: 900;
	font-size: 52px;
	line-height: 0.95;
	letter-spacing: -1px;
	color: var(--color-ink);
	transition: color 0.18s;
}

.ui-cats .ui-cat:hover .cn {
	color: var(--color-primary-deep);
}

.ui-cats .ui-cat .cs {
	display: block;
	font-size: 12px;
	color: var(--color-ink-soft);
	letter-spacing: 0.4px;
	margin-top: 10px;
}

.ui-cats .ui-cat .ub {
	height: 3px;
	background: var(--color-primary);
	width: 0;
	transition: width 0.2s;
	margin-top: 14px;
}

.ui-cats .ui-cat:hover .ub {
	width: 64px;
}

@media (max-width: 768px) {
	.ui-cats {
		/* Same var names as desktop — the mobile-specific values are
		   already substituted in via the matching @media (max-width:768px)
		   block in the inline :root override (see
		   inc/customizer/inline-css.php malasiya_theme_settings_inline_css()),
		   not a separately-named variable here. */
		flex-direction: column;
		min-height: 0;
		padding-top: var(--spacing-category_tabs-top);
		padding-bottom: var(--spacing-category_tabs-bottom);
		padding-inline: 16px;
		gap: 0;
	}

	.ui-cats .ui-cat {
		padding-inline: 0;
	}

	/* Confirmed from source's mobile block (real values, just applied at
	   the correct 768px breakpoint instead of the source's broken
	   max-width:1px one) — this font-size reduction was missing
	   entirely, which is why "Nation"/"Decisions" rendered at the full
	   52px desktop size on mobile. */
	.ui-cats .ui-cat .cn {
		font-size: 34px;
	}

	.ui-cats .ui-cat .ub {
		margin-top: 10px;
	}

	.ui-cats .ui-cat:not(:first-child) {
		border-left: 0;
		border-top: 1px solid var(--color-line);
	}
}
