/*
Theme Name: Bautagebuch Stadtvilla
Theme URI: https://bautagebuch-stadtvilla.de
Author: Christoph
Description: Block-Theme für das Bautagebuch einer Stadtvilla. Alles lässt sich im WordPress-Editor pflegen, ohne Zusatz-Plugins.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bautagebuch
*/

/* Was theme.json nicht abdeckt. Farben und Schriften kommen aus theme.json. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 1.5rem; }
:focus-visible { outline: 2px solid var(--wp--preset--color--tinte); outline-offset: 3px; }

/* Keine Lücken zwischen vollbreiten Abschnitten */
.wp-site-blocks > *, .wp-block-post-content > .alignfull { margin-block: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.bt-phasen { margin-top: 2rem; }

/* Pinselstriche: Blockstil an Gruppen, im Editor mit einem Klick abschaltbar */
.is-style-bt-pinsel { position: relative; overflow: hidden; }
.is-style-bt-pinsel::before,
.is-style-bt-pinsel::after {
	content: ""; position: absolute; pointer-events: none; opacity: .9;
	width: min(52%, 680px); aspect-ratio: 1000 / 467;
	background: url(assets/img/pinsel.png) center / contain no-repeat;
}
.is-style-bt-pinsel::before { top: -30px; left: -80px; }
.is-style-bt-pinsel::after { bottom: -40px; right: -60px; transform: rotate(180deg); }
.is-style-bt-pinsel > * { position: relative; z-index: 1; }

/* Tipp-Box */
.is-style-bt-tipp {
	background: var(--wp--preset--color--nebel);
	border-radius: 24px;
	padding: 1.875rem 2.125rem;
}
.is-style-bt-tipp > :first-child { margin-top: 0; }

/* Große Zahl (Hausdaten) */
.bt-zahl {
	font-family: var(--wp--preset--font-family--aleo);
	font-weight: 800; font-size: 2.5rem; line-height: 1; margin-bottom: .375rem;
}
.bt-zahl + p { margin-top: 0; font-weight: 600; }

/* Großer Status-Satz */
.bt-status__satz {
	font-family: var(--wp--preset--font-family--aleo);
	font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.875rem); line-height: 1.2;
	max-width: 22em; margin: 0;
}
.bt-status__leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.75rem; font-weight: 600; }
.bt-status__haeuser { display: flex; gap: .5rem; }
.bt-status__haeuser svg { display: block; }

/* Bauphasen-Galerie */
.bt-phasen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.bt-phasen img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; display: block; }
.bt-phasen__name { display: block; margin-top: .75rem; font-family: var(--wp--preset--font-family--aleo); font-weight: 700; }
.bt-phasen__info { display: block; font-size: 1rem; }
.bt-phasen__info.is-aktuell { color: var(--wp--preset--color--bernstein); font-weight: 600; }

/* Beitragslisten */
.wp-block-post-template.is-layout-grid { gap: 2.5rem; }
.wp-block-post-template .wp-block-post-title { margin-top: .25rem; }
.wp-block-post-template .wp-block-post-featured-image { margin-bottom: 1.125rem; }
.wp-block-post-featured-image img { width: 100%; height: auto; }
.bt-lead .wp-block-post-title { font-size: clamp(1.875rem, 3.2vw, 2.625rem); font-weight: 800; line-height: 1.15; }
.bt-lead .wp-block-post-featured-image { margin-bottom: 0; }
.wp-block-post-excerpt__more-link { font-weight: 600; }

/* Kopfbereich */
.bt-kopf .wp-block-site-logo img { display: block; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }

/* Tabellen */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--linie); padding: .875rem 0; text-align: left; }
.wp-block-table th { font-weight: 700; }
.wp-block-table td:first-child { font-weight: 700; padding-right: 1rem; }
.wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-table.is-style-stripes { border: 0; }
.wp-block-table.is-style-stripes td, .wp-block-table.is-style-stripes th { padding-left: .875rem; padding-right: .875rem; border: 0; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--wp--preset--color--papier); }

/* Listen */
.wp-block-list { padding-left: 1.25em; }
.wp-block-post-content li::marker { color: var(--wp--preset--color--bernstein); font-weight: 700; }

