/* ==========================================================================
   Atlas Sport — portfolio archive
   Paired with atlas-portfolio.php / atlas-portfolio.js

   Palette and shapes come from the child theme's other pages (#178A45 green,
   #FF7A59 orange, #12291B ink, hard offset shadows). The design canvas set the
   headings in Nunito; Open Sans is used instead, because every other module on
   the site does and one page in a different face reads as a mistake.

   The second half of the file restyles Visual Portfolio's own markup into the
   cards — the plugin still renders the grid, we only reshape it.
   ========================================================================== */

.atlas-pf,
.atlas-pf *,
.atlas-pf *::before,
.atlas-pf *::after { box-sizing: border-box; }

.atlas-pf {
	--pf-green: #178a45;
	--pf-green-dark: #12703a;
	--pf-lime: #7ac943;
	--pf-orange: #ff7a59;
	--pf-ink: #12291b;
	--pf-body: #4a5650;
	--pf-muted: #6c7a70;
	--pf-cream: #f6f4ee;
	--pf-border: #d3decb;
	--pf-shadow: #e3ebdb;

	font-family: 'Open Sans', Roboto, Arial, sans-serif;
	color: var(--pf-ink);
	-webkit-font-smoothing: antialiased;
}

.atlas-pf a { text-decoration: none; }

/* Decorative circles behind the hero and the CTA. */
.atlas-pf__blob {
	position: absolute;
	display: block;
	border-radius: 50%;
	pointer-events: none;
}

/* --- hero --------------------------------------------------------------- */

.atlas-pf__hero {
	position: relative;
	overflow: hidden;
	margin: 0 0 34px;
	padding: 56px 56px 48px;
	border-radius: 26px;
	background: var(--pf-cream);
}

.atlas-pf__blob--green {
	top: -120px;
	right: -120px;
	width: 420px;
	height: 420px;
	background: rgba(122, 201, 67, .14);
}

.atlas-pf__blob--orange {
	top: 60px;
	right: 200px;
	width: 120px;
	height: 120px;
	background: rgba(255, 122, 89, .18);
}

.atlas-pf__heroinner {
	position: relative;
	z-index: 2;
}

.atlas-pf__crumbs {
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--pf-muted);
}

.atlas-pf__crumbs a { color: var(--pf-green); }
.atlas-pf__crumbs a:hover { text-decoration: underline; }
.atlas-pf__crumbs span { margin: 0 6px 0 4px; }
.atlas-pf__crumbs span:last-child { margin-right: 0; }

.atlas-pf__herorow {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 48px;
}

.atlas-pf__title {
	margin: 0 0 14px;
	font-size: clamp(32px, 4vw, 56px);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -.02em;
	color: var(--pf-ink);
}

.atlas-pf__accent { color: var(--pf-green); }

.atlas-pf__lead {
	margin: 0;
	max-width: 640px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--pf-body);
	text-wrap: pretty;
}

.atlas-pf__stats {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
}

.atlas-pf__stat {
	padding: 18px 24px;
	border: 2px solid var(--pf-border);
	border-radius: 18px;
	background: #fff;
	box-shadow: 5px 6px 0 var(--pf-shadow);
	text-align: center;
}

.atlas-pf__statvalue {
	display: block;
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
}

.atlas-pf__statvalue--green { color: var(--pf-green); }
.atlas-pf__statvalue--orange { color: var(--pf-orange); }

.atlas-pf__statlabel {
	display: block;
	margin-top: 5px;
	max-width: 15ch;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--pf-ink);
}

/* --- toolbar: pills + search -------------------------------------------- */

.atlas-pf__toolbar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 34px;
}

.atlas-pf__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	min-width: 0;
}

