/*
Theme Name: Bongo Invest
Theme URI: https://bongoinvest.pl
Description: Motyw dewelopera nieruchomości Bongo Invest. Zbudowany na blokach ACF (mobile-first, jeden breakpoint 992px). Bazowe style w style.css, style bloków w custom.css.
Author: Weboski
Author URI: https://weboski.pl
Version: 1.0.0
Text Domain: bongo-invest
*/

/* =========================================================================
   BONGO INVEST - BAZOWY DESIGN SYSTEM
   Mobile-first: style bazowe = mobile (<992px), jeden media query desktop (>=992px)
   NIE zmieniaj tego pliku dla nowych bloków - dodawaj style do custom.css.
   ========================================================================= */

/* ---- Zmienne ---- */
:root {
    --ink: #191c1f;       /* nagłówki, mocny tekst */
    --body: #45464d;      /* tekst body */
    --gold: #b9975b;      /* akcent złoty */
    --gold-dk: #a07f45;   /* złoty hover */
    --stroke: #c6c6cd;    /* obramowania / linie */
    --whybg: #f2f4f8;     /* jasne tło sekcji */
    --statbg: #e9e9e9;    /* tło kafelków statystyk */
    --green: #16a34a;     /* dostępne */
    --orange: #ea580c;    /* ostatnie / zarezerwowane */
    --gray: #9aa0ab;      /* wyłączone / wynajęte */
    --red: #e91e1e;       /* sprzedane */
    --black: #000;
    --maxw: 1440px;
    --transition: .15s ease;

    --font-head: 'Plus Jakarta Sans', 'PJ-fallback', Georgia, serif;
    --font-body: 'Inter', 'Inter-fallback', Arial, Helvetica, sans-serif;

    --header-h: 80px;
}

/* Fallbacki fontów (ograniczają CLS) */
@font-face {
    font-family: 'PJ-fallback';
    size-adjust: 105%;
    ascent-override: 95%;
    descent-override: 24%;
    line-gap-override: 0%;
    src: local('Georgia');
}
@font-face {
    font-family: 'Inter-fallback';
    size-adjust: 107%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
    src: local('Arial');
}

/* ---- Reset ---- */
* { box-sizing: border-box; }
html { max-width: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--body);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    max-width: 100%;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
@supports not (overflow: clip) {
    html, body { overflow-x: hidden; }
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .18s; }
a:hover { color: var(--gold-dk); }
::selection { background: var(--gold); color: #fff; }

/* main odsuwa treść spod fixed headera; na stronie głównej hero jest pod transparentnym headerem */
.site-main { min-height: 40vh; padding-top: var(--header-h); }
.bongo-home .site-main { padding-top: 0; }
body.admin-bar .site-header { top: 32px; }

/* ---- Typografia (bez klas na elementach typograficznych) ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    margin: 0 0 .5em;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
h1 { font-size: 40px; line-height: 46px; font-weight: 300; }
h2 { font-size: 32px; line-height: 38px; }
h3 { font-size: 24px; line-height: 32px; }
h4 { font-size: 19px; line-height: 26px; font-weight: 500; }
h5 { font-size: 17px; }
h6 { font-size: 15px; }
p { margin: 0 0 1em; font-size: 16px; line-height: 24px; color: var(--body); }
p:last-child { margin-bottom: 0; }
/* strong dziedziczy kolor (nie wymusza ink) - dzięki temu pogrubienie w białych
   nagłówkach/sekcjach ciemnych pozostaje białe. Wyróżnienie w akapitach tekstu
   (jasne tło) dostaje ink; w sekcjach ciemnych i hero wraca do dziedziczenia. */
strong, b { font-weight: 600; }
p strong, li strong, p b, li b { color: var(--ink); }
.section--dark p strong, .section--dark li strong,
.hero-slider p strong, .hero-slider li strong,
.image-cta-columns__card.is-dark p strong { color: inherit; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .4em; }

/* ---- Layout ---- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}
.section { padding: 64px 0; }
.section--gray { background: var(--whybg); }
.section--dark { background: #000; }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark p { color: rgba(255,255,255,.7); }

/* Eyebrow (złota etykieta nad nagłówkiem) - div, nie element typograficzny */
.eyebrow {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}
.section-head { margin-bottom: 40px; }
.section-head--center { text-align: center; }
.section-head--center .eyebrow { margin-left: auto; margin-right: auto; }

/* Nagłówek + link w jednym rzędzie */
.head-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}
.head-row .link-underline { align-self: flex-start; }

