/*
Theme Name: SAG Custom
Theme URI: https://sag.ufvsoca.ca/sag
Description: Custom theme for S'eliyemetaxwtexw Art Gallery (UFV). Replaces the Elementor Pro dependency with hand-coded templates. Required plugins: Loginizer, Classic Editor, ACF, Online Forms, and Upgrade for Unattach & Re-Attach Media Attachments.
Author: UFV SOCA
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sag-custom
*/

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
	--color-black:      #1a1a1a;
	--color-white:      #ffffff;
	--color-mid-grey:   #888888;
	--color-light-grey: #f4f4f4;
	--color-border:     #e0e0e0;

	--font-body:    'Helvetica Neue', Helvetica, Arial, sans-serif;
	--font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;

	--max-width:    1200px;
	--gutter:       2rem;
}

/* ============================================================
   Reset / Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.6;
	color: var(--color-black);
	background: var(--color-white);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
	font-family: var(--font-heading);
	font-weight: 300;
	line-height: 1.2;
	margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* ============================================================
   Site Header & Primary Nav
   ============================================================ */
.site-header {
	border-bottom: 1px solid var(--color-border);
	background: var(--color-white);
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Grey header + body background on home page only */
.home {
	background: var(--color-light-grey);
}
.home .site-header {
	background: var(--color-light-grey);
	border-bottom-color: transparent;
}

.site-header__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1rem var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

/* Logo — WordPress custom-logo output */
.custom-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.custom-logo     { height: 56px; width: auto; display: block; }

/* Fallback text logo (only when no custom logo is set) */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo__text {
	font-size: 1rem;
	font-weight: 300;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Primary nav */
.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	align-items: center;
}

.site-nav__list li a {
	font-size: 0.75rem;
	font-weight: 300;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-black);
	padding: 0.25rem 0;
}

.site-nav__list li a:hover { text-decoration: underline; }

.site-nav__list li.current-menu-item > a { text-decoration: underline; }

/* Dropdown submenu — CSS-only on desktop, JS-toggled on mobile */
.site-nav__list > li { position: relative; }

.site-nav__list .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + 0.25rem);
	left: 0;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	min-width: 160px;
	padding: 0.4rem 0;
	z-index: 200;
	flex-direction: column;
	gap: 0;
	list-style: none;
	margin: 0;
}

.site-nav__list > li:hover .sub-menu,
.site-nav__list > li:focus-within .sub-menu {
	display: flex;
}

.site-nav__list .sub-menu li a {
	display: block;
	padding: 0.35rem 1rem;
	white-space: nowrap;
}

/* ============================================================
   Site Content wrapper
   ============================================================ */
.site-content {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2rem var(--gutter) 4rem;
}

/* ============================================================
   Pagination (shared)
   ============================================================ */
.pagination {
	margin-top: 2rem;
	display: flex;
	justify-content: space-between;
}

.pagination .nav-links {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.pagination a,
.pagination .current {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.4rem 0;
	border-bottom: 2px solid transparent;
	color: var(--color-black);
}

.pagination a:hover { border-bottom-color: var(--color-black); text-decoration: none; }
.pagination .current { border-bottom-color: var(--color-black); }

/* ============================================================
   Home page hero
   ============================================================ */
.home #content.site-content {
	max-width: none;
	margin: 0;
	padding: 0;
	background: var(--color-white);
}

.home-hero {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 3rem var(--gutter);
	min-height: 50vh;
}

.home-hero__wrap { text-align: center; }
.home-hero__link { display: inline-block; }

.home-hero__img {
	display: block;
	max-width: 100%;
	max-height: 520px;
	width: auto;
	height: auto;
	margin: 0 auto;
}

/* ============================================================
   Site Footer
   ============================================================ */
/* Home: info/social band above copyright. Interior pages: copyright bar only. */
.site-footer {
	background: var(--color-white);
	margin-top: 0;
}

.home .site-footer {
	background: var(--color-light-grey);
}

