/* Vlastní override stylu pro Soreta web. Vendor CSS includy v base.html.twig. */

/* Public 2-level menu dropdown (Etapa 4) */
.nav-menu .dropdown { position: relative; }
.nav-menu .dropdown > ul { display: none; position: absolute; top: 100%; left: 0; background: white; border: 1px solid #e5e7eb; min-width: 200px; padding: 8px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.1); list-style: none; }
.nav-menu .dropdown:hover > ul { display: block; }
.nav-menu .dropdown > ul li a { display: block; padding: 8px 16px; color: #111; }
.nav-menu .dropdown > ul li a:hover { background: #f3f4f6; }

/* Hero / banner (úvodní stránka) */
.banner .carousel-caption.banner-slider-inner {
    top: 0;
    bottom: 0;
    height: 100%;
    display: flex;
    align-items: center; /* svislé zarovnání obsahu na střed */
}
@media (min-width: 992px) {
    .banner,
    .banner .carousel,
    .banner .carousel-inner,
    .banner .carousel-item.item-bg {
        height: 625px;
    }
    .banner .carousel-item.item-bg img {
        height: 625px;
        object-fit: cover;
    }
    /* nadpis + popisek max 1/3 šířky zleva, delší text se zalomí */
    .banner .banner-info2 .text-l {
        max-width: 33.333%;
    }
}

/* ===== Hlavička v normálním toku — nesmí překrývat obsah pod sebou =====
   Template má kontaktní lištu (.top-header-3) jako position:absolute a hlavní
   navigaci (.sticky-header / .main-header-5) jako position:fixed (top:110px).
   Obě tak plavou nad obsahem a překrývaly hero na úvodu i nadpisy podstránek.
   Vracíme celou hlavičku do toku, takže obsah přirozeně začíná pod ní. */
.top-header-3 {
    position: relative !important;
}
.main-header.sticky-header,
.main-header.header-fixed,
.main-header.header-fixed.small {
    position: static !important;
    top: auto !important;
}

/* Rozbalovací menu (Služby): roztáhnout pole podle nejdelší položky,
   ať texty nepřetékají přes bílé pozadí. */
.main-header .dropdown-menu {
    width: max-content;
    min-width: 16rem;
    max-width: min(92vw, 360px);
}
.main-header .dropdown-menu a {
    white-space: nowrap;
}
/* Čtvercová ikonka před textem podpoložky v dropdownu */
.main-header .dropdown-menu .menu-icon {
    width: 26px;
    height: 26px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
    vertical-align: middle;
}

/* ===== Rozcestník služeb — vizuální boxy (čtvercové obrázky jako tlačítka) ===== */
.service-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin: 34px 0 10px;
}
.service-box {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease;
}
.service-box:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .13);
    transform: translateY(-3px);
    color: inherit;
}
.service-box-img {
    display: block;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
}
.service-box-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.service-box-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #c3c8d0;
    font-size: 42px;
}
.service-box-label {
    display: block;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    line-height: 1.35;
}

/* ===== Property card (.pcard) — design dle ukázky (home + seznam) ===== */
.pcard {
    --pc-accent: #1e73be;
    --pc-ink: #1f2a37;
    --pc-muted: #98a2b3;
    --pc-line: #eceff3;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(20, 38, 66, .08);
    transition: transform .25s ease, box-shadow .25s ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(20, 38, 66, .15); }

.pcard__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #eef1f5;
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.pcard:hover .pcard__media img { transform: scale(1.05); }

