.jub-j4 .modal-header{
    padding: 0 15px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    flex-shrink: 0;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.jub-j4 .modal-title{
    font-weight: 400;
    line-height: 2.875rem;
}

.jub-j4 .modal-header .btn-close{
    padding: 0.5rem 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
}

.jub-j4 .modal-header .btn-close:hover{
    color: #000;
    text-decoration: none;
    opacity: 0.75;
}

.jub-j4 .modal-header .btn-close:focus{
    outline: 0;
    -webkit-box-shadow: 0 0 0 0.25rem rgba(42, 105, 183, 0.25);
    box-shadow: 0 0 0 0.25rem rgba(42, 105, 183, 0.25);
    opacity: 1;
}

.jub-j4 .modal-lg{
    width: 65% !important;
    height: 80% !important;
}

.jub-j4 .modal-content{
    height: 100%;
}

.jub-j4 .modal-body{
    height: 80% !important;
}

.jub-j4 .modal-backdrop.fade {
    opacity: .7 !important;
}
/* === Padding verticale per classi spacing in JA Builder === */
.spacing-top-sm { padding-top: 15px !important; }
.spacing-top-md { padding-top: 30px !important; }
.spacing-top-lg { padding-top: 60px !important; }
.spacing-top-xl { padding-top: 90px !important; }
.spacing-top-huge { padding-top: 120px !important; }

.spacing-bottom-sm { padding-bottom: 15px !important; }
.spacing-bottom-md { padding-bottom: 30px !important; }
.spacing-bottom-lg { padding-bottom: 60px !important; }
.spacing-bottom-xl { padding-bottom: 90px !important; }
.spacing-bottom-huge { padding-bottom: 120px !important; }

/* Opzionale: assicurati che gli elementi che usano spacing siano visualizzati correttamente */
.spacing-top-sm,
.spacing-top-md,
.spacing-top-lg,
.spacing-top-xl,
.spacing-top-huge,
.spacing-bottom-sm,
.spacing-bottom-md,
.spacing-bottom-lg,
.spacing-bottom-xl,
.spacing-bottom-huge {
  display: block !important;
}
/* --- Immagini responsive nel dettaglio SP Simple Portfolio --- */
.sp-simpleportfolio-view-item .sp-simpleportfolio-description img,
.sp-simpleportfolio-view-item img.sp-simpleportfolio-img {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
  display: block;
  margin: 10px auto;
}

/* --- Se due immagini sono nello stesso paragrafo, affiancale su desktop --- */
@media (min-width: 768px) {
  .sp-simpleportfolio-view-item .sp-simpleportfolio-description p > img:first-child:nth-last-child(2),
  .sp-simpleportfolio-view-item .sp-simpleportfolio-description p > img:first-child:nth-last-child(2) ~ img {
    width: 49% !important;
    margin: 0.5%;
    display: inline-block;
    vertical-align: middle;
  }
}
/* Rimuove overlay e pulsanti Zoom/View dalle card */
.sp-simpleportfolio .sp-simpleportfolio-overlay,
.sp-simpleportfolio .sp-simpleportfolio-btns {
  display: none !important;
}

/* Pulsante invio RSForm arancione scuro */
#INVIA.rsform-submit-button.btn-primary {
  background-color: #d35400 !important; /* Arancione scuro */
  border-color: #d35400 !important;
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background-color 0.3s ease, transform 0.2s ease;
  padding: 12px 30px;
  border-radius: 6px;
}

#INVIA.rsform-submit-button.btn-primary:hover {
  background-color: #b84300 !important; /* tono più scuro al passaggio */
  border-color: #b84300 !important;
  transform: scale(1.03);
}