/* Gutenberg Blocks - Quote */
.wp-block-quote {
  position: relative;
  margin: 2rem 0;
  padding: 2.25rem 2rem 1.5rem 4.3rem;
  border-left: 4px solid #0d5cab;
  background-color: #eceff3;
  color: #1f2833;
  font-style: italic;
}

.wp-block-quote::before {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: 1.3rem;
  width: 42px;
  height: 42px;
  background-image: url("../images/quote.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.wp-block-quote p {
  margin: 0 0 1.1rem;
  color: inherit;
  font-size: clamp(1.45rem, 2.6vw, 2.8rem);
  line-height: 1.45;
  font-style: italic;
  font-weight: 400;
}

.wp-block-quote > :last-child {
  margin-bottom: 0;
}

.wp-block-quote cite,
.wp-block-quote footer {
  display: block;
  margin-top: 0.55rem;
  color: #8f97a3;
  font-size: clamp(1rem, 1.3vw, 1.9rem);
  line-height: 1.35;
  font-style: normal;
}

.wp-block-quote cite::before,
.wp-block-quote footer::before {
  content: "\2014\00A0";
  color: #aeb5bf;
}

.wp-block-quote.has-text-align-center {
  border-left: 4px solid #0d5cab;
}

.wp-block-quote.has-text-align-right {
  border-left: 4px solid #0d5cab;
  border-right: 0;
}

/* Gutenberg Blocks - File */
.wp-block-file {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 1.8rem 0;
  padding: 1.2rem 1.35rem;
  border: 1px solid #d5dbe3;
  border-radius: 14px;
  background-color: #f2f4f7;
}

.wp-block-file::before {
  content: "";
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background-color: #d9e4ef;
  background-image: url("../images/file-download.svg");
  background-repeat: no-repeat;
  background-size: 30px 30px;
  background-position: center;
}

.wp-block-file > a:not(.wp-block-file__button) {
  flex: 1 1 auto;
  min-width: 0;
  color: #212833;
  font-size: clamp(1.15rem, 1.5vw, 1.95rem);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none !important;
}

.wp-block-file .wp-block-file__button {
  margin-left: auto;
  margin-top: 0;
  align-self: center;
  border: 1px solid #cfd6de;
  border-radius: 11px;
  background: transparent;
  color: #0d5cab;
  padding: 0.55rem 1rem;
  font-size: clamp(1rem, 1.2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.wp-block-file .wp-block-file__button:hover,
.wp-block-file .wp-block-file__button:focus {
  background-color: #e9eef4;
  color: #0b4f90;
}

@media (max-width: 767px) {
  .wp-block-quote {
    padding: 1.5rem 1rem 1.1rem 3rem;
  }

  .wp-block-quote::before {
    top: 0.8rem;
    left: 0.85rem;
    width: 30px;
    height: 30px;
  }

  .wp-block-quote p {
    font-size: clamp(1.2rem, 6.4vw, 1.7rem);
    line-height: 1.4;
  }

  .wp-block-quote cite,
  .wp-block-quote footer {
    font-size: 1.15rem;
  }

  .wp-block-file {
    gap: 0.85rem;
    padding: 1rem;
    align-items: center;
    flex-wrap: nowrap;
  }

  .wp-block-file::before {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-size: 24px 24px;
  }

  .wp-block-file > a:not(.wp-block-file__button) {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.15rem;
  }

  .wp-block-file .wp-block-file__button {
    margin-left: auto;
    margin-top: 0;
    white-space: nowrap;
    font-size: 1rem;
    padding: 0.5rem 0.9rem;
  }

  .uil-box-evidenza {
        padding: 1.25rem;
        gap: 0.75rem;
    }
    .uil-box-evidenza__title {
        font-size: 1.15rem;
    }
    .uil-box-evidenza__text {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Blocco Custom ACF: Box Evidenza (Verde, Blu, Giallo)
   ========================================================================== */
.wp-block-acf-uil-box-evidenza .acf-block-component.acf-block-body .acf-block-fields.acf-fields{
    border-radius: 1rem;
}
.uil-box-evidenza {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.uil-box-evidenza__icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-top: 0.15rem;
}

.uil-box-evidenza__icon svg {
    width: 100%;
    height: auto;
    display: block;
}

.uil-box-evidenza__content {
    flex: 1 1 auto;
    min-width: 0;
}

.uil-box-evidenza__title {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.uil-box-evidenza__text {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.uil-box-evidenza__text p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

/* Variante Verde (Successo/Positivo) */
.uil-box-evidenza.is-tipo-verde {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}
.uil-box-evidenza.is-tipo-verde .uil-box-evidenza__icon { color: #16a34a; }
.uil-box-evidenza.is-tipo-verde .uil-box-evidenza__title { color: #14532d; }
.uil-box-evidenza.is-tipo-verde .uil-box-evidenza__text { color: #166534; }

/* Variante Blu (Informativo) */
.uil-box-evidenza.is-tipo-blu {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}
.uil-box-evidenza.is-tipo-blu .uil-box-evidenza__icon { color: #2563eb; }
.uil-box-evidenza.is-tipo-blu .uil-box-evidenza__title { color: #1e3a8a; }
.uil-box-evidenza.is-tipo-blu .uil-box-evidenza__text { color: #1e40af; }

/* Variante Giallo (Attenzione/Avviso) */
.uil-box-evidenza.is-tipo-giallo {
    background-color: #fefce8;
    border-color: #fef08a;
}
.uil-box-evidenza.is-tipo-giallo .uil-box-evidenza__icon { color: #eab308; }
.uil-box-evidenza.is-tipo-giallo .uil-box-evidenza__title { color: #713f12; }
.uil-box-evidenza.is-tipo-giallo .uil-box-evidenza__text { color: #854d0e; }