/*
Theme Name: Harthaven
Description: Theme for the Harthaven Community Association. A child of Twenty Twenty-Five, so WordPress keeps the underlying theme updated; this adds only Harthaven's colors, fonts, and layouts.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: harthaven
*/

/* Most styling lives in theme.json (editable under Appearance → Editor → Styles).
   This file holds the few things theme.json can't express. */

/* Fallbacks for color/font names that Twenty Twenty-Five's own styles refer to */
:root {
	--wp--preset--color--base: var(--wp--preset--color--paper);
	--wp--preset--color--contrast: var(--wp--preset--color--ink);
	--wp--preset--color--accent-1: var(--wp--preset--color--sand);
	--wp--preset--color--accent-2: var(--wp--preset--color--sand);
	--wp--preset--color--accent-3: var(--wp--preset--color--navy);
	--wp--preset--color--accent-4: var(--wp--preset--color--muted);
	--wp--preset--color--accent-5: var(--wp--preset--color--sand);
	--wp--preset--color--accent-6: var(--wp--preset--color--rule);
	--wp--preset--font-family--manrope: var(--wp--preset--font-family--body);
	--wp--preset--font-family--fira-code: ui-monospace, Menlo, monospace;
}

/* ---------- Header ---------- */
.hh-header .wp-block-navigation a { white-space: nowrap; }
.hh-header .wp-block-navigation .current-menu-item > a,
.hh-header .wp-block-navigation a[aria-current="page"] {
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--red);
}
.hh-header .wp-block-site-logo img { height: 52px; width: auto; }
@media (max-width: 640px) {
	.hh-header .wp-block-site-logo img { height: 40px; }
}

/* ---------- Space between a page title and its first block ---------- */
.wp-block-post-title + .wp-block-post-content { margin-top: var(--wp--preset--spacing--50); }

/* ---------- Red rule under page titles ---------- */
h1.wp-block-post-title::after,
.wp-block-post-content > h1.wp-block-heading:first-of-type::after,
h1.is-style-rule::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	background: var(--wp--preset--color--red);
	margin-top: 20px;
}

/* ---------- Main artwork at the top of an artist profile ---------- */
.single main > .wp-block-post-featured-image { text-align: center; }
.single main > .wp-block-post-featured-image img {
	display: inline-block;
	width: auto;
	max-width: 100%;
	max-height: 60vh;
	border-radius: 4px;
}

/* ---------- Byline (block style on Paragraph) ---------- */
.is-style-byline {
	color: var(--wp--preset--color--muted);
	font-style: italic;
}

/* ---------- Indented clauses (Architectural Guidelines). Add hh-indent-1/2/3
   under Block → Advanced → Additional CSS class ---------- */
.hh-indent-1 { margin-left: 1.5em !important; }
.hh-indent-2 { margin-left: 3em !important; }
.hh-indent-3 { margin-left: 4.5em !important; }
@media (max-width: 640px) {
	.hh-indent-1 { margin-left: .75em !important; }
	.hh-indent-2 { margin-left: 1.5em !important; }
	.hh-indent-3 { margin-left: 2.25em !important; }
}

/* ---------- Artwork hover zoom ---------- */
.wp-block-gallery:not(.is-style-slideshow) .wp-block-image,
.hh-people .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 4px;
}
.wp-block-gallery:not(.is-style-slideshow) .wp-block-image img,
.hh-people .wp-block-post-featured-image img {
	transition: transform .4s ease;
}
.wp-block-gallery:not(.is-style-slideshow) .wp-block-image:hover img,
.hh-people .wp-block-post-featured-image:hover img {
	transform: scale(1.04);
}

/* ---------- Document lists (File blocks) ---------- */
.wp-block-file,
.wp-block-file:not(.wp-element-button) {
	font-size: inherit;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 12px 0;
	margin: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}
.wp-block-file > a:first-child { font-weight: 600; text-decoration: none; }
.wp-block-file > a:first-child:hover { text-decoration: underline; }
.wp-block-file .hh-file-meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	white-space: nowrap;
	margin-left: auto;
}
.wp-block-file .wp-block-file__button { display: none; }

