/* ==========================================================================
   Classifieds MVC — Homepage CSS  (v2 Foundation + UI Polish)
   Scope: styles used ONLY on the public homepage.
   No inline CSS. No homepage styles in site.css.
   BEM: .block, .block__element, .block--modifier
   Loaded from the public layout alongside site.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Skeleton shimmer  — pure CSS loading animation on card images.
      The shimmer is hidden automatically once the img (object-fit:cover)
      fills the container; no JS required.
   -------------------------------------------------------------------------- */
@keyframes skeleton-shimmer {
    0%   { background-position: -800px 0; }
    100% { background-position:  800px 0; }
}

/* --------------------------------------------------------------------------
   1. Wide container  — overrides Bootstrap's 1320px cap
   -------------------------------------------------------------------------- */
.hp-wrap {
    width: 100%;
    max-width: var(--site-max-w, 1680px);
    margin: 0 auto;
    padding-inline: var(--site-gutter, 2rem);
}

/* --------------------------------------------------------------------------
   2. Homepage district filter — compact, mobile-first, Select2 chips
   -------------------------------------------------------------------------- */
.listing-filter,
.listing-location-filter {
    padding: 1rem 0 0;
    background: var(--color-page-bg, #f8f8fb);
    overflow-x: clip;
}

.listing-filter__panel,
.listing-location-filter__panel {
    background: #fff;
    border: 1px solid var(--color-border-light, #eceef6);
    border-radius: var(--radius-card, 16px);
    box-shadow: var(--shadow-sm, 0 1px 4px rgba(26,26,46,.08), 0 4px 12px rgba(26,26,46,.04));
    padding: .875rem 1rem 1rem;
}

.listing-filter__header,
.listing-location-filter__header {
    margin-bottom: .625rem;
}

.listing-filter__title {
    display: flex;
    align-items: center;
    gap: .375rem;
    margin: 0;
    font-size: clamp(.875rem, 2.2vw, 1rem);
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    letter-spacing: -.01em;
    line-height: 1.35;
}

.listing-filter__title-icon {
    color: var(--color-brand-accent, #4f46e5);
    font-size: 1rem;
    flex-shrink: 0;
}

.listing-filter__regions,
.listing-location-filter__regions {
    display: flex;
    flex-wrap: wrap;
    gap: .4375rem;
    margin-bottom: .75rem;
}

.listing-filter__region {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: .375rem .8125rem;
    border-radius: var(--radius-pill, 100px);
    border: 1px solid var(--color-border, #e3e5f0);
    background: var(--color-page-bg, #f8f8fb);
    color: var(--color-text-secondary, #4a4b5c);
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.25;
    white-space: nowrap;
    transition:
        background var(--dur-fast, .14s) var(--ease-std),
        border-color var(--dur-fast, .14s) var(--ease-std),
        color var(--dur-fast, .14s) var(--ease-std),
        box-shadow var(--dur-fast, .14s) var(--ease-std);
}

.listing-filter__region:hover {
    border-color: rgba(79, 70, 229, .35);
    color: var(--color-brand-accent, #4f46e5);
    text-decoration: none;
}

.listing-filter__region--active {
    border-color: transparent;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 55%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(79, 70, 229, .28);
}

.listing-filter__region--active:hover {
    color: #fff;
}

.listing-filter__form,
.listing-location-filter__form {
    display: grid;
    gap: .625rem;
    min-width: 0;
}

.listing-filter__field,
.listing-location-filter__districts {
    min-width: 0;
    position: relative;
}

/* Hide native multi-select only after Select2 mounts */
.listing-filter--ready .listing-filter__select,
.listing-filter--ready .listing-location-filter__select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Before Select2: collapse native multi-select (no giant list box) */
.listing-filter:not(.listing-filter--ready) .listing-filter__select,
.listing-filter:not(.listing-filter--ready) .listing-location-filter__select {
    display: block;
    width: 100%;
    min-height: 44px;
    max-height: 44px;
    overflow: hidden;
    border: 1px solid var(--color-border, #e3e5f0);
    border-radius: 12px;
    background: #fff;
    color: var(--color-text-muted, #8b8fa8);
    padding: .625rem .875rem;
    font-size: .875rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b8fa8' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .875rem center;
    background-size: .75rem;
}

.listing-filter:not(.listing-filter--ready) .listing-filter__select option,
.listing-filter:not(.listing-filter--ready) .listing-location-filter__select option {
    display: none;
}

.listing-filter:not(.listing-filter--ready) .listing-filter__select option[value=""],
.listing-filter:not(.listing-filter--ready) .listing-location-filter__select option[value=""] {
    display: block;
}

.listing-filter__actions,
.listing-location-filter__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .625rem;
    min-width: 0;
}

.listing-filter__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    min-height: 44px;
    padding: .5rem 1.125rem;
    border: none;
    border-radius: var(--radius-pill, 100px);
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(79, 70, 229, .24);
    transition:
        transform var(--dur-fast, .14s) var(--ease-out, cubic-bezier(.22,.68,0,1.2)),
        box-shadow var(--dur-fast, .14s) var(--ease-std),
        background var(--dur-fast, .14s) var(--ease-std);
}

.listing-filter__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, .32);
}

.listing-filter__submit:focus-visible {
    outline: 2px solid var(--color-brand-accent, #4f46e5);
    outline-offset: 2px;
}

.listing-filter__clear {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: .25rem .5rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--color-text-muted, #8b8fa8);
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--radius-pill, 100px);
    transition: color var(--dur-fast, .14s) var(--ease-std);
}

.listing-filter__clear:hover {
    color: var(--color-brand-accent, #4f46e5);
    text-decoration: none;
}

/* Select2 — compact single-line closed state, chip wrap when selected */
.listing-filter .select2-container,
.listing-location-filter .select2-container {
    width: 100% !important;
    max-width: 100%;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection {
    min-height: 44px;
    border: 1px solid var(--color-border, #e3e5f0);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    transition: border-color var(--dur-fast, .14s) var(--ease-std), box-shadow var(--dur-fast, .14s) var(--ease-std);
}

.listing-filter .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.listing-filter .select2-container--bootstrap-5.select2-container--open .select2-selection,
.listing-location-filter .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.listing-location-filter .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: rgba(79, 70, 229, .55);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple {
    padding: .3125rem .5rem;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3125rem;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: .1875rem .5rem .1875rem .625rem;
    border-radius: var(--radius-pill, 100px);
    border: 1px solid rgba(79, 70, 229, .22);
    background: var(--color-brand-light, #eef2ff);
    color: var(--color-brand-accent-dk, #3730a3);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__display,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__display {
    padding: 0;
    margin-right: .25rem;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    position: static;
    order: 1;
    margin: 0 0 0 .125rem;
    padding: 0 .125rem;
    border: none;
    color: var(--color-brand-accent, #4f46e5);
    font-weight: 700;
    line-height: 1;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: transparent;
    color: var(--color-brand-accent-dk, #3730a3);
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-search,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
    flex: 1 1 6rem;
    min-width: 4rem;
    max-width: 100%;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field {
    margin: 0;
    font-size: .875rem;
    color: var(--color-text, #1a1a2e);
}

/* Collapse empty inline search when closed — shows placeholder instead of blank input */
.listing-filter .select2-container--bootstrap-5:not(.select2-container--open) .select2-selection--multiple .select2-search--inline,
.listing-location-filter .select2-container--bootstrap-5:not(.select2-container--open) .select2-selection--multiple .select2-search--inline {
    width: auto;
    margin: 0;
}

.listing-filter .select2-container--bootstrap-5:not(.select2-container--open) .select2-selection--multiple .select2-search__field,
.listing-location-filter .select2-container--bootstrap-5:not(.select2-container--open) .select2-selection--multiple .select2-search__field {
    width: .1px !important;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
}

.listing-filter .select2-container--bootstrap-5.select2-container--open .select2-selection--multiple .select2-search__field,
.listing-location-filter .select2-container--bootstrap-5.select2-container--open .select2-selection--multiple .select2-search__field {
    width: 100% !important;
    min-height: 28px;
    opacity: 1;
}

.listing-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__placeholder,
.listing-location-filter .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__placeholder {
    color: var(--color-text-muted, #8b8fa8);
    font-size: .875rem;
    line-height: 1.4;
}

/* Dropdown panel */
.listing-filter .select2-dropdown,
.listing-location-filter .select2-dropdown {
    border: 1px solid var(--color-border-light, #eceef6);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(26, 26, 46, .12);
    overflow: hidden;
}

.listing-filter .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field,
.listing-location-filter .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    min-height: 38px;
    border-radius: 8px;
    font-size: .875rem;
}

.listing-filter .select2-container--bootstrap-5 .select2-results__option,
.listing-location-filter .select2-container--bootstrap-5 .select2-results__option {
    font-size: .875rem;
    padding: .5rem .75rem;
}

.listing-filter .select2-container--bootstrap-5 .select2-results__option--highlighted,
.listing-location-filter .select2-container--bootstrap-5 .select2-results__option--highlighted {
    background: var(--color-brand-light, #eef2ff);
    color: var(--color-brand-accent-dk, #3730a3);
}

@media (min-width: 576px) {
    .listing-filter__panel,
    .listing-location-filter__panel {
        padding: 1rem 1.125rem 1.125rem;
    }

    .listing-filter__actions,
    .listing-location-filter__actions {
        flex-wrap: nowrap;
    }
}

@media (min-width: 768px) {
    .listing-filter__form,
    .listing-location-filter__form {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .75rem 1rem;
    }

    .listing-filter__actions,
    .listing-location-filter__actions {
        justify-content: flex-end;
        flex-shrink: 0;
    }

    .listing-filter__submit {
        min-height: 42px;
        padding-inline: 1rem;
    }
}

@media (min-width: 1024px) {
    .listing-filter__regions,
    .listing-location-filter__regions {
        margin-bottom: .625rem;
    }
}


/* --------------------------------------------------------------------------
   3. Premium Floating Search
      One unified white container. Micro-labels above each field.
      Keyword is live; City + Category are future-ready, disabled placeholders.
   -------------------------------------------------------------------------- */
.search-float {
    position: relative;
    z-index: 2;
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius-pill, 100px);
    box-shadow: 0 8px 40px rgba(15,15,30,.32), 0 2px 8px rgba(15,15,30,.14);
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.search-float__divider {
    width: 1px;
    background: var(--color-border, #e3e5f0);
    flex-shrink: 0;
    margin: 10px 0;
    align-self: stretch;
}

.search-float__field {
    flex: 1 1 0;
    min-width: 0;
    padding: .75rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: text;
    transition: background var(--dur-fast, .14s) var(--ease-std);
}
.search-float__field:hover { background: #fafafd; }
.search-float__field--kw   { flex: 2 1 0; }

.search-float__label {
    display: block;
    font-size: .575rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-text, #1a1a2e);
    margin-bottom: 2px;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.search-float__input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: .875rem;
    color: var(--color-text, #1a1a2e);
    padding: 0;
    line-height: 1.35;
}
.search-float__input::placeholder { color: var(--color-text-muted, #8b8fa8); }
.search-float__input:focus        { outline: none; }

.search-float__select {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: .875rem;
    color: var(--color-text-muted, #8b8fa8);
    padding: 0;
    line-height: 1.35;
    cursor: not-allowed;
    -webkit-appearance: none;
    appearance: none;
}
.search-float__select:disabled { opacity: 1; }

.search-float__btn {
    flex: 0 0 auto;
    align-self: stretch;
    margin: 6px;
    padding: 0 1.625rem;
    background: var(--color-brand-accent, #4f46e5);
    color: #fff;
    border: none;
    border-radius: calc(var(--radius-pill, 100px) - 6px);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
    letter-spacing: .01em;
    transition:
        background  var(--dur-fast, .14s) var(--ease-std),
        box-shadow  var(--dur-fast, .14s) var(--ease-std),
        transform   var(--dur-fast, .14s) var(--ease-out, cubic-bezier(.22,.68,0,1.2));
    min-height: 44px;
}
.search-float__btn:hover {
    background: var(--color-brand-accent-dk, #3730a3);
    box-shadow: 0 4px 18px rgba(79,70,229,.42);
    transform: translateY(-1px);
}
.search-float__btn:active  { transform: translateY(0); }
.search-float__btn:focus-visible {
    outline: 2px solid rgba(255,255,255,.8);
    outline-offset: -3px;
}

@media (max-width: 767.98px) {
    .search-float {
        border-radius: var(--radius-card, 16px);
        flex-direction: column;
    }
    .search-float__divider { width: auto; height: 1px; margin: 0 14px; }
    .search-float__field {
        flex-direction: row;
        align-items: center;
        gap: .625rem;
        padding: .625rem 1rem;
    }
    .search-float__label   { flex: 0 0 70px; margin-bottom: 0; }
    .search-float__btn {
        margin: 6px;
        border-radius: calc(var(--radius-card, 16px) - 6px);
        justify-content: center;
        min-height: 48px;
    }
}

/* --------------------------------------------------------------------------
   4. Listings Section
   -------------------------------------------------------------------------- */
.listing-section {
    padding: 1.375rem 0 2.25rem;
    background: var(--color-page-bg, #f8f8fb);
}

/* Section header — heading row (left) + counter (right) + toolbar slot */
.listing-section__header {
    margin-bottom: 1.375rem;
}
.listing-section__header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .875rem;
    border-bottom: 1px solid var(--color-border-light, #eceef6);
    flex-wrap: wrap;
}
.listing-section__heading {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--color-text-muted, #8b8fa8);
    margin: 0;
}
.listing-section__counter {
    font-size: .75rem;
    color: var(--color-text-muted, #8b8fa8);
    white-space: nowrap;
}

.listing-section__counter-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* VIP / normal sub-sections */
.listing-vip-section {
    margin-bottom: 0;
}

.listing-vip-section__header {
    margin-bottom: 1.125rem;
}

.listing-vip-section__heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.25rem;
    font-size: clamp(0.8125rem, 2vw, 0.9375rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a6914;
    line-height: 1.3;
}

.listing-vip-section__mark {
    color: #c89b3c;
    font-size: 0.95em;
    line-height: 1;
    flex-shrink: 0;
}

.listing-vip-section__sub {
    margin: 0 0 0.625rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted, #8b8fa8);
    line-height: 1.4;
}

.listing-vip-section__rule {
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(198, 156, 72, 0.55) 0%,
        rgba(198, 156, 72, 0.18) 55%,
        transparent 100%
    );
}

.listing-section-divider {
    height: 1px;
    margin: 1.375rem 0 1.25rem;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-border-light, #eceef6) 12%,
        var(--color-border-light, #eceef6) 88%,
        transparent 100%
    );
}

.listing-normal-section {
    margin-top: 0;
}

.listing-normal-section__header {
    margin-bottom: 1.125rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--color-border-light, #eceef6);
}

.listing-normal-section__heading {
    margin: 0 0 0.25rem;
    font-size: clamp(0.8125rem, 2vw, 0.9375rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted, #8b8fa8);
    line-height: 1.3;
}

.listing-normal-section__sub {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted, #8b8fa8);
    line-height: 1.4;
}

@media (max-width: 575.98px) {
    .listing-vip-section__heading,
    .listing-normal-section__heading {
        letter-spacing: 0.07em;
    }
}

/*
 * Filter toolbar — [FUTURE SLOT].
 * Empty and hidden by default. When category/city/price filters
 * are implemented, set display:flex and populate this area.
 */
.listing-filter-toolbar {
    display: none;
    /* Future: padding: .625rem 0 .125rem; gap: .5rem; flex-wrap: wrap; */
}

/* 5-column at ≥1400px and 6-column at ≥1600px.
   Bootstrap grid stops at xxl (≥1400px) without 5/6-col support.
   .listing-col cascades: 1→2→3→4 via Bootstrap col-* classes, then 5/6 via below. */
@media (min-width: 1400px) {
    .listing-col { flex: 0 0 auto; width: 20%; }
}
@media (min-width: 1600px) {
    .listing-col { flex: 0 0 auto; width: 16.6667%; }
}

/* --------------------------------------------------------------------------
   5. Advertisement Card
      Fixed height: 400px total = 312px image (78%) + 88px body (22%).
      Guarantees identical card heights across every column count.
   -------------------------------------------------------------------------- */
.listing-card {
    position: relative;          /* anchors the stretched-link ::after overlay */
    border-radius: var(--radius-card, 16px);
    overflow: hidden;
    background: var(--color-card-bg, #fff);
    border: 1px solid var(--color-border-light, #eceef6);
    box-shadow: var(--shadow-sm, 0 1px 4px rgba(26,26,46,.08), 0 4px 12px rgba(26,26,46,.04));
    display: flex;
    flex-direction: column;
    height: 400px;
    cursor: pointer;
    transition:
        transform   var(--dur-base, .2s) var(--ease-out, cubic-bezier(.22,.68,0,1.2)),
        box-shadow  var(--dur-base, .2s) var(--ease-std),
        background  var(--dur-base, .2s) var(--ease-std);
}
.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(26,26,46,.12), 0 20px 48px rgba(26,26,46,.07));
    background: var(--color-card-bg-hover, #fdfdff);
}
/* Keyboard focus ring — only shown for keyboard navigation */
.listing-card:has(:focus-visible) {
    outline: 2px solid var(--color-brand-accent, #4f46e5);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   5b. VIP GOLD card — premium surface (homepage only)
   -------------------------------------------------------------------------- */
.listing-grid .listing-col {
    overflow: visible;
}

.listing-card--vip {
    border: 1px solid rgba(198, 156, 72, 0.40);
    overflow: visible;
    box-shadow:
        0 1px 4px rgba(26, 26, 46, 0.08),
        0 4px 14px rgba(26, 26, 46, 0.05),
        0 0 0 1px rgba(198, 156, 72, 0.10),
        0 4px 14px rgba(198, 156, 72, 0.055);
}

.listing-card--vip::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-card, 16px) + 2px);
    pointer-events: none;
    z-index: 0;
    box-shadow:
        0 0 12px rgba(198, 156, 72, 0.07),
        0 0 24px rgba(198, 156, 72, 0.035);
}

.listing-card--vip .listing-card__image-wrap,
.listing-card--vip .listing-card__body {
    position: relative;
    z-index: 1;
}

.listing-card--vip .listing-card__image-wrap {
    border-radius: calc(var(--radius-card, 16px) - 1px) calc(var(--radius-card, 16px) - 1px) 0 0;
}

.listing-card--vip:hover {
    transform: translateY(-6px);
    border-color: rgba(198, 156, 72, 0.58);
    background: var(--color-card-bg, #fff);
    box-shadow:
        0 10px 26px rgba(26, 26, 46, 0.11),
        0 20px 44px rgba(26, 26, 46, 0.07),
        0 0 0 1px rgba(198, 156, 72, 0.16),
        0 8px 20px rgba(198, 156, 72, 0.08);
}

.listing-card--vip:hover::before {
    box-shadow:
        0 0 16px rgba(198, 156, 72, 0.10),
        0 0 32px rgba(198, 156, 72, 0.05);
}

.listing-card--vip:has(:focus-visible) {
    outline-color: rgba(198, 156, 72, 0.85);
}

.listing-card--vip .listing-card__badge--featured {
    background: linear-gradient(135deg, #e2c164 0%, #c89b3c 42%, #a67c1a 100%);
    color: #fff;
    text-shadow: 0 1px 1px rgba(61, 41, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.22),
        0 2px 10px rgba(198, 156, 72, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    letter-spacing: 0.05em;
    font-weight: 800;
    text-transform: uppercase;
}

.listing-card__badge-mark {
    flex-shrink: 0;
    font-size: 0.82em;
    line-height: 1;
    opacity: 0.95;
}

.listing-card--vip .listing-card__title {
    color: var(--color-text, #1a1a2e);
    font-weight: 750;
}

.listing-card--vip:hover .listing-card__title {
    color: #8a6914;
}

/* Image wrap — fixed 312px (78%) — skeleton shimmer until image covers it */
.listing-card__image-wrap {
    position: relative;
    width: 100%;
    height: 312px;
    flex-shrink: 0;
    overflow: hidden;
    pointer-events: none;    /* let stretched-link ::after receive image-area clicks */
    container-type: inline-size;
    container-name: listing-image;
    background-color: var(--color-surface-raised, #f2f3f8);
    background-image: linear-gradient(
        90deg,
        transparent          0%,
        rgba(255,255,255,.52) 50%,
        transparent          100%
    );
    background-size:   800px 100%;
    background-repeat: no-repeat;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.listing-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
    transition: transform var(--dur-slow, .3s) var(--ease-std);
}
.listing-card:hover .listing-card__image { transform: scale(1.05); }

/* Badge overlay — service location top-left, VIP GOLD top-right.
   Each container is clamped to its half of the card so badges never overlap. */
.listing-card__badges {
    position: absolute;
    top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 3;
    pointer-events: none;
    min-width: 0;
}

.listing-card__badges--service {
    left: 8px;
    right: auto;
    max-width: min(52%, 7.5rem);
    align-items: flex-start;
    /* Keep stack above bottom-right contact buttons on tall multi-select cards */
    max-height: calc(100% - 4.5rem);
    overflow: hidden;
}

.listing-card__badges--featured {
    right: 8px;
    left: auto;
    max-width: min(52%, 8.5rem);
    align-items: flex-end;
}

.listing-card__badge {
    display: inline-flex;
    align-items: center;
    gap: clamp(2px, 0.6cqi, 4px);
    padding: clamp(2px, 0.5cqi, 3px) clamp(5px, 1.8cqi, 10px);
    border-radius: var(--radius-pill, 100px);
    font-size: clamp(0.5rem, 1.8cqi + 0.3rem, 0.625rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.35;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 1px 4px rgba(0,0,0,.20);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: max-content;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Service location — vertical stack of compact row badges */
.listing-card__badges--service .listing-card__badge {
    border-radius: 6px;
    font-size: clamp(0.5625rem, 1.55cqi + 0.28rem, 0.6875rem);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.25;
    padding: 2px clamp(5px, 1.4cqi, 7px);
    width: 100%;
    max-width: 100%;
}

.listing-card__badge i {
    flex-shrink: 0;
    font-size: 0.95em;
    line-height: 1;
}
/* Legacy featured badge fallback (non-VIP markup paths) */
.listing-card:not(.listing-card--vip) .listing-card__badge--featured {
    background: var(--color-badge-featured, #f59e0b);
    color: #3d1f00;
}
.listing-card__badge--service   { background: rgba(255,255,255,.92); color: #1e1b4b; }
.listing-card__badge--service-home      { border: 1px solid rgba(79,70,229,.25); }
.listing-card__badge--service-hotel     { border: 1px solid rgba(14,116,144,.25); }
.listing-card__badge--service-residence { border: 1px solid rgba(124,58,237,.25); }
.listing-card__badge--service-own-place { border: 1px solid rgba(5,150,105,.25); }

.listing-card__badge--vip       { background: var(--color-badge-vip, #7c3aed);      color: #fff; }
.listing-card__badge--new       { background: var(--color-badge-new, #059669);      color: #fff; }
.listing-card__badge--urgent    { background: var(--color-badge-urgent, #dc2626);   color: #fff; }
.listing-card__badge--sponsored { background: rgba(0,0,0,.58);                      color: #fff; }

/* Badge scale-down on narrow card widths (container = image-wrap width) */
@container listing-image (max-width: 260px) {
    .listing-card__badges { top: 6px; gap: 3px; }
    .listing-card__badges--service { left: 6px; max-width: min(54%, 6.75rem); }
    .listing-card__badges--featured { right: 6px; max-width: min(54%, 7.25rem); }
    .listing-card__badge {
        font-size: clamp(0.4375rem, 1.6cqi + 0.28rem, 0.5625rem);
        padding: 2px clamp(4px, 1.5cqi, 7px);
        letter-spacing: 0.02em;
    }
    .listing-card__badges--service .listing-card__badge {
        font-size: clamp(0.5rem, 1.45cqi + 0.24rem, 0.625rem);
        padding: 2px clamp(4px, 1.2cqi, 6px);
    }
}

@container listing-image (max-width: 200px) {
    .listing-card__badges { top: 5px; }
    .listing-card__badges--service { left: 5px; max-width: min(56%, 6.25rem); }
    .listing-card__badges--featured { right: 5px; max-width: min(56%, 6.75rem); }
    .listing-card__badge {
        font-size: 0.4375rem;
        padding: 2px 4px;
        gap: 2px;
    }
    .listing-card__badges--service .listing-card__badge {
        font-size: 0.5rem;
        padding: 1px 4px;
    }
    .listing-card__badge i { font-size: 0.85em; }
}

/* Contact channel buttons — bottom-right of image-wrap.
   z-index 3 keeps them above the stretched-link ::after overlay (z-index 2). */
.listing-card__channels {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.listing-card__whatsapp,
.listing-card__telegram {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.375rem;
    text-decoration: none;
    flex-shrink: 0;
    transition:
        transform   var(--dur-fast, .14s) var(--ease-out, cubic-bezier(.22,.68,0,1.2)),
        box-shadow  var(--dur-fast, .14s) var(--ease-std),
        background  var(--dur-fast, .14s) var(--ease-std);
}

.listing-card__whatsapp {
    background: #25d366;
    box-shadow:
        0 2px 12px rgba(37,211,102,.40),
        0 1px 4px  rgba(0,0,0,.18);
}
.listing-card__whatsapp:hover {
    background: #128c7e;
    transform: scale(1.14) translateY(-2px);
    box-shadow:
        0 6px 22px rgba(37,211,102,.50),
        0 2px 8px  rgba(0,0,0,.20);
    color: #fff;
}
.listing-card__whatsapp:focus-visible {
    outline: 2px solid #25d366;
    outline-offset: 3px;
    color: #fff;
}

.listing-card__telegram {
    background: #229ED9;
    box-shadow:
        0 2px 12px rgba(34,158,217,.35),
        0 1px 4px  rgba(0,0,0,.18);
}
.listing-card__telegram:hover {
    background: #1a8bc4;
    transform: scale(1.14) translateY(-2px);
    box-shadow:
        0 6px 22px rgba(34,158,217,.45),
        0 2px 8px  rgba(0,0,0,.20);
    color: #fff;
}
.listing-card__telegram:focus-visible {
    outline: 2px solid #229ED9;
    outline-offset: 3px;
    color: #fff;
}

@container listing-image (max-width: 260px) {
    .listing-card__channels {
        bottom: 8px;
        right: 8px;
        gap: 6px;
    }
    .listing-card__whatsapp,
    .listing-card__telegram {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* Legacy single-button comment retained for reference — use .listing-card__channels */

/* Card body — remaining ~88px, centred vertically and horizontally */
.listing-card__body {
    flex: 1;
    width: 100%;
    padding: .5rem .75rem .625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .1875rem;
    overflow: hidden;
    pointer-events: none;
}

/* Primary link — stretched across entire card via Bootstrap .stretched-link */
.listing-card__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    color: inherit;
    text-decoration: none;
    position: static;
}
.listing-card__link:hover,
.listing-card__link:focus { color: inherit; text-decoration: none; }

/* Overlay sits above image, below WhatsApp (z-index 3) */
.listing-card__link.stretched-link::after {
    z-index: 2;
}

/* Title — primary card headline below image */
.listing-card__title {
    font-size: clamp(0.9375rem, 1.1cqi + 0.82rem, 1.0625rem);
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--dur-fast, .14s) var(--ease-std);
    width: 100%;
}
.listing-card:hover .listing-card__title { color: var(--color-brand-accent, #4f46e5); }

/* Meta stack — location, age (null fields omitted in HTML) */
.listing-card__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .0625rem;
    width: 100%;
    min-width: 0;
}

.listing-card__meta-item {
    font-size: .6875rem;
    color: var(--color-text-muted, #8b8fa8);
    line-height: 1.35;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 400;
}

.listing-card__location {
    font-size: .6875rem;
    font-weight: 400;
    color: var(--color-text-secondary, #6b7280);
}

.listing-card__age {
    font-size: .6875rem;
    font-weight: 400;
    color: var(--color-text-muted, #8b8fa8);
}

/* --------------------------------------------------------------------------
   6. Empty state
   -------------------------------------------------------------------------- */
.listing-empty {
    padding: 4rem 0;
    text-align: center;
    color: var(--color-text-muted, #8b8fa8);
}
.listing-empty__icon {
    font-size: 2.75rem;
    display: block;
    margin-bottom: .75rem;
    opacity: .3;
}

/* --------------------------------------------------------------------------
   7. Pagination
   -------------------------------------------------------------------------- */
.listing-pagination {
    padding: 2.25rem 0 .75rem;
}
.listing-pagination .pagination {
    gap: .25rem;
}

/* Base pill button */
.listing-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.375rem;
    height: 2.375rem;
    padding: 0 .6875rem;
    border-radius: 50rem !important;   /* full pill */
    border-color: var(--color-border, #e3e5f0);
    color: var(--color-text-secondary, #4a4b5c);
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1;
    transition: background var(--dur-fast, .14s) var(--ease-std),
                border-color var(--dur-fast, .14s) var(--ease-std),
                color var(--dur-fast, .14s) var(--ease-std),
                box-shadow var(--dur-fast, .14s) var(--ease-std);
}
.listing-pagination .page-link:hover,
.listing-pagination .page-link:focus-visible {
    background: var(--color-brand-light, #eef2ff);
    border-color: var(--color-brand-accent, #4f46e5);
    color: var(--color-brand-accent, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
    outline: none;
}
.listing-pagination .page-item.active .page-link {
    background: var(--color-brand-accent, #4f46e5);
    border-color: var(--color-brand-accent, #4f46e5);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(79,70,229,.35);
}
/* Nav arrows (prev / next) — slightly wider */
.listing-pagination .page-link--nav {
    font-size: .75rem;
}
/* Ellipsis — no hover effects */
.listing-pagination .page-link--ellipsis {
    border-color: transparent;
    background: transparent;
    color: var(--color-text-muted, #8b8fa8);
    pointer-events: none;
}
/* Disabled state */
.listing-pagination .page-item.disabled .page-link {
    opacity: .45;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   7b. Premium CTA — after listings + pagination
   -------------------------------------------------------------------------- */
.listing-cta {
    padding: 0 0 2.5rem;
    background: var(--color-page-bg, #f8f8fb);
}

.listing-cta__panel {
    position: relative;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(
        150deg,
        #0f0f1e 0%,
        #1e1b4b 45%,
        #312e81 75%,
        #4338ca 100%
    );
    border: 1px solid rgba(129, 140, 248, .18);
    border-radius: var(--radius-card, 16px);
    box-shadow:
        var(--shadow-md, 0 4px 16px rgba(26,26,46,.10), 0 12px 32px rgba(26,26,46,.05)),
        0 0 0 1px rgba(255, 255, 255, .04) inset;
    padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem);
}

.listing-cta__panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .22) 0%, transparent 70%);
    pointer-events: none;
}

.listing-cta__panel::after {
    content: '';
    position: absolute;
    bottom: -70px;
    left: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, .14) 0%, transparent 70%);
    pointer-events: none;
}

.listing-cta__badge,
.listing-cta__title,
.listing-cta__description,
.listing-cta__button {
    position: relative;
    z-index: 1;
}

.listing-cta__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .375rem .875rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-pill, 100px);
    border: 1px solid rgba(165, 180, 252, .35);
    background: rgba(79, 70, 229, .22);
    color: #c7d2fe;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1.4;
}

.listing-cta__title {
    margin: 0 auto .875rem;
    font-size: clamp(1.375rem, 3.2vw, 2.125rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.025em;
    color: #fff;
    max-width: 28rem;
}

.listing-cta__title-accent {
    display: inline;
    background: linear-gradient(90deg, #a5b4fc 0%, #818cf8 45%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.listing-cta__description {
    margin: 0 auto 1.375rem;
    max-width: 42rem;
    font-size: clamp(.875rem, 1.8vw, 1rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, .72);
}

.listing-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    min-height: 52px;
    padding: .8125rem 1.625rem;
    border-radius: var(--radius-pill, 100px);
    background: #25d366;
    color: #fff;
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow:
        0 4px 18px rgba(37, 211, 102, .30),
        0 1px 4px rgba(0, 0, 0, .08);
    transition:
        background var(--dur-fast, .14s) var(--ease-std),
        transform var(--dur-base, .2s) var(--ease-out, cubic-bezier(.22,.68,0,1.2)),
        box-shadow var(--dur-base, .2s) var(--ease-std);
}

.listing-cta__button:hover {
    background: #1ebe5d;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow:
        0 8px 26px rgba(37, 211, 102, .36),
        0 2px 8px rgba(0, 0, 0, .10);
}

.listing-cta__button:active {
    transform: translateY(0);
}

.listing-cta__button:focus-visible {
    outline: 3px solid rgba(37, 211, 102, .5);
    outline-offset: 2px;
    color: #fff;
    text-decoration: none;
}

.listing-cta__button-icon {
    font-size: 1.375rem;
    line-height: 1;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   9. Responsive refinements
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .listing-section { padding: 1.5rem 0 1.5rem; }
    .listing-section__header { margin-bottom: 1rem; }
    .listing-filter,
    .listing-location-filter { padding-top: .875rem; }
    .listing-filter__panel,
    .listing-location-filter__panel { padding: .875rem .875rem .9375rem; }
    .listing-filter__submit { width: 100%; }
    .listing-filter__actions,
    .listing-location-filter__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .listing-filter__clear {
        align-self: center;
        text-align: center;
    }
    .listing-cta { padding-bottom: 1.75rem; }
    .listing-cta__panel { padding: 1.5rem 1.125rem; }
    .listing-cta__title { max-width: 100%; }
    .listing-cta__button {
        width: 100%;
        max-width: 20rem;
        min-height: 48px;
        padding-inline: 1.25rem;
        font-size: .875rem;
    }
    .hp-wrap { padding-inline: 1rem; }
}

/* --------------------------------------------------------------------------
   10. Dark mode — architecture ready.
       These variables flip the entire homepage to a dark surface automatically.
       Individual nav overrides live in site.css since they are global.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --color-page-bg:        #0f0f18;
        --color-card-bg:        #17172a;
        --color-card-bg-hover:  #1c1c32;
        --color-surface-raised: #202035;
        --color-border:         #2a2a45;
        --color-border-light:   #222238;
        --color-text:           #e2e2f0;
        --color-text-secondary: #9898b8;
        --color-text-muted:     #58587a;
    }

    .listing-section { background: var(--color-page-bg); }
    .listing-section__header { border-color: var(--color-border-light); }

    /* Shimmer toned down for dark surfaces */
    .listing-card__image-wrap {
        background-color: var(--color-surface-raised);
        background-image: linear-gradient(
            90deg,
            transparent          0%,
            rgba(255,255,255,.06) 50%,
            transparent          100%
        );
    }

    .listing-card--vip {
        border-color: rgba(212, 175, 95, 0.36);
        box-shadow:
            0 1px 4px rgba(0, 0, 0, 0.28),
            0 4px 14px rgba(0, 0, 0, 0.18),
            0 0 0 1px rgba(212, 175, 95, 0.12),
            0 4px 14px rgba(198, 156, 72, 0.06);
    }

    .listing-card--vip::before {
        box-shadow:
            0 0 12px rgba(198, 156, 72, 0.06),
            0 0 24px rgba(198, 156, 72, 0.03);
    }

    .listing-card--vip:hover {
        border-color: rgba(212, 175, 95, 0.48);
        box-shadow:
            0 10px 26px rgba(0, 0, 0, 0.24),
            0 20px 44px rgba(0, 0, 0, 0.16),
            0 0 0 1px rgba(212, 175, 95, 0.18),
            0 8px 20px rgba(198, 156, 72, 0.07);
    }

    .listing-vip-section__heading {
        color: #d4b04a;
    }

    .listing-normal-section__header {
        border-color: var(--color-border);
    }

    .listing-card--vip:hover .listing-card__title {
        color: #d4b04a;
    }

    .listing-card--vip .listing-card__badge--featured {
        background: linear-gradient(135deg, #c9a227 0%, #a67c1a 55%, #8a6914 100%);
        border-color: rgba(255, 255, 255, 0.22);
    }

    .pagination .page-link {
        background: var(--color-card-bg);
        border-color: var(--color-border);
        color: var(--color-text-secondary);
    }
}