/* Info + social band — only rendered on home (see footer.php) */
.site-footer__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2.5rem var(--gutter);
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 2rem;
}

.site-footer__info {
	font-size: 0.78rem;
	line-height: 1.7;
	color: var(--color-black);
}

.site-footer__gallery-name {
	font-size: 0.78rem;
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 0.75rem;
}

.site-footer__address,
.site-footer__contact,
.site-footer__hours {
	font-style: normal;
	margin: 0 0 0.75rem;
}

.site-footer__contact a { color: var(--color-black); text-decoration: none; }
.site-footer__contact a:hover { text-decoration: underline; }

.site-footer__social {
	display: flex;
	gap: 0.75rem;
	flex-shrink: 0;
	align-items: center;
}

.site-footer__social-link {
	display: flex;
	align-items: center;
	color: var(--color-black);
	opacity: 0.6;
	transition: opacity 0.15s;
}

.site-footer__social-link:hover { opacity: 1; text-decoration: none; }

.site-footer__social-icon { width: 32px; height: 32px; }

/* Copyright bar — white on interior pages, grey on home */
.site-footer__copyright-bar {
	background: var(--color-white);
	width: 100%;
}

.home .site-footer__copyright-bar { background: var(--color-light-grey); }

.site-footer__copyright {
	padding: 1rem var(--gutter);
	font-size: 0.7rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-mid-grey);
	text-align: center;
}

/* ============================================================
   Mobile nav toggles
   (hamburger, submenu +/−, year-filter caret)
   ============================================================ */
.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.35rem;
	flex-shrink: 0;
	margin-left: auto;
}

.nav-toggle__bar {
	display: block;
	width: 22px;
	height: 1.5px;
	background: var(--color-black);
	transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Animate to × when open */
.nav-toggle--open .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle--open .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle--open .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Submenu (+/−) and year-filter caret — hidden on desktop, shown on mobile */
.submenu-toggle      { display: none; }
.year-filter__toggle { display: none; }

/* ============================================================
   Exhibition Archive — full-width layout
   (body class set on /all-exhibitions/, /YYYY/, /category/exhibitions/,
    and the year-named category archives via sag_exhibition_category_body_class)
   ============================================================ */
.post-type-archive-exhibition #content.site-content {
	max-width: none;
	padding: 0;
	margin: 0;
}

/* Current / Upcoming feature bands */
.exhibition-feature {
	background: var(--color-light-grey);
	padding: 2.5rem var(--gutter);
}

.exhibition-feature + .exhibition-feature {
	border-top: 1px solid var(--color-border);
}

.exhibition-feature__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.exhibition-feature__label {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-mid-grey);
	margin: 0 0 1.5rem;
}

.exhibition-feature__poster { text-align: center; }
.exhibition-feature__poster a { display: inline-block; }

.exhibition-feature__img {
	display: block;
	max-height: 520px;
	width: auto;
	max-width: 100%;
	margin: 0 auto;
}

/* Past Exhibits section */
.past-exhibitions-wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 3rem var(--gutter) 4rem;
}

.past-exhibitions__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
	padding-bottom: 1rem;
	margin-bottom: 2rem;
}

.past-exhibits-label {
	font-size: 0.7rem;
	font-weight: 300;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-mid-grey);
	margin: 0;
}

/* Year filter — plain text links, pinned to the right of the header row.
   position: relative is required so the mobile dropdown (.year-filter__list)
   can be absolutely positioned against it. */
.year-filter {
	flex: 0 0 auto;
	margin-left: auto;
	position: relative;
}

.year-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
	align-items: center;
}

.year-filter__link {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 300;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-mid-grey);
	transition: color 0.15s;
}

.year-filter__link:hover,
.year-filter__link--active {
	color: var(--color-black);
}

.year-filter__link:hover { text-decoration: underline; }

/* Exhibition card grid */
.exhibition-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem 1.5rem;
	align-content: start;
}

