/* Studio Catarraso v5.10.20
   Reliable compact cards for HOME specialisations and COMPETENZE intervention areas.
   Specialist pathways (.sc-related-services) are intentionally not selected.
   Only loaded for it/en/es home and servizi pages after the normal theme CSS. */

/* HOME | Specializzazioni: preserve 3/2/1 columns with a calmer, shorter card. */
body #competenze .service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
body #competenze .service-grid > a.service-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  padding: 21px 22px 18px !important;
}
body #competenze .service-grid > a.service-card::after {
  height: 2px;
  left: 22px;
  right: 22px;
}
body #competenze .service-grid > a.service-card .card-icon {
  box-sizing: border-box;
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px;
  border-radius: 14px;
  margin: 0 0 13px !important;
}
body #competenze .service-grid > a.service-card .card-icon svg {
  width: 22px !important;
  height: 22px !important;
}
body #competenze .service-grid > a.service-card h3 {
  min-height: 0 !important;
  font-size: 16.8px !important;
  font-weight: 650;
  line-height: 1.36;
  margin: 0 0 8px !important;
}
body #competenze .service-grid > a.service-card p {
  font-size: 12.5px !important;
  line-height: 1.62;
  margin: 0 !important;
  flex: 1;
}
body #competenze .service-grid > a.service-card .arrow {
  font-size: 17px;
  padding-top: 10px;
  margin-top: auto;
}

/* COMPETENZE | Ambiti di intervento: handle both imported and already-saved Gutenberg markup. */
body .inner-section .inner-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
body .inner-section .inner-cards > a.inner-card,
body .inner-section .inner-cards > a.sc-competenza-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  padding: 21px 22px 18px !important;
}
body .inner-section .inner-cards > a .card-icon {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px;
  border-radius: 12px;
  margin: 0 !important;
}
body .inner-section .inner-cards > a .card-icon svg {
  width: 21px !important;
  height: 21px !important;
}
body .inner-section .inner-cards > a h3 {
  min-height: 0 !important;
  font-size: 16.8px !important;
  font-weight: 650;
  line-height: 1.36;
  margin: 12px 0 8px !important;
}
body .inner-section .inner-cards > a p {
  font-size: 12.8px !important;
  line-height: 1.62;
  margin: 0 !important;
  flex: 1;
}
body .inner-section .inner-cards > a .arrow,
body .inner-section .inner-cards > a .inner-arrow {
  font-size: 18px;
  margin-top: 10px;
}

/* Tablet: keep the cards comfortable. */
@media (min-width: 761px) and (max-width: 1020px) {
  body #competenze .service-grid,
  body .inner-section .inner-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone: one full-width card per row; no fixed height. */
@media (max-width: 760px) {
  body #competenze .service-grid,
  body .inner-section .inner-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }
  body #competenze .service-grid > a.service-card,
  body .inner-section .inner-cards > a.inner-card,
  body .inner-section .inner-cards > a.sc-competenza-card {
    min-height: 0 !important;
    padding: 18px 19px 16px !important;
  }
  body #competenze .service-grid > a.service-card::after {left: 19px;right: 19px;}
  body #competenze .service-grid > a.service-card .card-icon,
  body .inner-section .inner-cards > a .card-icon {
    width: 40px !important;
    height: 40px !important;
    flex-basis: 40px;
    margin-bottom: 10px !important;
  }
  body #competenze .service-grid > a.service-card .card-icon svg,
  body .inner-section .inner-cards > a .card-icon svg {
    width: 20px !important;
    height: 20px !important;
  }
  body #competenze .service-grid > a.service-card h3,
  body .inner-section .inner-cards > a h3 {
    font-size: 17px !important;
    margin-bottom: 7px !important;
  }
  body .inner-section .inner-cards > a h3 {margin-top: 10px !important;}
  body #competenze .service-grid > a.service-card p,
  body .inner-section .inner-cards > a p {
    font-size: 12.7px !important;
  }
  body #competenze .service-grid > a.service-card .arrow {padding-top: 8px;}
  body .inner-section .inner-cards > a .arrow,
  body .inner-section .inner-cards > a .inner-arrow {margin-top: 8px;}
}
