/* GreenPulse Performance Final Tuning - safe, tema only */
:root{
  --gp-primary:#0003FF;
  --gp-primary-hover:#1A1DFF;
  --gp-primary-soft:#EEF2FF;
  --gp-primary-grad:linear-gradient(135deg,#0003FF 0%,#1A1DFF 52%,#5C7CFF 100%);
}

/* Chi siamo: immagine discreta/professionale, senza effetto posticcio */
.gp-about-image{display:flex;justify-content:center;align-items:center}
.gp-about-image img,
.gp-about-photo img,
.greenpulse-about-image img{
  width:min(50%, 340px) !important;
  max-width:340px !important;
  min-width:220px;
  height:auto !important;
  aspect-ratio:4/3;
  object-fit:cover;
  border-radius:22px;
  box-shadow:0 14px 34px rgba(15,23,42,.14);
}
.gp-about-copy{
  background:var(--gp-primary-grad) !important;
  color:#fff;
}

/* Riduzione piccoli salti layout e render mobile */
img{height:auto;max-width:100%}
.gp-card,
.gp-service-card,
.gp-news-card,
.gp-normativa-card,
.gp-content-card,
.gp-about-content{
  content-visibility:auto;
  contain-intrinsic-size:1px 360px;
}

/* Mobile: immagine chi siamo ancora leggibile ma non dominante */
@media(max-width:760px){
  .gp-about-image img,
  .gp-about-photo img,
  .greenpulse-about-image img{
    width:min(62vw, 280px) !important;
    min-width:180px;
    max-width:280px !important;
    border-radius:20px;
  }
  .gp-about-copy{padding:26px !important}
}

/* GreenPulse final fix - Chi siamo proportions requested.
   Safe theme-only CSS: box about ~50% narrower, image +25%, no shortcode/template changes. */
body.gp-about-page .gp-about-hero,
.gp-about-page .gp-about-hero,
body.page-id-chi-siamo .gp-about-hero,
body[class*="chi-siamo"] .gp-about-hero{
  width:min(100%, 720px) !important;
  max-width:720px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  grid-template-columns:minmax(0, 1fr) minmax(210px, 270px) !important;
  gap:24px !important;
  align-items:center !important;
}

body.gp-about-page .gp-about-copy,
.gp-about-page .gp-about-copy,
body[class*="chi-siamo"] .gp-about-copy,
body[class*="chi-siamo"] .gp-content-card,
body[class*="chi-siamo"] .greenpulse-card{
  max-width:720px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.gp-about-page .gp-about-image,
.gp-about-page .greenpulse-about-image,
.gp-about-page .wp-block-image,
body[class*="chi-siamo"] .gp-about-image,
body[class*="chi-siamo"] .greenpulse-about-image,
body[class*="chi-siamo"] .wp-block-image{
  max-width:215px !important;
  width:100% !important;
  justify-self:center !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.gp-about-page .gp-about-image img,
.gp-about-page .greenpulse-about-image img,
.gp-about-page .wp-block-image img,
body[class*="chi-siamo"] .gp-about-image img,
body[class*="chi-siamo"] .greenpulse-about-image img,
body[class*="chi-siamo"] .wp-block-image img{
  width:100% !important;
  max-width:215px !important;
  min-width:0 !important;
  max-height:270px !important;
  aspect-ratio:4/5 !important;
  object-fit:cover !important;
  border-radius:20px !important;
  box-shadow:0 12px 30px rgba(15,23,42,.14) !important;
}

@media(max-width:900px){
  body.gp-about-page .gp-about-hero,
  .gp-about-page .gp-about-hero,
  body[class*="chi-siamo"] .gp-about-hero{
    width:min(100%, 560px) !important;
    max-width:560px !important;
    grid-template-columns:1fr !important;
  }
  .gp-about-page .gp-about-image,
  .gp-about-page .greenpulse-about-image,
  .gp-about-page .wp-block-image,
  body[class*="chi-siamo"] .gp-about-image,
  body[class*="chi-siamo"] .greenpulse-about-image,
  body[class*="chi-siamo"] .wp-block-image{max-width:205px !important;}
  .gp-about-page .gp-about-image img,
  .gp-about-page .greenpulse-about-image img,
  .gp-about-page .wp-block-image img,
  body[class*="chi-siamo"] .gp-about-image img,
  body[class*="chi-siamo"] .greenpulse-about-image img,
  body[class*="chi-siamo"] .wp-block-image img{max-width:205px !important;max-height:255px !important;}
}

@media(max-width:560px){
  body.gp-about-page .gp-about-hero,
  .gp-about-page .gp-about-hero,
  body[class*="chi-siamo"] .gp-about-hero{
    width:100% !important;
    max-width:100% !important;
  }
  .gp-about-page .gp-about-image,
  .gp-about-page .greenpulse-about-image,
  .gp-about-page .wp-block-image,
  body[class*="chi-siamo"] .gp-about-image,
  body[class*="chi-siamo"] .greenpulse-about-image,
  body[class*="chi-siamo"] .wp-block-image{max-width:185px !important;}
  .gp-about-page .gp-about-image img,
  .gp-about-page .greenpulse-about-image img,
  .gp-about-page .wp-block-image img,
  body[class*="chi-siamo"] .gp-about-image img,
  body[class*="chi-siamo"] .greenpulse-about-image img,
  body[class*="chi-siamo"] .wp-block-image img{max-width:185px !important;max-height:230px !important;border-radius:18px !important;}
}
