/*
Theme Name: Blumen Brauner
Description: Schlankes Block-Theme für Blumen Brauner, Lenting (Farben und Schriften wie die alte Seite).
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: blumen-brauner
*/

/* Kopfzeile oben (Öffnungszeiten / Telefon / Mail) */
.bb-topbar a { color: inherit; text-decoration: none; }
.bb-topbar a:hover { text-decoration: underline; }
.bb-topbar p { margin: 0; }

/* Navigation */
.bb-header { box-shadow: 0 2px 8px rgba(0,0,0,.06); position: relative; z-index: 20; }
.bb-header .wp-block-navigation a { text-decoration: none; }
.bb-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent); }
.wp-block-navigation__submenu-container { border: 0 !important; box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: .4rem 0 !important; }
.wp-block-navigation__submenu-container a { padding: .45rem 1.1rem !important; }

/* Karten */
.bb-card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.08); height: 100%; transition: transform .15s, box-shadow .15s; }
.bb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.bb-card .wp-block-image, .bb-card .wp-block-post-featured-image { margin: 0; }
.bb-card .wp-block-image img, .bb-card .wp-block-post-featured-image img { aspect-ratio: 4/3; object-fit: cover; width: 100%; display: block; }
.bb-card-body { padding: 1rem 1.25rem 1.4rem; }
.bb-card h3 a, .bb-card h2 a { text-decoration: none; color: inherit; }

/* "Aktuelles": Abschnitt nur zeigen, wenn es Beiträge gibt */
.bb-news:not(:has(.wp-block-post)) { display: none; }
.bb-news .wp-block-post-template { gap: 1.5rem; }
.bb-news .wp-block-post { list-style: none; }

/* Galerien: einheitliche Kacheln */
.wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 1; object-fit: cover; }
.wp-block-gallery figure.wp-block-image figcaption { font-size: .8rem; }

/* Aufklappbare Abschnitte (Beispiele) */
.wp-block-details { border: 1px solid var(--wp--preset--color--line); border-radius: 6px; padding: .2rem 1.1rem; margin-block: .75rem; background: #fff; }
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-size: 1.25rem; padding: .7rem 0; color: var(--wp--preset--color--primary-dark); }
.wp-block-details[open] summary { border-bottom: 1px solid var(--wp--preset--color--line); margin-bottom: 1rem; }

/* Bild mit Lightbox in Seiten */
.wp-block-image img { border-radius: 4px; }

/* Karte (Anfahrt): statisches Bild statt Google-Iframe (DSGVO) */
.bb-map img { border-radius: 6px; }

/* Footer */
.bb-footer a { color: #fff; }
.bb-footer p { margin-block: .25rem; }

/* Kleine Bildschirme */
@media (max-width: 781px) {
  .bb-topbar .wp-block-group { justify-content: center !important; text-align: center; }
  .bb-hide-mobile { display: none !important; }
}

/* Titelbilder: Text bündig mit Logo/Inhalt */
.wp-block-cover.alignfull.has-custom-content-position .wp-block-cover__inner-container { width: 100% !important; max-width: 1200px; margin-inline: auto !important; }
.wp-block-cover.alignfull { padding-left: 1.25rem; padding-right: 1.25rem; }
.wp-block-cover h1 { text-shadow: 0 1px 8px rgba(0,0,0,.35); }
h1, h2, h3 { hyphens: auto; overflow-wrap: break-word; }
.bb-card h3 { hyphens: manual; }

/* Titelbilder in voller Farbe: statt grüner Abdunklung über das ganze Foto nur ein Verlauf hinter dem Text */
.wp-block-cover.alignfull > .wp-block-cover__background.has-background-dim { opacity: 1 !important; background: linear-gradient(90deg, rgba(30,45,20,.62) 0%, rgba(30,45,20,.35) 38%, rgba(30,45,20,0) 65%) !important; }
.wp-block-cover.alignfull :is(h1, h2, p) { text-shadow: 0 1px 10px rgba(0,0,0,.45); }
@media (max-width: 781px) {
  .wp-block-cover.alignfull > .wp-block-cover__background.has-background-dim { background: linear-gradient(0deg, rgba(30,45,20,.6) 0%, rgba(30,45,20,.3) 55%, rgba(30,45,20,.12) 100%) !important; }
}
