@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --isb-accent:      #F97316;
  --isb-accent-dark: #ea6a05;
  --isb-accent-light:#fff7ed;
  --isb-border:      #e2e8f0;
  --isb-text:        #111827;
  --isb-muted:       #6b7280;
  --isb-font:        'Outfit', sans-serif;
}

/* ─── AZZERA margine/padding sezione Elementor che contiene la barra ─── */
#isb-hero-section,
#isb-hero-section .elementor-container,
#isb-hero-section .elementor-row,
#isb-hero-section .elementor-column,
#isb-hero-section .elementor-column-wrap,
#isb-hero-section .elementor-widget-wrap {
  padding-bottom: 0 !important;
  margin-bottom:  0 !important;
}


.isb-wrapper {
  font-family: var(--isb-font);
  width: 100%;
  position: relative;
  z-index: 100;
  display: block;
  line-height: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  box-shadow: none;
}

/* ─── BARRA: piena larghezza, angoli arrotondati top ─── */
.isb-bar {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 16px 16px 0 0;
  border-top:   1.5px solid var(--isb-border);
  border-left:  1.5px solid var(--isb-border);
  border-right: 1.5px solid var(--isb-border);
  border-bottom: none;
  box-shadow: none;
  overflow: hidden;
  min-height: 68px;
  width: 100%;
  line-height: normal;
}
.isb-bar.filtri-open {
  border-radius: 16px 16px 0 0;
}

/* ─── CAMPI ─── */
.isb-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  flex: 1;
  min-width: 0;
  background: #fff;
}
/* Campo zona più largo ma non troppo */
.isb-field:first-child { flex: 1.8; }