/* Kontur-Button */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--tinte);
	border: 2px solid currentColor; padding-top: calc(1rem - 2px); padding-bottom: calc(1rem - 2px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--tinte); color: #fff; }

/* Bilder, Galerie, Cover, Medien+Text */
.wp-block-gallery .wp-block-image img { border-radius: 14px; }
.wp-block-media-text { overflow: hidden; background: var(--wp--preset--color--papier); }
.wp-block-cover { overflow: hidden; }
figcaption, .wp-element-caption { margin-top: .5rem; }

/* Trenner */
.wp-block-separator { border: 0; border-top: 1px solid currentColor; }
.wp-block-separator.is-style-dots { border: 0; color: var(--wp--preset--color--senf); }
.wp-block-separator.is-style-wide { border-top-width: 3px; }

/* Aufklappen */
.wp-block-details summary { font-family: var(--wp--preset--font-family--aleo); font-weight: 700; cursor: pointer; }

/* Datei */
.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; background: var(--wp--preset--color--papier); border-radius: 16px; padding: 1rem 1.25rem; }
.wp-block-file .wp-block-file__button { margin: 0; border-radius: 999px; background: var(--wp--preset--color--tinte); color: #fff; padding: .625rem 1.125rem; text-decoration: none; }

/* Suche und Formularfelder (auch Kommentare) */
.wp-block-search__label { font-weight: 700; }
.wp-block-search__input,
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]),
.wp-block-post-comments-form textarea,
input[type=email], input[type=text], input[type=search], input[type=url], textarea, select {
	font: inherit; color: var(--wp--preset--color--tinte); background: #fff;
	border: 2px solid var(--wp--preset--color--linie); border-radius: 14px; padding: .75rem 1rem; box-sizing: border-box; max-width: 100%;
}
.wp-block-search__input { border-radius: 999px; padding-left: 1.5rem; min-height: 3.25rem; }
.wp-block-search__button { margin-left: .625rem; border-radius: 999px; }
.wp-block-post-comments-form .wp-block-button__link, .wp-block-post-comments-form input[type=submit] {
	font: inherit; font-weight: 700; color: #fff; background: var(--wp--preset--color--tinte); border: 0; border-radius: 999px; padding: .875rem 1.75rem; cursor: pointer;
}

/* Kommentare */
.wp-block-comment-template { list-style: none; padding: 0; }
.wp-block-comment-template li { padding: 1.25rem 0; border-bottom: 1px solid var(--wp--preset--color--linie); }
.wp-block-avatar img { border-radius: 50%; }

/* Widgets-artige Blöcke */
.wp-block-latest-posts, .wp-block-categories, .wp-block-archives, .wp-block-page-list { padding-left: 0; list-style: none; }
.wp-block-latest-posts li, .wp-block-categories li, .wp-block-archives li { padding: .5rem 0; border-bottom: 1px solid var(--wp--preset--color--linie); }
.wp-block-latest-posts a, .wp-block-categories a, .wp-block-archives a { color: var(--wp--preset--color--tinte); text-decoration: none; }
.wp-block-latest-comments { padding-left: 0; }
.wp-block-tag-cloud a { display: inline-block; font-size: 1rem !important; font-weight: 600; text-decoration: none; color: var(--wp--preset--color--tinte); background: var(--wp--preset--color--papier); border-radius: 999px; padding: .25rem .875rem; margin: 0 .25rem .375rem 0; }
.wp-block-calendar table caption, .wp-block-calendar table th { background: none; font-weight: 700; }
.wp-block-calendar table td, .wp-block-calendar table th { border-color: var(--wp--preset--color--linie); }
.wp-block-social-links .wp-social-link { background: var(--wp--preset--color--tinte) !important; color: #fff !important; }
.wp-block-query-pagination-numbers .current { font-weight: 800; text-decoration: underline; }
.wp-block-query-pagination a { color: var(--wp--preset--color--tinte); text-decoration: none; }

/* Fußbereich: Links weiß */
.bt-fuss a { color: #fff; }
.bt-fuss a:hover { color: var(--wp--preset--color--senf); }