.exhibition-pagination {
	grid-column: 1 / -1;
	margin-top: 0.5rem;
}

.exhibition-card { display: flex; flex-direction: column; }

.exhibition-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--color-black);
	text-decoration: none;
}

.exhibition-card__link:hover .exhibition-card__title { text-decoration: underline; }

.exhibition-card__thumb {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--color-light-grey);
	margin-bottom: 0.75rem;
}

.exhibition-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.exhibition-card__link:hover .exhibition-card__img { transform: scale(1.03); }

.exhibition-card__no-img {
	width: 100%;
	height: 100%;
	background: var(--color-light-grey);
}

.exhibition-card__body { flex: 1; }

.exhibition-card__title {
	font-size: 0.9rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
	line-height: 1.3;
}

.exhibition-card__excerpt {
	font-size: 0.82rem;
	color: #555;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ============================================================
   Single Exhibition
   ============================================================ */
.single-exhibition #content.site-content {
	max-width: none;
	padding: 0;
	margin: 0;
}

.exhibition-single__topbar {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1.25rem var(--gutter) 0;
	text-align: right;
}

.exhibition-single__back {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-mid-grey);
	transition: color 0.15s;
}

.exhibition-single__back:hover {
	color: var(--color-black);
	text-decoration: none;
}

/* Carousel */
.ex-carousel {
	background: var(--color-light-grey);
	padding: 2.5rem var(--gutter) 1.5rem;
	margin-top: 1.25rem;
}

.ex-carousel__stage {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
}

.ex-carousel__track {
	position: relative;
	min-height: 200px;
}

.ex-carousel__slide { display: none; text-align: center; }
.ex-carousel__slide.is-active { display: block; }

.ex-carousel__img {
	display: inline-block;
	max-width: 100%;
	max-height: 560px;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: opacity 0.2s;
}

.ex-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 2.5rem;
	line-height: 1;
	color: var(--color-mid-grey);
	cursor: pointer;
	padding: 0 0.5rem;
	transition: color 0.15s;
	z-index: 2;
}

.ex-carousel__arrow:hover { color: var(--color-black); }
.ex-carousel__arrow--prev { left: -2.5rem; }
.ex-carousel__arrow--next { right: -2.5rem; }

.ex-carousel__footer {
	max-width: 800px;
	margin: 1rem auto 0;
	text-align: center;
}

.ex-carousel__caption {
	font-size: 0.82rem;
	color: var(--color-mid-grey);
	font-style: italic;
	min-height: 1.2em;
	margin: 0 0 0.75rem;
}

.ex-carousel__dots {
	display: flex;
	justify-content: center;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.ex-carousel__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-border);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.15s;
}

.ex-carousel__dot.is-active,
.ex-carousel__dot:hover { background: var(--color-black); }

/* Content body */
.exhibition-single__body {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2.5rem var(--gutter) 4rem;
}

.exhibition-single__title {
	font-size: 1.6rem;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.2;
	margin-bottom: 0.75rem;
}

.exhibition-single__meta { margin-bottom: 1.25rem; }

.exhibition-single__artist {
	font-size: 0.9rem;
	font-weight: 700;
	margin-bottom: 0.25rem;
}

.exhibition-single__meta p {
	font-size: 0.9rem;
	color: var(--color-black);
	margin-bottom: 0.2rem;
}

.exhibition-single__content {
	margin-top: 1.5rem;
	max-width: 680px;
	font-size: 0.95rem;
	line-height: 1.7;
}

.exhibition-single__content p { margin-bottom: 1em; }

/* Lightbox */
.ex-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ex-lightbox[hidden] { display: none; }

.ex-lightbox__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 90vw;
	max-height: 90vh;
}

.ex-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

.ex-lightbox__caption {
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.82rem;
	font-style: italic;
	margin-top: 0.75rem;
	text-align: center;
	min-height: 1.2em;
}

