/**
 * Full-width two-column mega-menu module — internal layout only.
 *
 * Shell + link-row primitives come from `mega.scss`; section/heading primitives
 * from the shared `_mega-columns` partial; the optional footer band from the
 * shared `_mega-callout` partial. This file (shipped as
 * `build/mega-full-width-two-column.css`, enqueued only when the variant is on)
 * stretches the panel across the header (shell shared via `_mega-full-bleed`)
 * and constrains its sections to two roomy columns.
 */

@use "mega-columns";
@use "mega-callout";
@use "mega-full-bleed";
@include mega-full-bleed.shell( "full-width-two-column" );

.aureon-mega--full-width-two-column {

	.aureon-mega__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap:
			var(--aureon-mega-row-gap, var(--aureon-space-md, 1.5rem))
			var(--aureon-mega-col-gap, clamp(2rem, 6vw, 4rem));
	}

	/* Extra breathing room below the section heading, above its link list, and
	   align its left edge with the icon column (link rows use 0.25rem inline
	   padding here, vs the shared heading's 0.75rem). */
	.aureon-mega__heading {
		margin-bottom: 1rem;
		padding-inline: 0.25rem;
	}

	/* Link rows in this variant follow the Tailwind Plus reference: plain icons
	   (no recessed tile), vertically centred with a single-line label. */
	.aureon-mega__link {
		align-items: center;
		gap: 1rem;
		padding: 0.45rem 0.25rem;
	}

	.aureon-mega__icon {
		width: 1.75rem;
		height: 1.75rem;
		background: none;
		border-radius: 0;
		font-size: 1.5rem;
		color: color-mix(in srgb, var(--aureon-submenu-text, var(--aureon-color-text)) 50%, transparent);

		svg {
			width: 1.5rem;
			height: 1.5rem;
		}
	}

	.aureon-mega__title {
		font-weight: 700;
	}

	/* Menu columns (left) beside the recent-posts panel (right). The columns
	   flex to fill, the posts panel takes a fixed, roomy share. */
	.aureon-mega__ftc-body {
		display: flex;
		flex-wrap: wrap;
		gap: clamp(2rem, 6vw, 4rem);
		align-items: flex-start;

		.aureon-mega__cols {
			flex: 1 1 20rem;
		}
	}

	/* The hand-picked post cards sit side by side on the right, wrapping to fit
	   however many the editor added to the menu. */
	.aureon-mega__posts {
		flex: 1 1 26rem;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
		gap: var(--aureon-space-md, 1.5rem);
	}
}

/* Post card — featured image, meta row (date + category badge), title, excerpt.
   Scoped under `.aureon-mega` (0,2,0) so it beats the header menu's
   `.aureon-menu a { display: inline-block }` (0,1,1) — otherwise the card
   anchor stays inline-block and its title/excerpt flow together on one line.
   Kept on the base `.aureon-mega` (not the variant modifier) so the primitive
   can be reused if another `posts`-capable variant is added later. */
.aureon-mega .aureon-mega__postcard {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	min-width: 0;
	text-decoration: none;
	color: inherit;

	&:hover .aureon-mega__postcard-title,
	&:focus-visible .aureon-mega__postcard-title {
		color: var(--aureon-menu-link-hover, var(--aureon-color-link, currentColor));
	}
}

.aureon-mega__postcard-media {
	display: block;
	overflow: hidden;
	border-radius: var(--aureon-radius-md, 0.5rem);
	aspect-ratio: 16 / 9;

	img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

.aureon-mega__postcard-meta {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 0.15rem;
	font-size: 0.875rem;
	color: color-mix(in srgb, var(--aureon-submenu-text, var(--aureon-color-text)) 60%, transparent);
}

.aureon-mega__postcard-badge {
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--aureon-color-border) 40%, transparent);
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--aureon-submenu-text, var(--aureon-color-text));
}

.aureon-mega__postcard-title {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--aureon-submenu-text, var(--aureon-color-text));
}

.aureon-mega__postcard-excerpt {
	font-size: 0.9375rem;
	line-height: 1.55;
	color: color-mix(in srgb, var(--aureon-submenu-text, var(--aureon-color-text)) 70%, transparent);
}

@media (max-width: 48rem) {

	.aureon-mega--full-width-two-column .aureon-mega__posts {
		grid-template-columns: minmax(0, 1fr);
	}
}