.atlas-pf__pill {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 11px 18px;
	border: 2px solid var(--pf-border);
	border-radius: 999px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	color: var(--pf-ink);
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.atlas-pf__pill:hover { border-color: #b9cdad; }

.atlas-pf__pill.is-on {
	background: var(--pf-green);
	border-color: var(--pf-green);
	color: #fff;
	box-shadow: 4px 5px 0 #bfe3cc;
}

.atlas-pf__pillcount {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--pf-cream);
	font-size: 12px;
	font-weight: 800;
	color: var(--pf-green);
}

.atlas-pf__pill.is-on .atlas-pf__pillcount {
	background: rgba(255, 255, 255, .24);
	color: #fff;
}

.atlas-pf__search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 11px;
	flex: 0 1 340px;
	margin-left: auto;
	/* Height from the property, not from padding: the clear button that appears
	   on the first keystroke is taller than the input's line box and would
	   otherwise stretch the row. */
	height: 48px;
	padding: 0 12px 0 20px;
	border: 2px solid var(--pf-border);
	border-radius: 999px;
	background: #fff;
	box-shadow: 4px 5px 0 var(--pf-shadow);
	transition: border-color .18s ease, box-shadow .18s ease;
}

.atlas-pf__search:hover { border-color: #b9cdad; }

.atlas-pf__search.is-focused {
	border-color: var(--pf-green);
	box-shadow: 4px 5px 0 #bfe3cc;
}

.atlas-pf__searchicon {
	display: flex;
	flex: 0 0 auto;
	color: var(--pf-green);
}

.atlas-pf__searchinput.atlas-pf__searchinput {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--pf-ink);
	text-overflow: ellipsis;
	-webkit-appearance: none;
	appearance: none;
}

.atlas-pf__searchinput:focus { outline: none; box-shadow: none; }
.atlas-pf__searchinput::placeholder { color: var(--pf-muted); font-weight: 500; opacity: 1; }
/* The native affordances duplicate our own clear button. */
.atlas-pf__searchinput::-webkit-search-cancel-button,
.atlas-pf__searchinput::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.atlas-pf__searchclear {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--pf-cream);
	color: var(--pf-muted);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.atlas-pf__searchclear:hover { background: #e8eee2; color: var(--pf-ink); }
.atlas-pf__searchclear[hidden] { display: none; }

/* Out of flow, so typing never grows the toolbar and shoves the grid down. */
.atlas-pf__status {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--pf-muted);
}

.atlas-pf__toolbar.is-empty .atlas-pf__status { color: #b4442f; }

/* --- empty state -------------------------------------------------------- */

.atlas-pf__empty {
	max-width: 520px;
	margin: 8px auto 48px;
	padding: 48px 24px;
	text-align: center;
}

.atlas-pf__empty[hidden] { display: none; }

.atlas-pf__emptytitle {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--pf-ink);
}

.atlas-pf__emptyhint {
	margin: 0 0 20px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--pf-muted);
}

.atlas-pf__emptyreset {
	margin: 0;
	padding: 13px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--pf-green);
	box-shadow: 4px 5px 0 #bfe3cc;
	font-family: inherit;
	font-size: 15px;
	font-weight: 800;
	color: #fff;
	cursor: pointer;
	transition: background-color .15s ease;
}

.atlas-pf__emptyreset:hover { background: var(--pf-green-dark); color: #fff; }

/* --- CTA ---------------------------------------------------------------- */

.atlas-pf__cta {
	position: relative;
	overflow: hidden;
	margin: 8px 0 0;
	padding: 56px;
	border-radius: 26px;
	background: #eaf2e2;
}

.atlas-pf__blob--ctagreen {
	left: -100px;
	bottom: -160px;
	width: 420px;
	height: 420px;
	background: rgba(122, 201, 67, .20);
}

.atlas-pf__blob--ctaorange {
	right: -80px;
	top: -120px;
	width: 300px;
	height: 300px;
	background: rgba(255, 122, 89, .12);
}

.atlas-pf__ctainner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 48px;
}

.atlas-pf__ctatitle {
	margin: 0 0 10px;
	font-size: clamp(24px, 2.6vw, 38px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.02em;
	color: var(--pf-ink);
}

.atlas-pf__ctatext {
	margin: 0;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--pf-body);
}

.atlas-pf__ctabtn {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 17px 28px;
	border-radius: 16px;
	background: var(--pf-orange);
	box-shadow: 5px 6px 0 rgba(255, 122, 89, .32);
	font-size: 18px;
	font-weight: 800;
	color: #3d1408;
	transition: background-color .15s ease;
}