.isb-field.isb-divider {
  border-right: 1.5px solid var(--isb-border);
}
.isb-icon { width: 18px; height: 18px; color: #9ca3af; flex-shrink: 0; }

.isb-field input[type="text"],
.isb-field select {
  border: none; outline: none; background: transparent;
  font-family: var(--isb-font);
  font-size: 15px;
  font-weight: 500;
  color: var(--isb-text);
  width: 100%;
  appearance: none; -webkit-appearance: none;
}
.isb-field input[type="text"]::placeholder { color: #9ca3af; font-weight: 400; }
.isb-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='6' viewBox='0 0 11 6'%3E%3Cpath d='M1 1l4.5 4 4.5-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 18px;
  cursor: pointer;
  min-width: 130px;   /* abbastanza per "Vendita / Affitto" */
}

/* ─── BOTTONE FILTRI ─── */
.isb-btn-filtri-wrap {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-right: 1.5px solid var(--isb-border);
  background: #fff;
  flex-shrink: 0;
}
.isb-btn-filtri {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--isb-accent-light);
  border: 1.5px solid #fed7aa;
  border-radius: 999px;
  font-family: var(--isb-font);
  font-size: 14px;
  font-weight: 700;
  color: var(--isb-accent);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.isb-btn-filtri svg { width: 15px; height: 15px; }
.isb-btn-filtri:hover { background: #ffe4c4; }
.isb-btn-filtri.active { background: #fed7aa; border-color: var(--isb-accent); }

/* ─── BOTTONE CERCA: alto, ben proporzionato ─── */
.isb-btn-cerca {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 32px;
  min-width: 120px;
  align-self: stretch;       /* occupa tutta l'altezza della barra */
  background: var(--isb-accent);
  border: none;
  font-family: var(--isb-font);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.isb-btn-cerca:hover  { background: var(--isb-accent-dark); }
.isb-btn-cerca:active { opacity: 0.9; }
.isb-btn-cerca svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── FILTRI AVANZATI ─── */
.isb-filtri-avanzati {
  background: #fff;
  border: 1.5px solid var(--isb-border);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), padding 0.3s;
}
.isb-filtri-avanzati.open { max-height: 160px; padding: 18px 24px 22px; }
.isb-filtri-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.isb-filter-group { display: flex; flex-direction: column; gap: 5px; }
.isb-filter-group label {
  font-size: 11px; font-weight: 700; color: var(--isb-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.isb-filter-group input[type="number"],
.isb-filter-group select {
  border: 1.5px solid var(--isb-border); border-radius: 10px;
  padding: 8px 12px; font-family: var(--isb-font); font-size: 14px;
  color: var(--isb-text); outline: none; transition: border-color 0.15s;
  background: #fff;
}
.isb-filter-group input[type="number"]:focus,
.isb-filter-group select:focus {
  border-color: var(--isb-accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}

/* ─── RISULTATI ─── */
.isb-results {
  margin-top: 6px;
  background: #fff;
  border: 1.5px solid var(--isb-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  animation: isbFadeIn 0.22s ease;
}
@keyframes isbFadeIn { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:translateY(0)} }

.isb-results-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px; border-bottom: 1.5px solid var(--isb-border); background: #fafafa;
}
.isb-results-count { font-size: 12px; font-weight: 700; color: var(--isb-muted); text-transform: uppercase; letter-spacing: 0.05em; line-height: normal; }
.isb-results-count strong { color: var(--isb-accent); font-size: 16px; }
.isb-results-close {
  display: flex; align-items: center; gap: 5px; background: var(--isb-accent);
  border: none; font-family: var(--isb-font); font-size: 13px; font-weight: 600;
  color: #fff; cursor: pointer; padding: 6px 14px; border-radius: 999px;
  transition: background 0.15s; line-height: normal;
}
.isb-results-close:hover { background: var(--isb-accent-dark); }

.isb-results-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-height: 600px; overflow-y: auto;
  padding: 16px; gap: 14px; background: #f8fafc;
}
.isb-results-grid::-webkit-scrollbar { width: 5px; }
.isb-results-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ─── CARD ─── */
.isb-card {
  display: flex; flex-direction: column; text-decoration: none;
  color: var(--isb-text); background: #fff; border-radius: 14px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1.5px solid transparent;
}
.isb-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.11); border-color: #fed7aa; }
.isb-card:hover .isb-card-img img { transform: scale(1.05); }

.isb-card-img { width:100%; height:165px; overflow:hidden; background:#f1f5f9; position:relative; flex-shrink:0; }
.isb-card-img img { width:100%; height:100%; object-fit:cover; transition:transform 0.35s ease; display:block; }
.isb-card-no-img { display:flex; align-items:center; justify-content:center; width:100%; height:100%; color:#cbd5e1; font-size:40px; }

/* Badge — solo arancione */
.isb-card-badge {
  position:absolute; top:9px; left:9px;
  font-family:var(--isb-font); font-size:10px; font-weight:800;
  letter-spacing:0.07em; text-transform:uppercase; color:#fff;
  padding:4px 11px; border-radius:999px;
  background: var(--isb-accent);
}
.isb-card-badge--vendita,
.isb-card-badge--affitto,
.isb-card-badge--default { background: var(--isb-accent); }

.isb-card-body { padding:13px 14px 15px; display:flex; flex-direction:column; gap:4px; flex:1; line-height:normal; }
.isb-card-tipologia { font-size:10px; font-weight:800; color:var(--isb-accent); text-transform:uppercase; letter-spacing:0.06em; }
.isb-card-title { font-size:14px; font-weight:700; color:var(--isb-text); line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.isb-card-meta { display:flex; flex-wrap:wrap; gap:5px; margin-top:4px; }
.isb-card-meta-item { display:flex; align-items:center; gap:3px; font-size:11px; color:var(--isb-muted); font-weight:600; background:#f1f5f9; padding:3px 7px; border-radius:6px; }
.isb-card-meta-item svg { width:11px; height:11px; flex-shrink:0; }

/* Città: sempre su riga separata */
.isb-card-location {
  display: flex; width: 100%; align-items: center;
  gap: 4px; font-size: 11px; color: var(--isb-muted);
  margin-top: 6px; line-height: 1.4;
}
.isb-card-location svg { width:11px; height:11px; flex-shrink:0; color:var(--isb-accent); }

.isb-card-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:9px; border-top:1px solid #f1f5f9; }
.isb-card-prezzo { font-size:17px; font-weight:800; color:var(--isb-accent); line-height:1; }
.isb-card-cta { font-size:10px; font-weight:700; color:var(--isb-accent); text-transform:uppercase; letter-spacing:0.05em; opacity:0.55; transition:opacity 0.15s; }
.isb-card:hover .isb-card-cta { opacity:1; }

/* ─── EMPTY / LOADER ─── */
.isb-no-results { padding:48px 20px; text-align:center; color:var(--isb-muted); font-size:14px; grid-column:1/-1; background:#fff; border-radius:12px; line-height:normal; }
.isb-no-results svg { display:block; margin:0 auto 12px; width:40px; height:40px; opacity:0.2; }
.isb-no-results small { display:block; margin-top:5px; font-size:12px; opacity:0.7; }
.isb-results-loader { display:none; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:44px; font-size:14px; color:var(--isb-muted); font-weight:500; line-height:normal; }
.isb-results-loader.visible { display:flex; }
.isb-spinner { width:32px; height:32px; border:3px solid #fed7aa; border-top-color:var(--isb-accent); border-radius:50%; animation:isbSpin 0.65s linear infinite; }
@keyframes isbSpin { to { transform:rotate(360deg); } }

/* ─── RESPONSIVE ─── */
/* ─── TABLET ─── */
@media (max-width:1024px) {
  .isb-results-grid { grid-template-columns:repeat(3,1fr); }
}

/* Gruppi di righe per mobile */
.isb-row-group {
  display: contents;   /* su desktop si comporta come se non esistesse */
}

/* ─── MOBILE ─── */
@media (max-width:768px) {

  .isb-bar {
    flex-direction: column;
    border-radius: 16px 16px 0 0;
    min-height: auto;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  /* row-group diventa flex row su mobile */
  .isb-row-group {
    display: flex;
    width: 100%;
    border-bottom: 1.5px solid var(--isb-border);
  }

  /* Campo zona: piena larghezza */
  .isb-row-full {
    width: 100%;
    min-height: 56px;
    border-right: none !important;
  }

  /* Tutti i campi dentro row-group: 50% */
  .isb-row-group .isb-field {
    flex: 1;
    min-height: 52px;
    border-bottom: none;   /* il border lo mette il row-group */
  }
  .isb-row-group .isb-field.isb-divider {
    border-right: 1.5px solid var(--isb-border);
  }

  /* Filtri dentro row-group */
  .isb-row-group .isb-btn-filtri-wrap {
    flex-shrink: 0;
    padding: 0 14px;
    border-right: none;
    border-bottom: none;
    display: flex;
    align-items: center;
  }

  /* Bottone Cerca: piena larghezza, prominente */
  .isb-btn-cerca {
    width: 100%;
    justify-content: center;
    padding: 0;
    font-size: 17px;
    height: 58px;
    border-radius: 0;
    align-self: auto;
  }

  /* Risultati */
  .isb-results-grid { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .isb-filtri-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }

  /* Card orizzontale su mobile */
  .isb-card { flex-direction: row; height: 110px; }
  .isb-card-img { width: 120px; height: 110px; flex-shrink: 0; }
  .isb-card-body { padding: 10px 12px; gap: 3px; overflow: hidden; }
  .isb-card-tipologia { font-size: 10px; }
  .isb-card-title { font-size: 13px; -webkit-line-clamp: 1; }
  .isb-card-meta { gap: 4px; }
  .isb-card-meta-item { font-size: 10px; padding: 2px 6px; }
  .isb-card-location { font-size: 10px; margin-top: 3px; }
  .isb-card-footer { padding-top: 6px; }
  .isb-card-prezzo { font-size: 15px; }
  .isb-card-cta { display: none; }
  .isb-card-badge { font-size: 9px; padding: 3px 8px; top: 7px; left: 7px; }
}

@media (max-width: 480px) {
  .isb-results-header { padding: 10px 14px; }
  .isb-results-count { font-size: 11px; }
  .isb-filtri-avanzati.open { padding: 14px 16px 18px; }
  .isb-filtri-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ═══════════════════════════════════════════════════
   v1.7.3 — Pulsante "Vedi tutti gli immobili" + Pagina risultati
   ═══════════════════════════════════════════════════ */

/* Footer popup con CTA */
.isb-results-footer {
  padding: 18px 20px 22px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafafa;
}

.isb-view-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: #FC941C; /* arancione */
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(247, 148, 29, 0.3);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.isb-view-all-btn:hover,
.isb-view-all-btn:focus {
  background: #e08412;
  box-shadow: 0 6px 16px rgba(247, 148, 29, 0.45);
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none;
}

.isb-view-all-btn svg {
  width: 18px;
  height: 18px;
}

/* Pagina /risultati-ricerca/ */
.isb-results-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 0;
}

.isb-results-summary {
  background: #f8f9fa;
  border-left: 4px solid #FC941C;
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: 4px;
}

.isb-results-summary-count {
  font-size: 18px;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.isb-results-summary-count strong {
  color: #FC941C;
  font-size: 22px;
}

.isb-results-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.isb-results-chip {
  display: inline-block;
  padding: 5px 12px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  font-size: 12px;
  color: #555;
}

.isb-results-chip strong {
  color: #1a1a1a;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   Pagina /risultati-ricerca/ — Card grafica tema
   ═══════════════════════════════════════════════════ */

/* Grid 3 colonne desktop, 2 tablet, 1 mobile */
.isb-results-grid--page {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 0;
}

.isb-rp-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.isb-rp-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Immagine */
.isb-rp-img-link {
  display: block;
  text-decoration: none;
}

.isb-rp-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
  overflow: hidden;
}

.isb-rp-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.isb-rp-card:hover .isb-rp-img img {
  transform: scale(1.04);
}

.isb-rp-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: #ccc;
  background: linear-gradient(135deg, #f5f5f5, #ebebeb);
}

/* Badge arancione VENDITA/AFFITTO in alto a destra */
.isb-rp-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #FC941C;
  color: #fff;
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-radius: 20px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(247, 148, 29, 0.35);
}

/* Body */
.isb-rp-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Titolo (24px, #002337, Roboto — da specifiche Elementor del tema) */
.isb-rp-title {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 14px;
  font-weight: 400;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #002337;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.isb-rp-title a {
  color: inherit;
  text-decoration: none;
}

.isb-rp-title a:hover {
  color: #FC941C;
}

/* Comune (14px, #FC941C, Roboto, MAIUSCOLO — da specifiche tema) */
.isb-rp-comune {
  color: #FC941C;
  font-size: 14px;
  font-weight: 400;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Prezzo (21px, #002337, Roboto, bold — da specifiche tema) */
.isb-rp-prezzo {
  font-size: 21px;
  font-weight: 700;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #002337;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

/* Meta icone */
.isb-rp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.isb-rp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.isb-rp-meta-item svg {
  width: 16px;
  height: 16px;
  color: #1a1a1a;
  flex-shrink: 0;
}

/* Estratto */
.isb-rp-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: #555;
  margin: 0 0 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Pulsante "Vai all'immobile" arancione full-width */
.isb-rp-btn {
  display: block;
  background: #FC941C;
  color: #fff !important;
  text-align: center;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  margin-top: auto;
  transition: background 0.2s ease, transform 0.15s ease;
}

.isb-rp-btn:hover,
.isb-rp-btn:focus {
  background: #e08412;
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
}

@media (max-width: 1024px) {
  .isb-results-grid--page { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .isb-rp-title { font-size: 22px; }
  .isb-rp-prezzo { font-size: 19px; }
}

/* Paginazione */
.isb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  padding: 20px 0;
}

.isb-page-link {
  padding: 10px 20px;
  background: #1a1a1a;
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.isb-page-link:hover {
  background: #FC941C;
  color: #fff !important;
  text-decoration: none;
}

.isb-page-info {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* No results su pagina dedicata */
.isb-no-results--page {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 40px 30px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: left;
  flex-direction: row;
  margin: 0;
}

.isb-no-results--page svg {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  color: #ccc;
}

.isb-no-results--page p {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.isb-no-results--page small {
  font-size: 14px;
  color: #888;
}

@media (max-width: 600px) {
  .isb-view-all-btn { padding: 12px 20px; font-size: 13px; width: 100%; }
  .isb-results-grid--page { grid-template-columns: 1fr; gap: 16px; }
  .isb-pagination { flex-direction: column; gap: 10px; }
  .isb-no-results--page { flex-direction: column; text-align: center; }
  .isb-rp-body { padding: 18px 20px 22px; }
  .isb-rp-title { font-size: 21px; }
  .isb-rp-prezzo { font-size: 19px; }
  .isb-rp-meta { gap: 14px; }
}
