/**
 * BrillaHero single Hero profile styles (wireframe 02).
 *
 * Applied on /annunci/<cat>/<city>/<slug>/ when the surrounding
 * HivePress listing_view_page template is reshaped by the core
 * plugin into the bh-hero-* block tree. Picks up brand tokens
 * from the parent theme; falls back to readable defaults when
 * the tokens are missing.
 */

:root {
  --bh-hero-blu-primary: var(--bh-blu-primary, #0047BB);
  --bh-hero-blu-strong:  var(--bh-blu-strong, #1A2B5F);
  --bh-hero-blu-soft:    var(--bh-blu-soft, #B3C5FF);
  --bh-hero-corallo:     var(--bh-corallo, #EE4E44);
  --bh-hero-surface:     var(--bh-surface, #F5F6FA);
  --bh-hero-text-1:      var(--bh-text-1, #1A2B5F);
  --bh-hero-text-2:      var(--bh-text-2, #877F7D);
  --bh-hero-border:      var(--bh-border, #E2E6F2);
  --bh-hero-font-body:   var(--bh-font-body, 'Inter', sans-serif);
  --bh-hero-font-display:var(--bh-font-display, 'Bricolage Grotesque', sans-serif);
}

/* ===== Layout shell (HivePress page_content + page_sidebar wrap) === */

.hp-listing.hp-vertical {
  font-family: var(--bh-hero-font-body);
  color: var(--bh-hero-text-1);
}

/* ===== Header (avatar + name + Ambassador + zones + rating) ======== */

.bh-hero-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--bh-hero-border);
  margin-bottom: 28px;
}

.bh-hero-header__avatar {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bh-hero-blu-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bh-hero-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bh-hero-header__monogram {
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 44px;
  color: #fff;
  line-height: 1;
}

.bh-hero-header__identity {
  flex: 1;
  min-width: 0;
}

.bh-hero-header__name {
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  color: var(--bh-hero-blu-strong);
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.bh-hero-header__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--bh-hero-corallo);
  color: #fff;
  font-family: var(--bh-hero-font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  vertical-align: middle;
}

.bh-hero-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: var(--bh-hero-text-2);
}

.bh-hero-header__zones-more {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bh-hero-surface);
  font-size: 13px;
  color: var(--bh-hero-blu-strong);
}

.bh-hero-header__star {
  color: var(--bh-hero-corallo);
  margin-right: 4px;
}

.bh-hero-header__rating-count {
  margin-left: 4px;
  color: var(--bh-hero-text-2);
}

.bh-hero-header__no-rating {
  font-style: italic;
}

/* ===== Gallery ===================================================== */
/* Layout adapts to actual photo count via data-count on the wrapper.
 * 1   single full-width
 * 2   two equal cells side by side
 * 3+  1 big + 2 thumbs (+N badge on the third when >3)
 * 0   block doesn't render (PHP returns empty)
 */

.bh-hero-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

/* 1 photo: single full-width cell, no thumbs column. */
.bh-hero-gallery[data-count="1"] {
  grid-template-columns: 1fr;
}
.bh-hero-gallery[data-count="1"] .bh-hero-gallery__main {
  aspect-ratio: 16 / 9;
}

/* 2 photos: two equal cells. */
.bh-hero-gallery[data-count="2"] {
  grid-template-columns: 1fr 1fr;
}
.bh-hero-gallery__cell {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bh-hero-surface);
  border-radius: 14px;
  overflow: hidden;
}

.bh-hero-gallery__main {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bh-hero-surface);
  border-radius: 14px;
  overflow: hidden;
}

.bh-hero-gallery__thumbs {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.bh-hero-gallery__thumb {
  position: relative;
  background: var(--bh-hero-surface);
  border-radius: 14px;
  overflow: hidden;
}

.bh-hero-gallery__link,
.bh-hero-gallery__link:hover,
.bh-hero-gallery__link:focus {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: zoom-in;
}
.bh-hero-gallery__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 240ms ease, opacity 240ms ease;
}
.bh-hero-gallery__link:hover img,
.bh-hero-gallery__link:focus-visible img {
  transform: scale(1.02);
  opacity: 0.96;
}

.bh-hero-gallery__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 43, 95, 0.55);
  color: #fff;
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 22px;
  pointer-events: none;
}

.bh-hero-gallery__hidden {
  display: none;
}

/* ===== Bio ("Su di me") ============================================= */

.bh-hero-bio {
  margin-bottom: 32px;
}
.bh-hero-bio__title {
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--bh-hero-blu-strong);
  margin: 0 0 12px;
}
.bh-hero-bio__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--bh-hero-text-1);
}
.bh-hero-bio__body p {
  margin: 0 0 12px;
}

