/* =========================================================================
   ECH Nieruchomości — system designu
   ========================================================================= */

:root {
    /* Kolory z logo ECH: grafit #2b2a29 + czerwień #e33424 */
    --brand:        #2b2a29;
    --brand-dark:   #1f1b20;
    --brand-600:    #423f3e;
    --accent:       #e33424;
    --accent-dark:  #c22417;

    --ink:          #201e1d;
    --ink-soft:     #55514f;
    --muted:        #948f8c;
    --line:         #e8e5e3;
    --surface:      #ffffff;
    --surface-2:    #f7f5f4;
    --surface-3:    #efece9;

    --ok:           #2e7d5b;
    --shadow-sm:    0 1px 2px rgba(31, 27, 32, .06), 0 1px 3px rgba(31, 27, 32, .08);
    --shadow-md:    0 6px 18px rgba(31, 27, 32, .10);
    --shadow-lg:    0 18px 44px rgba(31, 27, 32, .16);

    --radius:       14px;
    --radius-sm:    9px;
    --container:    1180px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 700; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

/* ---------- Header ---------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 74px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand__logo { height: 46px; width: auto; display: block; }

/* Wersja logo na ciemnym tle (stopka) — monochromatyczna biel */
.brand__logo--light { filter: brightness(0) invert(1); opacity: .95; }

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav a {
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink-soft);
    transition: color .15s, background .15s;
}

.nav a:hover { color: var(--brand); background: var(--surface-2); }
.nav a.is-active { color: var(--brand); }

/* ---------- Nav dropdowns -------------------------------------------- */

.nav-dropdown { position: relative; }
.nav-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink-soft);
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.nav-dropdown__toggle:hover,
.nav-dropdown:focus-within .nav-dropdown__toggle { color: var(--brand); background: var(--surface-2); }
.nav-dropdown__chevron { width: 14px; height: 14px; transition: transform .2s; }
.nav-dropdown:hover .nav-dropdown__chevron,
.nav-dropdown:focus-within .nav-dropdown__chevron { transform: rotate(180deg); }

.nav-dropdown__menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 40;
}
/* Mostek, aby najechanie z przycisku na menu nie gubiło hovera */
.nav-dropdown__menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown__menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
}
.nav-dropdown__menu a:hover { background: var(--surface-2); color: var(--brand); }

.nav__cta {
    margin-left: 8px;
}

/* ---------- Buttons --------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s, box-shadow .15s, background .15s, color .15s;
    white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }

.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-600); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--block { width: 100%; }
.btn--sm { padding: 7px 13px; font-size: .85rem; border-radius: 8px; }
.btn--danger { color: var(--accent-dark); }
.btn--danger:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ------------------------------------------------------ */

.hero {
    position: relative;
    color: #fff;
    background-color: var(--brand-dark); /* fallback zanim załaduje się zdjęcie */
    background-image:
        linear-gradient(180deg, rgba(31, 27, 32, .74), rgba(31, 27, 32, .86)),
        url("https://as2.ftcdn.net/v2/jpg/09/99/73/19/1000_F_999731931_bSiZGjMYl6sRNBASrRWuitfUdAe9wpXU.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero__inner {
    padding: 84px 0 132px;
    max-width: 720px;
}

.hero__eyebrow {
    display: inline-block;
    font-size: .78rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    margin-bottom: 18px;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .86);
    margin: 0;
    max-width: 560px;
}

/* ---------- Search panel --------------------------------------------- */

.search-panel {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 20px;
}

.hero-search {
    margin-top: -78px;
    position: relative;
    z-index: 5;
}

.search-tabs {
    display: inline-flex;
    gap: 4px;
    background: var(--surface-3);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.search-tabs button {
    border: 0;
    background: transparent;
    padding: 8px 16px;
    border-radius: 7px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.search-tabs button.is-active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

.search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .78rem; font-weight: 700; color: var(--ink-soft); letter-spacing: .01em; }

.field input,
.field select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
    font-size: .93rem;
    color: var(--ink);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 52, 36, .15);
}

