/*
 * HouseSitList — homepage design stylesheet.
 *
 * Loaded by header.php on every page so the navbar/pagination restyle is
 * consistent across the site; hero/filter/card styles only match on pages
 * that render the hsl-* markup (currently just the homepage).
 *
 * Sections:
 *   1. Design tokens (light + dark)
 *   2. Typography
 *   3. Navbar overrides
 *   4. Hero section (hsl-hero-* classes)
 *   5. Filter sidebar (hsl-filters-* classes)
 *   6. Listing card redesign (hsl-card-* classes)
 *   7. Pagination restyle
 *   8. Responsive
 */

/* ======================================================================
 * 1. Design tokens
 * ==================================================================== */

:root {
    --hsl-primary: #1b4965;
    --hsl-primary-hover: #143449;
    --hsl-primary-soft: #e8eff5;
    --hsl-accent: #52b788;
    --hsl-accent-soft: #e8f5ee;
    --hsl-pop: #f48c06;
    --hsl-pop-soft: #fff1dd;
    --hsl-fg: #0f1821;
    --hsl-fg-muted: #5c6773;
    --hsl-fg-subtle: #8993a1;
    --hsl-surface: #f6f7f9;
    --hsl-surface-raised: #ffffff;
    --hsl-surface-sunken: #eceef2;
    --hsl-border: #e2e5ea;
    --hsl-border-strong: #cfd4dc;
    --hsl-shadow-sm: 0 1px 2px rgba(15, 24, 33, 0.04), 0 1px 3px rgba(15, 24, 33, 0.06);
    --hsl-shadow-md: 0 4px 12px rgba(15, 24, 33, 0.07), 0 2px 4px rgba(15, 24, 33, 0.05);
    --hsl-shadow-lg: 0 12px 28px rgba(15, 24, 33, 0.12), 0 4px 10px rgba(15, 24, 33, 0.06);
    --hsl-radius-sm: 8px;
    --hsl-radius: 14px;
    --hsl-radius-lg: 20px;
    --hsl-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --hsl-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-bs-theme="dark"] {
    --hsl-primary: #7cb3d9;
    --hsl-primary-hover: #a0c9e3;
    --hsl-primary-soft: #1e3140;
    --hsl-accent: #74c69d;
    --hsl-accent-soft: #1e3828;
    --hsl-pop: #ffa94d;
    --hsl-pop-soft: #3a2a14;
    --hsl-fg: #e7edf4;
    --hsl-fg-muted: #9aa5b3;
    --hsl-fg-subtle: #6e7a89;
    --hsl-surface: #10141a;
    --hsl-surface-raised: #1a1f27;
    --hsl-surface-sunken: #0a0d12;
    --hsl-border: #262c36;
    --hsl-border-strong: #363e4a;
    --hsl-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --hsl-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --hsl-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.55);
}

/* ======================================================================
 * 2. Typography + base
 * ==================================================================== */

body {
    font-family: var(--hsl-font-body);
    background: var(--hsl-surface) !important;
    color: var(--hsl-fg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .hsl-hero-title, .hsl-card-title {
    font-family: var(--hsl-font-display);
    letter-spacing: -0.01em;
}

/* ======================================================================
 * 3. Navbar overrides (restyle existing Bootstrap navbar)
 * ==================================================================== */

/* Hide the stacked logo image above the nav — we move branding inside. */
.container > header > a:first-child img[alt*="Logo"] {
    display: none;
}

/* On pages that use the redesigned hero (homepage), collapse the big
   Bootstrap mt-3 mb-5 utilities on the wrapper <header> so the navbar sits
   closer to the register banner / main content. Non-homepage pages keep
   their existing breathing room. */
body:has(.hsl-hero) .container > header {
    margin-top: 4px !important;
    margin-bottom: 10px !important;
}

/* Promote the navbar from inside the header into a fuller-width band. */
.container > header > .navbar.sticky-top {
    background: var(--hsl-surface-raised) !important;
    border-bottom: 1px solid var(--hsl-border);
    border-radius: 0;
    padding: 10px 16px;
    box-shadow: var(--hsl-shadow-sm);
}

.navbar .navbar-brand {
    font-family: var(--hsl-font-display);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--hsl-fg) !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

/* Inline SVG house mark before the brand name. */
.navbar .navbar-brand::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--hsl-primary) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'><path d='M3 11.5L12 4l9 7.5'/><path d='M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9'/></svg>") center/60% no-repeat;
    flex-shrink: 0;
}