/* ===== Services + zones ============================================ */

.bh-hero-services {
  margin-bottom: 32px;
}
.bh-hero-services__title {
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--bh-hero-blu-strong);
  margin: 0 0 16px;
}

.bh-hero-services__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}
.bh-hero-services__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bh-hero-text-2);
}
.bh-hero-services__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bh-hero-services__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-family: var(--bh-hero-font-body);
}
.bh-hero-services__chip--service {
  background: var(--bh-hero-blu-soft);
  color: var(--bh-hero-blu-strong);
  font-weight: 500;
}
.bh-hero-services__chip--zone {
  background: #fff;
  border: 1.5px solid var(--bh-hero-border);
  color: var(--bh-hero-text-1);
}

.bh-hero-services__chip-sep {
  opacity: 0.5;
}
.bh-hero-services__chip-price {
  font-weight: 700;
}

/* ===== Sidebar ===================================================== */

.bh-hero-sidebar {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 1px solid var(--bh-hero-border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(26, 43, 95, 0.06);
}

/* Service switcher (was tabs; switched to a select so the second
   category never gets clipped on narrow sidebars). */
.bh-hero-sidebar__switcher {
  display: block;
  margin-bottom: 18px;
}
.bh-hero-sidebar__switcher-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bh-hero-text-2);
  margin-bottom: 6px;
}
.bh-hero-sidebar__select {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 14px;
  font-family: var(--bh-hero-font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--bh-hero-blu-strong);
  background: var(--bh-hero-surface);
  border: 1.5px solid var(--bh-hero-border);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='none' stroke='%231A2B5F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8l3.5-3.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.bh-hero-sidebar__select:focus {
  outline: none;
  border-color: var(--bh-hero-blu-primary);
  box-shadow: 0 0 0 3px var(--bh-hero-blu-soft);
}

.bh-hero-sidebar__price {
  display: none;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bh-hero-border);
}
.bh-hero-sidebar__price.is-active {
  display: block;
}

.bh-hero-sidebar__price-value {
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 36px;
  color: var(--bh-hero-blu-strong);
  line-height: 1;
}
.bh-hero-sidebar__price-unit {
  font-family: var(--bh-hero-font-body);
  font-weight: 400;
  font-size: 18px;
  color: var(--bh-hero-text-2);
}
.bh-hero-sidebar__price-quote {
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--bh-hero-blu-strong);
}
.bh-hero-sidebar__price-cat {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--bh-hero-text-2);
}

.bh-hero-sidebar__cta {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--bh-hero-blu-strong);
  color: #fff;
  text-align: center;
  font-family: var(--bh-hero-font-display);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 120ms ease;
}
.bh-hero-sidebar__cta:hover {
  background: var(--bh-hero-blu-primary);
  color: #fff;
}

.bh-hero-sidebar__map {
  margin: 16px 0 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--bh-hero-border);
  background: var(--bh-hero-surface);
}
.bh-hero-sidebar__map iframe {
  display: block;
  width: 100%;
  height: 180px;
  border: 0;
}

.bh-hero-sidebar__address {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: var(--bh-hero-surface);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--bh-hero-text-2);
}
.bh-hero-sidebar__address-zone {
  display: block;
  color: var(--bh-hero-blu-strong);
  font-weight: 700;
  font-family: var(--bh-hero-font-display);
  margin-bottom: 4px;
}

/* Hide the legacy HivePress actions container — the message-send modal
   it injects stays in the DOM so our CTA can anchor to it, but the
   default button shouldn't render twice. */
.bh-hero-actions-shadow {
  display: none !important;
}

/* Hide the legacy category badge and report link the page is no longer using. */
.hp-listing__category--header,
.hp-listing__details--primary,
.hp-listing__action--report {
  display: none;
}

/* ===== Mobile ====================================================== */

@media (max-width: 768px) {
  .bh-hero-gallery,
  .bh-hero-gallery[data-count="1"],
  .bh-hero-gallery[data-count="2"] {
    grid-template-columns: 1fr;
  }
  .bh-hero-gallery[data-count="2"] .bh-hero-gallery__cell {
    aspect-ratio: 16 / 10;
  }
  .bh-hero-gallery__thumbs {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .bh-hero-gallery__thumb {
    aspect-ratio: 16 / 10;
  }
  .bh-hero-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .bh-hero-header__name {
    font-size: 26px;
  }
  .bh-hero-services__row {
    grid-template-columns: 1fr;
  }
  .bh-hero-sidebar {
    position: relative;
    top: 0;
  }
}
