/**
 * philsite.css — layout for the CPT archive/single templates
 * (Publications, Talks, Research topics).
 *
 * These views are template-driven (they can't hold WPBakery content), so this stylesheet
 * makes them inherit Ohio's theme tokens — font, accent, borders, spacing — and adopt the
 * large, minimalist scale of the "Creative Agency" demo so they sit alongside the
 * WPBakery-built pages seamlessly. It intentionally sets NO font-family or background:
 * both flow from the active Ohio theme (works in light + dark).
 */

.philsite {
	--ps-accent: var(--clb-color-primary, #3f5d4e);
	--ps-line:   var(--clb-color-border, rgba(128,128,128,.28));
	--ps-radius: var(--clb-border-radius, 6px);

	max-width: 1040px;
	margin: 0 auto;
}

/* ---------- shared type ---------- */
.philsite-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ps-accent);
	margin: 0 0 1em;
}
.philsite-eyebrow a { color: inherit; text-decoration: none; }
.philsite h1 {
	font-size: clamp(2.2rem, 6vw, 4rem);
	line-height: 1.04;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 0.3em;
}
.philsite h2 { font-weight: 700; letter-spacing: -0.01em; }
.philsite-lede {
	font-size: clamp(1.05rem, 1.6vw, 1.35rem);
	line-height: 1.5;
	max-width: 60ch;
	opacity: 0.72;
}

