/*
Theme Name: Black Swabian
Theme URI: https://n-dib.net/wplug/black-swabian
Author: N-dib
Author URI: https://n-dib.net/wplug
Description: A black theme with a framed header image, blue button navigation on the left and a language list (Polylang) below it. Made for the Karl Voltz website.
Version: 0.1.2
Requires at least: 6.2
Tested up to: 7.1.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: black-swabian
*/

/*
Black Swabian WordPress Theme, (C) 2026 N-dib (https://n-dib.net/wplug)
Black Swabian is distributed under the terms of the GNU General Public License v2 or later.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*/

/* ---------- Basics ---------- */
:root {
	--bs-blue: #004080;
	--bs-blue-hover: #0a58a8;
	--bs-line: #cccccc;
	--bs-width: 1200px;
	--bs-nav: 240px;
	--bs-gap: 1.1rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #000;
	color: #fff;
	font-family: Arial, Helvetica, "Liberation Sans", sans-serif;
	font-size: 1.0625rem;
	line-height: 1.35;
}
a { color: #9fc9ff; text-underline-offset: 0.18em; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #ffd966; outline-offset: 2px; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0; padding: 0.7rem 1.1rem; z-index: 100;
	left: 0.5rem; top: 0.5rem; background: #fff; color: #000; text-decoration: none;
}

/* ---------- Page frame ---------- */
.bs-page { max-width: var(--bs-width); margin: 0 auto; padding: 1.25rem 1rem 0; }
.bs-header { border-top: 5px solid var(--bs-line); border-bottom: 3px solid var(--bs-line); margin: 0 0 1.4rem; }
.bs-header a { display: block; }
.bs-header img { display: block; width: 100%; height: auto; }
.bs-header__title { margin: 0; padding: 1.5rem 0; font-size: 1.8rem; letter-spacing: 0.1em; }
.bs-layout { display: grid; grid-template-columns: var(--bs-nav) minmax(0, 1fr); gap: 0 var(--bs-gap); align-items: start; }
.bs-main { min-width: 0; }

/* ---------- Navigation ---------- */
.bs-nav ul { list-style: none; margin: 0; padding: 0; }
.bs-nav li { margin: 0 0 2px; }
.bs-nav a {
	display: block; padding: 0.28rem 0.9rem; background: var(--bs-blue); border: 1px solid #fff; border-radius: 4px;
	color: #fff; text-decoration: none; text-shadow: 1px 1px 1px #000; font-size: 1rem; line-height: 1.3;
}
.bs-nav a:hover, .bs-nav .current-menu-item > a, .bs-nav .current_page_item > a { background: var(--bs-blue-hover); }
.bs-nav-toggle { display: none; }
.bs-rule { margin: 0.45rem 0 0.6rem; height: 6px; border-top: 2px solid #fff; border-bottom: 2px solid var(--bs-line); }
.bs-changed { margin: 0; font-size: 0.75rem; color: #f4e3a4; }
.bs-lang { list-style: none; margin: 4.2rem 0 0; padding: 0; }
.bs-lang li { margin: 0 0 0.45rem; }
.bs-lang a { color: #fff; text-decoration: none; }
.bs-lang a:hover { text-decoration: underline; }
.bs-lang .current-lang a { font-weight: 700; }

/* ---------- Content ---------- */
.bs-title {
	margin: 0 0 1.1rem; font-size: 1.45rem; font-weight: 700; letter-spacing: 0.17em; line-height: 1.2;
	color: #e6e6e6; text-shadow: 1px 1px 1px #777;
}
.entry-content > * { margin-top: 0; margin-bottom: 0.9rem; }
.entry-content h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.7rem; }
.entry-content h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.5rem; }
.entry-content p { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.3rem; }
.bs-large { font-size: 1.2rem; }
.bs-small { font-size: 0.85rem; color: #ddd; }
.entry-content figure { margin: 0; }
.entry-content img { display: block; }
.entry-content a[href$=".jpg"] > img, .entry-content a[href$=".jpeg"] > img, .entry-content a[href$=".png"] > img,
.entry-content a[href$=".webp"] > img, .entry-content a[href$=".gif"] > img { cursor: zoom-in; }
.bs-row { gap: 1.2rem; align-items: flex-end; }
.bs-gallery { gap: 1.8rem 4%; }
.bs-gallery img { border: 1px dashed #b3001b; }
.bs-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100%; height: auto; }
.wp-block-gallery { display: flex; flex-wrap: wrap; }
.wp-block-gallery.columns-3 > .wp-block-image { width: calc(33.333% - 2.7%); flex: 0 0 auto; }

/* ---------- Footer ---------- */
.bs-footer { display: grid; grid-template-columns: var(--bs-nav) minmax(0, 1fr); gap: 0 var(--bs-gap); margin-top: 3.2rem; }
.bs-footer p { grid-column: 2; margin: 0; font-size: 0.8rem; color: #eee; }
.bs-bar { border-top: 5px solid var(--bs-line); margin-top: 2.2rem; height: 3.5rem; }

/* ---------- Narrow screens ---------- */
@media (max-width: 800px) {
	.bs-layout, .bs-footer { grid-template-columns: minmax(0, 1fr); }
	.bs-footer p { grid-column: 1; }
	.bs-side { margin-bottom: 1.2rem; }
	.js .bs-nav-toggle {
		display: block; width: 100%; text-align: left; font: inherit; cursor: pointer; padding: 0.4rem 0.9rem;
		background: var(--bs-blue); color: #fff; border: 1px solid #fff; border-radius: 4px; margin-bottom: 2px;
	}
	.js .bs-nav { display: none; }
	.js .bs-side.is-open .bs-nav { display: block; }
	.bs-lang { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-top: 1rem; }
	.bs-lang li { margin: 0; }
	.wp-block-gallery.columns-3 > .wp-block-image { width: calc(50% - 2%); }
}
@media (max-width: 520px) {
	.wp-block-gallery.columns-3 > .wp-block-image { width: 100%; }
}

/* ---------- Lightbox: counter, previous, next and close above the picture, caption below ---------- */
.bs-lb[hidden] { display: none; }
.bs-lb { position: fixed; inset: 0; z-index: 9999; display: flex; padding: 1rem; background: rgba(0, 0, 0, 0.94); overflow: auto; }
.bs-lb__stage { display: flex; flex-direction: column; align-items: center; margin: auto; max-width: 100%; }
.bs-lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; height: 4rem; }
.bs-lb__group { display: flex; align-items: center; gap: 0.5rem; }
.bs-lb__count { padding: 0.4rem 0.85rem; border-radius: 999px; background: #1c2f4a; color: #fff; font-size: 0.95rem; line-height: 1.2; }
.bs-lb__btn {
	display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; cursor: pointer;
	border: 1px solid #fff; border-radius: 50%; background: var(--bs-blue); color: #fff;
}
.bs-lb__btn:hover { background: var(--bs-blue-hover); }
.bs-lb__img { display: block; max-width: calc(100vw - 2rem); max-height: calc(100vh - 9rem); width: auto; height: auto; }
.bs-lb__caption { margin: 0.8rem 0 0; color: #fff; font-size: 1rem; text-align: center; }
.bs-lb__caption[hidden] { display: none; }
body.bs-lb-open { overflow: hidden; }