/* Link podkreślany */
.link-underline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #000;
    padding-bottom: 4px;
    border-bottom: 1px solid #000;
}
.link-underline:hover { color: var(--gold); border-color: var(--gold); }

/* ---- Przyciski ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--gold);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 18px 32px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--gold-dk); color: #fff; }
.btn svg { flex: none; }
.bongo-icon { display: inline-block; flex: none; color: currentColor; vertical-align: middle; }
.bongo-icon--gold { color: var(--gold); }
.btn--dark { background: #000; }
.btn--dark:hover { background: var(--gold); }
.btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.45);
}
.btn--ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.btn--ghost-dark {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--stroke);
}
.btn--ghost-dark:hover { background: var(--whybg); color: var(--ink); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ---- Header ---- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 60;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
    transition: background .28s, box-shadow .28s, backdrop-filter .28s;
}
/* Wariant transparentny nad ciemnym hero (front-page/hero) do momentu scrolla */
.site-header.is-transparent {
    background: transparent;
    box-shadow: none;
}
.site-header.is-transparent .header-nav a,
.site-header.is-transparent .header-burger { color: #fff; }
.site-header.is-scrolled {
    background: rgba(255,255,255,.96);
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
    backdrop-filter: saturate(1.3) blur(8px);
}
body.is-mobile-menu-open .site-header {
    z-index: 90;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
body.is-mobile-menu-closing .site-header { z-index: 90; }
.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
}
.header-logo { position: relative; display: block; min-width: 0; }
.header-logo img { display: block; height: 44px; width: auto; max-width: 100%; object-fit: contain; transition: opacity .24s ease; }
.header-logo .logo-main { opacity: 1; }
.header-logo .logo-alt { position: absolute; top: 0; left: 0; opacity: 0; }
.site-header.is-transparent .header-logo .logo-main,
body.is-mobile-menu-open .header-logo .logo-main { opacity: 0; }
.site-header.is-transparent .header-logo .logo-alt,
body.is-mobile-menu-open .header-logo .logo-alt { opacity: 1; }
.header-nav { display: none; }
.header-nav ul, .header-nav li { list-style: none; margin: 0; padding: 0; }
.header-nav li { position: relative; }
.header-nav a {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}
.header-nav a:hover, .header-nav a.current-menu-item, .header-nav .current-menu-item > a, .header-nav .current-menu-ancestor > a { color: var(--ink); border-color: var(--gold); }
.header-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5;
    min-width: 230px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0,0,0,.12);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.header-nav .sub-menu .sub-menu {
    top: -12px;
    left: 100%;
}
.header-nav li:hover > .sub-menu,
.header-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.header-nav .sub-menu li { display: block; }
.header-nav .sub-menu a {
    justify-content: space-between;
    gap: 18px;
    padding: 12px 18px;
    border-bottom: none;
    color: var(--ink);
    white-space: nowrap;
}
.header-nav .sub-menu a:hover,
.header-nav .sub-menu .current-menu-item > a,
.header-nav .sub-menu .current-menu-ancestor > a {
    color: var(--gold);
    border-color: transparent;
}
.header-nav .menu-item-has-children > a::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-5px);
}
.header-nav .sub-menu .menu-item-has-children > a::after {
    transform: rotate(-45deg);
    margin-left: auto;
}
.site-header.is-transparent:not(.is-scrolled) .header-nav .sub-menu a { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.header-phone {
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    transition: background .15s, color .15s;
}
.header-phone:hover { background: var(--gold); color: #fff; }
.header-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
    padding: 0;
    position: relative;
    z-index: 90;
    flex: none;
}
.header-burger__line {
    display: block;
    width: 26px;
    height: 2px;
    background: currentColor;
    transform-origin: center;
    transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .2s ease, background .2s ease;
}
.header-burger.is-open { color: #fff; }
.header-burger.is-open .header-burger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-burger.is-open .header-burger__line:nth-child(2) { opacity: 0; transform: scaleX(.3); }
.header-burger.is-open .header-burger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-header.is-scrolled .header-burger.is-open,
.site-header.is-transparent .header-burger.is-open { color: #fff; }
.header-burger:focus-visible,
.mobile-menu__close:focus-visible,
.mobile-submenu-toggle:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

/* Mobilne menu (fullscreen) */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: #0c0d0f;
    display: flex;
    flex-direction: column;
    padding: calc(var(--header-h) + 18px) 24px 40px;
    overflow-y: auto;
    overflow-x: clip;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px);
    transition: opacity .34s ease, transform .44s cubic-bezier(.22,1,.36,1), visibility .34s ease;
    will-change: opacity, transform;
}
.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.mobile-menu.is-closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
    transform: translateY(18px);
}
.mobile-menu__top {
    display: none; align-items: center; justify-content: space-between; margin-bottom: 32px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .28s ease .08s, transform .38s cubic-bezier(.22,1,.36,1) .08s;
}
.mobile-menu__top img { height: 42px; }
.mobile-menu__close { background: none; border: none; color: #fff; cursor: pointer; }
.mobile-menu a.m-link {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-menu .btn { margin-top: 28px; }
.mobile-menu ul, .mobile-menu li { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { position: relative; }
.mobile-menu__list,
.mobile-menu > .btn {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .3s ease .14s, transform .44s cubic-bezier(.22,1,.36,1) .14s;
}
.mobile-menu.is-open .mobile-menu__top,
.mobile-menu.is-open .mobile-menu__list,
.mobile-menu.is-open > .btn {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu .menu-item-has-children > a { padding-right: 52px; }
.mobile-menu .sub-menu {
    padding-left: 18px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height .36s cubic-bezier(.22,1,.36,1), opacity .22s ease, transform .32s ease;
}
.mobile-menu li.is-open > .sub-menu {
    max-height: 700px;
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu .sub-menu a {
    font-size: 13px;
    padding: 14px 0;
    color: rgba(255,255,255,.78);
}
.mobile-submenu-toggle {
    position: absolute;
    top: 7px;
    right: 0;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}
.mobile-submenu-toggle .accordion-sign { width: 12px; height: 12px; color: inherit; }
.mobile-menu li.is-open > .mobile-submenu-toggle .accordion-sign__vertical { stroke-dasharray: 0 1; }

/* ---- Footer ---- */
.site-footer {
    background: #fff;
    border-top: 1px solid rgba(198,198,205,.5);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 0 0;
}
.footer-logo img { height: 72px; width: auto; margin-bottom: 24px; }
.footer-company { font-size: 16px; line-height: 24px; color: var(--body); }
.footer-col__title {
    font-weight: 600; font-size: 16px; letter-spacing: 1.2px; color: #000; margin-bottom: 16px;
}
.footer-tel, .footer-mail {
    display: block;
    font-weight: 500;
    font-size: 18px;
    color: var(--gold);
    word-break: break-word;
}
.footer-tel { margin-bottom: 24px; }
.footer-links,
.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li { list-style: none; margin: 0; padding: 0; }
.footer-links a { font-size: 16px; color: var(--body); text-transform: uppercase; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
    margin-top: 48px;
    border-top: 1px solid rgba(198,198,205,.5);
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}
.footer-copy { font-size: 10px; letter-spacing: 1px; color: var(--body); text-transform: uppercase; }
.footer-social { display: flex; gap: 28px; }
.footer-social a { color: var(--body); transition: color .2s ease; }
.footer-social a svg, .footer-social a img { display: block; transition: filter .2s ease; }
.footer-social a:hover { color: var(--gold); }
.footer-social a:hover img { filter: brightness(0) saturate(100%) invert(64%) sepia(15%) saturate(1423%) hue-rotate(2deg) brightness(92%) contrast(86%); }
.footer-credits { font-size: 10px; letter-spacing: 1px; color: var(--body); text-transform: uppercase; }
.footer-credits:hover { color: var(--gold); }

/* ---- Formularze (bazowe, m.in. CF7) ---- */
input[type=text], input[type=email], input[type=tel], input[type=number],
textarea, select {
    width: 100%;
    background: #fff;
    border: none;
    box-shadow: inset 0 0 0 1px var(--stroke);
    padding: 14px 12px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    border-radius: 0;
    outline: none;
}
input:focus, textarea:focus, select:focus {
    box-shadow: inset 0 0 0 1px var(--gold) !important;
}
label { font-family: var(--font-body); }

/* WYSIWYG treść */
.rte h2 { margin-top: 1.2em; }
.rte h3 { margin-top: 1em; }
.rte img { margin: 1.2em 0; }
.rte a { text-decoration: underline; }
.rte:first-child h2, .rte:first-child h3 {
    margin-top: 0;
}
.rte ul:last-child{
    margin-bottom: 0;
}

/* Eyebrow + nagłówek - stały, jednolity odstęp wszędzie (także w treści WYSIWYG).
   Bez tej reguły ".rte h2/h3" (wyżej) dodaje własny margin-top, który zlewa się
   (collapsuje) z margin-bottom eyebrowa do większej z dwóch wartości - stąd
   "kosmos" między eyebrowem a nagłówkiem wewnątrz WYSIWYG. Selektor "+" ma taką
   samą specyficzność jak ".rte h2/h3" i musi być zdefiniowany PO nich, aby wygrać. */
.eyebrow + h1, .eyebrow + h2, .eyebrow + h3, .eyebrow + h4, .eyebrow + h5, .eyebrow + h6 {
    margin-top: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    font-size: 13px; color: var(--body); margin-top: 16px;
}
.breadcrumbs a { color: var(--body); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs span.sep { color: var(--stroke); }

/* Utilities */
.is-hidden { display: none !important; }
.text-center { text-align: center; }

/* =========================================================================
   DESKTOP (>=992px) - jedyny media query w bazowym pliku
   ========================================================================= */
@media (min-width: 992px) {
    :root { --header-h: 90px; }
    .container { padding: 0 60px; }
    .section { padding: 100px 0; }
    .site-main { padding-top: var(--header-h); }
    .bongo-home .site-main { padding-top: 0; }

    h1 { font-size: 64px; line-height: 72px; letter-spacing: -1.28px; }
    h2 { font-size: 48px; line-height: 56px; letter-spacing: -0.48px; }
    h3 { font-size: 32px; line-height: 40px; }

    .section-head { margin-bottom: 48px; }
    .head-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        gap: 40px;
    }

    .header-inner { padding: 0 64px; }
    .header-logo img { height: 48px; }
    .header-nav { display: flex; align-items: center; }
    .header-nav__list { display: flex; align-items: center; gap: 28px; }
    .header-phone { display: inline-flex; }
    .header-burger { display: none; }

    .footer-grid {
        grid-template-columns: 1.2fr 1fr 1fr 1fr;
        padding: 80px 0 0;
    }
    .footer-logo img { height: 88px; }
    .footer-tel, .footer-mail { font-size: 16px; }
    .footer-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 40px 0; }
    .footer-social { justify-self: center; }
    .footer-credits { justify-self: end; }
}
