/*
Theme Name: Galerie 3000
Theme URI: https://galerie3000.ch
Author: Galerie 3000
Description: Klares, zeitgemässes Block-Theme für die Galerie 3000 in Bern. Viel Weissraum, grosse Grotesk-Titel, ein Akzent in Ultramarin. Lokal eingebundene Schriften (Inter, Space Grotesk), kein Google-Fonts-Abruf.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: galerie3000
Tags: block-theme, full-site-editing, one-column, wide-blocks, portfolio, blog
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
::selection { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

img { height: auto; }

/* ---------- Kopfzeile ---------- */
.g3-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .g3-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .g3-header { top: 46px; } }

.g3-header .wp-block-site-title a { text-decoration: none; }
.g3-mark {
	display: inline-block;
	color: var(--wp--preset--color--accent);
}

/* Lange Untermenüs (KünstlerInnen) bleiben bedienbar */
.g3-header .wp-block-navigation__submenu-container {
	max-height: min(70vh, 640px);
	overflow-y: auto;
	min-width: 280px !important;
	padding: 0.5rem 0 !important;
	border: 1px solid var(--wp--preset--color--line) !important;
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.25);
}
.g3-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.35rem 1.1rem !important;
}
.g3-header .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent); }

.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0.6rem !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	columns: 2 220px;
	column-gap: 1.5rem;
	display: block !important;
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- Kicker / Labels ---------- */
.is-style-kicker {
	font-size: var(--wp--preset--font-size--x-small) !important;
	color: var(--wp--preset--color--subtle);
}
.is-style-kicker,
.g3-kicker {
	font-family: var(--wp--preset--font-family--display);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ---------- Beitragsraster ---------- */
.g3-grid .wp-block-post-featured-image {
	overflow: hidden;
	background: var(--wp--preset--color--muted);
}
.g3-grid .wp-block-post-featured-image img {
	transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.g3-grid .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.g3-grid .wp-block-post-title a { text-decoration: none; }
.g3-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }

/* Beiträge ohne Bild bekommen eine ruhige Farbfläche statt eines Lochs */
.g3-grid .wp-block-post:not(:has(.wp-block-post-featured-image)) .wp-block-post-title {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 3px solid var(--wp--preset--color--accent);
}

/* ---------- KünstlerInnen-Index ---------- */
.g3-index .wp-block-page-list,
.g3-index ul {
	list-style: none;
	padding: 0;
	margin: 0;
	columns: 3 220px;
	column-gap: var(--wp--preset--spacing--50);
}
.g3-index li {
	break-inside: avoid;
	padding: 0.45rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.g3-index li a {
	text-decoration: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.g3-index li a::after { content: "→"; opacity: 0; transition: opacity .2s, transform .2s; }
.g3-index li a:hover { color: var(--wp--preset--color--accent); }
.g3-index li a:hover::after { opacity: 1; transform: translateX(3px); }
.g3-index li ul { display: none; }

/* ---------- Inhalt ---------- */
.entry-content > p:first-child:not(:only-child) {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.45;
}
.entry-content a img { transition: opacity .2s; }
.entry-content a:hover img { opacity: 0.9; }

/* Ältere Beiträge mit losen Flickr-Bildern ordentlich anzeigen */
.entry-content p > a > img,
.entry-content p > img {
	display: inline-block;
	max-width: 100%;
	vertical-align: top;
	margin: 0 0.5rem 0.5rem 0;
}

.wp-block-separator { border-top-width: 1px !important; }

.wp-block-image.is-style-frame img {
	background: #fff;
	padding: clamp(0.75rem, 3vw, 2rem);
	box-shadow: 0 1px 0 var(--wp--preset--color--line), 0 20px 40px -28px rgba(0,0,0,.35);
}

/* ---------- Fusszeile ---------- */
.g3-footer a { text-decoration: none; }
.g3-footer a:hover { text-decoration: underline; }
.g3-footer .g3-bignum {
	font-feature-settings: "tnum";
	line-height: 0.8;
	letter-spacing: -0.06em;
	white-space: nowrap;
	overflow: hidden;
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

.g3-footer .is-style-kicker { color: color-mix(in srgb, var(--wp--preset--color--base) 60%, transparent); }
.g3-footer ul { list-style: none; }
