/*
Theme Name: TVL Karate
Description: Schlankes Block-Theme für TVL Karate e.V. (Nachbau des früheren Thrive-Designs). Bearbeitung komplett über den WordPress-Website-Editor, ohne Page-Builder.
Author: TVL Karate e.V.
Version: 1.0.6
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tvl-karate
*/

/* ---- Navigation im Header ---- */
.tvl-header .wp-block-navigation a { text-decoration: none; }
.tvl-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.tvl-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { opacity: .8; }
.tvl-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--primary) !important;
	color: #fff !important;
}

/* ---- Beitragskarten (Startseite, News) ---- */
.tvl-card { overflow: hidden; }
.tvl-card .wp-block-post-featured-image { height: 100%; margin: 0; }
.tvl-card .wp-block-post-featured-image img { height: 100%; min-height: 280px; object-fit: cover; }
.tvl-card .wp-block-post-title a { text-decoration: none; color: inherit; }
.tvl-card .wp-block-post-title a:hover { color: var(--wp--preset--color--primary); }
.tvl-card .wp-block-post-excerpt__more-link { display: none; }
@media (max-width: 781px) {
	.tvl-card .wp-block-columns { flex-direction: column-reverse; }
}

/* ---- Trainingszeiten-Tabelle ---- */
.tvl-zeiten table { border-collapse: collapse; width: 100%; }
.tvl-zeiten thead th { background: var(--wp--preset--color--primary); color: #fff; font-weight: 400; text-align: left; padding: .7em 1.5em; border: 0; }
.tvl-zeiten td { padding: .45em 1.5em; border: 0; border-left: 1px solid var(--wp--preset--color--primary-soft); border-right: 1px solid var(--wp--preset--color--primary-soft); }
.tvl-zeiten tbody tr:nth-child(even) td { background: var(--wp--preset--color--primary-soft); }
.tvl-zeiten tbody tr:last-child td { border-bottom: 1px solid var(--wp--preset--color--primary-soft); }
.tvl-zeiten td:last-child { text-align: center; }
.tvl-zeiten figcaption { display: none; }

/* ---- Bilder in Beiträgen ---- */
.wp-block-post-content .wp-block-image img { height: auto; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 0; }

/* ---- Barrierefreiheit: sichtbarer Fokus ---- */
a:focus-visible, button:focus-visible { outline: 2px solid var(--wp--preset--color--contrast); outline-offset: 2px; }
.tvl-zeiten thead { border-bottom: 0; }
.tvl-zeiten thead th:first-child { padding-left: 1.5em; }

/* ---- Footer: am Handy alles linksbündig unter dem Logo ---- */
@media (max-width: 600px) {
	.tvl-footer-links { align-items: flex-start !important; }
}

/* ---- Trainerkarten: in der schmalen Ansicht Abstand zum orangen Rahmen ---- */
@media (max-width: 781px) {
	.tvl-trainer { padding-right: 0 !important; }
	.tvl-trainer .wp-block-column:last-child { padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) var(--wp--preset--spacing--30); }
}

/* ---- Links: nie unterstrichen; beim Darüberfahren dunkleres Orange ---- */
main a:not(.wp-element-button):hover { color: #B4640A; }
footer a:hover { opacity: .8; }

/* ---------- Galerie-Großansicht (nur Galerien) ---------- */
.tvl-lb-trigger { cursor: zoom-in; }
html.tvl-lb-open, html.tvl-lb-open body { overflow: hidden; }
.tvl-lb {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .92);
	touch-action: pan-y pinch-zoom;
	-webkit-user-select: none; user-select: none;
}
.tvl-lb[hidden] { display: none; }
.tvl-lb__img {
	max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px);
	object-fit: contain; box-shadow: 0 4px 30px rgba(0,0,0,.5);
	transition: transform .15s ease-out;
}
.tvl-lb__btn {
	position: absolute; border: 0; cursor: pointer;
	background: rgba(255,255,255,.12); color: #fff;
	width: 48px; height: 48px; border-radius: 50%;
	font-size: 32px; line-height: 1; display: flex; align-items: center; justify-content: center;
	padding: 0 0 4px;
}
.tvl-lb__btn:hover, .tvl-lb__btn:focus-visible { background: var(--wp--preset--color--primary); outline: none; }
.tvl-lb__btn[hidden] { display: none; }
.tvl-lb__close { top: 14px; right: 14px; }
.tvl-lb__prev  { left: 14px; top: 50%; transform: translateY(-50%); }
.tvl-lb__next  { right: 14px; top: 50%; transform: translateY(-50%); }
.tvl-lb__counter {
	position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
	color: rgba(255,255,255,.85); font-size: 15px; pointer-events: none;
}
@media (max-width: 781px) {
	/* Auf dem Handy: Pfeile unten neben dem Zähler, damit sie das Foto nicht verdecken. */
	.tvl-lb__prev, .tvl-lb__next { top: auto; bottom: 8px; transform: none; }
}

/* Beiträge, die auf eine fremde Seite führen */
.tvl-extern-pfeil { font-size: .8em; color: var(--wp--preset--color--primary); }
.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