.ex-lightbox__close {
	position: fixed;
	top: 1.25rem;
	right: 1.5rem;
	background: none;
	border: none;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem;
	opacity: 0.8;
	transition: opacity 0.15s;
}

.ex-lightbox__close:hover { opacity: 1; }

.ex-lightbox__counter {
	position: fixed;
	top: 1.4rem;
	left: 1.5rem;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.8rem;
	letter-spacing: 0.05em;
}

.ex-lightbox__arrow {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	font-size: 3rem;
	line-height: 1;
	cursor: pointer;
	padding: 1rem;
	opacity: 0.6;
	transition: opacity 0.15s;
}

.ex-lightbox__arrow:hover { opacity: 1; }
.ex-lightbox__arrow--prev { left: 0.5rem; }
.ex-lightbox__arrow--next { right: 0.5rem; }

/* ============================================================
   Collection Archive / Page
   (body class .page-collection-archive added by sag_collection_page_body_class)
   ============================================================ */
.post-type-archive-collection #content.site-content,
.page-collection-archive      #content.site-content {
	max-width: none;
	padding: 0;
	margin: 0;
}

/* Grey page header band (page template only) */
.collection-page-header {
	background: var(--color-light-grey);
	padding: 3rem var(--gutter) 2.5rem;
}

.collection-page-header__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.collection-page-header__content {
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--color-black);
}

.collection-page-header__content p { margin: 0 0 0.75em; }
.collection-page-header__content p:last-child { margin-bottom: 0; }

/* CPT archive fallback header (no page content) */
.collection-archive-wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 3rem var(--gutter) 4rem;
}

.collection-archive__header { margin-bottom: 2.5rem; }

.collection-archive__title {
	font-size: 0.7rem;
	font-weight: 300;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-mid-grey);
	margin: 0;
}

/* 4-column card grid */
.collection-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 3rem 1.5rem;
	align-content: start;
}

.collection-pagination {
	grid-column: 1 / -1;
	margin-top: 1rem;
}

.collection-card { display: flex; flex-direction: column; }

.collection-card__link {
	display: flex;
	flex-direction: column;
	color: var(--color-black);
	text-decoration: none;
}

.collection-card__link:hover .collection-card__caption { text-decoration: underline; }

/* Thumb: no fixed aspect-ratio — image shows at natural proportion */
.collection-card__thumb {
	width: 100%;
	background: var(--color-light-grey);
	margin-bottom: 0.6rem;
	overflow: hidden;
}

.collection-card__img {
	display: block;
	width: 100%;
	height: auto;
	transition: opacity 0.2s;
}

.collection-card__link:hover .collection-card__img { opacity: 0.85; }

.collection-card__no-img {
	width: 100%;
	aspect-ratio: 1;
	background: var(--color-light-grey);
}

.collection-card__caption {
	font-size: 0.78rem;
	color: var(--color-mid-grey);
	line-height: 1.4;
	margin: 0;
}

/* ============================================================
   Single Collection Item
   ============================================================ */
.single-collection #content.site-content {
	max-width: none;
	padding: 0;
	margin: 0;
}

.collection-single__topbar {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1.25rem var(--gutter) 0;
	text-align: right;
}

.collection-single__back {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-mid-grey);
	transition: color 0.15s;
}

.collection-single__back:hover {
	color: var(--color-black);
	text-decoration: none;
}

/* Carousel — horizontal arrows, no dots */
.col-carousel {
	background: var(--color-light-grey);
	padding: 2.5rem var(--gutter) 1.5rem;
	margin-top: 1.25rem;
}

.col-carousel__stage {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
}

.col-carousel__track {
	text-align: center;
	min-height: 200px;
}

.col-carousel__slide { display: none; }
.col-carousel__slide.is-active { display: block; }

.col-carousel__img {
	display: inline-block;
	max-width: 100%;
	max-height: 580px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.col-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 2.5rem;
	line-height: 1;
	color: var(--color-mid-grey);
	cursor: pointer;
	padding: 0 0.5rem;
	transition: color 0.15s;
	z-index: 2;
}

