/* ==========================================================================
   Be Part of Berlin – Theme
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:where(.site-main) > :first-child { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header { position: relative; z-index: 50; }
.site-header.is-overlay { position: absolute; inset: 0 0 auto; }
.site-header.is-solid { position: sticky; top: 0; }
.admin-bar .site-header.is-solid { top: 32px; }
.bpob-header { padding-block: 22px; }
.bpob-header.is-solid { padding-block: 4px; background: var(--wp--preset--color--primary); box-shadow: 0 1px 6px rgb(0 0 0 / .15); }
.bpob-header__inner { gap: 30px; }
.bpob-logo { display: block; line-height: 0; }
.bpob-logo img { width: 170px; height: auto; }
.is-solid .bpob-logo img { width: 120px; }
.bpob-header__nav { gap: 30px; }

.bpob-header .wp-block-navigation-item__content { position: relative; padding-block: 6px; color: var(--wp--preset--color--primary); }
.bpob-header .wp-block-navigation-item__content::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: currentColor; transition: right .25s; }
.bpob-header .wp-block-navigation-item__content:hover::after,
.bpob-header .current-menu-item > .wp-block-navigation-item__content::after,
.bpob-header [aria-current="page"]::after { right: 0; }
.bpob-header .current-menu-item > .wp-block-navigation-item__content,
.bpob-header [aria-current="page"] { color: var(--wp--preset--color--primary-dark); }
.bpob-header.is-solid .wp-block-navigation-item__content,
.bpob-header.is-solid .current-menu-item > .wp-block-navigation-item__content { color: #fff; }

.bpob-lang { margin: 0; padding: 0; list-style: none; display: flex; gap: 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.bpob-lang li { display: flex; align-items: center; }
.bpob-lang li + li::before { content: "|"; margin: 0 6px; color: var(--wp--preset--color--body-text); opacity: .6; }
.bpob-lang a { color: var(--wp--preset--color--body-text); }
.bpob-lang .current-lang a { color: var(--wp--preset--color--primary); }
.is-solid .bpob-lang a, .is-solid .bpob-lang li + li::before { color: rgb(255 255 255 / .75); }
.is-solid .bpob-lang .current-lang a { color: #fff; }

.wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--primary); }
.is-solid .wp-block-navigation__responsive-container-open { color: #fff; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 30px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff !important; font-size: 18px; }

@media (max-width: 781px) {
	.bpob-header { padding-block: 12px; }
	.bpob-logo img { width: 120px; }
	.bpob-header__nav { gap: 16px; }
}

/* --------------------------------------------------------------------------
   Hero (Cover am Seitenanfang) + Slider
   -------------------------------------------------------------------------- */
