.royal-palaces {
    --gold: #b98d4f;
    --gold-dark: #9a6f35;
    --brown: #7a5326;
    --ink: #2b2622;
    --muted: #6d655d;
    --panel: #f7f5f2;
    --line: #e8e2da;
    --sand: #efe6dc;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
    --pad: clamp(20px, 5vw, 56px);
    --max: 1320px;
    color: var(--ink);
    font-family: var(--sans)
}

.royal-palaces *,
.royal-palaces *:before,
.royal-palaces *:after {
    box-sizing: border-box
}

.royal-palaces h1,
.royal-palaces h2,
.royal-palaces h3,
.royal-palaces p {
    margin: 0
}

.royal-palaces a {
    color: inherit;
    text-decoration: none
}

.royal-palaces .hero {
    --hero-image: none;
    position: relative;
    min-height: 420px;
    height: 62vh;
    max-height: 540px;
    color: #fff;
    overflow: hidden;
    background: #5a3f2a var(--hero-image) center / cover no-repeat
}

.royal-palaces .hero:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 8, 5, .78), rgba(12, 8, 5, .45) 38%, transparent 70%), linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .5))
}

.hero-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    max-width: var(--max);
    margin: auto;
    padding: 0 var(--pad);
    display: flex;
    align-items: center
}

.hero-copy {
    max-width: 440px
}

.hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(44px, 5.4vw, 64px);
    line-height: 1
}

.hero .lead {
    margin-top: 22px;
    font-family: var(--serif);
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.45;
    max-width: 340px
}

.hero .rule {
    display: block;
    width: 38px;
    height: 1px;
    background: var(--gold);
    margin: 22px 0
}

.hero .body {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.6;
    max-width: 290px;
    color: rgba(255, 255, 255, .92)
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 10px;
    letter-spacing: .13em;
    text-transform: uppercase;
    font-weight: 500
}

.link-arrow:after {
    content: "";
    width: 44px;
    height: 1px;
    background: currentColor;
    transition: width .25s
}

.link-arrow:hover:after {
    width: 58px
}

.hero .link-arrow {
    margin-top: 28px
}

.listing {
    display: grid;
    max-width: var(--max);
    margin: auto;
    grid-template-columns: clamp(250px, 25%, 300px) minmax(0, 1fr)
}

.filters {
    background: var(--panel);
    padding: 44px 24px 60px 36px
}

.filters-inner {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto
}

.f-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line)
}

.f-title {
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-dark);
    font-weight: 500
}

.f-clear,
.f-close {
    background: none;
    border: 0;
    cursor: pointer
}

.f-clear {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: underline
}

.f-close,
.f-foot {
    display: none
}

details.filter {
    border-bottom: 1px solid var(--line);
    padding: 22px 0 24px
}

details.filter>summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 500
}

details.filter>summary::-webkit-details-marker {
    display: none
}

.options {
    margin-top: 20px;
    display: grid;
    gap: 16px
}

.check {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    color: #4a433c;
    cursor: pointer
}

.check input {
    appearance: none;
    margin: 0;
    width: 13px;
    height: 13px;
    border: 1px solid #b8aea2;
    background: #fff
}

.check input:checked {
    background: var(--gold);
    border-color: var(--gold)
}

.range {
    position: relative;
    height: 22px;
    margin-top: 22px
}

.range .track {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 10px;
    height: 1px;
    background: var(--brown)
}

.range input[type=range] {
    position: absolute;
    inset: 0;
    width: 100%;
    margin: 0;
    appearance: none;
    background: none;
    pointer-events: none
}

.range input[type=range]::-webkit-slider-thumb {
    appearance: none;
    pointer-events: auto;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--brown)
}

.range-vals {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #4a433c;
    margin-top: 8px
}

.results {
    padding: 44px var(--pad) 52px 30px
}

.results-bar {
    font-family: var(--serif);
    font-size: 14px;
    line-height: 24px;
    color: #4a433c
}

.cards {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column
}

.card[hidden] {
    display: none
}

.card-img {
    aspect-ratio: 16/9;
    background: #6b5a44;
    overflow: hidden
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.card-body {
    padding: 22px 18px 24px;
    display: flex;
    flex-direction: column;
    flex: 1
}

.card h3 {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 400;
    text-transform: uppercase
}

.card .loc {
    margin-top: 6px;
    font-family: var(--serif);
    font-size: 15px;
    color: #4a433c
}

.meta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 38px;
    font-size: 9.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #4a433c;
    font-weight: 500
}

.meta svg {
    width: 17px;
    height: 17px;
    stroke: #6d655d;
    fill: none;
    stroke-width: 1.1;
    flex: none;
}

.card p.desc {
    margin: 22px 0;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.55
}

.card .link-arrow {
    margin-top: auto;
    font-size: 9.5px;
    color: var(--brown)
}

.cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 210px;
    background: var(--sand)
}

.cta-img {
    position: relative;
    overflow: hidden;
    min-height: 220px
}

.cta-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.cta-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px var(--pad) 30px 56px
}

.eyebrow {
    font-size: 8.5px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500
}

.cta-copy h2 {
    margin-top: 14px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(24px, 2.4vw, 29px);
    line-height: 1.25
}

.cta-copy p {
    margin-top: 14px;
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.55;
    max-width: 280px
}

.cta-copy .link-arrow {
    margin-top: 20px;
    font-size: 9.5px
}

.filter-fab,
.backdrop {
    display: none
}

@media(max-width:991.98px) {
    .listing {
        display: block;
        max-width: none
    }

    .results {
        padding: 28px var(--pad) 44px
    }

    .filter-fab {
        position: fixed;
        z-index: 40;
        left: 50%;
        bottom: 18px;
        display: inline-flex;
        gap: 10px;
        padding: 14px 24px;
        border: 0;
        border-radius: 999px;
        background: var(--ink);
        color: #fff;
        font-size: 11px;
        letter-spacing: .14em;
        text-transform: uppercase;
        transform: translateX(-50%)
    }

    .badge {
        min-width: 18px;
        border-radius: 9px;
        background: var(--gold);
        padding: 2px 5px;
        text-align: center
    }

    .backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 50;
        background: rgba(28, 22, 17, .5);
        opacity: 0;
        visibility: hidden
    }

    .backdrop.is-open {
        opacity: 1;
        visibility: visible
    }

    .filters {
        position: fixed;
        z-index: 60;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 86vh;
        padding: 0;
        background: #fff;
        border-radius: 18px 18px 0 0;
        transform: translateY(100%);
        visibility: hidden
    }

    .filters.is-open {
        transform: none;
        visibility: visible
    }

    .filters-inner {
        position: static;
        max-height: none;
        padding: 0 20px;
        overflow-y: auto
    }

    .f-head {
        padding: 14px 0
    }

    .f-close {
        display: block;
        font-size: 22px
    }

    .f-foot {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 12px;
        padding: 14px 20px;
        border-top: 1px solid var(--line)
    }

    .btn {
        border: 0;
        cursor: pointer;
        padding: 15px 20px;
        text-transform: uppercase
    }

    .btn-ghost {
        background: #fff;
        border: 1px solid var(--line)
    }

    .btn-gold {
        background: var(--gold);
        color: #fff
    }

    .cta {
        grid-template-columns: 1fr
    }

    .cta-copy {
        padding: 36px var(--pad)
    }
}

@media(max-width:640px) {
    .cards {
        grid-template-columns: 1fr
    }

    .hero {
        min-height: 400px
    }
}