/* ---------- Tables (board lists, exhibitions) ---------- */
.wp-block-table table { border-collapse: collapse; }
.wp-block-table td, .wp-block-table th {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding: 8px 16px 8px 0;
	text-align: left;
	vertical-align: top;
}
.wp-block-table thead { border-bottom: 1px solid var(--wp--preset--color--navy); }
.wp-block-table th { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--wp--preset--color--muted); }

/* ---------- Password form (Member Area) ---------- */
.post-password-form { max-width: 460px; margin-left: 0 !important; }
.post-password-form p:first-child { color: var(--wp--preset--color--muted); }
.post-password-form label { display: grid; gap: 6px; font-weight: 600; }
.post-password-form input[type="password"] {
	font: inherit;
	font-size: 18px;
	padding: 10px 12px;
	border: 1.5px solid #b9b2a5;
	border-radius: 6px;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}
.post-password-form input[type="submit"] {
	margin-top: 14px;
	font: inherit;
	font-weight: 600;
	font-size: 18px;
	padding: 11px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--navy);
	color: #fff;
	cursor: pointer;
}
.post-password-form input[type="submit"]:hover { background: var(--wp--preset--color--red); }

/* ---------- Member Area sidebar ---------- */
.hh-member-nav {
	border-left: 1px solid var(--wp--preset--color--rule);
	padding-left: 24px;
}
.hh-member-nav .wp-block-navigation__container { gap: 2px !important; }
.hh-member-nav .wp-block-navigation-item a { padding: 3px 0; }
.hh-member-nav .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--red); }
.hh-member-nav h2 {
	font-family: var(--wp--preset--font-family--body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 22px 0 6px;
}
@media (max-width: 781px) {
	.hh-member-nav { border-left: 0; padding-left: 0; border-top: 1px solid var(--wp--preset--color--rule); padding-top: 24px; }
}

/* ---------- Gallery slideshow (Gallery block, style "Slideshow") ----------
   Without JavaScript this stays an ordinary gallery. assets/js/slideshow.js adds .is-ready. */
.is-style-slideshow.is-ready {
	position: relative;
	display: block !important;
	width: 100%;
	aspect-ratio: 16 / 8;
	max-height: 72vh;
	overflow: hidden;
	background: var(--wp--preset--color--navy);
	border-radius: 6px;
	margin-top: 0;
}
.is-style-slideshow.is-ready > .wp-block-image {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100%;
	margin: 0 !important;
	opacity: 0;
	transition: opacity 1.4s ease;
}
.is-style-slideshow.is-ready > .wp-block-image.is-active { opacity: 1; }
.is-style-slideshow.is-ready .hh-backdrop {
	position: absolute;
	inset: -40px;
	background-size: cover;
	background-position: center;
	filter: blur(28px) brightness(.7) saturate(1.1);
}
.is-style-slideshow.is-ready > .wp-block-image img {
	position: relative;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
	flex: none;
}
.wp-block-gallery.has-nested-images.is-style-slideshow.is-ready > figure.wp-block-image figcaption {
	position: absolute;
	inset: auto auto 16px 20px;
	width: auto;
	max-height: none;
	overflow: visible;
	padding: 0;
	margin: 0;
	background: none;
	text-align: left;
	color: #fff;
	font-size: 14px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
/* WordPress adds a blurred strip behind gallery captions; not wanted here */
.wp-block-gallery.has-nested-images.is-style-slideshow.is-ready > figure.wp-block-image:has(figcaption)::before { display: none; }
.hh-slide-controls {
	position: absolute;
	right: 16px;
	bottom: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-size: 14px;
}
.hh-slide-controls button {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	font-size: 16px;
	line-height: 1;
}
.hh-slide-controls button:hover { background: rgba(255, 255, 255, .35); }
.hh-slide-controls .hh-count { min-width: 52px; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
/* If "Expand on click" is on for a slide, keep its wrapper filling the frame */
.is-style-slideshow.is-ready .wp-lightbox-container { position: relative; width: 100%; height: 100%; }
@media (max-width: 640px) {
	.is-style-slideshow.is-ready { aspect-ratio: 4 / 3; border-radius: 0; }
	.wp-block-gallery.has-nested-images.is-style-slideshow.is-ready > figure.wp-block-image figcaption { bottom: 58px; left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.is-style-slideshow.is-ready > .wp-block-image { transition: none; }
}