.field--range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field--range > label { grid-column: 1 / -1; }

/* ---------- Location picker ------------------------------------------ */

.loc-picker { position: relative; }
.loc-picker > summary { list-style: none; }
.loc-picker > summary::-webkit-details-marker { display: none; }

.loc-picker__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    font-size: .93rem;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, box-shadow .15s;
}
.loc-picker__summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-picker__summary .icon { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.loc-picker[open] .loc-picker__summary { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 52, 36, .15); }
.loc-picker[open] .loc-picker__summary .icon { transform: rotate(180deg); }

.loc-picker__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    z-index: 30;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow-lg);
    padding: 10px;
    min-width: 260px;
}
.loc-picker__search {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-size: .9rem;
    margin-bottom: 8px;
}
.loc-picker__search:focus { outline: none; border-color: var(--accent); }
.loc-picker__list { max-height: 280px; overflow-y: auto; }

.loc-group + .loc-group { margin-top: 6px; }
.loc-group__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent-dark);
    padding: 8px 8px 4px;
    position: sticky;
    top: 0;
    background: var(--surface);
}
.loc-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: .92rem;
}
.loc-opt:hover { background: var(--surface-2); }
.loc-opt input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.loc-opt span { flex: 1; }
.loc-opt small { color: var(--muted); font-size: .78rem; }

/* ---------- Advanced filters (Więcej filtrów) ------------------------ */

.search-more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.search-more__toggle {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--brand);
    cursor: pointer;
    user-select: none;
}
.search-more__toggle::-webkit-details-marker { display: none; }
.search-more__toggle .icon { width: 17px; height: 17px; }
.search-more__label--less { display: none; }
.search-more[open] .search-more__label--more { display: none; }
.search-more[open] .search-more__label--less { display: inline; }
.search-more__chevron { width: 15px; height: 15px; transition: transform .2s; }
.search-more[open] .search-more__chevron { transform: rotate(180deg); }
.search-more[open] .search-more__toggle { margin-bottom: 14px; }
.search-more__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: end;
}

/* ---------- Sections -------------------------------------------------- */

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--surface-2); }

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.section__title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; color: var(--brand); }
.section__lead { color: var(--ink-soft); margin: 6px 0 0; }

.eyebrow {
    display: inline-block;
    font-size: .76rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent-dark);
    font-weight: 700;
    margin-bottom: 8px;
}

/* ---------- Offer grid & cards --------------------------------------- */

.offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 26px;
}

.offer-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}

.offer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.offer-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-3);
    overflow: hidden;
}

.offer-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.offer-card:hover .offer-card__media img { transform: scale(1.05); }

.offer-card__badges {
    position: absolute;
    top: 12px; left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.badge--promo { background: var(--accent); color: #fff; }
.badge--mdm { background: var(--ok); color: #fff; }
.badge--rent { background: var(--brand); color: #fff; }

.offer-card__price-tag {
    position: absolute;
    bottom: 12px; left: 12px;
    background: rgba(31, 27, 32, .88);
    color: #fff;
    padding: 7px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.02rem;
    backdrop-filter: blur(4px);
}

.offer-card__price-tag small { font-weight: 600; opacity: .8; font-size: .72rem; }

.offer-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.offer-card__id { font-size: .74rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }

.offer-card__title { font-size: 1.08rem; margin: 0; color: var(--brand); }

.offer-card__loc { color: var(--ink-soft); font-size: .9rem; display: flex; align-items: center; gap: 6px; }

.offer-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: .88rem;
}

.offer-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.offer-card__meta b { color: var(--ink); font-weight: 700; }

.icon { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; flex-shrink: 0; }

/* ---------- Category strip ------------------------------------------- */

.cat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.cat-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 3 / 2;
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s;
}

.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31,27,32,.05), rgba(31,27,32,.82)); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-card__label { position: relative; z-index: 2; font-weight: 700; font-size: 1.15rem; }
.cat-card__count { position: relative; z-index: 2; display: block; font-size: .8rem; opacity: .85; font-weight: 500; }