.atlas-pf__ctabtn:hover { background: #ff8d70; color: #3d1408; }
.atlas-pf__ctabtn svg { display: block; }

/* ==========================================================================
   Visual Portfolio, reshaped into cards
   ========================================================================== */

/* Our pills replace the plugin's filter row. */
.atlas-pf .vp-portfolio__filter-wrap { display: none !important; }

/* The plugin's own top spacing would double ours. */
.atlas-pf .vp-portfolio__layout-elements-top { margin-bottom: 0; }

/* --- the card ----------------------------------------------------------- */

/* The element+class selector matches the plugin's own `.vp-portfolio
   figure.vp-portfolio__item { display: block }`, which would otherwise win.
   The padding kill targets atlas-shop-page.css (site-wide), where the old
   portfolio design left `.vp-portfolio__item { padding-top: 25px !important }` —
   on these cards it painted a white band between the border and the photo. */
.atlas-pf .vp-portfolio figure.vp-portfolio__item {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0 !important;
	border: 2px solid var(--pf-border);
	border-radius: 20px;
	background: #fff;
	box-shadow: 5px 6px 0 var(--pf-shadow);
	transition: transform .15s ease, box-shadow .15s ease;
}

.atlas-pf .vp-portfolio__item:hover {
	transform: translate(-2px, -3px);
	box-shadow: 7px 9px 0 var(--pf-shadow);
}

/* The photo. The plugin already gives this wrapper overflow:hidden and makes it
   the containing block for the overlay, so one radius clips photo, zoom and
   overlay together. */
.atlas-pf .vp-portfolio__item-img-wrap {
	border-top-left-radius: 18px;
	border-top-right-radius: 18px;
}

.atlas-pf .vp-portfolio__item-img-wrap img {
	border-top-left-radius: 18px;
	border-top-right-radius: 18px;
	transition: transform .35s ease;
}

.atlas-pf .vp-portfolio__item:hover .vp-portfolio__item-img-wrap img { transform: scale(1.05); }

/* Keep the hover scrim light — the card lifts, the photo does not go dark.
   The variable rounds the scrim's clip to match the photo's top corners (the
   plugin clips it with `inset(0 round var(...))`). */
/* On the same element the plugin declares it on (`.vp-portfolio__items-style-
   default { --…: 0 }`) — declared on an ancestor it would be shadowed. */
.atlas-pf .vp-portfolio__items-style-default {
	--vp-items-style-default--overlay__border-radius: 18px 18px 0 0;
}

.atlas-pf .vp-portfolio__item-overlay { background: rgba(18, 41, 27, .10); }

/* --- category chip over the photo --------------------------------------- */

/* Positioned against the figure, which lifts it out of the caption and onto the
   image. Projects sit in several categories at once; the pills above already
   say which, so the card shows the first only and stays legible. */
.atlas-pf .vp-portfolio__items-style-default .vp-portfolio__item-meta-categories {
	position: absolute;
	left: 14px;
	top: 14px;
	z-index: 3;
	display: flex;
	margin: 0;
	font-size: 0;
}

.atlas-pf .vp-portfolio__item-meta-category:nth-child(n+2) { display: none; }

/* The extra class in the selector is deliberate — see the note on the site's
   Additional CSS below, which paints every caption link white with !important. */
.atlas-pf .vp-portfolio__items-style-default .vp-portfolio__item-meta-category a {
	display: block;
	padding: 7px 13px;
	border-radius: 999px;
	background: var(--pf-lime);
	box-shadow: 0 4px 12px rgba(12, 30, 18, .22);
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1;
	color: var(--pf-ink) !important;
	opacity: 1;
}

.atlas-pf .vp-portfolio__items-style-default .vp-portfolio__item-meta-category a:hover { background: #6cbb36; }

/* --- caption ------------------------------------------------------------ */

.atlas-pf .vp-portfolio__item-caption {
	flex: 1 1 auto;
	padding: 18px 20px 20px;
	text-align: left;
}

/* The extra class matters: the plugin sets `position: relative` on this from
   `.vp-portfolio__items-style-default .vp-portfolio__item-meta`, which ties a
   two-class selector — and the plugin's stylesheet loads after this one, so a
   tie loses. Relative here would capture the category chip and pin it inside
   the caption instead of over the photo. */
.atlas-pf .vp-portfolio__items-style-default .vp-portfolio__item-meta {
	position: static;
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-start;
	padding: 0;
}

/* The site's Additional CSS (Appearance ▸ Customize) still carries the old
   design's caption styling — a green panel with white links, both !important:
   `.vp-portfolio__item-meta, .vp-portfolio__item-caption-text-align-center
    { background-color: #449574 !important }` and
   `.vp-portfolio__items-style-default .vp-portfolio__item-caption a
    { color: white !important }`.
   Those two rules are obsolete now and are better deleted at the source; until
   then these out-specify them, scoped to this page so nothing else moves. */
.atlas-pf .vp-portfolio__item-caption,
.atlas-pf .vp-portfolio__item-caption.vp-portfolio__item-caption-text-align-center,
.atlas-pf .vp-portfolio__item-meta {
	background: #fff !important;
}

.atlas-pf .vp-portfolio__item-meta-title {
	margin: 0;
	font-family: inherit;
	font-size: 19px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -.01em;
	color: var(--pf-ink);
}

.atlas-pf .vp-portfolio__items-style-default .vp-portfolio__item-caption .vp-portfolio__item-meta-title a {
	color: var(--pf-ink) !important;
}

.atlas-pf .vp-portfolio__items-style-default .vp-portfolio__item:hover .vp-portfolio__item-meta-title a {
	color: var(--pf-green) !important;
}

/* The location line, from the child theme's visual-portfolio/ template
   override. Only present on projects that have one filled in. */
.atlas-pf .atlas-pf__cardloc {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--pf-green);
}

.atlas-pf .atlas-pf__cardloc svg { flex: 0 0 auto; display: block; }

/* --- pagination --------------------------------------------------------- */

.atlas-pf .vp-portfolio__pagination-wrap { margin-top: 12px; }

.atlas-pf .vp-pagination__load-more {
	border-radius: 999px;
	font-weight: 800;
}

/* Nothing to page through while a filter is on — everything is already here. */
.atlas-pf.is-filtered .vp-portfolio__pagination-wrap { display: none; }

/* ==========================================================================
   Narrow screens
   ========================================================================== */

@media (max-width: 1100px) {
	.atlas-pf__hero { padding: 44px 36px 40px; }
	.atlas-pf__cta { padding: 44px 36px; }
	.atlas-pf__herorow { flex-direction: column; align-items: flex-start; gap: 28px; }
	.atlas-pf__lead { max-width: none; }
}

@media (max-width: 860px) {
	.atlas-pf__toolbar { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
	.atlas-pf__search { flex: 1 1 auto; margin-left: 0; }
	/* One swipeable row rather than four stacked lines of pills. */
	.atlas-pf__pills {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 6px;
		scrollbar-width: none;
	}
	.atlas-pf__pills::-webkit-scrollbar { display: none; }
	.atlas-pf__pill { flex: 0 0 auto; white-space: nowrap; }
	.atlas-pf__status { position: static; margin-top: 2px; text-align: center; }
	.atlas-pf__ctainner { flex-direction: column; align-items: flex-start; gap: 24px; }
	.atlas-pf__ctabtn { width: 100%; justify-content: center; }
}

@media (max-width: 600px) {
	.atlas-pf__hero {
		margin-bottom: 26px;
		padding: 32px 20px 28px;
		border-radius: 18px;
	}
	.atlas-pf__cta { padding: 32px 20px; border-radius: 18px; }
	.atlas-pf__stats { width: 100%; }
	.atlas-pf__stat { flex: 1 1 0; padding: 14px 12px; border-radius: 14px; }
	.atlas-pf__statvalue { font-size: 26px; }
	.atlas-pf__statlabel { font-size: 11px; }
	.atlas-pf__lead { font-size: 15px; }
	.atlas-pf__search { height: 44px; padding: 0 10px 0 16px; }
	.atlas-pf__searchinput.atlas-pf__searchinput { font-size: 14px; }
	.atlas-pf .vp-portfolio__item-caption { padding: 14px 16px 16px; }
	.atlas-pf .vp-portfolio__item-meta-title { font-size: 17px; }
}