/*
 * The three lists.
 *
 * Every colour and every typeface below is a variable the theme already
 * publishes from the Global Colours and Fonts. There is not one hex
 * value in this file on purpose: change the palette in the customizer
 * and these cards change with it.
 *
 * One column on a phone, two on a tablet, three on a laptop.
 */

/*
 * The doubled class is deliberate. A theme that styles the lists inside
 * page content beats a single class, and Kadence indents every list by
 * 34px, which pushed every card sideways off a phone screen.
 */
.altc.altc {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px 24px;
	margin: 8px 0 0;
	padding: 0;
	padding-inline-start: 0;
	list-style: none;
}

@media ( min-width: 600px ) {
	.altc {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( min-width: 900px ) {
	.altc {
		grid-template-columns: repeat( 3, 1fr );
	}
}

/*
 * min-width is the important one. The name across a panel is set not to
 * wrap, so without this the column grows to fit the longest name rather
 * than cropping it, and a card called Construction traditionnelle drags
 * the whole grid off the side of the page.
 */
.altc.altc > .altc__item {
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.altc__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* The picture, or the panel that stands in for one. */

.altc__frame {
	display: block;
	overflow: hidden;
	margin-bottom: 14px;
}

.altc__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.altc__panel {
	display: flex;
	min-width: 0;
	max-width: 100%;
	align-items: flex-end;
	aspect-ratio: 4 / 3;
	padding: 14px 16px;
	overflow: hidden;
	background: var( --global-palette3 );
}

.altc__panel--b {
	background: var( --global-palette5 );
}

.altc__paneltext {
	font-family: var( --global-heading-font-family );
	font-weight: 400;
	font-size: clamp( 26px, 5.4vw, 40px );
	line-height: 1.05;
	white-space: nowrap;
	color: var( --global-palette9 );
}

/* The words. */

.altc__title {
	display: block;
	padding-top: 10px;
	border-top: 2px solid var( --global-palette6 );
	font-family: var( --global-heading-font-family );
	font-weight: 400;
	font-size: 22px;
	line-height: 1.25;
	color: var( --global-palette3 );
}

.altc__words {
	display: block;
	margin-top: 6px;
	font-family: var( --global-body-font-family );
	font-weight: 300;
	font-size: 16px;
	line-height: 1.5;
	color: var( --global-palette4 );
}

.altc__link:hover .altc__title,
.altc__link:focus .altc__title {
	color: var( --global-palette1 );
}

.altc__link:focus-visible {
	outline: 3px solid var( --global-palette12 );
	outline-offset: 4px;
}

/* Nothing in the list yet. */

.altc-none {
	margin: 4px 0 0;
	padding: 18px 20px;
	border-left: 2px solid var( --global-palette6 );
	background: var( --global-palette7 );
	font-family: var( --global-body-font-family );
	font-weight: 300;
	font-size: 16px;
	line-height: 1.5;
	color: var( --global-palette5 );
}