/* ---------- Trust / stats -------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat__num { font-size: 2.4rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.stat__label { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Listing page --------------------------------------------- */

.page-head {
    background: var(--brand);
    color: #fff;
    padding: 40px 0;
}
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.page-head p { margin: 6px 0 0; color: rgba(255,255,255,.8); }

.listing-layout { display: grid; grid-template-columns: 1fr; gap: 28px; }

.filter-bar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

.result-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 28px 0 20px;
}
.result-head__count { color: var(--ink-soft); }
.result-head__count b { color: var(--ink); }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-soft);
    background: var(--surface-2);
    border-radius: var(--radius);
}

/* ---------- Offer detail --------------------------------------------- */

.detail-header { margin: 28px 0 20px; }
.detail-header__id { color: var(--muted); font-weight: 600; font-size: .85rem; }
.detail-header h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: var(--brand); margin: 6px 0 8px; }
.detail-header__loc { color: var(--ink-soft); font-size: 1.05rem; }

.gallery { margin-bottom: 4px; }

.gallery__stage {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--surface-3);
    border-radius: var(--radius);
    overflow: hidden;
}
.gallery__main {
    width: 100%; height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    display: block;
}

.gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity .18s, background .15s;
}
.gallery__stage:hover .gallery__nav { opacity: 1; }
.gallery__nav:hover { background: #fff; }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__nav .icon { width: 22px; height: 22px; stroke-width: 2; }

.gallery__counter {
    position: absolute;
    bottom: 14px; right: 14px;
    background: rgba(31, 27, 32, .82);
    color: #fff;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}
.gallery__zoom {
    position: absolute;
    top: 14px; right: 14px;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: rgba(31, 27, 32, .72);
    color: #fff;
    border-radius: 9px;
    pointer-events: none;
}

.gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.gallery__thumb {
    flex: 0 0 104px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface-3);
    opacity: .72;
    transition: opacity .15s, border-color .15s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active { opacity: 1; border-color: var(--accent); }

/* ---------- Lightbox -------------------------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 13, 16, .92);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
    grid-column: 2;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    margin: 0 auto;
    object-fit: contain;
    border-radius: 6px;
}
.lightbox__close {
    position: absolute;
    top: 18px; right: 22px;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0; border-radius: 50%;
    cursor: pointer;
    transition: background .15s;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .24); }
.lightbox__nav {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0; border-radius: 50%;
    cursor: pointer;
    transition: background .15s;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, .24); }
.lightbox__nav .icon { width: 26px; height: 26px; stroke-width: 2; }
.lightbox__counter {
    position: absolute;
    bottom: 20px; left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .85);
    font-size: .88rem;
    font-weight: 600;
}

.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; margin: 36px 0 72px; align-items: start; }

.price-box {
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px;
    position: sticky;
    top: 94px;
}
.price-box__amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.price-box__unit { color: rgba(255,255,255,.75); margin: 2px 0 20px; }
.price-box__cta { display: flex; flex-direction: column; gap: 10px; }
.price-box .btn--ghost { border-color: rgba(255,255,255,.3); color: #fff; }
.price-box .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
}
.spec {
    background: var(--surface);
    padding: 16px 18px;
}
.spec__label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.spec__value { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-top: 3px; }

.prose { color: var(--ink-soft); font-size: 1.03rem; }
.prose h2 { color: var(--brand); font-size: 1.35rem; margin-top: 0; }

.feature-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.feature-list li {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
}

/* ---------- Contact / about ------------------------------------------ */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-item__ico { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--brand); flex-shrink: 0; }
.contact-item b { display: block; }
.contact-item span { color: var(--ink-soft); }

/* ---------- CTA band -------------------------------------------------- */

.cta-band {
    background: linear-gradient(120deg, var(--brand-dark) 35%, var(--accent-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: 1.7rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,.82); }

/* ---------- Footer ---------------------------------------------------- */

.site-footer {
    background: var(--brand-dark);
    color: rgba(255, 255, 255, .72);
    padding: 56px 0 28px;
    margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.72); display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--accent); }
