/*
Theme Name: Bärgblüemli
Theme URI: https://www.baergbluemli.ch
Author: Chalet Bärgblüemli
Description: Massgeschneidertes Block-Theme für das Ferienchalet Bärgblüemli in Elsigen-Metsch.
Version: 1.2.1
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: baergbluemli
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
:where(section[id], div[id]) { scroll-margin-top: 24px; }
img { height: auto; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main.bb-main > *:first-child { margin-block-start: 0; }

/* ---------- Kopfzeile ---------- */
.bb-header { padding-top: 22px; padding-bottom: 22px; position: relative; z-index: 20; }
.bb-header__inner { gap: 12px 32px; }
.bb-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--wald); display: inline-flex; align-items: center; gap: 10px; }
.bb-header .wp-block-site-title a::before {
  content: ""; width: 32px; height: 32px; flex: 0 0 32px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 27 L13 12 L18 19 L22 14 L31 27 Z'/%3E%3Cpath d='M17 8 c0-2.5 3-2.5 3 0 c2.5 0 2.5 3 0 3 c0 2.5-3 2.5-3 0 c-2.5 0-2.5-3 0-3 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 27 L13 12 L18 19 L22 14 L31 27 Z'/%3E%3Cpath d='M17 8 c0-2.5 3-2.5 3 0 c2.5 0 2.5 3 0 3 c0 2.5-3 2.5-3 0 c-2.5 0-2.5-3 0-3 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bb-header .wp-block-navigation { font-size: 0.9375rem; font-weight: 500; gap: 8px 28px; }
.bb-header .wp-block-navigation a { text-decoration: none; }
.bb-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bb-header .bb-nav-cta > a {
  background: var(--wp--preset--color--enzian); color: #fff !important; padding: 11px 20px; border-radius: 999px; font-weight: 600;
}
.bb-header .bb-nav-cta > a:hover { text-decoration: none !important; background: var(--wp--preset--color--enzian-dunkel); }

/* Kopfzeile über dem Titelbild (Startseite) */
.bb-header-wrap--overlay { position: absolute; top: 0; left: 0; right: 0; z-index: 30; }
.bb-header-wrap--overlay .bb-header .wp-block-site-title a,
.bb-header-wrap--overlay .bb-header .wp-block-navigation:not(.has-modal-open) .wp-block-navigation-item > a,
.bb-header-wrap--overlay .bb-header .wp-block-navigation__responsive-container-open { color: #fff; }
.bb-header-wrap--overlay .bb-header .bb-nav-cta > a { background: #fff; color: var(--wp--preset--color--wald) !important; }
.bb-header-wrap--overlay .bb-header .bb-nav-cta > a:hover { background: var(--wp--preset--color--enzian-hell); }
.wp-block-navigation__responsive-container.is-menu-open { padding: 28px !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > a { font-size: 1.375rem; color: var(--wp--preset--color--wald) !important; }
.wp-block-navigation__responsive-container.is-menu-open .bb-nav-cta > a { color: #fff !important; background: var(--wp--preset--color--enzian) !important; }

/* ---------- Abschnitte ---------- */
.bb-section { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.bb-section--weiss { background: #fff; }
.bb-section--wald { background: var(--wp--preset--color--wald); color: #fff; }
.bb-section--wald :is(h2, h3, h4) { color: #fff; }
.bb-section--wald .bb-eyebrow { color: #B9C6F5; }
.bb-section--wald .bb-muted { color: #D5DDD8; }
.bb-eyebrow { font-size: 0.875rem !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--enzian); margin-bottom: 0.25rem !important; }
.bb-muted { color: var(--wp--preset--color--grau); }
.bb-lead { font-size: 1.25rem; line-height: 1.5; }
.bb-intro { max-width: 700px; }
.bb-intro > * + * { margin-block-start: 0.75rem; }

/* ---------- Titelbild ---------- */
.bb-hero { min-height: min(760px, 92vh) !important; align-items: flex-end !important; padding-bottom: clamp(88px, 10vw, 120px) !important; padding-top: 140px !important; }
.bb-hero .wp-block-cover__inner-container { max-width: 1200px; width: 100%; margin: 0 auto; color: #fff; }
.bb-hero h1 { color: #fff; max-width: 900px; margin-top: 0.75rem; margin-bottom: 1rem; }
.bb-hero .bb-eyebrow { color: #fff; }
.bb-hero .bb-lead { max-width: 640px; }

/* ---------- Schnellzugriff-Karte ---------- */
.bb-quick-wrap { margin-top: -56px !important; position: relative; z-index: 5; }
.bb-quick { background: #fff; border-radius: 20px; box-shadow: 0 12px 40px rgba(20, 40, 30, 0.14); padding: 22px 26px !important; gap: 16px 24px; }
.bb-quick p { margin: 0; }
.bb-quick .bb-quick__title { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.375rem; color: var(--wp--preset--color--wald); }
.bb-quick .wp-block-buttons { gap: 10px; }
.is-style-outline > .wp-block-button__link, .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--enzian); border: 2px solid currentColor; padding: calc(0.9rem - 2px) calc(1.6rem - 2px);
}

/* ---------- Karten & Raster ---------- */
.bb-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(var(--bb-min, 240px), 1fr)); gap: 16px; }
.bb-grid > * { margin: 0 !important; }
.bb-card { background: #fff; border-radius: 16px; padding: 20px 22px !important; }
.bb-card > * { margin: 0; }
.bb-card > * + * { margin-block-start: 0.3rem; }
.bb-fact__value { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.75rem; color: var(--wp--preset--color--wald); line-height: 1.2; }
.bb-fact__label { font-size: 0.9375rem; color: var(--wp--preset--color--grau); }

/* Familien-Gründe */
.bb-split { gap: clamp(32px, 5vw, 64px) !important; align-items: center !important; }
.bb-split .wp-block-image img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 24px; }
.bb-feature { position: relative; padding-left: 44px; }
.bb-feature > * { margin: 0; }
.bb-feature h3 { font-family: var(--wp--preset--font-family--body); font-size: 1.125rem; letter-spacing: 0; color: var(--wp--preset--color--tinte); margin-bottom: 0.15rem; }
.bb-feature::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 28px; height: 28px; background: var(--wp--preset--color--enzian);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20 L9 10 L13 15 L16 11 L21 20 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20 L9 10 L13 15 L16 11 L21 20 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Räume */
.bb-rooms .wp-block-image { margin: 0; }
.bb-rooms .wp-block-image img { width: 100%; height: 300px; object-fit: cover; border-radius: 16px; }
.bb-rooms .wp-element-caption { text-align: left; margin-top: 10px; font-size: 0.9375rem; color: var(--wp--preset--color--grau); }
.bb-rooms .wp-element-caption strong { display: block; color: var(--wp--preset--color--tinte); font-size: 1.0625rem; }
.bb-box { background: var(--wp--preset--color--sand); border-radius: 16px; padding: 26px 28px !important; }
.bb-box > * { margin: 0; }
.bb-box > * + * { margin-block-start: 0.6rem; }
.bb-box ul { padding-left: 1.2em; font-size: 0.9375rem; }

/* Ausflüge */
.bb-trip { background: var(--wp--preset--color--wald-hell); border-radius: 18px; overflow: hidden; padding: 0 0 22px !important; }
.bb-trip > * { margin: 0; padding-left: 22px; padding-right: 22px; }
.bb-trip > * + * { margin-block-start: 0.35rem; }
.bb-trip .wp-block-image { padding: 0; margin-bottom: 18px !important; }
.bb-trip .wp-block-image img { width: 100%; height: 230px; object-fit: cover; border-radius: 0; }
.bb-trip .bb-trip__meta { font-size: 0.8125rem; font-weight: 600; color: #B9C6F5; }
.bb-trip h3 { font-size: 1.25rem; }
.bb-trip .bb-trip__text { color: #D5DDD8; font-size: 0.9375rem; }

/* Preise */
.bb-price { background: #fff; border-radius: 18px; padding: 24px !important; }
.bb-price > * { margin: 0; }
.bb-price > * + * { margin-block-start: 0.25rem; }
.bb-price__season { font-size: 0.875rem; font-weight: 600; color: var(--wp--preset--color--grau); }
.bb-price__amount { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 2.5rem; line-height: 1.1; color: var(--wp--preset--color--wald); }
.bb-price__note { font-size: 0.9375rem; color: var(--wp--preset--color--grau); }
.bb-price--top { background: var(--wp--preset--color--enzian); }
.bb-price--top :is(.bb-price__season, .bb-price__amount, .bb-price__note) { color: #fff; }
.bb-note { background: var(--wp--preset--color--enzian-hell); border-radius: 14px; padding: 18px 22px !important; }

/* Kalender (calendarapp.de) */
.bb-cal { background: #fff; border-radius: 20px; padding: clamp(18px, 3vw, 32px) !important; }
.bb-cal #zhcal-root { font-family: var(--wp--preset--font-family--body); }
.bb-cal #zhcal-root table { border-collapse: separate; border-spacing: 3px; width: 100%; }
.bb-cal #zhcal-root th.zhcal_month { font-family: var(--wp--preset--font-family--heading); font-size: 1.0625rem; color: var(--wp--preset--color--wald); padding-bottom: 6px; }
.bb-cal #zhcal-root td, .bb-cal #zhcal-root th { font-size: 0.8125rem; }
.bb-cal #zhcal-root a, .bb-cal #zhcal-root button { font-family: inherit; }
.bb-steps { counter-reset: bbstep; }
.bb-step { position: relative; padding-left: 48px; }
.bb-step > * { margin: 0; }
.bb-step::before {
  counter-increment: bbstep; content: counter(bbstep); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--wp--preset--color--enzian); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9375rem;
}
.bb-info p { margin: 0; font-size: 0.9375rem; }

/* FAQ */
.bb-faq .wp-block-details { background: #fff; border-radius: 14px; padding: 18px 22px; margin: 0 0 12px; }
.bb-faq .wp-block-details summary { font-weight: 600; cursor: pointer; }
.bb-faq .wp-block-details p { color: var(--wp--preset--color--grau); margin: 10px 0 0; }
.bb-map iframe { width: 100%; height: 300px; border: 0; border-radius: 18px; display: block; }
.bb-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; padding: 0; list-style: none; font-size: 0.9375rem; }

/* ---------- Fusszeile ---------- */
.bb-footer { background: var(--wp--preset--color--wald); color: #D5DDD8; padding-top: 56px; padding-bottom: 40px; font-size: 0.9375rem; }
.bb-footer a { color: #fff; }
.bb-footer a:hover { color: #B9C6F5; }
.bb-footer h2 { color: #fff; font-size: 1.375rem; }
.bb-footer h3 { color: #fff; font-family: var(--wp--preset--font-family--body); font-size: 0.9375rem; letter-spacing: 0; }
.bb-footer p, .bb-footer ul { margin: 0; }
.bb-footer ul { list-style: none; padding: 0; }
.bb-footer ul li + li { margin-top: 4px; }
.bb-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px !important; padding-top: 20px; font-size: 0.8125rem; }

/* ---------- Normale Unterseiten ---------- */
.bb-page-head { padding-top: clamp(32px, 6vw, 64px); padding-bottom: 8px; }
.bb-page-body { padding-bottom: clamp(56px, 8vw, 96px); }

@media (max-width: 600px) {
  .bb-rooms .wp-block-image img { height: 240px; }
  .bb-quick .wp-block-buttons, .bb-quick .wp-block-button { width: 100%; }
  .bb-quick .wp-block-button__link { width: 100%; }
  .bb-times { grid-template-columns: 1fr; }
}

/* ---------- Logo & Sprachumschalter ---------- */
.bb-header :is(.wp-block-site-logo, .bb-logo) { margin: 0; line-height: 0; }
.bb-header :is(.wp-block-site-logo, .bb-logo) img { width: 180px !important; height: auto; border-radius: 0 !important; }
.bb-header-wrap--overlay .bb-header :is(.wp-block-site-logo, .bb-logo) img { filter: brightness(0) invert(1); }
.bb-header .bb-lang > a { font-weight: 600; border: 1.5px solid currentColor; border-radius: 999px; padding: 5px 12px; font-size: 0.8125rem; letter-spacing: 0.04em; }
.bb-header .bb-lang > a:hover { text-decoration: none !important; }
.wp-block-navigation__responsive-container.is-menu-open .bb-lang > a { font-size: 1rem !important; padding: 6px 14px; }
@media (max-width: 600px) {
  .bb-header :is(.wp-block-site-logo, .bb-logo) img { width: 136px !important; }
  .bb-header { padding-top: 14px; padding-bottom: 14px; }
}