.navbar-nav .nav-link {
    color: var(--hsl-fg-muted) !important;
    font-weight: 500;
    font-size: 0.925rem;
    border-radius: 8px;
    padding: 6px 12px !important;
    margin: 0 1px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    background: var(--hsl-surface-sunken);
    color: var(--hsl-fg) !important;
}

/* Search form — pill style. */
.navbar form[action="/search.php"] {
    background: var(--hsl-surface-sunken);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 2px 6px 2px 14px;
    transition: border-color 0.15s, background 0.15s;
}

.navbar form[action="/search.php"]:focus-within {
    background: var(--hsl-surface-raised);
    border-color: var(--hsl-border-strong);
}

.navbar form[action="/search.php"] .form-control {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--hsl-fg);
    font-size: 0.9rem;
    padding: 6px 0;
}

.navbar form[action="/search.php"] .form-control::placeholder {
    color: var(--hsl-fg-subtle);
}

.navbar form[action="/search.php"] .btn {
    border: 0;
    background: transparent;
    color: var(--hsl-fg-muted);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.navbar form[action="/search.php"] .btn:hover {
    background: var(--hsl-primary-soft);
    color: var(--hsl-primary);
}

/* CTA buttons in the nav. */
.navbar a.btn-success {
    background: var(--hsl-primary) !important;
    border-color: var(--hsl-primary) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-weight: 600;
    padding: 7px 16px !important;
    box-shadow: none !important;
    white-space: nowrap;
}

.navbar a.btn-success:hover {
    background: var(--hsl-primary-hover) !important;
    border-color: var(--hsl-primary-hover) !important;
}

.navbar a.btn-outline-secondary {
    border-radius: 999px !important;
    border-color: var(--hsl-border-strong) !important;
    color: var(--hsl-fg) !important;
    padding: 6px 14px !important;
    white-space: nowrap;
}

.navbar a.btn-outline-secondary:hover {
    background: var(--hsl-surface-sunken) !important;
    color: var(--hsl-fg) !important;
}

.navbar a.btn-primary {
    background: var(--hsl-primary) !important;
    border-color: var(--hsl-primary) !important;
    border-radius: 999px !important;
    padding: 6px 14px !important;
    white-space: nowrap;
}

/* Keep the CTA pills (List Your Sit / Register) grounded in dark blue even in
   dark mode, where --hsl-primary flips to a lighter accent blue for text/links.
   Hardcoding the light-mode primary gives the top-right CTAs more weight. */
[data-bs-theme="dark"] .navbar a.btn-success,
[data-bs-theme="dark"] .navbar a.btn-primary {
    background: #1b4965 !important;
    border-color: #1b4965 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .navbar a.btn-success:hover,
[data-bs-theme="dark"] .navbar a.btn-primary:hover {
    background: #143449 !important;
    border-color: #143449 !important;
}

#themeToggle {
    width: 36px;
    height: 36px;
    border-radius: 999px !important;
    border: 1px solid var(--hsl-border);
    color: var(--hsl-fg-muted) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

#themeToggle:hover {
    background: var(--hsl-surface-sunken);
}

/* ======================================================================
 * 4. Hero section
 * ==================================================================== */

.hsl-hero {
    padding: 20px 0 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.hsl-hero-text {
    text-align: left;
    min-width: 0;
}

/* When the featured column couldn't render (no images), the text column is
   the only child — fall back to the centered single-column hero we had before. */
.hsl-hero-text:only-child {
    grid-column: 1 / -1;
    text-align: center;
}

.hsl-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: var(--hsl-accent-soft);
    color: var(--hsl-accent);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.hsl-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hsl-accent);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--hsl-accent) 40%, transparent);
    animation: hsl-pulse 2s infinite;
}