.col-carousel__arrow:hover { color: var(--color-black); }
.col-carousel__arrow--prev { left: -2.5rem; }
.col-carousel__arrow--next { right: -2.5rem; }

.col-carousel__caption {
	font-size: 0.82rem;
	color: var(--color-mid-grey);
	font-style: italic;
	min-height: 1.2em;
	margin: 0.75rem auto 0;
	text-align: center;
	max-width: 760px;
}

/* Content body */
.collection-single__body {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2.5rem var(--gutter) 4rem;
}

.collection-single__title {
	font-size: 1.4rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.2;
	margin-bottom: 0.5rem;
}

.collection-single__meta { margin-bottom: 1.5rem; }

.collection-single__artist {
	font-size: 0.9rem;
	font-weight: 700;
	margin-bottom: 0.2rem;
}

.collection-single__medium,
.collection-single__dimensions {
	font-size: 0.88rem;
	color: var(--color-mid-grey);
	margin-bottom: 0.15rem;
}

.collection-single__content {
	margin-top: 1.25rem;
	font-size: 0.95rem;
	line-height: 1.7;
}

.collection-single__content p { margin-bottom: 1em; }

/* Lightbox */
.col-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.col-lightbox[hidden] { display: none; }

.col-lightbox__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 90vw;
	max-height: 90vh;
}

.col-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

.col-lightbox__caption {
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.82rem;
	font-style: italic;
	margin-top: 0.75rem;
	text-align: center;
	min-height: 1.2em;
}

.col-lightbox__close {
	position: fixed;
	top: 1.25rem;
	right: 1.5rem;
	background: none;
	border: none;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem;
	opacity: 0.8;
	transition: opacity 0.15s;
}

.col-lightbox__close:hover { opacity: 1; }

.col-lightbox__counter {
	position: fixed;
	top: 1.4rem;
	left: 1.5rem;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.8rem;
	letter-spacing: 0.05em;
}

.col-lightbox__arrow {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	font-size: 3rem;
	line-height: 1;
	cursor: pointer;
	padding: 1rem;
	opacity: 0.6;
	transition: opacity 0.15s;
}

.col-lightbox__arrow:hover { opacity: 1; }
.col-lightbox__arrow--prev { left: 0.5rem; }
.col-lightbox__arrow--next { right: 0.5rem; }

/* ============================================================
   Standard Pages, Digital Archive, Artist Talks
   (full-width layout overrides)
   ============================================================ */
.page #content.site-content,
.category-artist-talks #content.site-content {
	max-width: none;
	padding: 0;
	margin: 0;
}

/* Shared grey header band (page.php + page-va-digital-archives.php) */
.page-header-band {
	background: var(--color-light-grey);
	padding: 3rem var(--gutter) 2.5rem;
}

.page-header-band__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.page-header-band__title {
	font-size: 0.7rem;
	font-weight: 300;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-black);
	margin: 0;
}

/* Shared page content wrapper */
.page-content-wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 3rem var(--gutter) 4rem;
}

.page-content {
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--color-black);
	max-width: 720px;
}

.page-content p { margin: 0 0 1em; }
.page-content p:last-child { margin-bottom: 0; }

/* Digital Archive — stacked video embeds */
.digital-archive-content iframe {
	display: block;
	width: 100%;
	max-width: 490px;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	margin-bottom: 2.5rem;
}

.digital-archive-content .wp-block-embed,
.digital-archive-content .wp-block-embed__wrapper,
.digital-archive-content figure {
	margin: 0 0 2.5rem;
	padding: 0;
}

.digital-archive-content p:empty { display: none; }

/* ============================================================
   Gallery Page (Template: Gallery / page-gallery.php)
   ============================================================ */
.gallery-page #content.site-content,
.page-template-page-gallery #content.site-content {
	max-width: none;
	padding: 0;
	margin: 0;
}

