/* Individual campaign pages: sections, picture gallery, audio, other-campaign
   links and the full-size picture viewer. Title band: pagekit.css. Video cards:
   voices.css + reviews.css (.am-vgrid). Link cards: campaigns.css. */

.am-cpg-sec { padding-top: 56px; }
.am-pg-hero + .am-cpg-sec { padding-top: 40px; }
.am-cpg-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.am-cpg-sec h2 {
	margin: 0;
	color: var(--a-ink);
	font-size: var(--a-h3);
	font-weight: 600;
	letter-spacing: 0.007em;
	line-height: 1.143;
}
.am-cpg-sec__text { margin: 6px 0 0; color: var(--a-muted); }
.am-cpg-more { flex-shrink: 0; color: var(--a-blue); font-weight: 600; text-decoration: none; }
.am-cpg-more::after { content: "→"; display: inline-block; margin-left: .35em; transition: transform 240ms var(--a-ease-out); }
.am-cpg-more:hover { color: var(--a-red-ink); }
.am-cpg-more:hover::after { transform: translateX(4px); }

/* Picture gallery: even 3-up grid; the whole picture is always shown (ads must
   never be cropped), on a soft panel so mixed shapes still line up. */
.am-gal {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 24px;
}
.am-gal__item { margin: 0; min-width: 0; }
.am-gal__link {
	display: block;
	border-radius: var(--a-radius-m);
	cursor: zoom-in;
}
.am-gal__frame {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	padding: 12px;
	border-radius: var(--a-radius-m);
	background: var(--a-blue-50);
	box-shadow: inset 0 0 0 1px var(--a-line);
	overflow: hidden;
	transition: box-shadow var(--a-move) var(--a-ease-out), transform var(--a-move) var(--a-ease-out);
}
.am-gal__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
}
.am-gal__link:hover .am-gal__frame { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--a-line), var(--a-shadow-2); }
.am-gal__link:active .am-gal__frame { transform: translateY(-1px) scale(.99); transition-duration: var(--a-press); }
.am-gal__link:focus-visible { outline: 3px solid var(--a-red-ink); outline-offset: 3px; }
.am-gal__cap { margin: 12px 0 0; color: var(--a-ink); font-weight: 600; line-height: 1.35; }
/* a video placed among pictures keeps the same card size */
.am-gal--mixed .am-voice__play { aspect-ratio: 4 / 3; }
.am-gal--mixed .am-voice__name { margin-top: 12px; }

/* Audio */
.am-audios { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 820px; }
.am-audio {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 20px;
	align-items: center;
	padding: 20px;
	border-radius: var(--a-radius-l);
	background: var(--a-blue-50);
	box-shadow: inset 0 0 0 1px var(--a-line);
}
.am-audio__icon,
.am-audio__img { width: 88px; height: 88px; border-radius: var(--a-radius-m); object-fit: cover; }
.am-audio__icon { display: grid; place-items: center; background: var(--a-blue); }
.am-audio__icon svg { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.am-audio__title { margin: 0; color: var(--a-ink); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.am-audio__meta { margin: 2px 0 12px; color: var(--a-muted); font-size: 14px; }
.am-audio audio { display: block; width: 100%; height: 40px; accent-color: var(--a-blue); }

/* Other campaigns */
.am-cpg-others { padding-top: 80px; padding-bottom: 96px; }
.am-cpg-others h2 { margin: 0 0 16px; color: var(--a-ink); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.am-cpg-others ul { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.am-cpg-others li a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--a-line);
	border-radius: 999px;
	background: #fff;
	color: var(--a-ink);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 200ms var(--a-ease-out), border-color 200ms var(--a-ease-out);
}
.am-cpg-others li a:hover { border-color: var(--a-blue-300); background: var(--a-blue-50); color: var(--a-ink); }
.am-cpg-others li a[aria-current="page"] { background: var(--a-blue); border-color: var(--a-blue); color: #fff; }

/* Full-size picture viewer */
.am-lightbox {
	width: 100vw;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 4, 32, .94);   /* the viewer itself is the dark layer */
	color: #fff;
	overflow: hidden;
}
.am-lightbox::backdrop { background: rgba(0, 4, 32, .4); }
.am-lightbox[open] { display: grid; place-items: center; animation: am-lb-in 220ms var(--a-ease-out); }
@keyframes am-lb-in { from { opacity: 0; } }
.am-lightbox__fig { margin: 0; display: grid; justify-items: center; gap: 14px; max-width: calc(100vw - 144px); }
.am-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: calc(100dvh - 140px);
	width: auto;
	height: auto;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.am-lightbox__cap { color: #fff; font-weight: 600; text-align: center; }
.am-lightbox__cap:empty { display: none; }
.am-lightbox__count { position: absolute; left: 24px; top: 20px; margin: 0; color: rgba(255, 255, 255, .75); font-size: 14px; font-variant-numeric: tabular-nums; }
.am-lightbox__btn {
	position: absolute;
	width: 48px;
	height: 48px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background-color 200ms var(--a-ease-out), transform var(--a-press) ease-out;
}
.am-lightbox__btn:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.am-lightbox__btn:active { transform: scale(.92); }
.am-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.am-lightbox__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.am-lightbox__close { right: 20px; top: 16px; }
.am-lightbox__prev { left: 20px; top: 50%; margin-top: -24px; }
.am-lightbox__next { right: 20px; top: 50%; margin-top: -24px; }
.am-lightbox[data-single] .am-lightbox__prev,
.am-lightbox[data-single] .am-lightbox__next,
.am-lightbox[data-single] .am-lightbox__count { display: none; }
html.am-lb-open { overflow: hidden; }

@media (max-width: 999px) {
	.am-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
}
@media (max-width: 767px) {
	.am-cpg-sec { padding-top: 44px; }
	.am-cpg-sec__head { flex-direction: column; align-items: flex-start; gap: 8px; }
	.am-cpg-others { padding-top: 56px; padding-bottom: 64px; }
	.am-lightbox__fig { max-width: calc(100vw - 24px); }
	.am-lightbox__img { max-height: calc(100dvh - 180px); }
	.am-lightbox__prev, .am-lightbox__next { top: auto; bottom: 20px; margin-top: 0; }
	.am-lightbox__prev { left: calc(50% - 60px); }
	.am-lightbox__next { right: calc(50% - 60px); }
}
@media (max-width: 559px) {
	.am-gal { grid-template-columns: 1fr; }
	.am-audio { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px; }
	.am-audio__icon, .am-audio__img { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
	.am-gal__link:hover .am-gal__frame { transform: none; }
	.am-lightbox[open] { animation: none; }
}