@keyframes hsl-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hsl-accent) 50%, transparent); }
    70%  { box-shadow: 0 0 0 10px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.hsl-hero-title {
    font-weight: 500;
    font-size: clamp(2.1rem, 4.4vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    text-wrap: balance;
    max-width: 22ch;
}

.hsl-hero-text:only-child .hsl-hero-title {
    margin-left: auto;
    margin-right: auto;
}

.hsl-hero-title em {
    font-style: italic;
    color: var(--hsl-primary);
    font-weight: 500;
}

.hsl-hero-sub {
    color: var(--hsl-fg-muted);
    font-size: 1.05rem;
    max-width: 48ch;
    margin: 0 0 28px;
    line-height: 1.5;
    text-wrap: pretty;
}

.hsl-hero-text:only-child .hsl-hero-sub {
    margin-left: auto;
    margin-right: auto;
}

.hsl-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--hsl-border);
}

.hsl-hero-text:only-child .hsl-trust-strip {
    justify-content: center;
    max-width: 640px;
    margin: 0 auto;
}

.hsl-hero-text:only-child .hsl-trust-stat {
    align-items: center;
    text-align: center;
}

.hsl-trust-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hsl-trust-num {
    font-family: var(--hsl-font-display);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--hsl-fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.hsl-trust-num .hsl-pop {
    color: var(--hsl-pop);
}

.hsl-trust-label {
    color: var(--hsl-fg-subtle);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ----------------------------------------------------------------------
 * 4b. Rotating featured sit (hero right column)
 * -------------------------------------------------------------------- */

.hsl-hero-featured-col {
    min-width: 0;
}

.hsl-featured-slot {
    position: relative;
    aspect-ratio: 4 / 5;
    max-width: 420px;
    margin-left: auto;
    border-radius: var(--hsl-radius-lg);
    overflow: hidden;
    background: var(--hsl-surface-sunken);
    box-shadow: var(--hsl-shadow-lg);
    border: 1px solid var(--hsl-border);
}

.hsl-featured-item {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hsl-featured-item.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hsl-featured-img {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.hsl-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s ease;
}

.hsl-featured-item:hover .hsl-featured-img img {
    transform: scale(1.03);
}

.hsl-featured-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 55%);
    pointer-events: none;
}

.hsl-featured-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 20px 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hsl-featured-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hsl-featured-eyebrow i {
    font-size: 11px;
}

.hsl-featured-title {
    font-family: var(--hsl-font-display);
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hsl-featured-dates {
    font-size: 0.82rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.hsl-featured-dots {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 2px;
    z-index: 3;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.hsl-featured-dot {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hsl-featured-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background 0.25s, transform 0.25s;
}

.hsl-featured-dot:hover::before {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.2);
}

.hsl-featured-dot.is-active::before {
    background: #fff;
    transform: scale(1.4);
}

.hsl-featured-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
    border-radius: 50%;
}

.hsl-featured-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s, background 0.15s, transform 0.15s;
    z-index: 3;
    backdrop-filter: blur(4px);
}

.hsl-featured-slot:hover .hsl-featured-nav,
.hsl-featured-nav:focus-visible {
    opacity: 1;
}

.hsl-featured-nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

.hsl-featured-nav:active {
    transform: translateY(-50%) scale(0.92);
}

.hsl-featured-prev {
    left: 12px;
}

.hsl-featured-next {
    right: 12px;
}

@media (hover: none) {
    .hsl-featured-nav {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* ======================================================================
 * 5. Filter sidebar
 * ==================================================================== */

.hsl-filters {
    position: sticky;
    top: 90px;
    background: var(--hsl-surface-raised);
    border: 1px solid var(--hsl-border);
    border-radius: var(--hsl-radius);
    padding: 22px;
    height: fit-content;
    box-shadow: var(--hsl-shadow-sm);
}

.hsl-filter-group {
    margin-bottom: 22px;
}

.hsl-filter-group:last-of-type {
    margin-bottom: 20px;
}

.hsl-filter-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hsl-fg-subtle);
    margin-bottom: 10px;
}

.hsl-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hsl-chip-row input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hsl-chip-row label {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--hsl-surface-sunken);
    color: var(--hsl-fg-muted);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s;
    user-select: none;
}