.gallery-section-title {
	font-size: 1.1rem;
	font-weight: 300;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-black);
	margin: 0 0 1.75rem;
}

/* Contact section */
.gallery-contact {
	background: var(--color-light-grey);
	padding: 2.5rem var(--gutter) 3rem;
}

.gallery-contact__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.gallery-contact__grid {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 3rem;
	align-items: start;
}

.gallery-contact__map iframe {
	display: block;
	width: 100%;
	height: 220px;
	border: 1px solid var(--color-border);
}

.gallery-contact__info {
	font-size: 0.78rem;
	font-weight: 300;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.6;
	color: var(--color-black);
}

.gallery-contact__info p { margin: 0 0 1rem; }
.gallery-contact__info p:last-child { margin-bottom: 0; }

.gallery-info__name { font-weight: 400; }

.gallery-contact__info a { color: var(--color-black); }
.gallery-contact__info a:hover { text-decoration: underline; }

/* About section */
.gallery-about {
	background: var(--color-white);
	padding: 3rem var(--gutter) 4rem;
}

.gallery-about__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.gallery-about__content {
	font-size: 0.95rem;
	line-height: 1.75;
	color: var(--color-black);
}

.gallery-about__content p { margin: 0 0 1em; }
.gallery-about__content p:last-child { margin-bottom: 0; }

/* ============================================================
   Artist Talks Archive (/category/artist-talks/)
   ============================================================ */
.artist-talks-wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 3rem var(--gutter) 4rem;
}

.artist-talk {
	margin-bottom: 4rem;
	padding-bottom: 4rem;
	border-bottom: 1px solid var(--color-border);
}

.artist-talk:last-of-type { border-bottom: none; }

/* Video embed — constrain width, preserve 16:9 ratio */
.artist-talk__media {
	max-width: 490px;
	margin-bottom: 1.25rem;
}

.artist-talk__media iframe {
	display: block;
	width: 100%;
	max-width: 490px;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

.artist-talk__media .wp-block-embed,
.artist-talk__media .wp-block-embed__wrapper,
.artist-talk__media figure {
	margin: 0;
	padding: 0;
}

.artist-talk__title {
	font-size: 0.75rem;
	font-weight: 300;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-black);
	margin: 0 0 0.35rem;
}

.artist-talk__date {
	font-size: 0.72rem;
	color: var(--color-mid-grey);
	margin: 0 0 0.9rem;
}

.artist-talks-pagination { margin-top: 2rem; }

/* Generic "no results found" message — shared across archives */
.no-results {
	color: var(--color-mid-grey);
	font-style: italic;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
	.collection-grid { grid-template-columns: repeat(3, 1fr); }
}

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

