/*
Theme Name: Thorsten Hahn
Theme URI: https://www.thorstenhahn.de/
Author: Thorsten Hahn
Description: Schlankes Block-Theme für thorstenhahn.de – Keynotes, Moderation, die Kolumne „Quer durch die Bank“ und FREITAGS im Fahrstuhl. Schriften lokal eingebunden, YouTube erst nach Klick (2-Klick-Lösung).
Version: 1.0.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thorstenhahn
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
:where(body) { -webkit-font-smoothing: antialiased; }
a:where(:not(.wp-element-button)) { text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent-light); outline-offset: 2px; }
.th-skip { position: absolute; left: -9999px; }
.th-skip:focus { left: 1rem; top: 1rem; z-index: 999; background: #fff; color: #111418; padding: .6rem 1rem; }

/* ---------- Kopfzeile ---------- */
.th-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .th-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .th-header { top: 0; position: relative; } }
.th-brand a { text-decoration: none; color: inherit; }
.th-header .wp-block-navigation a { text-decoration: none; }
.th-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent-light); }
.th-header .th-nav-cta > a { background: var(--wp--preset--color--accent); color: #fff !important; padding: .6rem 1.1rem !important; border-radius: 4px; font-weight: 600; }
.th-header .th-nav-cta > a:hover { background: #9A3412; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--ink) !important; color: #fff !important; }

/* ---------- Abschnitte ---------- */
.th-kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 600; font-size: .82rem !important; }
.th-proof .th-num { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 2.6rem; line-height: 1; margin: 0; }
.th-proof .th-num-label { margin: .4rem 0 0; color: var(--wp--preset--color--muted); font-size: .95rem; }
.th-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 6px; height: 100%; }
.th-card-dark { border-radius: 6px; }
.th-formats > .wp-block-group { border-top: 1px solid var(--wp--preset--color--line); }
.th-formats .th-n { font-family: var(--wp--preset--font-family--display); font-weight: 800; color: var(--wp--preset--color--accent); min-width: 2.2rem; }
.th-chip { display: inline-block; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; padding: .4rem 1rem; font-size: .88rem; font-weight: 500; margin: 0 .4rem .5rem 0; }
.th-portrait img { width: 100%; height: auto; border-radius: 4px; object-fit: cover; }
.th-cv { list-style: none; padding: 0; margin: 0; }
.th-cv li { display: flex; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--wp--preset--color--line); font-size: .95rem; }
.th-cv li span:first-child { min-width: 7.5rem; color: var(--wp--preset--color--muted); font-variant-numeric: tabular-nums; }

/* ---------- Listen: Kolumne ---------- */
.th-postlist .wp-block-post { border-top: 1px solid var(--wp--preset--color--line); padding: 1.1rem 0; }
.th-postlist .wp-block-post-title a { text-decoration: none; color: inherit; }
.th-postlist .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.th-postlist .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: .9rem; }