.hsl-chip-row label:hover {
    color: var(--hsl-fg);
    background: var(--hsl-primary-soft);
}

.hsl-chip-row input[type="radio"]:checked + label {
    background: var(--hsl-primary);
    color: #fff;
    border-color: var(--hsl-primary);
}

.hsl-chip-row input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--hsl-primary);
    outline-offset: 2px;
}

.hsl-filters .form-control,
.hsl-filters select.form-control {
    border-radius: var(--hsl-radius-sm);
    border: 1px solid var(--hsl-border);
    background: var(--hsl-surface-raised);
    color: var(--hsl-fg);
    font-size: 0.9rem;
    padding: 9px 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.hsl-filters .form-control:focus {
    border-color: var(--hsl-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hsl-primary) 15%, transparent);
    outline: none;
}

.hsl-filters .btn-primary {
    background: var(--hsl-primary);
    border-color: var(--hsl-primary);
    border-radius: 999px;
    padding: 11px;
    font-weight: 600;
}

.hsl-filters .btn-primary:hover {
    background: var(--hsl-primary-hover);
    border-color: var(--hsl-primary-hover);
}

.hsl-filters .btn-outline-secondary {
    border-radius: 999px;
    border-color: var(--hsl-border-strong);
    color: var(--hsl-fg);
}

/* ======================================================================
 * 6. Listing card redesign
 * ==================================================================== */

.hsl-card {
    display: flex;
    flex-direction: column;
    background: var(--hsl-surface-raised);
    border: 1px solid var(--hsl-border);
    border-radius: var(--hsl-radius);
    overflow: hidden;
    box-shadow: var(--hsl-shadow-sm);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    min-width: 0;
    height: 100%;
    position: relative;
}

.hsl-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hsl-shadow-lg);
    border-color: var(--hsl-border-strong);
}

/* Stretched overlay link — makes the whole card clickable while keeping
   nested anchors (pet icons) valid HTML. Visually hidden; keyboard-focusable. */
.hsl-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-indent: 100%;
    overflow: hidden;
    white-space: nowrap;
    border-radius: inherit;
}

.hsl-card-link:focus-visible {
    outline: 2px solid var(--hsl-primary);
    outline-offset: -2px;
}

.hsl-card-pets a {
    position: relative;
    z-index: 2;
}

.hsl-fav-btn {
    z-index: 3;
}

.hsl-card.hsl-card-expired {
    opacity: 0.6;
}

.hsl-card.hsl-card-expired:hover {
    opacity: 0.85;
}

.hsl-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--hsl-surface-sunken);
}

.hsl-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    display: block;
}

.hsl-card:hover .hsl-card-media img {
    transform: scale(1.04);
}

.hsl-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.hsl-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--hsl-fg);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.hsl-badge-new {
    background: var(--hsl-pop);
    color: #fff;
}

.hsl-badge-expired {
    background: rgba(108, 117, 125, 0.95);
    color: #fff;
}

.hsl-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c73e4a;
    transition: transform 0.12s, background 0.12s;
    font-size: 15px;
}

.hsl-fav-btn:hover {
    transform: scale(1.08);
    background: #fff;
}