.footer-brand p { font-size: .92rem; line-height: 1.7; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 40px;
    padding-top: 20px;
    font-size: .84rem;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Responsive ------------------------------------------------ */

.nav-toggle { display: none; }

@media (max-width: 960px) {
    .search-grid { grid-template-columns: repeat(2, 1fr); }
    .search-grid .btn { grid-column: 1 / -1; }
    .search-more__grid { grid-template-columns: repeat(2, 1fr); }
    .cat-strip { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .price-box { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .nav { display: none; }
    .nav-toggle {
        display: inline-grid; place-items: center;
        margin-left: auto;
        width: 42px; height: 42px;
        border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer;
    }
    .search-grid { grid-template-columns: 1fr; }
    .search-more__grid { grid-template-columns: 1fr; }
    .gallery__stage { aspect-ratio: 4 / 3; }
    .gallery__nav { opacity: 1; width: 38px; height: 38px; }
    .gallery__thumb { flex-basis: 84px; height: 60px; }
    .lightbox { grid-template-columns: 1fr; padding: 16px; }
    .lightbox__nav { position: absolute; bottom: 18px; width: 46px; height: 46px; }
    .lightbox__nav--prev { left: 20px; }
    .lightbox__nav--next { right: 20px; }
    .lightbox__img { grid-column: 1; max-height: calc(100vh - 120px); }
    .cta-band { padding: 32px; }
    .section { padding: 48px 0; }
}

/* =========================================================================
   Panel administracyjny + CMS
   ========================================================================= */

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: .93rem;
    font-weight: 500;
}
.alert--success { background: #e7f5ee; color: #1c6b48; border: 1px solid #bfe6d2; }
.alert--error { background: #fdeceb; color: var(--accent-dark); border: 1px solid #f6cfcb; }

/* ---------- Admin chrome --------------------------------------------- */

body.admin { background: var(--surface-2); }

.admin-bar {
    background: var(--brand);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-bar__inner {
    max-width: 1180px;
    margin-inline: auto;
    padding: 0 20px;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.admin-bar .brand { gap: 10px; }
.admin-bar .brand__logo { filter: brightness(0) invert(1); }
.admin-bar__tag {
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
    background: rgba(255, 255, 255, .16);
    padding: 3px 8px;
    border-radius: 5px;
}
.admin-bar__nav { display: flex; gap: 4px; margin-left: 10px; }
.admin-bar__nav a {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .92rem;
    color: rgba(255, 255, 255, .78);
}
.admin-bar__nav a:hover, .admin-bar__nav a.is-active { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-bar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.admin-bar__link { color: rgba(255, 255, 255, .8); font-size: .9rem; font-weight: 600; }
.admin-bar__link:hover { color: #fff; }
.admin-bar__user { color: rgba(255, 255, 255, .7); font-size: .88rem; }
.admin-bar .btn--ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.admin-bar .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }

.admin-main { padding: 36px 0 72px; }

.admin-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}
.admin-head h1 { color: var(--brand); font-size: 1.7rem; margin: 0; }
.admin-head p { color: var(--ink-soft); margin: 4px 0 0; }

/* ---------- Admin table ---------------------------------------------- */

.admin-table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    text-align: left;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: var(--surface-2); }
.admin-slug { color: var(--brand-600); font-size: .88rem; }
.admin-slug:hover { color: var(--accent); }
.admin-muted { color: var(--muted); font-size: .86rem; }
.admin-actions { display: flex; gap: 8px; justify-content: flex-end; }

.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.pill--ok { background: #e7f5ee; color: #1c6b48; }
.pill--muted { background: var(--surface-3); color: var(--ink-soft); }

/* ---------- Admin form ------------------------------------------------ */

.admin-form { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 20px;
}
.admin-card h3 { color: var(--brand); font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 16px; }
.admin-form label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form input[type="password"],
.admin-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
    font-size: .93rem;
    color: var(--ink);
    background: var(--surface);
}
.admin-form input:focus, .admin-form textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 52, 36, .15);
}
.admin-form .form-group, .admin-form > div > div { margin-bottom: 16px; }
.admin-form .checkbox label, .admin-form input[type="checkbox"] + label { display: inline; }
.admin-form input[type="checkbox"] { width: auto; margin-right: 8px; accent-color: var(--accent); }
.admin-form .help-text, .admin-form small { display: block; color: var(--muted); font-size: .8rem; margin-top: 5px; }
/* Błędy walidacji Symfony — celowo tylko dla list z klasą, aby nie dotykać treści w CKEditor. */
.admin-form ul.form-errors { list-style: none; padding: 0; margin: 6px 0 0; }
.admin-form ul.form-errors li { color: var(--accent-dark); font-size: .84rem; }
.ck-editor__editable { min-height: 340px; }

/* Treść CMS renderowana z edytora */
.cms-content h2 { color: var(--brand); font-size: 1.4rem; margin: 1.4em 0 .5em; }
.cms-content h3 { color: var(--brand); font-size: 1.15rem; margin: 1.2em 0 .4em; }
.cms-content p { margin: 0 0 1em; }
.cms-content ul, .cms-content ol { margin: 0 0 1em; padding-left: 1.4em; }
.cms-content li { margin-bottom: .3em; }
.cms-content a { color: var(--accent-dark); text-decoration: underline; }
.cms-content blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 1em 0; color: var(--ink-soft); font-style: italic; }
.cms-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.cms-content th, .cms-content td { border: 1px solid var(--line); padding: 8px 12px; }

@media (max-width: 900px) {
    .admin-form { grid-template-columns: 1fr; }
    .admin-bar__nav, .admin-bar__link { display: none; }
}

/* ---------- Formularz kontaktowy ------------------------------------- */

.contact-form form > div { margin-bottom: 14px; }
.contact-form label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
    font-size: .93rem;
    color: var(--ink);
    background: var(--surface);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 52, 36, .15); }