/* ---------- buttons ---------- */
.philsite-btn {
	display: inline-block;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--ps-accent);
	color: #fff;
	border: 1px solid var(--ps-accent);
	transition: opacity .2s ease;
}
.philsite-btn:hover { opacity: 0.85; }
.philsite-btn--ghost { background: transparent; color: var(--ps-accent); }
.philsite-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- archive headers ---------- */
.philsite-archive__head {
	padding: 24px 0 40px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--ps-line);
}
.philsite-block { margin: 64px 0; }
.philsite-block__head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
	margin-bottom: 8px;
}
.philsite-block__head h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.philsite-block__head a { text-decoration: none; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- lists (publications / talks / topic groups) ---------- */
.philsite-list { list-style: none; margin: 0; padding: 0; }
.philsite-list__item {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px;
	padding: 26px 0; border-bottom: 1px solid var(--ps-line);
	transition: padding-left .25s ease;
}
.philsite-list__item:hover { padding-left: 10px; }
.philsite-list__main { flex: 1 1 60%; min-width: 0; }
.philsite-list__title {
	display: block; text-decoration: none; font-weight: 600;
	font-size: clamp(1.15rem, 2.2vw, 1.6rem); line-height: 1.2;
}
.philsite-list__title:hover { color: var(--ps-accent); }
.philsite-list__meta { display: block; margin-top: 6px; font-size: 0.9rem; opacity: 0.6; }
.philsite-list__link { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; white-space: nowrap; }
.philsite-badge {
	font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	padding: 5px 12px; border-radius: 999px; border: 1px solid var(--ps-line); white-space: nowrap;
	align-self: center;
}

/* ---------- publication status sections ---------- */
.philsite-pub-group { margin: 0 0 48px; }
.philsite-pub-group:last-child { margin-bottom: 0; }
.philsite-pub-group__title {
	margin: 0 0 4px; font-size: clamp(1.25rem, 2.2vw, 1.7rem); line-height: 1.2;
	color: #925f8d;
}
.philsite-pub-group__title::before {
	content: ""; display: inline-block; width: 22px; height: 2px; margin-right: 12px;
	vertical-align: middle; background: #925f8d;
}

/* Inline status label on a single publication (shown when not "Published") */
.philsite-status { color: #925f8d; font-weight: 700; }

/* ---------- research-area group headings (Primary / Secondary) ---------- */
.philsite-ra-group {
	margin: 0 0 6px; font-size: 0.82rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.14em;
}
.philsite-ra-group--primary { color: var(--clb-color-primary, #925f8d); }
.philsite-ra-group--secondary { margin-top: 48px; opacity: 0.7; }

/* ---------- filters ---------- */
.philsite-filter { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; }
.philsite-filter a {
	text-decoration: none; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
	padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.philsite-filter a:hover { border-bottom-color: var(--ps-accent); color: var(--ps-accent); }

/* ---------- single article ---------- */
.philsite-article { max-width: 760px; }
.philsite-article__head { padding: 24px 0 8px; }
.philsite-article__meta { font-size: 0.95rem; opacity: 0.6; margin-top: 6px; }
.philsite-body, .philsite-abstract, .philsite-cite { margin: 40px 0; font-size: 1.08rem; line-height: 1.7; }
.philsite-abstract h2, .philsite-cite h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ps-accent); }
.philsite-abstract p { border-left: 2px solid var(--ps-accent); padding-left: 20px; opacity: 0.9; }
.philsite-cite__text { padding: 16px 20px; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); font-size: 0.98rem; }
.philsite-bibtex {
	background: var(--clb-color-neutral, rgba(128,128,128,.08));
	border: 1px solid var(--ps-line); border-radius: var(--ps-radius);
	padding: 16px 18px; overflow-x: auto; font-size: 0.82rem;
}
/* Page header description (intro shown below the header, above content) */
.philsite-page-intro {
	max-width: 760px; margin: 0 auto 40px;
	font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; opacity: 0.72;
	text-align: center;
}
.philsite-page-intro p:last-child { margin-bottom: 0; }

/* Page banner (image chosen in the page settings) */
.philsite-banner { margin: 8px 0 24px; }
.philsite-banner img {
	display: block; width: 100%; height: auto;
	max-height: 460px; object-fit: cover; border-radius: 24px;
}

/* Banner placeholder (e.g. About page hero) — swap for a real banner image later */
.philsite-banner-placeholder {
	display: flex; align-items: center; justify-content: center;
	min-height: 340px; margin: 8px 0 24px;
	border: 2px dashed var(--clb-color-border, rgba(128,128,128,.4));
	border-radius: 24px;
	background: var(--clb-color-neutral, rgba(128,128,128,.06));
}
.philsite-banner-placeholder span {
	text-transform: uppercase; letter-spacing: 0.14em;
	font-size: 0.8rem; font-weight: 600; opacity: 0.55;
}
@media (max-width: 640px) { .philsite-banner-placeholder { min-height: 200px; } }

/* Utility: hide a section on the front end while keeping its content in the page (reversible) */
.philsite-hidden { display: none !important; }

/* Project grids (home "Recent Projects" and the Projects page): halve each project card's
   image height. Ohio renders the card image as a full-width square via
   `.image-holder { padding-bottom: 100% }`; overriding that aspect control to 50% makes a
   2:1 band (half the height, image cover-cropped). Scoped to the two pages that carry this
   grid (page-id-14 = Home, page-id-228613 = Projects), and applied to the grid's aspect rule
   so current AND future projects are capped to the same height.
   NB: only the .image-holder box is resized — the image inside is absolutely positioned and
   object-fit:cover, so it fills the shorter box automatically. (Do NOT add padding-bottom to
   the <img>: with border-box that padding consumes the image's height and it vanishes.) */
.page-id-14 .portfolio-projects .card.-metro:not(.-stretch) .image-holder,
.page-id-228613 .portfolio-projects .card.-metro:not(.-stretch) .image-holder {
	padding-bottom: 50% !important;
}

/* Image carousel below the Talks & Media list (managed under Talks & Media → Carousel) */
.philsite-talks-carousel { margin: 72px 0 48px; }
.philsite-talks-carousel .philsite-carousel-caption {
	margin: 12px 0 0;
	text-align: center;
	font-size: 0.9rem;
	line-height: 1.5;
	opacity: 0.75;
}

/* Cap the carousel image height and show the whole photo (never cropped), centred. */
.philsite-talks-carousel .owl-item { text-align: center; }
.philsite-talks-carousel .wpb_single_image { margin: 0; }
.philsite-talks-carousel a.philsite-lightbox-link {
	display: inline-block; max-width: 100%; cursor: zoom-in;
}
.philsite-talks-carousel .vc_single_image-wrapper { display: inline-block; max-width: 100%; }
.philsite-talks-carousel img.vc_single_image-img {
	max-height: 420px;
	width: auto !important;
	max-width: 100%;
	height: auto;
}

/* Video popup for YouTube/Vimeo links (built by philsite.js). */
.philsite-video-lightbox {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 5vh 4vw;
	background: rgba(15, 13, 20, 0.92);
	opacity: 0; visibility: hidden; transition: opacity 0.2s ease;
}
.philsite-video-lightbox.is-open { opacity: 1; visibility: visible; }
.philsite-video-frame {
	position: relative; width: min(92vw, 1120px); aspect-ratio: 16 / 9; max-height: 84vh;
	background: #000; border-radius: 12px; overflow: hidden;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
.philsite-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Full-screen lightbox popup for the carousel photos (built by philsite.js). */
.philsite-lightbox {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 4vh 4vw;
	background: rgba(15, 13, 20, 0.92);
	opacity: 0; visibility: hidden; transition: opacity 0.2s ease;
}
.philsite-lightbox.is-open { opacity: 1; visibility: visible; }
.philsite-lightbox__figure {
	margin: 0; max-width: 100%; max-height: 100%;
	display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.philsite-lightbox__img {
	max-width: 92vw; max-height: 84vh; width: auto; height: auto;
	border-radius: 12px; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5); background: #1c1a22;
}
.philsite-lightbox__caption {
	color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; line-height: 1.5;
	text-align: center; max-width: 800px;
}
.philsite-lightbox__btn {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255, 255, 255, 0.12); color: #fff;
	font-size: 26px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.15s ease;
}
.philsite-lightbox__btn:hover { background: rgba(255, 255, 255, 0.24); }
.philsite-lightbox__btn[hidden] { display: none; }
.philsite-lightbox__prev { left: 3vw; }
.philsite-lightbox__next { right: 3vw; }
.philsite-lightbox__close { top: 3vh; right: 3vw; transform: none; width: 46px; height: 46px; font-size: 22px; }
@media (max-width: 640px) {
	.philsite-lightbox__prev { left: 1vw; }
	.philsite-lightbox__next { right: 1vw; }
	.philsite-lightbox__btn { width: 42px; height: 42px; font-size: 22px; }
}

/* Portrait image (Researcher Profile → Portrait), e.g. beside the About heading */
.philsite-portrait { margin: 0 0 16px; }
.philsite-portrait img {
	display: block; width: 100%; height: auto;
	aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px;
}
.philsite-portrait-placeholder {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 4 / 5; width: 100%;
	border: 2px dashed var(--clb-color-border, rgba(128,128,128,.4));
	border-radius: 24px;
	background: var(--clb-color-neutral, rgba(128,128,128,.06));
}
.philsite-portrait-placeholder span {
	text-transform: uppercase; letter-spacing: 0.14em;
	font-size: 0.8rem; font-weight: 600; opacity: 0.55;
}

/* BibTeX: click to copy the snippet to the clipboard (never shown inline) */
.philsite-bibtex-copy {
	margin-top: 14px; cursor: pointer; font-family: inherit; line-height: 1;
	font-size: 0.78rem; padding: 10px 20px;
}
.philsite-bibtex-copy::before { content: "{ } "; opacity: .6; }
.philsite-bibtex-copy.is-copied { opacity: .85; }
.philsite-tags {
	margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--ps-line);
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 0.82rem;
}
.philsite-tags span { text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.5; }
.philsite-tags a {
	text-decoration: none; padding: 5px 14px; border: 1px solid var(--ps-line); border-radius: 999px;
}
.philsite-tags a:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.philsite-featured img { width: 100%; height: auto; border-radius: var(--ps-radius); margin: 24px 0; }

/* ---------- Research page: Current projects / working papers ---------- */
.philsite-current-projects { margin: 8px 0 0; }
.philsite-cp-group {
	font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
	opacity: 0.6; margin: 20px 0 8px;
}
.philsite-cp-list { list-style: none; padding: 0; margin: 0 0 8px; }
.philsite-cp-list li {
	padding: 9px 0; line-height: 1.5;
	border-bottom: 1px solid var(--ps-line, rgba(128, 128, 128, 0.18));
}
.philsite-cp-list li:last-child { border-bottom: 0; }
.philsite-cp-meta { display: block; font-size: 0.85rem; opacity: 0.6; margin-top: 2px; }

/* ---------- Academic profiles row ---------- */
.philsite-profiles {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.philsite-profiles a {
	display: inline-block; padding: 8px 18px; text-decoration: none; font-size: 0.9rem;
	border: 1px solid var(--ps-line, rgba(128, 128, 128, 0.35)); border-radius: 999px;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.philsite-profiles a:hover { border-color: var(--ps-accent, #635d6f); color: var(--ps-accent, #635d6f); }

/* ---------- CV auto-lists ---------- */
.philsite-cv-section { margin: 48px 0; }
.philsite-cv-section h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 12px; }
.philsite-cv-pubs, .philsite-cv-talks { padding-left: 1.3em; }
.philsite-cv-pubs li, .philsite-cv-talks li { margin-bottom: 12px; line-height: 1.55; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
	.philsite-list__item { flex-direction: column; }
	.philsite-badge { align-self: flex-start; }
}

/* ---------- CF7 form privacy notice (UK GDPR/PECR transparency) ---------- */
.wpcf7 .form-privacy-note {
	font-size: 0.8rem;
	line-height: 1.5;
	opacity: 0.72;
	margin: 0.75rem 0 1rem;
}
.wpcf7 .form-privacy-note a { text-decoration: underline; }

/* PhilSite: distance between the language dropdown and the "Get in Touch" button. */
.menu-optional > li.button-group { margin-left: 1.5rem; }
.menu-optional .lang-dropdown { margin-right: .25rem; }

/* PhilSite: cookie consent banner — two buttons. */
.philsite-cookie-consent[hidden] { display: none !important; }
.philsite-cookie-consent .alert { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.philsite-cookie-consent .alert-message { margin: 0; }
.philsite-cookie-actions { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
.philsite-cookie-actions .philsite-cookie-btn { white-space: nowrap; margin: 0; }

/* PhilSite: mobile slide-in menu (header-3 `.menu-slide-in-overlay`). The theme echoes the
   site-footer copyright block into this menu. Keep it to: nav + language dropdown + social icons.
   - Hide the footer links (Privacy Policy, Sitemap), the crawlable "English" language link and the
     copyright line INSIDE the menu only — the real page footer keeps all of them.
   - Keep the 4 social icons.
   - Put the language dropdown directly under the menu (below Contact) and the social icons at the
     bottom, via flex order on `.holder`.
   (`.hamburger-nav` selectors kept as a harmless defensive fallback for the alternate popup.) */
.menu-slide-in-overlay .copyright > p:has(.philsite-footer-nav),
.menu-slide-in-overlay .philsite-footer-nav,
.menu-slide-in-overlay .philsite-footer-copy,
.hamburger-nav .philsite-footer-nav,
.hamburger-nav .philsite-footer-copy { display: none !important; }

.menu-slide-in-overlay .holder { display: flex; flex-direction: column; }
.menu-slide-in-overlay .holder > .nav-container { order: 0; }
.menu-slide-in-overlay .holder > .lang-dropdown { order: 1; margin: 20px 0 4px; }
.menu-slide-in-overlay .holder > .copyright { order: 2; }