.hsl-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.hsl-card-loc {
    color: var(--hsl-fg-subtle);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hsl-card-loc i {
    font-size: 11px;
    color: var(--hsl-fg-subtle);
}

.hsl-card-title {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.005em;
    margin: 0;
    color: var(--hsl-fg);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hsl-card-pets {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--hsl-fg-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

.hsl-card-pets .fas,
.hsl-card-pets .far {
    font-size: 14px;
    margin-right: 0;
    color: var(--hsl-fg-muted);
}

.hsl-card-pets a {
    color: inherit;
    text-decoration: none;
}

.hsl-card-pets a:hover .fas,
.hsl-card-pets a:hover .far {
    color: var(--hsl-primary);
}

.hsl-card-dates {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--hsl-border);
    font-size: 0.82rem;
    color: var(--hsl-fg-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hsl-duration-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--hsl-primary-soft);
    color: var(--hsl-primary);
    border-radius: 999px;
    white-space: nowrap;
}

/* ======================================================================
 * 7. Pagination restyle
 * ==================================================================== */

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    margin: 0 3px;
    border-radius: 10px !important;
    border: 1px solid var(--hsl-border);
    background: var(--hsl-surface-raised);
    color: var(--hsl-fg-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.12s;
}

.pagination .page-link:hover {
    color: var(--hsl-fg);
    border-color: var(--hsl-border-strong);
    background: var(--hsl-surface-raised);
}

.pagination .page-item.active .page-link {
    background: var(--hsl-primary);
    border-color: var(--hsl-primary);
    color: #fff;
}

/* ======================================================================
 * 8. Listings header row (count + sort)
 * ==================================================================== */

.hsl-listings-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.hsl-listings-count {
    color: var(--hsl-fg-muted);
    font-size: 0.925rem;
}

.hsl-listings-count strong {
    color: var(--hsl-fg);
    font-weight: 600;
}

/* ======================================================================
 * 8b. Location-page specifics (breadcrumb, hero meta, notify strip, chips)
 * ==================================================================== */

.hsl-breadcrumb {
    margin: 14px 0 4px;
    font-size: 0.85rem;
}

.hsl-breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--hsl-fg-subtle);
}

.hsl-breadcrumb li + li::before {
    content: "/";
    margin-right: 6px;
    color: var(--hsl-fg-subtle);
    opacity: 0.6;
}

.hsl-breadcrumb a {
    color: var(--hsl-fg-muted);
    text-decoration: none;
}

.hsl-breadcrumb a:hover {
    color: var(--hsl-primary);
    text-decoration: underline;
}

.hsl-breadcrumb [aria-current="page"] {
    color: var(--hsl-fg);
}

.hsl-location-hero {
    padding-top: 10px;
    padding-bottom: 24px;
}

.hsl-hero-meta {
    color: var(--hsl-fg-subtle);
    font-size: 0.9rem;
    margin: 0 0 20px;
}

.hsl-hero-meta a {
    color: var(--hsl-primary);
    font-weight: 500;
}

.hsl-notify-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--hsl-primary-soft);
    border: 1px solid var(--hsl-border);
    border-radius: var(--hsl-radius-sm);
    font-size: 0.9rem;
    color: var(--hsl-fg);
    margin-top: 6px;
    max-width: 560px;
}

.hsl-hero-text:only-child .hsl-notify-strip {
    margin-left: auto;
    margin-right: auto;
}

.hsl-notify-strip > i {
    color: var(--hsl-primary);
    flex-shrink: 0;
}

.hsl-notify-strip > span {
    flex: 1;
    line-height: 1.4;
}

.hsl-notify-strip a {
    color: var(--hsl-primary);
    font-weight: 500;
}

.hsl-notify-strip .btn-primary {
    background: var(--hsl-primary);
    border-color: var(--hsl-primary);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.hsl-notify-strip--muted {
    background: var(--hsl-surface-sunken);
}

.hsl-notify-strip--muted > i {
    color: var(--hsl-fg-muted);
}

.hsl-chips-section {
    margin: 28px 0 24px;
}

.hsl-chips-heading {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hsl-fg-subtle);
    margin: 0 0 10px;
}

.hsl-chip-row--links {
    gap: 8px;
}

.hsl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--hsl-surface-sunken);
    color: var(--hsl-fg-muted);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.12s;
}