.contact-form ul { list-style: none; padding: 0; margin: 6px 0 0; }
.contact-form ul li { color: var(--accent-dark); font-size: .84rem; }

/* Honeypot antyspamowy — poza ekranem, niewidoczny dla ludzi */
.hp-field { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Drzewo pozycji nawigacji w panelu */
.admin-row-child td:first-child { padding-left: 32px; }
.admin-row-child td { background: var(--surface-2); }
.admin-tree-mark { color: var(--muted); margin-right: 6px; }

/* ---------- Spis poradników (strona Porady) -------------------------- */

.cms-content .guide-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin: 14px 0 8px;
}
.cms-content a.guide-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cms-content a.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.cms-content .guide-card h3 { color: var(--brand); margin: 0 0 8px; font-size: 1.15rem; }
.cms-content .guide-card p { color: var(--ink-soft); margin: 0 0 12px; font-size: .96rem; }
.cms-content .guide-card__more { color: var(--accent-dark); font-weight: 700; font-size: .92rem; }

/* ---------- Oferta: multimedia, obniżka, agent ----------------------- */

.media-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }

.price-box__prev { color: rgba(255,255,255,.75); font-size: .95rem; margin-bottom: 2px; }
.price-box__prev { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.5); }
.price-box__prev .price-drop {
    text-decoration: none;
    display: inline-block;
    margin-left: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    padding: 2px 8px;
    border-radius: 6px;
    vertical-align: middle;
}
.price-box__rent { color: rgba(255,255,255,.78); font-size: .9rem; margin-top: 6px; }

.agent-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
    margin-top: 16px;
}
.agent-box__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.agent-box__name { font-size: 1.1rem; font-weight: 800; color: var(--brand); margin-top: 4px; }
.agent-box__lic { font-size: .85rem; color: var(--ink-soft); margin-top: 2px; }
.agent-box__phone { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--accent-dark); }
.agent-box__phone:hover { color: var(--accent); }

/* Komunikat prawny nad stopką */
.legal-note { background: var(--surface-2); border-top: 1px solid var(--line); padding: 16px 0; }
.legal-note .container { color: var(--ink-soft); font-size: .84rem; text-align: center; }