/* ---------- Listen: Fahrstuhl (Kacheln ohne externe Bilder) ---------- */
.th-fif-grid .wp-block-post { background: var(--wp--preset--color--ink-2); border-radius: 6px; padding: 1.4rem 1.4rem 1.6rem; position: relative; transition: transform .15s ease, background .15s ease; }
.th-fif-grid .wp-block-post:hover { background: #2C313A; transform: translateY(-2px); }
.th-fif-grid.is-light .wp-block-post { background: #fff; border: 1px solid var(--wp--preset--color--line); }
.th-fif-grid.is-light .wp-block-post:hover { background: #fff; border-color: var(--wp--preset--color--accent); }
.th-fif-grid .wp-block-post-title a { text-decoration: none; color: inherit; }
.th-fif-grid .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.th-ep { display: block; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: .85rem; letter-spacing: .08em; color: var(--wp--preset--color--accent-light); margin-bottom: .45rem; text-transform: uppercase; }
.th-fif-grid.is-light .th-ep { color: var(--wp--preset--color--accent); }
.th-fif-grid .wp-block-post-date { font-size: .85rem; opacity: .7; }

/* ---------- Beitrag ---------- */
.th-article .wp-block-post-content > p { font-family: var(--wp--preset--font-family--serif); font-size: 1.16rem; line-height: 1.72; }
.th-article .wp-block-post-content > h2 { margin-top: 2.4rem; }
.th-article .wp-block-post-content em { color: var(--wp--preset--color--muted); }
.th-article .wp-block-post-content hr { border: 0; border-top: 1px solid var(--wp--preset--color--line); margin: 2.5rem 0; }
.th-article .taxonomy-post_tag a { display: inline-block; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; padding: .2rem .75rem; margin: 0 .3rem .4rem 0; font-size: .85rem; text-decoration: none; color: var(--wp--preset--color--ink); }
.th-article .taxonomy-post_tag .wp-block-post-terms__separator { display: none; }
.th-article .taxonomy-category a { color: var(--wp--preset--color--accent); text-decoration: none; }

/* ---------- Video: 2-Klick ---------- */
.th-yt { position: relative; aspect-ratio: 16 / 9; background: var(--wp--preset--color--ink); border-radius: 6px; overflow: hidden; margin: 0 0 1.6rem; color: #fff; }
.th-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.th-yt button { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem; text-align: center;
  background: linear-gradient(90deg, transparent 0 6%, rgba(194,65,12,.9) 6% calc(6% + 6px), transparent calc(6% + 6px) calc(94% - 6px), rgba(194,65,12,.9) calc(94% - 6px) 94%, transparent 94%), var(--wp--preset--color--ink); }
.th-yt button:focus-visible { outline: 3px solid var(--wp--preset--color--accent-light); outline-offset: -6px; }
.th-yt .th-yt-play { width: 78px; height: 78px; border-radius: 50%; background: var(--wp--preset--color--accent); display: grid; place-items: center; transition: transform .15s; }
.th-yt button:hover .th-yt-play { transform: scale(1.07); }
.th-yt .th-yt-title { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.6rem); line-height: 1.2; max-width: 34ch; }
.th-yt .th-yt-note { font-size: .8rem; opacity: .7; max-width: 46ch; }

/* ---------- Kontaktformular (Contact Form 7) ---------- */
.th-form { background: #fff; color: var(--wp--preset--color--ink); border-radius: 6px; }
.th-form .wpcf7-form p { margin: 0 0 1rem; }
.th-form label { display: block; font-size: .9rem; font-weight: 500; }
.th-form input[type=text], .th-form input[type=email], .th-form input[type=tel], .th-form textarea, .th-form select {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: .75rem; margin-top: .35rem; border: 1px solid #C9C5BB; border-radius: 4px; background: #fff; }
.th-form textarea { min-height: 8rem; resize: vertical; }
.th-form input:focus, .th-form textarea:focus { outline: 2px solid var(--wp--preset--color--accent); border-color: transparent; }
.th-form .wpcf7-submit { background: var(--wp--preset--color--ink); color: #fff; border: 0; border-radius: 4px; padding: .95rem 1.8rem; font: inherit; font-weight: 600; cursor: pointer; }
.th-form .wpcf7-submit:hover { background: var(--wp--preset--color--accent); }
.th-form .wpcf7-spinner { margin-left: .8rem; }
.th-form .wpcf7-response-output { margin: 1rem 0 0 !important; border-radius: 4px; }

/* ---------- Pagination ---------- */
.wp-block-query-pagination { gap: .6rem; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; }
.wp-block-query-pagination-numbers .page-numbers { display: inline-block; min-width: 2.2rem; text-align: center; padding: .35rem .5rem; border-radius: 4px; }
.wp-block-query-pagination-numbers .current { background: var(--wp--preset--color--ink); color: #fff; }

/* ---------- Korrekturen ---------- */
.wp-site-blocks > * { margin-block-start: 0; }
.th-proof .th-num { white-space: nowrap; font-size: clamp(1.7rem, 6.5vw, 2.6rem); }
@media (max-width: 600px) {
	.th-proof .th-num-label { font-size: .82rem; hyphens: auto; }
	.th-brand p + p { display: none; }
	.th-header > .wp-block-group { flex-wrap: nowrap; }
}