.hsl-chip:hover {
    background: var(--hsl-primary-soft);
    color: var(--hsl-primary);
    border-color: var(--hsl-primary-soft);
}

.hsl-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    background: var(--hsl-surface-raised);
    color: var(--hsl-fg-muted);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--hsl-border);
}

.hsl-chip:hover .hsl-chip-count {
    color: var(--hsl-primary);
    border-color: var(--hsl-primary);
    background: var(--hsl-surface-raised);
}

/* ======================================================================
 * 8c. Listing image carousel — strengthen Bootstrap's faint controls so
 *     arrows and indicator strip stay legible on bright/busy photos.
 * ==================================================================== */

#listingCarousel .carousel-control-prev,
#listingCarousel .carousel-control-next {
    width: 56px;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#listingCarousel .carousel-control-prev-icon,
#listingCarousel .carousel-control-next-icon {
    width: 42px;
    height: 42px;
    padding: 12px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.5);
    background-size: 18px;
    background-position: center;
    backdrop-filter: blur(4px);
    transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

#listingCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#listingCarousel .carousel-control-next:hover .carousel-control-next-icon,
#listingCarousel .carousel-control-prev:focus-visible .carousel-control-prev-icon,
#listingCarousel .carousel-control-next:focus-visible .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.78);
    transform: scale(1.06);
}

#listingCarousel .carousel-indicators {
    gap: 4px;
    margin: 0 auto 12px;
    padding: 5px 8px;
    width: fit-content;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.38);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

#listingCarousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: 0;
    margin: 0;
    padding: 0;
    opacity: 1;
    transition: background 0.2s, transform 0.2s;
}

#listingCarousel .carousel-indicators [data-bs-target]:hover {
    background: rgba(255, 255, 255, 0.85);
}

#listingCarousel .carousel-indicators [data-bs-target].active {
    background: #fff;
    transform: scale(1.4);
}

/* ======================================================================
 * 8d. Admin pending-listing banner (logged-in admins only)
 * ==================================================================== */

.hsl-admin-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--hsl-pop);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.hsl-admin-banner-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.hsl-admin-banner-text {
    flex: 1;
}

.hsl-admin-banner-cta {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border-radius: 999px;
    padding: 4px 14px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.hsl-admin-banner-cta:hover {
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
}

[data-bs-theme="dark"] .hsl-admin-banner {
    background: #d97505;
}

/* ======================================================================
 * 9. Register banner (keep functional, soften visual)
 * ==================================================================== */

#registerBanner {
    background: var(--hsl-primary-soft) !important;
    color: var(--hsl-fg) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--hsl-border) !important;
    padding: 6px 0 !important;
    font-size: 0.82rem;
}

#registerBanner .container {
    padding-top: 0;
    padding-bottom: 0;
}

#registerBanner strong {
    font-weight: 600;
}

#registerBanner .btn-primary {
    background: var(--hsl-primary);
    border-color: var(--hsl-primary);
    border-radius: 999px;
    padding: 2px 12px;
    font-size: 0.78rem;
}

#registerBanner .btn-close {
    font-size: 0.7rem;
    padding: 6px;
}

/* ======================================================================
 * 10. Responsive
 * ==================================================================== */

@media (max-width: 960px) {
    .hsl-filters {
        position: static;
        top: auto;
    }
    .hsl-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    /* Collapse to the centered single-column hero (reuses the :only-child
       fallback styles above, which already apply because we hide the column). */
    .hsl-hero-featured-col {
        display: none;
    }
    .hsl-hero-text {
        text-align: center;
    }
    .hsl-hero-title,
    .hsl-hero-sub {
        margin-left: auto;
        margin-right: auto;
    }
    .hsl-trust-strip {
        justify-content: center;
        max-width: 640px;
        margin: 0 auto;
    }
    .hsl-trust-stat {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .hsl-hero {
        padding: 28px 0 20px;
    }
    .hsl-trust-strip {
        gap: 20px;
    }
    .hsl-trust-num {
        font-size: 1.35rem;
    }
}