.bpob-hero { min-height: min(600px, 80vh) !important; }
.bpob-hero .wp-block-cover__inner-container { max-width: 900px; padding-top: 80px; text-align: center; }
.bpob-hero__title,
.bpob-hero h1 {
	margin: 0 0 16px;
	color: #fff;
	font-size: var(--wp--preset--font-size--hero);
	font-weight: 700;
	line-height: 1.15;
	text-shadow: 0 2px 18px rgb(0 0 0 / .18);
}
.bpob-hero p:not(.bpob-hero__title) { color: #fff; font-size: 15px; line-height: 1.8; text-shadow: 0 1px 8px rgb(0 0 0 / .25); }
.bpob-hero .wp-block-buttons { margin-top: 26px; justify-content: center; }

.is-style-hero-slider { position: relative; display: grid; overflow: hidden; }
.is-style-hero-slider > .wp-block-cover { grid-area: 1 / 1; margin: 0 !important; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s 1.2s; }
.is-style-hero-slider > .wp-block-cover.is-active { opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
.is-style-hero-slider > .wp-block-cover:first-child { opacity: 1; visibility: visible; }
.is-style-hero-slider.is-ready > .wp-block-cover:first-child:not(.is-active) { opacity: 0; visibility: hidden; }
.is-style-hero-slider .wp-block-cover__image-background { transform: scale(1.06); transition: transform 7s linear; }
.is-style-hero-slider .is-active .wp-block-cover__image-background { transform: scale(1); }
.bpob-hero-dots { position: absolute; left: 50%; bottom: 72px; z-index: 3; display: flex; gap: 8px; transform: translateX(-50%); }
.bpob-hero-dots button { width: 10px; height: 10px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.bpob-hero-dots button[aria-current="true"] { background: #fff; }

/* Suchleiste überlappt den Hero */
.bpob-search-overlap { position: relative; z-index: 4; margin-top: -26px !important; }
@media (max-width: 900px) { .bpob-search-overlap { margin-top: 20px !important; } }

/* --------------------------------------------------------------------------
   Inhalte
   -------------------------------------------------------------------------- */
.bpob-section { padding-block: var(--wp--preset--spacing--60); }
.bpob-section--l { padding-block: var(--wp--preset--spacing--80); }
.bpob-lead { margin-top: -10px !important; font-size: 15px; }
.has-text-align-center.bpob-lead { margin-inline: auto; }

.is-style-underline::after { content: ""; display: block; width: 50px; height: 2px; margin-top: 16px; background: var(--wp--preset--color--primary); }
.has-text-align-center.is-style-underline::after { margin-inline: auto; }

.wp-block-button.is-style-dark .wp-block-button__link { background: var(--wp--preset--color--dark); }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: #000; }
.is-style-cta-band .wp-block-button__link { padding: 14px 34px; font-size: 16px; letter-spacing: .04em; }

/* CTA-Band */
.is-style-cta-band { padding-block: 26px; }
.is-style-cta-band h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
.is-style-cta-band > .wp-block-group { gap: 20px; }

/* Icon-Boxen */
.bpob-iconbox { text-align: center; }
.bpob-iconbox .wp-block-image { margin: 0 auto 18px; }
.bpob-iconbox .wp-block-image img { width: 46px; height: 46px; }
.bpob-iconbox h3 { margin: 0 0 18px; font-size: 14px; font-weight: 700; line-height: 1.5; }

/* Zähler */
.bpob-counters { text-align: center; }
.is-style-counter { margin: 0 0 4px; color: #fff; font-size: clamp(44px, 5vw, 64px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bpob-counters p { color: #fff; font-size: 15px; }

/* Bilder mit Schatten (Text-Bild-Sektionen) */
.bpob-shadow img { box-shadow: 0 10px 30px rgb(0 0 0 / .18); }

/* Galerie als Karussell */
.wp-block-gallery.is-style-carousel {
	display: grid !important;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 4 * 12px) / 5);
	gap: 12px !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.wp-block-gallery.is-style-carousel::-webkit-scrollbar { display: none; }
.wp-block-gallery.is-style-carousel > .wp-block-image { width: auto !important; margin: 0 !important; scroll-snap-align: start; }
.wp-block-gallery.is-style-carousel img { aspect-ratio: 3 / 2; object-fit: cover; height: 100% !important; }
.bpob-carousel { position: relative; }
.bpob-carousel__arrow { position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: var(--wp--preset--color--heading); font-size: 26px; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.bpob-carousel__arrow--prev { left: -40px; }
.bpob-carousel__arrow--next { right: -40px; }
@media (max-width: 1240px) { .bpob-carousel__arrow--prev { left: -6px; } .bpob-carousel__arrow--next { right: -6px; } }
@media (max-width: 900px) { .wp-block-gallery.is-style-carousel { grid-auto-columns: calc((100% - 2 * 12px) / 3); } }
@media (max-width: 600px) { .wp-block-gallery.is-style-carousel { grid-auto-columns: 80%; } }

/* Kontakt-Liste mit Icons */
.is-style-icons { padding-left: 0 !important; list-style: none; }
.is-style-icons li { position: relative; padding-left: 26px; margin-bottom: 6px; line-height: 1.5; }
.is-style-icons li::before { content: ""; position: absolute; left: 0; top: .2em; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--icon) no-repeat center / contain; mask: var(--icon) no-repeat center / contain; }
.is-style-icons .is-mail { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2zm2 2v.5l8 5.5 8-5.5V7z'/%3E%3C/svg%3E"); }
.is-style-icons .is-location { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.3 7 13 7 13s7-7.7 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }
.is-style-icons .is-phone { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1z'/%3E%3C/svg%3E"); }
.bpob-contact-aside .is-style-icons li::before { background: var(--wp--preset--color--primary); }

/* Rechtstexte */
.bpob-legal { max-width: 1140px; font-size: 15px; }
.bpob-legal h2 { margin-top: 2em; font-size: var(--wp--preset--font-size--large); }
.bpob-legal h3 { margin-top: 1.6em; font-size: var(--wp--preset--font-size--medium); font-weight: 700; }

/* --------------------------------------------------------------------------
   Formulare (Contact Form 7)
   -------------------------------------------------------------------------- */
.wpcf7 { max-width: 720px; font-size: 14px; }
.wpcf7 label { display: block; color: var(--wp--preset--color--primary); font-size: 12px; font-weight: 700; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="date"], .wpcf7 textarea, .wpcf7 select {
	width: 100%;
	margin-top: 6px;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	background: #fff;
	color: var(--wp--preset--color--heading);
	font: inherit;
}
.wpcf7 textarea { min-height: 200px; }
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--wp--preset--color--primary); outline: none; }
.wpcf7 .wpcf7-list-item { margin: 0 14px 0 0; }
.wpcf7 .wpcf7-radio label, .wpcf7 .wpcf7-checkbox label, .wpcf7 .wpcf7-acceptance label { display: inline-flex; gap: 6px; align-items: center; color: var(--wp--preset--color--body-text); }
.wpcf7 .bpob-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wpcf7 p { margin-bottom: 24px; }
.wpcf7 input[type="submit"] { padding: 13px 22px; border: 0; border-radius: 3px; background: var(--wp--preset--color--primary); color: #fff; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--primary-dark); }
.wpcf7-not-valid-tip { font-size: 12px; }
@media (max-width: 600px) { .wpcf7 .bpob-form-row { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.bpob-footer { font-size: 14px; line-height: 1.6; }
.bpob-footer__cols { gap: 30px; }
.bpob-footer__menu { margin: 0; padding-left: 1em; }
.bpob-footer__menu li { margin-bottom: 4px; }
.bpob-footer__menu li::marker { color: #fff; }
.bpob-footer__menu .is-strong a { font-weight: 700; }
.bpob-footer a:hover { color: #b4d4d4 !important; }
.bpob-footer__bottom { margin-top: 24px; }
.bpob-footer__bottom p { margin: 0; font-size: 12px; }

/* --------------------------------------------------------------------------
   Korrekturen nach Abgleich mit dem Original
   -------------------------------------------------------------------------- */
.bpob-header__nav { flex: 1 1 auto; justify-content: flex-end; }
.bpob-header .wp-block-navigation__container { flex-wrap: nowrap; }
.bpob-lang { width: auto; flex: none; }
.bpob-lang ul { display: flex; margin: 0; padding: 0; list-style: none; }
.bpob-lang li + li::before { content: "|"; margin: 0 6px; color: var(--wp--preset--color--body-text); opacity: .6; }
.bpob-hero { min-height: 720px !important; }
@media (max-width: 781px) { .bpob-hero { min-height: 480px !important; } }
.bpob-hero-dots { bottom: 60px; }
.bpob-lang.pll-layout-vertical ul { flex-direction: row !important; align-items: center; }
.bpob-lang li { margin: 0 !important; }
.wpcf7 { margin-inline: 0 !important; }
.wpcf7 .bpob-form-row { align-items: start; }
.wpcf7 .wpcf7-label { display: block; margin-bottom: 4px; color: var(--wp--preset--color--primary); font-size: 12px; font-weight: 700; }
.wpcf7 form > label, .wpcf7 form > p, .wpcf7 form > .bpob-form-row { display: block; margin-top: 22px; }
.wpcf7 form > .bpob-form-row { display: grid; }
.wpcf7 form > * + * { margin-top: 22px; }
@media (max-width: 781px) { .bpob-hero-dots { bottom: 18px; } .is-style-hero-slider .bpob-hero .wp-block-cover__inner-container { padding-bottom: 40px; } }

/* ==========================================================================
   Abgleich Typografie/Header mit dem Original (gemessen)
   ========================================================================== */
/* Header oben: Logo 170 px, Menü #2d4242, 14 px, Abstand ~40 px */
.bpob-header { padding-block: 25px; }
.bpob-header .wp-block-navigation { --navigation-layout-gap: 40px; gap: 40px; }
.bpob-header .wp-block-navigation__container { gap: 40px; }
.bpob-header .wp-block-navigation-item__content,
.bpob-header .current-menu-item > .wp-block-navigation-item__content,
.bpob-header [aria-current="page"] { color: var(--wp--preset--color--primary-dark); }

/* Sticky-Zustand: fixiert, Petrol, 74 px, weißes Logo + Menü */
.site-header.is-overlay.is-stuck { position: fixed; top: 0; animation: bpob-slide-down .3s ease; }
.admin-bar .site-header.is-overlay.is-stuck { top: 32px; }
.is-stuck .bpob-header { padding-block: 6px; background: var(--wp--preset--color--primary); box-shadow: 0 1px 6px rgb(0 0 0 / .15); }
.is-stuck .bpob-logo img { width: auto; height: 62px; filter: brightness(0) invert(1); }
.is-stuck .bpob-header .wp-block-navigation-item__content,
.is-stuck .bpob-header [aria-current="page"],
.is-stuck .wp-block-navigation__responsive-container-open { color: #fff; }
@keyframes bpob-slide-down { from { transform: translateY(-100%); } to { transform: none; } }

/* Farbige Variante (Immobilienübersicht) wie Sticky-Zustand */
.bpob-header.is-solid { padding-block: 6px; }
.is-solid .bpob-logo img { width: auto; height: 62px; }

/* Hero: Titel 70 px fett, Untertitel 20 px light */
.bpob-hero__title, .bpob-hero h1 { font-size: var(--wp--preset--font-size--hero); }
.bpob-hero p:not(.bpob-hero__title) { font-size: 20px; font-weight: 300; line-height: 1.5; }

/* Inhalte */
.bpob-lead { font-size: 18px; }
.is-style-cta-band h2 { font-size: clamp(26px, 3vw, 36px); }
.is-style-cta-band .wp-block-button__link { font-size: 18px; padding: 18px 36px; }
.is-style-counter { font-size: clamp(48px, 5vw, 69px); font-weight: 600; }
.bpob-counters p { font-size: 19px; }
.bpob-iconbox h3 { font-size: 18px; }
.bpob-legal { font-size: 18px; }
.wpcf7 { font-size: 16px; }
.wpcf7 label, .wpcf7 .wpcf7-label { font-size: 15px; }
.wpcf7 input[type="submit"] { font-size: 15px; letter-spacing: 1.3px; padding: 20px 40px; }

/* Footer: Links 15 px, Copyright 12 px */
.bpob-footer { font-size: 15px; }
.bpob-footer a { letter-spacing: .6px; }
.bpob-footer__bottom p, .bpob-cookie-settings { font-size: 12px; }
.bpob-cookie-settings { color: #fff; opacity: .8; }
.bpob-cookie-button { border: 0; cursor: pointer; }

/* Menüfarben gegen core "color: inherit" durchsetzen (höhere Spezifität) */
.site-header .bpob-header .wp-block-navigation .wp-block-navigation-item__content { color: var(--wp--preset--color--primary-dark); }
.site-header.is-stuck .bpob-header .wp-block-navigation .wp-block-navigation-item__content,
.site-header .bpob-header.is-solid .wp-block-navigation .wp-block-navigation-item__content { color: #fff; }
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff; }

/* ==========================================================================
   Runde 3 – Abgleich mit dem Original
   ========================================================================== */
/* Links wie im Original (#5cacae) */
:root { --bpob-link: #5cacae; }
.site-main a:not(.wp-element-button):not(.wp-block-button__link):not(.bpob-button):not(.bpob-card__link),
.wpcf7 a { color: var(--bpob-link); }
.site-main a:not(.wp-element-button):not(.wp-block-button__link):not(.bpob-button):not(.bpob-card__link):hover,
.wpcf7 a:hover { color: var(--wp--preset--color--primary-dark); text-decoration: underline; }

/* Vollbreite Sektionen ohne Lücken dazwischen (CTA-Band u. a.) */
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + *,
.site-main > .wp-block-template-part,
.site-main + .wp-block-template-part,
.site-main ~ .wp-block-template-part { margin-block: 0 !important; }
.is-style-cta-band > .wp-block-group { justify-content: space-between; width: 100%; }
.is-style-cta-band .wp-block-buttons { margin: 0 0 0 auto; justify-content: flex-end; }

/* H2 + Unterzeile ohne Abstand, danach 40 px bis zum Fließtext (wie Original) */
.wp-block-heading + .bpob-lead { margin-block-start: 0 !important; }
.bpob-lead { margin-block-end: 0; }
.bpob-lead + * { margin-block-start: 40px !important; }
.bpob-section p { margin-block-end: 20px; }
.bpob-section .wp-block-heading { margin-block-end: 0; }

/* Icons wie im Original (Font Awesome) */
.is-style-icons .is-mail { --icon: url("../images/icons/fa-envelope.svg"); }
.is-style-icons .is-phone { --icon: url("../images/icons/fa-phone.svg"); }
.is-style-icons .is-location { --icon: url("../images/icons/fa-map-marker-alt.svg"); }
.is-style-icons li::before { width: 15px; height: 15px; top: .3em; }

/* Galerie-Karussell: 3 Bilder mittig, links/rechts angeteasert, endlos */
.bpob-carousel { position: relative; max-width: 1140px; margin-inline: auto; outline: none; }
.bpob-carousel:focus-visible { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 6px; }
.bpob-carousel__viewport { overflow: hidden; touch-action: pan-y; }
.bpob-carousel__track { display: flex; gap: 20px; will-change: transform; }
.bpob-carousel__track > .wp-block-image { flex: 0 0 28%; margin: 0 !important; }
.bpob-carousel__track img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto !important; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.bpob-carousel__arrow {
	position: absolute; top: 50%; z-index: 2;
	display: grid; place-items: center;
	width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
	background: rgb(255 255 255 / .9); color: var(--wp--preset--color--heading);
	box-shadow: 0 2px 10px rgb(0 0 0 / .15); cursor: pointer; transform: translateY(-50%);
}
.bpob-carousel__arrow svg { width: 28px; height: 28px; }
.bpob-carousel__arrow:hover { background: #fff; color: var(--wp--preset--color--primary); }
.bpob-carousel__arrow--prev { left: 12px; right: auto; }
.bpob-carousel__arrow--next { right: 12px; left: auto; }
@media (max-width: 781px) {
	.bpob-carousel__track > .wp-block-image { flex-basis: 70%; }
	.bpob-carousel__arrow { width: 44px; height: 44px; }
}

/* "Nach oben"-Button wie OceanWP */
.bpob-to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90;
	display: grid; place-items: center; width: 40px; height: 40px;
	border-radius: 2px; background: rgb(0 0 0 / .4); color: #fff;
	opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background-color .2s;
}
.bpob-to-top.is-visible { opacity: 1; visibility: visible; }
.bpob-to-top:hover { background: rgb(0 0 0 / .8); color: #fff; }
.bpob-to-top svg { width: 14px; height: 18px; }
