.hb-search {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hb-search__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hb-search__field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.hb-search__field input {
    padding: 0.5rem 0.6rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
}

.hb-search__field--narrow input {
    width: 5.5rem;
}

.hb-search__submit {
    padding: 0.6rem 1.25rem;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.hb-search__submit:hover {
    background: #1e293b;
}

.hb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hb-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.hb-card__cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.hb-card__placeholder {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    font-size: 2.5rem;
}

.hb-card__body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hb-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.hb-card__excerpt {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

.hb-card--non-disponibile {
    opacity: 0.65;
}

.hb-availability {
    display: inline-block;
    width: fit-content;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.hb-availability.is-available {
    color: #15803d;
    background: #dcfce7;
}

.hb-availability.is-unavailable {
    color: #b91c1c;
    background: #fee2e2;
}

.hb-card__price {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.hb-card__price-notti {
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    margin-left: 0.3rem;
}

.hb-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.88rem;
}

.hb-pager__link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    /* button.hb-pager__link (esperienza dinamica) deve avere lo stesso aspetto di a.hb-pager__link
       (vetrina statica) — reset degli stili nativi del browser */
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
}

.hb-pager__link:hover {
    text-decoration: underline;
}

.hb-pager__status {
    color: #64748b;
}

.hb-card__book--disabled {
    display: inline-block;
    margin-top: auto;
    padding: 0.55rem 1rem;
    background: #e2e8f0;
    color: #94a3b8;
    text-align: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: not-allowed;
}

.hb-card__book {
    display: inline-block;
    margin-top: auto;
    padding: 0.55rem 1rem;
    background: #0f172a;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s ease;
    /* button.hb-card__book (esperienza dinamica "Prenota") deve avere lo stesso aspetto di
       a.hb-card__book (vetrina statica [hasset_alloggi]) — reset degli stili nativi del browser */
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.hb-card__book:hover,
.hb-card__book:focus {
    background: #1e293b;
    color: #fff;
    text-decoration: none;
}

.hb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.hb-chips--scheda {
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.hb-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 0.15rem 0.45rem;
    font-size: 0.78rem;
    color: #475569;
}

.hb-chip--scheda {
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.82rem;
}

.hb-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.hb-services--card {
    margin-top: auto;
    padding-top: 0.4rem;
}

.hb-service {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    color: #1d4ed8;
}

.hb-service--scheda {
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.82rem;
}

.hb-service .bi {
    margin-right: 0.2rem;
}

.hb-service--scheda .bi {
    margin-right: 0.25rem;
}

.hb-scheda {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
    line-height: 1.55;
    max-width: 860px;
}

.hb-scheda__hero {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f1f5f9;
}

.hb-scheda__cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.hb-scheda__placeholder {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    font-size: 4rem;
}

.hb-scheda__gallery {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    padding-bottom: 0.25rem;
}

.hb-scheda__thumb {
    height: 90px;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    cursor: zoom-in;
}

.hb-scheda__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.hb-scheda__lead {
    font-size: 1rem;
    color: #374151;
    margin: 0 0 0.75rem;
    font-weight: 500;
}

.hb-scheda__description {
    font-size: 0.93rem;
    color: #475569;
    margin-bottom: 1.1rem;
}

.hb-scheda__services {
    margin-top: 0.5rem;
}

.hb-scheda__services-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.hb-message {
    margin: 0;
}

.hb-message--error {
    color: #dc2626;
}

.hb-message--empty {
    color: #64748b;
}

.hb-altri-periodi {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1.5px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hb-altri-periodi__toggle {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    list-style: none;
}

.hb-altri-periodi__toggle::-webkit-details-marker {
    display: none;
}

.hb-altri-periodi__toggle::before {
    content: "▸ ";
    color: #64748b;
}

.hb-altri-periodi[open] .hb-altri-periodi__toggle::before {
    content: "▾ ";
}

.hb-altri-periodi__hint {
    margin: 0.5rem 0 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.hb-card__periodi-link {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    margin: -0.2rem 0 0.1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    font-family: inherit;
}

.hb-card__periodi-link:hover {
    text-decoration: underline;
}

.hb-periodi-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* L'attributo HTML "hidden" da solo non basta: una regola CSS dell'autore con la stessa
   specificità (come .hb-periodi-modal sopra) lo sovrascrive comunque, lasciando il popup
   visibile — e sopra tutta la pagina — fin dal caricamento. Questa regola, più specifica
   (classe + attributo), riafferma display:none quando l'attributo è presente. */
.hb-periodi-modal[hidden] {
    display: none;
}

.hb-periodi-modal__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.hb-periodi-modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
}

.hb-periodi-modal__title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.hb-periodi-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.hb-periodi-modal__list li {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.hb-periodi-modal__list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hb-periodi-modal__empty {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

.hb-pos {
    margin: 0.45rem 0 0.75rem;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.45;
}

.hb-pos-testo {
    margin-bottom: 0.2rem;
}

.hb-pos-mappa {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.hb-pos-mappa:hover {
    text-decoration: underline;
}

.hb-courtesy {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 520px;
    margin: 1.5rem auto;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    color: #334155;
}

.hb-courtesy__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hb-courtesy__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.65rem;
}

.hb-courtesy__text {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 1rem;
}

.hb-courtesy__contact {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.hb-courtesy__link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.hb-courtesy__link:hover {
    text-decoration: underline;
}

.hb-courtesy__retry {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    border: 1.5px solid #2563eb;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.hb-courtesy__retry:hover {
    background: #eff6ff;
}

.hb-courtesy__debug {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: #fff8e1;
    border: 1px dashed #dba617;
    border-radius: 6px;
    font-size: 12px;
    text-align: left;
    color: #5c4a00;
}

.hb-courtesy__debug a {
    display: inline-block;
    margin-top: 0.35rem;
    color: #2563eb;
    font-weight: 600;
}
