.raf,
.raf * { box-sizing: border-box; }

.raf {
    position: relative;
    z-index: 20;
    margin: 0 0 24px;
    padding: 20px 24px;
    background: #fbf7ee;
    border: 1px solid #ddd3c2;
    border-radius: 14px;
}

.raf__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}

/* Asztalon a trigger gomb nem kell (a csoportok mindig láthatóak);
   a .raf-highlights wrapper is „kibontva”, így a kiemelt csoport inline marad.
   Mobilon a @media blokk felülírja ezeket. */
.raf-trigger { display: none; }
.raf-highlights { display: contents; }

.raf-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.raf-group__label {
    color: #a98c55;
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.raf-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.raf-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 8px 16px;
    color: #5a5346;
    background: transparent;
    border: 1px solid #e4dbcb;
    border-radius: 100px;
    font-family: "Poppins", sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.raf-chip:hover {
    color: #211e1a;
    background: #f5efe3;
}

.raf-chip:focus-visible {
    outline: 2px solid #a98c55;
    outline-offset: 2px;
}

.raf-chip.is-active {
    color: #211e1a;
    background: #c6a968;
    border-color: #c6a968;
}

.raf-chip.is-active:hover {
    color: #211e1a;
    background: #d3b978;
}

.raf-chip svg {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
}

.raf-clear {
    margin-left: auto;
    padding: 8px 16px;
    color: #8a6f3e;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 100px;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease;
}

.raf-clear:hover {
    color: #211e1a;
    background: #f5efe3;
}

.raf-clear[hidden] { display: none; }

/* Üres állapot (nincs találat) — a dobozon belül. */
.raf-empty {
    margin: 16px 0 0;
    padding: 18px;
    color: #8a8175;
    background: #fff;
    border: 1px dashed #ddd3c2;
    border-radius: 12px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 18px;
    font-style: italic;
    line-height: 1.4;
    text-align: center;
}

.raf-empty[hidden] { display: none; }

/* Értesítés a dobozon KÍVÜL: „X apartman felel meg a szűrésnek”. */
.raf-announce {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}

.raf-announce__num {
    color: #9a7936;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.raf-announce__text {
    color: #5a5346;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .01em;
}

.raf-announce[hidden] { display: none; }

/* Sticky (fix) állapot: teljes szélességű, lapos sáv a menü alatt.
   A top értéket a JS adja meg (= a menü magassága). */
.raf.is-stuck {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #ddd3c2;
    border-radius: 0;
}

.raf.is-stuck .raf__inner {
    max-width: 1140px;
    margin-right: auto;
    margin-left: auto;
}

.raf-sticky-spacer {
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

/* Aktív szűrésnél a látható kártyák biztosan látszanak
   (felülírja a GSAP belépő animáció opacity:0 kezdőértékét). */
.ra-grid.is-filtering .ra-card {
    opacity: 1 !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .raf { padding: 12px 16px; }

    .raf__inner { flex-wrap: wrap; gap: 10px 12px; }

    /* Vendégek: címke elrejtve (a chipek önmagukat magyarázzák), chipek maradnak. */
    .raf-group--guests .raf-group__label { display: none; }

    /* Kiemelt szűrők: kis ikongomb a sor végén, alatta lenyíló panel. */
    .raf-highlights {
        position: relative;
        display: inline-flex;
        align-items: center;
        margin-left: auto;
    }
    .raf-trigger {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 9px 13px;
        color: #211e1a;
        background: #fff;
        border: 1px solid #ddd3c2;
        border-radius: 100px;
        cursor: pointer;
        transition: background 180ms ease, border-color 180ms ease;
    }
    .raf-trigger:hover,
    .raf-trigger:focus-visible { background: #f5efe3; border-color: #c6a968; outline: none; }
    .raf-trigger svg { display: block; }
    .raf-trigger__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        color: #fff;
        background: #9a7936;
        border-radius: 100px;
        font-family: "Poppins", sans-serif;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
    }
    .raf-trigger__badge[hidden] { display: none; }

    /* Lenyíló panel: a kiemelt csoport. */
    .raf-highlights .raf-group--highlights {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        z-index: 30;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        min-width: 250px;
        padding: 16px;
        background: #fff;
        border: 1px solid #ddd3c2;
        border-radius: 12px;
        box-shadow: 0 16px 30px -18px rgba(33,30,26,.28);
    }
    .raf.is-open .raf-highlights .raf-group--highlights { display: flex; }
    .raf-highlights .raf-group--highlights .raf-chips { flex-direction: row; flex-wrap: wrap; gap: 8px; }

    .raf-clear {
        flex: 0 0 auto;
        width: auto;
        margin: 0;
        white-space: nowrap;
    }

    .raf-announce__num { font-size: 26px; }
    .raf-announce__text { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .raf-chip,
    .raf-clear { transition: none; }
}
