/* Member Perks */

/* ═══ Page shell ═══════════════════════════════════════════════════════════ */

body.lu-perks-page {
	background: var(--lu-color-green-white, #F2F5F0);
	overflow-x: hidden;
}

body.lu-perks-page #primary.content-area {
	padding-top: 0;
	padding-bottom: 60px;
}

body.lu-perks-page #primary .entry-header {
	display: none;
}

/* ═══ Hero band ════════════════════════════════════════════════════════════ */

.lugbn-perks-hero {
	position: relative;
	padding: 44px 0 40px;
}

.lugbn-perks-hero::before {
	content: '';
	position: absolute;
	inset: 0 -100vw;
	background: var(--lu-color-deep-forest, #032E1C);
}

.lugbn-perks-hero > * {
	position: relative;
}

.lugbn-perks-hero__title {
	margin: 0 0 8px;
	font-family: var(--lu-font-heading, 'Radio Canada Big', 'Instrument Sans', sans-serif);
	font-size: 26px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--lu-color-white, #fff);
}

.lugbn-perks-hero__subtitle {
	max-width: 62ch;
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.82);
}

.lugbn-perks-hero__link {
	display: inline-block;
	margin-top: 14px;
	font-size: 14px;
	font-weight: 600;
	color: var(--lu-color-birdie-lime, #B5EB79);
	text-decoration: underline;
}

.lugbn-perks-hero__link:hover {
	color: var(--lu-color-white, #fff);
}

.lugbn-perks-body {
	padding-top: 32px;
}

/* ═══ Category filter ══════════════════════════════════════════════════════ */

.lugbn-offer-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 44px;
}

.lugbn-offer-filter-item {
	padding: 4px 16px;
	background: var(--lu-color-white, #fff);
	border: 0;
	border-radius: var(--lu-radius-full, 9999px);
	font-size: 15px;
	font-weight: 500;
	color: var(--lu-color-graphite, #2A2D2F);
	text-decoration: none;
	white-space: nowrap;
}

.lugbn-offer-filter-item:hover {
	background: var(--lu-color-green-tint, #E8EDE5);
	color: var(--lu-color-deep-forest, #032E1C);
}

.lugbn-offer-filter-item.is-active,
.lugbn-offer-filter-item.is-active:hover {
	background: var(--lu-color-deep-forest, #032E1C);
	color: var(--lu-color-birdie-lime, #B5EB79);
}

.lugbn-offer-filter-select {
	display: none;
	margin-bottom: 24px;
}

.lugbn-offer-filter-select select {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	background-color: var(--lu-color-white, #fff);
	border: 1px solid #E1E6DE;
	border-radius: var(--lu-radius-md, 8px);
	font-size: 15px;
	color: var(--lu-color-graphite, #2A2D2F);
}

/* ═══ Offer cards ══════════════════════════════════════════════════════════ */

.lugbn-offers-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.lugbn-offer-card {
	display: flex;
	flex-direction: column;
	background: var(--lu-color-white, #fff);
	border-radius: var(--lu-radius-md, 8px);
	overflow: hidden;
}

.lugbn-offer-image img {
	display: block;
	width: 100%;
	height: 185px;
	object-fit: cover;
}

.lugbn-offer-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 12px 0;
	flex: 1;
}

.lugbn-offer-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.lugbn-offer-category {
	padding: 4px 6px;
	line-height: 1;
	background: var(--lu-color-deep-forest, #032E1C);
	border-radius: var(--lu-radius-sm, 4px);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--lu-color-birdie-lime, #B5EB79);
}

.lugbn-offer-badge-birdie {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 4px 6px;
	line-height: 1;
	border-radius: var(--lu-radius-sm, 4px);
	background: var(--lu-color-gold, #D6AE5D);
	color: var(--lu-color-deep-forest, #032E1C);
	white-space: nowrap;
}

.lugbn-offer-title {
	margin: 0;
	font-family: var(--lu-font-heading, 'Radio Canada Big', 'Instrument Sans', sans-serif);
	font-weight: 500;
	font-size: 24px;
	line-height: 1.2;
	color: var(--lu-color-deep-forest, #032E1C);
}

.lugbn-offer-supplier {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lugbn-offer-supplier-logo img {
	display: block;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

.lugbn-offer-supplier-name {
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: var(--lu-color-graphite, #2A2D2F);
}

.lugbn-offer-description {
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--lu-color-caddy, #6B7570);
}

.lugbn-offer-description p {
	margin: 0 0 8px;
}

.lugbn-offer-description p:last-child {
	margin-bottom: 0;
}

/* ── Clamp + Read more ──────────────────────────────────────────────────────
   `is-clamped` is added by offer-cards.js, never by the server: a description
   hidden by CSS alone would be unreachable if the script failed to load. The
   full text is in the markup either way — this only decides whether the card
   shows all of it or hands it to the modal. */
.lugbn-offer-description.is-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	line-clamp: 5;
	overflow: hidden;
}

.lugbn-offer-more {
	align-self: flex-start;
	margin-top: 4px;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--lu-color-deep-forest, #032E1C);
	text-decoration: underline;
	cursor: pointer;
}

.lugbn-offer-more:hover {
	color: var(--lu-color-electric-turf, #1FCB60);
}

/* ── Read-more modal ────────────────────────────────────────────────────────
   One <dialog> for the whole page, built and filled by offer-cards.js. Native
   rather than the .lugbn-find-a-game-modal pattern used elsewhere: Esc, the
   backdrop, the focus trap and focus restoration all come for free, and this
   modal holds text rather than a Gravity Form. */
.lugbn-offer-modal {
	width: min(640px, calc(100vw - 32px));
	max-height: min(80vh, 760px);
	padding: 0;
	border: 0;
	border-radius: var(--lu-radius-md, 8px);
	background: var(--lu-color-white, #fff);
	color: var(--lu-color-graphite, #2A2D2F);
}

.lugbn-offer-modal::backdrop {
	background: rgba(3, 46, 28, 0.55);
}

.lugbn-offer-modal[open] {
	display: flex;
	flex-direction: column;
}

.lugbn-offer-modal__head {
	position: relative;
	flex: 0 0 auto;
	padding: 24px 56px 12px 24px;
}

.lugbn-offer-modal__supplier {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 500;
	color: var(--lu-color-caddy, #6B7570);
}

.lugbn-offer-modal__supplier:empty {
	display: none;
}

.lugbn-offer-modal__title {
	margin: 0;
	font-family: var(--lu-font-heading, 'Radio Canada Big', 'Instrument Sans', sans-serif);
	font-weight: 500;
	font-size: 24px;
	line-height: 1.2;
	color: var(--lu-color-deep-forest, #032E1C);
}

.lugbn-offer-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--lu-color-mist, #EDF1EA);
	font-size: 20px;
	line-height: 1;
	color: var(--lu-color-graphite, #2A2D2F);
	cursor: pointer;
}

.lugbn-offer-modal__close:hover {
	background: var(--lu-color-birdie-lime, #B5EB79);
}

/* The only scrolling region, so the title and close button stay put on a
   long offer. */
.lugbn-offer-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 0 24px 24px;
	font-size: 15px;
	line-height: 1.6;
}

.lugbn-offer-modal__body p {
	margin: 0 0 12px;
}

.lugbn-offer-modal__body p:last-child {
	margin-bottom: 0;
}

.lugbn-offer-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	/* `auto` top margin, not 16px: it pushes the footer to the base of the
	   card so footers line up across a row whatever the description does. */
	margin: auto -12px 0;
	padding: 16px 12px;
	gap: 8px 16px;
	font-size: 13px;
	color: var(--lu-color-caddy, #6B7570);
}

/* The code and the expiry used to be loose flex items with a hard-coded
   `width: 30%` on the code. A promo code longer than that box — LEVELUPCULLINAN
   — overflowed it and ran into the date. They share a group now and size to
   their content. */
.lugbn-offer-footer__meta,
.lugbn-offer-footer__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
	min-width: 0;
}

/* Keeps the actions right-aligned on a card that has no code or expiry, where
   there is no second group for space-between to push against. */
.lugbn-offer-footer__actions {
	margin-left: auto;
}

.lugbn-offer-code,
.lugbn-offer-expiry {
	min-width: 0;
}

.lugbn-offer-code strong {
	font-weight: 600;
	color: var(--lu-color-graphite, #2A2D2F);
	/* A code is one unbroken token, so it cannot wrap at a space. Without this
	   an over-long one widens the card and blows out the grid column. */
	overflow-wrap: anywhere;
}

.lugbn-offer-website {
	font-weight: 600;
	color: var(--lu-color-deep-forest, #032E1C);
	text-decoration: none;
	white-space: nowrap;
}

.lugbn-offer-website:hover {
	color: var(--lu-color-deep-forest, #032E1C);
	text-decoration: underline;
}

/* The mailto twin of .lugbn-offer-website. Reads as a secondary action —
   a supplier may set both a link and an address, and two solid buttons in a
   card footer compete rather than rank. */
.lugbn-offer-email {
	font-size: 14px;
	font-weight: 600;
	color: var(--lu-color-deep-forest, #032E1C);
	text-decoration: underline;
}

.lugbn-offer-email:hover {
	color: var(--lu-color-electric-turf, #1FCB60);
}

.lugbn-offers-empty {
	margin: 0;
	font-size: 15px;
	color: var(--lu-color-caddy, #6B7570);
}

/* ═══ Responsive ═══════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
	.lugbn-offers-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.lugbn-perks-hero {
		padding: 30px 0 28px;
	}

	.lugbn-perks-hero__title {
		font-size: 24px;
	}

	.lugbn-perks-body {
		padding-top: 24px;
	}

	/* Dropdown replaces the pill row, per the design. */
	.lugbn-offer-filter {
		display: none;
	}

	.lugbn-offer-filter-select {
		display: block;
	}

	.lugbn-offers-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	/* The design stacks the footer at this width rather than letting
	   code / expiry / link wrap unevenly against each other. */
	.lugbn-offer-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.lugbn-offer-footer__actions {
		margin-left: 0;
	}
}