/* Rohová stužka (diagonální v levém horním rohu) */
.pcard__ribbon {
    position: absolute;
    /* Střed pruhu leží na úhlopříčce rohu (x=y): left+200/2 = top+výška/2.
       Výška = padding 6+6 + line-height 16 = 28 → střed (36,36). */
    top: 22px;
    left: -64px;
    width: 200px;
    transform: rotate(-45deg);
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #fff;
    z-index: 3;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .22);
    pointer-events: none;
}
.pcard__ribbon--featured { background: linear-gradient(135deg, #2fae63, #1f9551); }
.pcard__ribbon--new { background: linear-gradient(135deg, #36c06f, #27a85d); }

/* Cenová placka */
.pcard__price {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 3;
    background: rgba(18, 28, 45, .8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
    padding: 10px 16px;
    border-radius: 9px;
}
.pcard__price small { font-size: .68em; font-weight: 500; opacity: .85; margin-left: 3px; }

.pcard__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 18px; }
.pcard__title { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0 0 12px; }
.pcard__title a { color: var(--pc-ink); transition: color .2s ease; }
.pcard__title a:hover { color: var(--pc-accent); }
.pcard__loc { display: flex; align-items: center; gap: 7px; color: #6b7480; font-size: 14px; margin: 0; }
.pcard__loc i { color: var(--pc-muted); font-size: 16px; }

.pcard__params {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--pc-line);
    border-bottom: 1px solid var(--pc-line);
}
.pcard__facils { display: flex; gap: 28px; flex-wrap: wrap; }
.pcard__facil { display: flex; align-items: center; gap: 10px; }
.pcard__facil > i { font-size: 21px; color: var(--pc-muted); }
.pcard__facil strong { display: block; font-size: 15px; font-weight: 700; color: var(--pc-ink); line-height: 1.15; }
.pcard__facil em { display: block; font-style: normal; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--pc-muted); }
.pcard__agent { flex: 0 0 auto; }
.pcard__agent img {
    width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block;
    border: 2px solid #fff; box-shadow: 0 0 0 1px var(--pc-line), 0 4px 10px rgba(0, 0, 0, .12);
    transition: transform .2s ease;
}
.pcard__agent:hover img { transform: scale(1.08); }

.pcard__footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; margin-top: auto; }
.pcard__detail { color: var(--pc-accent); font-weight: 600; font-size: 15px; }
.pcard__detail:hover { color: #15578f; }
.pcard__arrow {
    width: 42px; height: 42px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eaf2fb; color: var(--pc-accent); font-size: 18px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.pcard__arrow:hover { background: var(--pc-accent); color: #fff; transform: translateX(2px); }

/* ===== Detail nemovitosti (.pd) — redesign dle ukázky ===== */
.pd {
    --pd-accent: #1e73be;
    --pd-ink: #1f2a37;
    --pd-muted: #6b7480;
    --pd-faint: #9aa3b2;
    --pd-line: #eceff3;
    background: #eef1f5;
    padding: 30px 0 60px;
}
.pd-card {
    background: #fff;
    box-shadow: 0 4px 18px rgba(20, 38, 66, .07);
    padding: 26px 30px;
    margin-bottom: 24px;
}
.pd-h {
    font-size: 22px;
    font-weight: 700;
    color: var(--pd-ink);
    margin: 0 0 20px;
    padding-bottom: 12px;
    position: relative;
}
.pd-h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: var(--pd-accent); }

/* Galerie — poměr stran je na celé galerii; oba sloupce vyplní stejně vysoký řádek,
   takže dvě boční fotky mají dohromady přesně výšku hlavní fotky. */
.pd-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 14px; aspect-ratio: 12 / 5; margin-bottom: 24px; }
.pd-gallery--single { grid-template-columns: 1fr; aspect-ratio: 16 / 9; }
.pd-gallery__main { position: relative; display: block; height: 100%; min-height: 0; overflow: hidden; background: #dfe4ea; }
.pd-gallery__side { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 0; overflow: hidden; }
.pd-gallery__cell { position: relative; display: block; flex: 1; overflow: hidden; min-height: 0; background: #dfe4ea; }
@media (max-width: 575px) {
    .pd-gallery { grid-template-columns: 1fr; aspect-ratio: 4 / 3; }
    .pd-gallery__side { display: none; }
}
.pd-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.pd-gallery a:hover img { transform: scale(1.04); }
.pd-ribbon {
    position: absolute; top: 22px; left: -64px; width: 200px; transform: rotate(-45deg);
    text-align: center; padding: 6px 0; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; color: #fff; z-index: 3; pointer-events: none;
    background: linear-gradient(135deg, #2e8be0, #1e73be); box-shadow: 0 3px 8px rgba(0, 0, 0, .22);
}
.pd-gallery__counter {
    position: absolute; right: 14px; bottom: 14px; z-index: 3;
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(18, 28, 45, .8); color: #fff; font-size: 14px; font-weight: 600;
    padding: 7px 13px; border-radius: 6px;
}
.pd-gallery__more {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(18, 28, 45, .55); color: #fff; font-size: 18px; font-weight: 700;
}

/* Hlavička */
.pd-head__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.pd-head__title { font-size: 27px; font-weight: 700; color: var(--pd-ink); margin: 0 0 8px; line-height: 1.25; }
.pd-head__loc { display: flex; align-items: center; gap: 7px; color: var(--pd-muted); margin: 0; font-size: 15px; }
.pd-head__loc i { color: var(--pd-faint); }
.pd-head__price { text-align: right; white-space: nowrap; }
.pd-head__price strong { display: block; font-size: 29px; font-weight: 700; color: var(--pd-ink); line-height: 1.1; }
.pd-head__price small { font-size: .55em; font-weight: 500; color: var(--pd-muted); }
.pd-head__price span { display: block; font-size: 13px; color: var(--pd-faint); margin-top: 4px; }
.pd-specs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.pd-spec { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 150px; background: #f3f5f8; padding: 14px 18px; }
.pd-spec > i { font-size: 22px; color: var(--pd-accent); }
.pd-spec strong { display: block; font-size: 16px; font-weight: 700; color: var(--pd-ink); line-height: 1.15; }
.pd-spec em { display: block; font-style: normal; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--pd-faint); }

/* Popis */
.pd-desc { color: #4b5563; line-height: 1.75; font-size: 15px; }

/* Parametry */
.pd-params { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.pd-param { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--pd-line); }
.pd-param__label { color: var(--pd-muted); font-size: 15px; }
.pd-param__value { font-weight: 700; color: var(--pd-ink); text-align: right; font-size: 15px; }

/* Energetický štítek */
.pd-energy { display: flex; align-items: center; gap: 16px; margin-top: 26px; border: 1px solid var(--pd-line); padding: 14px 18px; }
.pd-energy__badge { flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 22px; }
.pd-energy__cap { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--pd-faint); }
.pd-energy__text strong { font-size: 16px; color: var(--pd-ink); }

/* Makléř */
.pd-agent { text-align: center; }
.pd-agent__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 14px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--pd-line), 0 6px 16px rgba(0, 0, 0, .12); }
.pd-agent__name { font-size: 18px; font-weight: 700; margin: 0 0 2px; }
.pd-agent__name a { color: var(--pd-ink); }
.pd-agent__pos { color: var(--pd-muted); font-size: 14px; margin: 0 0 18px; }

/* Tlačítka */
.pd-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 18px; margin-bottom: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.pd-btn--primary { background: var(--pd-accent); color: #fff; }
.pd-btn--primary:hover { background: #185e9c; color: #fff; }
.pd-btn--outline { background: #fff; color: var(--pd-ink); border-color: #d7dde5; }
.pd-btn--outline:hover { border-color: var(--pd-accent); color: var(--pd-accent); }

/* Formulář dotazu */
.pd-form label { display: block; font-size: 13px; color: #4b5563; font-weight: 500; margin: 14px 0 6px; }
.pd-form input:not([type=checkbox]):not([type=submit]):not([type=hidden]),
.pd-form textarea {
    width: 100%; padding: 11px 14px; border: 1px solid #d7dde5; background: #fff; font-size: 14px; color: var(--pd-ink); border-radius: 0;
}
.pd-form textarea { min-height: 118px; resize: vertical; line-height: 1.5; }
.pd-form input:focus, .pd-form textarea:focus { border-color: var(--pd-accent); outline: none; }
.pd-form .pd-btn { margin-top: 20px; }

@media (max-width: 575px) {
    .pd-params { grid-template-columns: 1fr; }
    .pd-head__price { text-align: left; }
}

/* ===== Sticky hlavička — odhalí se při scrollu nahoru =====
   Výchozí stav zůstává v toku (nepřekrývá hero). Třídu .is-fixed/.is-visible
   přidává JS: po sjetí pod menu je lišta fixní a skrytá; při scrollu nahoru
   se shora zasune. Spacer (JS) drží původní místo, takže obsah neposkočí. */
.main-header.sticky-header.is-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1031;
    background: #1e73be !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
    transform: translateY(-100%);
    transition: transform .32s ease;
}
.main-header.sticky-header.is-fixed.is-visible { transform: translateY(0); }

/* Bílé odkazy v zafixované liště (přebije template třídu header-shrink),
   ale NE tlačítko „Proč si vybrat nás" (.h-icon má bílé pozadí → modrý text). */
.main-header.is-fixed .navbar-expand-lg .navbar-nav .nav-link:not(.h-icon) { color: #fff !important; }
.main-header.is-fixed .navbar-expand-lg .navbar-nav .h-icon { color: #1e73be !important; background: #fff !important; }

/* Logo jen v zafixované liště — obarvené na bílé přes CSS filtr */
.main-header.is-fixed .logos { display: block !important; }
.main-header.is-fixed .logos img { height: 30px; width: auto; filter: brightness(0) invert(1); }

@media (min-width: 992px) {
    .main-header.is-fixed .navbar { flex-wrap: nowrap; align-items: center; }
    .main-header.is-fixed .logos { flex: 0 0 auto; margin: 0 26px 0 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }
    .main-header.is-fixed .navbar-collapse.w-100 { width: auto !important; flex: 1 1 auto; }
    .main-header.is-fixed .navbar-collapse .navbar-nav.w-100 { width: auto !important; }
    .main-header.is-fixed .navbar-collapse .navbar-nav.justify-content-start { margin-right: auto; }
    /* Nižší zafixovaná lišta — menší vertikální padding než výchozí menu */
    .main-header.is-fixed .navbar-expand-lg .navbar-nav .nav-link { padding-top: 14px !important; padding-bottom: 14px !important; }
    .main-header.is-fixed .navbar-expand-lg .navbar-nav .h-icon { padding-top: 15px !important; padding-bottom: 15px !important; }
}

/* ===== Filtr nemovitostí (.pcf) — redesign dle ukázky ===== */
.pcf-page { background: #f1f4f8; padding: 30px 0 60px; }
.pcf-total { color: #1e73be; }
.pcf { background: #fff; box-shadow: 0 6px 26px rgba(20, 38, 66, .08); border-radius: 14px; padding: 26px 30px; margin-bottom: 36px; }
.pcf-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #98a2b3; margin-bottom: 10px; }
.pcf-group { margin-bottom: 22px; }
.pcf-group:last-child { margin-bottom: 0; }
.pcf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 40px; }

/* Typ — dlaždice */
.pcf-types { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pcf-type { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 16px 10px; border: 1px solid #e2e8f1; border-radius: 10px; color: #475569; text-decoration: none; background: #fff; transition: border-color .15s ease, color .15s ease, box-shadow .15s ease; text-align: center; }
.pcf-type:hover { border-color: #1e73be; color: #1e73be; }
.pcf-type.is-active { background: #1e73be; border-color: #1e73be; color: #fff; box-shadow: 0 8px 18px rgba(30, 115, 190, .3); }
.pcf-type.is-active,
.pcf-type.is-active i,
.pcf-type.is-active .pcf-type__label { color: #fff !important; }
.pcf-type i { font-size: 26px; }
.pcf-type__label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.pcf-type__count { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border-radius: 5px; background: #1e73be; color: #fff; }
.pcf-type.is-active .pcf-type__count { background: rgba(255, 255, 255, .25); }

/* Segment (smlouva) */
.pcf-seg { display: inline-flex; border: 1px solid #e2e8f1; border-radius: 8px; overflow: hidden; }
.pcf-seg__btn { padding: 11px 26px; font-size: 14px; font-weight: 600; color: #475569; text-decoration: none; background: #fff; border-right: 1px solid #e2e8f1; transition: background .15s, color .15s; }
.pcf-seg__btn:last-child { border-right: 0; }
.pcf-seg__btn:hover { color: #1e73be; }
.pcf-seg__btn.is-active { background: #1e73be; color: #fff; }

/* Kraj — select */
.pcf-select { position: relative; }
.pcf-select > .bi-geo-alt { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.pcf-select__chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.pcf-select select { width: 100%; padding: 12px 40px; border: 1px solid #e2e8f1; border-radius: 8px; background: #f7f9fc; font-size: 14px; color: #1f2a37; appearance: none; -webkit-appearance: none; cursor: pointer; }
.pcf-select select:focus { outline: none; border-color: #1e73be; }

/* Cena */
.pcf-price { display: flex; gap: 16px; }
.pcf-input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #e2e8f1; border-radius: 8px; background: #f7f9fc; font-size: 14px; color: #1f2a37; }
.pcf-input:focus { outline: none; border-color: #1e73be; }

/* Dvojitý cenový slider */
.pcf-slider { position: relative; height: 34px; margin-top: 10px; }
.pcf-slider__rail { position: absolute; top: 15px; left: 0; right: 0; height: 4px; background: #e2e8f1; border-radius: 2px; }
.pcf-slider__fill { position: absolute; top: 0; bottom: 0; background: #1e73be; border-radius: 2px; }
.pcf-slider__h { position: absolute; top: 7px; left: 0; width: 100%; height: 20px; margin: 0; -webkit-appearance: none; appearance: none; background: none; pointer-events: none; }
.pcf-slider__h::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #1e73be; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.pcf-slider__h::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #1e73be; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.pcf-slider__h::-webkit-slider-runnable-track { background: none; border: none; }
.pcf-slider__h::-moz-range-track { background: none; border: none; }

/* Řazení */
.pcf-sort { display: flex; flex-wrap: wrap; gap: 22px; }
.pcf-sort__link { font-size: 14px; color: #64748b; text-decoration: none; }
.pcf-sort__link:hover { color: #1e73be; }
.pcf-sort__link.is-active { color: #1e73be; font-weight: 700; }

/* Patička filtru */
.pcf-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #eef1f5; margin-top: 6px; padding-top: 20px; }
.pcf-found { color: #64748b; font-size: 14px; }
.pcf-found strong { color: #1f2a37; }
.pcf-actions { display: flex; gap: 12px; }
.pcf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; font-size: 14px; font-weight: 600; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.pcf-btn--ghost { background: #fff; color: #475569; border-color: #d7dde5; }
.pcf-btn--ghost:hover { border-color: #1e73be; color: #1e73be; }
.pcf-btn--primary { background: #1e73be; color: #fff; }
.pcf-btn--primary:hover { background: #185e9c; color: #fff; }

/* Výsledky + loader (async filtrace bez probliknutí) */
.pcf-results { position: relative; min-height: 140px; }
.pcf-loader { position: absolute; inset: 0; display: none; justify-content: center; align-items: flex-start; padding-top: 70px; z-index: 5; }
.pcf-spinner { width: 46px; height: 46px; border: 4px solid #d7e3f0; border-top-color: #1e73be; border-radius: 50%; animation: pcf-spin .7s linear infinite; }
@keyframes pcf-spin { to { transform: rotate(360deg); } }
#listing-async.is-loading .pcf-loader { display: flex; }
#listing-async.is-loading .pcf-results .row { opacity: .4; transition: opacity .15s ease; pointer-events: none; }
#listing-async { transition: opacity .1s ease; }

@media (max-width: 991px) {
    .pcf { padding: 20px 16px; }
    .pcf-cols { grid-template-columns: 1fr; }
    .pcf-col, .pcf-group { min-width: 0; }
    .pcf-types { grid-template-columns: repeat(2, 1fr); }
    /* segment smlouvy na plnou šířku, ať se nepřetéká */
    .pcf-seg { display: flex; width: 100%; }
    .pcf-seg__btn { flex: 1; padding: 11px 6px; text-align: center; }
    /* cena + kraj — zaručeně do šířky karty */
    .pcf-price { gap: 12px; }
    .pcf-input, .pcf-select select { width: 100%; max-width: 100%; box-sizing: border-box; }
    .pcf-slider { max-width: 100%; }
    .pcf-foot { flex-direction: column; align-items: stretch; }
    .pcf-actions { justify-content: flex-end; }
}

/* ===== Mobilní menu — výsuvný drawer zleva (vlastní, místo BS collapse) ===== */
body.nav-drawer-lock { overflow: hidden; }
.nav-drawer-close { display: none; }       /* viditelný jen v mobilním draweru (níže) */
.nav-drawer-backdrop { display: none; }
@media (max-width: 991.98px) {
    .main-header .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 290px;
        max-width: 85vw;
        background: #fff;
        z-index: 1060;
        transform: translateX(-100%);
        transition: transform .3s ease;
        overflow-y: auto;
        display: block !important; /* přebije Bootstrap .collapse { display:none } */
        padding: 60px 0 24px;
        box-shadow: 6px 0 30px rgba(0, 0, 0, .25);
    }
    .main-header .navbar-collapse.is-open { transform: translateX(0); }

    .nav-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .5);
        z-index: 1059;
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease;
    }
    .nav-drawer-backdrop.is-open { opacity: 1; visibility: visible; }

    .nav-drawer-close {
        display: block;
        position: absolute;
        top: 12px;
        right: 14px;
        width: 40px;
        height: 40px;
        border: 0;
        background: transparent;
        font-size: 30px;
        line-height: 1;
        color: #475569;
        cursor: pointer;
        z-index: 2;
    }

    /* položky v draweru */
    .main-header .navbar-collapse .navbar-nav { flex-direction: column; width: 100% !important; align-items: stretch; padding: 0 !important; }
    .main-header .navbar-collapse .nav-item { width: 100%; }
    .main-header .navbar-collapse .nav-link { padding: 13px 24px !important; color: #1f2a37 !important; font-size: 15px; line-height: 1.3; border-bottom: 1px solid #f0f2f5; text-transform: none; }
    .main-header .navbar-collapse .nav-link:hover { color: #1e73be !important; background: #f7f9fc; }

    /* Služby submenu — rozbalené inline */
    .main-header .navbar-collapse .dropdown-menu { position: static !important; display: block !important; width: 100%; min-width: 0; border: 0; box-shadow: none; padding: 0; margin: 0; background: #f6f8fb; transform: none !important; opacity: 1 !important; visibility: visible !important; }
    .main-header .navbar-collapse .dropdown-menu .dropdown-item { padding: 11px 24px 11px 40px !important; font-size: 14px; }
    .main-header .navbar-collapse .dropdown-toggle::after { display: none; }

    /* tlačítko „Proč si vybrat nás" v draweru */
    .main-header .navbar-collapse .h-icon { display: inline-flex; justify-content: center; background: #1e73be !important; color: #fff !important; margin: 16px 24px 0; border-radius: 6px; }
}

/* ===== Detail makléře (.ad) — redesign dle ukázky ===== */
.ad-page { background: #f1f4f8; padding: 26px 0 60px; }
.ad-breadcrumb { color: #64748b; font-size: 14px; margin-bottom: 18px; }
.ad-breadcrumb a { color: #1e73be; }
.ad-breadcrumb span { margin: 0 6px; color: #b8c0cc; }

/* Karta makléře */
.ad-card { background: #fff; border-radius: 14px; box-shadow: 0 6px 26px rgba(20, 38, 66, .08); overflow: hidden; }
@media (min-width: 992px) { .ad-page .ad-card { position: sticky; top: 80px; } }
.ad-photo { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #dfe4ea; }
.ad-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-verified { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: #2fae63; color: #fff; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 6px; }
.ad-photo__name { position: absolute; left: 0; right: 0; bottom: 0; padding: 46px 22px 18px; background: linear-gradient(to top, rgba(15, 23, 42, .88), rgba(15, 23, 42, 0)); color: #fff; }
.ad-photo__name h1, .ad-photo__name h3 { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.2; color: #fff !important; }
.ad-photo__name p { font-size: 14px; opacity: .9; margin: 5px 0 0; color: #fff !important; }
.ad-card__body { padding: 16px 22px 22px; }

.ad-stars { color: #f6a609; font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.ad-rating { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; border-bottom: 1px solid #eef1f5; padding: 10px 0 16px; cursor: pointer; text-decoration: none; }
.ad-rating strong { color: #1f2a37; font-size: 15px; }
.ad-rating__count { color: #1e73be; font-size: 14px; }
.ad-rating .bi-chevron-right { margin-left: auto; color: #9aa3b2; }

.ad-contact { list-style: none; padding: 0; margin: 16px 0 18px; }
.ad-contact li { display: flex; gap: 14px; align-items: center; padding: 9px 0; }
.ad-contact li > i { font-size: 18px; color: #1e73be; width: 22px; text-align: center; flex: 0 0 auto; }
.ad-contact em { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #9aa3b2; font-style: normal; }
.ad-contact a, .ad-contact strong { color: #1f2a37; font-weight: 600; font-size: 15px; word-break: break-word; }

.ad-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; font-weight: 600; font-size: 15px; border-radius: 8px; border: 1px solid transparent; margin-bottom: 10px; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.ad-btn--primary { background: #1e73be; color: #fff; }
.ad-btn--primary:hover { background: #185e9c; color: #fff; }
.ad-btn--outline { background: #fff; color: #1f2a37; border-color: #d7dde5; }
.ad-btn--outline:hover { border-color: #1e73be; color: #1e73be; }

.ad-social { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eef1f5; }
.ad-social > span { color: #9aa3b2; font-size: 13px; }
.ad-social a { width: 34px; height: 34px; border-radius: 7px; background: #eef2f7; color: #475569; display: inline-flex; align-items: center; justify-content: center; transition: .15s; }
.ad-social a:hover { background: #1e73be; color: #fff; }

/* Pravý sloupec */
.ad-block { background: #fff; border-radius: 14px; box-shadow: 0 6px 26px rgba(20, 38, 66, .08); padding: 26px 30px; margin-bottom: 24px; }
.ad-h { font-size: 22px; font-weight: 700; color: #1f2a37; margin: 0 0 18px; padding-bottom: 12px; position: relative; }
.ad-h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: #1e73be; }
.ad-bio { color: #4b5563; line-height: 1.75; font-size: 15px; }
.ad-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.ad-stat { background: #f3f5f8; padding: 18px; border-radius: 10px; }
.ad-stat strong { display: block; font-size: 28px; color: #1e73be; font-weight: 700; line-height: 1; }
.ad-stat span { color: #64748b; font-size: 14px; }

.ad-awards { list-style: none; padding: 0; margin: 0; }
.ad-awards li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.ad-awards li:last-child { border-bottom: 0; }
.ad-awards li > i { width: 44px; height: 44px; flex: 0 0 auto; background: #1e73be; color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ad-awards strong { display: block; color: #1f2a37; }
.ad-awards em { color: #64748b; font-size: 14px; font-style: normal; }

.ad-listings { margin-top: 8px; }
.ad-listings__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ad-listings__head h2 { font-size: 24px; font-weight: 700; color: #1f2a37; margin: 0; }
.ad-listings__meta { color: #9aa3b2; font-size: 14px; }

/* Modal referencí */
.ad-modal { position: fixed; inset: 0; z-index: 1080; display: none; }
.ad-modal.is-open { display: block; }
.ad-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.ad-modal__dialog { position: relative; max-width: 680px; width: calc(100% - 32px); margin: 5vh auto; background: #fff; border-radius: 14px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.ad-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid #eef1f5; }
.ad-modal__head h3 { font-size: 22px; font-weight: 700; margin: 0; color: #1f2a37; }
.ad-modal__rating { margin-top: 6px; font-size: 14px; color: #64748b; }
.ad-modal__rating strong { color: #1f2a37; }
.ad-modal__close { background: #f1f4f8; border: 0; width: 38px; height: 38px; border-radius: 8px; cursor: pointer; color: #475569; flex: 0 0 auto; }
.ad-modal__close:hover { background: #e2e8f1; }
.ad-modal__body { padding: 18px 26px 26px; overflow-y: auto; }
.ad-review { border-left: 3px solid #1e73be; background: #f7f9fc; padding: 16px 18px; border-radius: 0 8px 8px 0; margin-bottom: 14px; }
.ad-review p { color: #374151; margin: 8px 0 14px; line-height: 1.6; }
.ad-review__author { display: flex; align-items: center; gap: 12px; }
.ad-avatar { width: 40px; height: 40px; border-radius: 50%; background: #1e73be; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.ad-review__author strong { display: block; color: #1f2a37; }
.ad-review__author em { color: #64748b; font-size: 13px; font-style: normal; }

@media (max-width: 575px) {
    .ad-stats { grid-template-columns: 1fr; }
}

/* Etapa 5 — contact forms */
.anti-spam-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.contact-form input, .contact-form textarea { width: 100%; margin-bottom: 12px; }
.newsletter-box form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-box input { flex: 1; min-width: 160px; padding: 8px; }
.inquiry-form { margin-top: 16px; }
.inquiry-form input, .inquiry-form textarea { width: 100%; margin-bottom: 8px; }