@media (max-width: 768px) {

	/* ── Header / Primary Nav ─────────────────────────────── */
	.site-header__inner {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		gap: 0;
	}

	.nav-toggle { display: flex; }

	.site-nav {
		display: none;
		width: 100%;
		order: 3;
		border-top: 1px solid var(--color-border);
		padding: 0.25rem 0 1rem;
	}

	.site-nav.nav--open { display: block; }

	.site-nav__list {
		flex-direction: column;
		gap: 0;
		align-items: stretch;
	}

	.site-nav__list > li {
		border-bottom: 1px solid var(--color-border);
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.site-nav__list > li > a { flex: 1; padding: 0.75rem 0; }

	/* +/− submenu toggle */
	.submenu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		background: none;
		border: none;
		border-left: 1px solid var(--color-border);
		cursor: pointer;
		padding: 0 1rem;
		font-size: 1.1rem;
		line-height: 1;
		color: var(--color-black);
		align-self: stretch;
	}

	/* Submenus: static, full-width, hidden until toggled */
	.site-nav__list .sub-menu {
		position: static;
		display: none;
		flex-direction: column;
		gap: 0;
		width: 100%;
		flex-basis: 100%;
		background: var(--color-light-grey);
		border: none;
		border-top: 1px solid var(--color-border);
		min-width: 0;
		padding: 0;
	}

	/* Disable desktop hover-to-open on mobile */
	.site-nav__list > li:hover .sub-menu,
	.site-nav__list > li:focus-within .sub-menu { display: none; }

	/* Show submenu when JS adds .submenu--open */
	.site-nav__list li.submenu--open > .sub-menu { display: flex; }

	.site-nav__list .sub-menu li { border-bottom: 1px solid var(--color-border); }
	.site-nav__list .sub-menu li:last-child { border-bottom: none; }

	.site-nav__list .sub-menu li a {
		padding: 0.6rem 1.25rem;
		white-space: normal;
	}

	/* ── Year filter — collapsible dropdown ───────────────── */
	nav.year-filter {
		margin-left: auto;
		text-align: right;
	}

	.year-filter__toggle {
		display: inline-flex;
		align-items: center;
		gap: 0.4rem;
		background: none;
		border: 1px solid var(--color-border);
		cursor: pointer;
		font-size: 0.72rem;
		font-weight: 300;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--color-black);
		padding: 0.4rem 0.75rem;
	}

	.year-filter__caret {
		font-size: 0.55rem;
		transition: transform 0.2s ease;
	}

	.year-filter__toggle--open .year-filter__caret { transform: rotate(180deg); }

	/* nav.year-filter prefix needed to beat the unconditional
	   .year-filter__list rules above (specificity wins). */
	nav.year-filter .year-filter__list {
		display: none;
		flex-direction: column;
		gap: 0;
		background: var(--color-white);
		border: 1px solid var(--color-border);
		position: absolute;
		right: 0;
		left: auto;
		z-index: 100;
		min-width: 140px;
		text-align: left;
	}

	nav.year-filter .year-filter__list--open { display: flex; }

	nav.year-filter .year-filter__list li { border-bottom: 1px solid var(--color-border); }
	nav.year-filter .year-filter__list li:last-child { border-bottom: none; }

	nav.year-filter .year-filter__link {
		display: block;
		padding: 0.5rem 0.75rem;
	}

	/* ── Layout adjustments ───────────────────────────────── */
	.site-footer__inner { flex-direction: column; gap: 1.5rem; }

	.exhibition-feature { padding: 2rem var(--gutter); }

	.past-exhibitions__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.exhibition-grid { grid-template-columns: repeat(2, 1fr); }
	.collection-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }

	.page-header-band  { padding: 2rem var(--gutter) 1.75rem; }
	.page-content-wrap { padding: 2rem var(--gutter) 3rem; }

	.gallery-contact { padding: 2rem var(--gutter) 2.5rem; }
	.gallery-contact__grid { grid-template-columns: 1fr; gap: 1.5rem; }
	.gallery-contact__map iframe { height: 200px; }
	.gallery-about { padding: 2rem var(--gutter) 3rem; }

	.artist-talks-wrap { padding: 2rem var(--gutter) 3rem; }
	.artist-talk { margin-bottom: 3rem; padding-bottom: 3rem; }
	.artist-talk__media,
	.artist-talk__media iframe { max-width: 100%; }

	/* ── Single exhibition + collection carousels ─────────── */
	.ex-carousel__arrow--prev { left: -1rem; }
	.ex-carousel__arrow--next { right: -1rem; }
	.ex-carousel__img  { max-height: 400px; }
	.col-carousel__img { max-height: 420px; }
}

@media (max-width: 480px) {
	:root { --gutter: 1rem; }

	.exhibition-grid { grid-template-columns: 1fr; }
	.collection-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 0.75rem; }

	.ex-carousel__arrow { font-size: 2rem; }
	.ex-carousel__arrow--prev { left: 0; }
	.ex-carousel__arrow--next { right: 0; }
	.exhibition-single__title { font-size: 1.25rem; }

	.col-carousel__arrow { font-size: 1.6rem; }
	.collection-single__title { font-size: 1.1rem; }
}
