.esg-wrap{font-family:Arial,Helvetica,sans-serif;max-width:1320px;margin:0 auto;color:#10213d}.esg-hero{position:relative;border-radius:22px;overflow:hidden;background:#07111f;box-shadow:0 18px 45px rgba(0,0,0,.18)}.esg-hero-stage{position:relative;height:clamp(250px,34vw,410px);background:#101827}.esg-hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .35s ease}.esg-hero-img.active{opacity:1}.esg-empty-hero{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;text-align:center;background:linear-gradient(135deg,#183b68,#06101f)}.esg-hero-copy{display:none!important}.esg-arrow{position:absolute;top:40%;z-index:4;width:48px;height:58px;border:0;border-radius:14px;background:rgba(0,0,0,.38);color:#fff;font-size:54px;line-height:45px;cursor:pointer}.esg-prev{left:18px}.esg-next{right:18px}.esg-carousel-row{display:flex;align-items:stretch;gap:0;background:rgba(0,0,0,.83);min-height:92px}.esg-strip{display:flex;gap:10px;overflow-x:auto;padding:10px 12px 14px;scroll-behavior:smooth;flex:1;min-width:0}.esg-upload-bar{flex:0 0 220px;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(0,0,0,.18);border-left:1px solid rgba(255,255,255,.08)}.esg-thumb{position:relative;flex:0 0 136px;height:76px;padding:0;border:2px solid transparent;border-radius:10px;overflow:hidden;background:#111;cursor:pointer}.esg-thumb.active{border-color:#2f80ed}.esg-thumb img{width:100%;height:100%;object-fit:cover;display:block}.esg-thumb span{position:absolute;left:8px;bottom:6px;background:rgba(0,0,0,.55);color:#fff;border-radius:6px;padding:3px 7px;font-size:12px}.esg-open-upload{position:static!important;display:inline-flex!important;align-items:center;justify-content:center;min-width:178px;text-align:center;white-space:nowrap;line-height:1.2;transform:none!important;transition:background .18s ease,box-shadow .18s ease;background:#2368b8;color:#fff;border:0;border-radius:9px;padding:10px 14px;font-weight:800;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.25)}.esg-open-upload:active,.esg-open-upload:focus{transform:none!important;outline:2px solid rgba(47,128,237,.35);outline-offset:2px}.esg-open-upload:hover{background:#1f5fa8}.esg-upload-panel{display:none;position:fixed;inset:0;z-index:99999;background:rgba(4,10,22,.72);padding:30px;overflow:auto}.esg-upload-panel.open{display:block}.esg-card{position:relative;max-width:920px;margin:0 auto;background:#fff;border-radius:20px;padding:28px;box-shadow:0 20px 60px rgba(0,0,0,.35)}.esg-close{position:absolute!important;top:14px!important;right:16px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#edf2f7!important;color:#17233d!important;font-size:24px!important;line-height:34px!important;text-align:center!important;display:flex!important;align-items:center!important;justify-content:center!important;cursor:pointer!important;box-sizing:border-box!important;transform:none!important}.esg-close:hover{background:#dfe7f2!important}.esg-muted{color:#667085}.esg-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.esg-grid input,.esg-file input{display:block;width:100%;margin-top:6px;padding:12px;border:1px solid #d6dce8;border-radius:8px}.esg-file{display:block;margin:12px 0 18px}.esg-crop-box{display:none}.esg-crop-box.ready{display:block}.esg-crop-frame{position:relative;aspect-ratio:16/9;overflow:hidden;background:#0b1422;border-radius:14px;border:2px dashed #aab7ca;cursor:grab}.esg-crop-frame img{position:absolute;left:0;top:0;max-width:none;user-select:none;transform-origin:0 0}.esg-crop-controls{display:flex;gap:16px;align-items:center;margin:12px 0;color:#44516a;font-size:13px}.esg-crop-controls>span{flex:1.2}.esg-zoom-label{flex:1;display:flex;align-items:center;gap:10px;margin:0}.esg-zoom-label input{width:100%}.esg-zoom-minus,.esg-zoom-plus{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#edf2f7;color:#17233d;font-weight:800}.esg-submit{background:#2368b8;color:#fff;border:0;border-radius:9px;padding:13px 18px;font-weight:800;cursor:pointer}.esg-submit:disabled{opacity:.55;cursor:not-allowed}.esg-message{margin-top:14px;padding:12px;border-radius:8px;display:none}.esg-message.ok{display:block;background:#e9f8ee;color:#176b35}.esg-message.err{display:block;background:#fdecec;color:#9a1b1b}.esg-lightbox{display:none;position:fixed;inset:0;z-index:99998;background:rgba(0,0,0,.86);align-items:center;justify-content:center;padding:24px}.esg-lightbox.open{display:flex}.esg-lightbox img{max-width:94vw;max-height:88vh;border-radius:10px}.esg-lightbox button{position:absolute;top:20px;right:24px;width:42px;height:42px;border:0;border-radius:50%;font-size:28px;background:#fff;cursor:pointer}
@media(max-width:900px){.esg-carousel-row{display:block}.esg-strip{padding:12px 12px 8px}.esg-upload-bar{border-left:0;border-top:1px solid rgba(255,255,255,.08);padding:12px;justify-content:center}.esg-thumb{flex-basis:145px;height:82px}.esg-open-upload{min-width:190px;padding:11px 14px;font-size:13px}.esg-arrow{top:32%;width:38px;height:48px;font-size:44px}.esg-grid{grid-template-columns:1fr}.esg-card{padding:22px}.esg-crop-controls{display:block}.esg-crop-controls>span{display:block;margin-top:8px}.esg-lightbox img{max-width:92vw}}

.esg-hero-caption{position:absolute;left:16px;bottom:14px;z-index:3;background:rgba(0,0,0,.46);color:#fff;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:700;letter-spacing:.01em;opacity:0;transition:opacity .25s ease;pointer-events:none}.esg-hero-caption.active{opacity:1}.esg-delete-thumb{position:absolute;top:4px;right:4px;z-index:5;width:22px;height:22px;border-radius:50%;background:rgba(190,20,20,.94)!important;color:#fff!important;display:flex!important;align-items:center;justify-content:center;font-size:17px!important;font-weight:900;line-height:22px!important;box-shadow:0 2px 8px rgba(0,0,0,.35)}.esg-delete-thumb:hover{background:#d60000!important}.esg-crop-frame.dragging{cursor:grabbing}
@media(max-width:900px){.esg-hero-stage{height:clamp(220px,48vw,330px)}.esg-upload-bar{flex-basis:auto}.esg-thumb{flex-basis:118px;height:66px}.esg-hero-caption{font-size:12px;bottom:10px;left:10px}}


/* v0.1.5 refinements */
.esg-wrap *{-webkit-tap-highlight-color:transparent}.esg-arrow:focus,.esg-arrow:active,.esg-thumb:focus,.esg-thumb:active{outline:none!important;box-shadow:none!important}.esg-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.esg-admin-login{background:#10213d;color:#fff;border:0;border-radius:9px;padding:13px 18px;font-weight:800;cursor:pointer}.esg-admin-login:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:900px){.esg-wrap{max-width:calc(100% - 24px);margin-left:auto;margin-right:auto}.esg-hero{border-radius:16px}.esg-arrow{top:30%;width:34px;height:44px;font-size:38px;line-height:38px;border-radius:12px;background:rgba(0,0,0,.48)}.esg-prev{left:10px}.esg-next{right:10px}.esg-strip{padding-left:14px;padding-right:14px;overscroll-behavior-x:contain}.esg-carousel-row{overflow:hidden}.esg-thumb{flex-basis:112px;height:63px}}
@media(max-width:520px){.esg-wrap{max-width:calc(100% - 16px)}.esg-hero-stage{height:clamp(190px,54vw,260px)}.esg-hero-caption{font-size:11px;padding:5px 9px}.esg-upload-panel{padding:14px}.esg-arrow{width:30px;height:40px;font-size:34px}.esg-prev{left:8px}.esg-next{right:8px}}


/* v0.1.6 mobile/focus and crop-rectangle refinements */
.esg-arrow,
.esg-arrow:hover,
.esg-arrow:focus,
.esg-arrow:active{
  -webkit-appearance:none!important;
  appearance:none!important;
  background:rgba(0,0,0,.42)!important;
  color:#fff!important;
  outline:0!important;
  box-shadow:none!important;
  border:0!important;
  transform:translateY(-50%)!important;
  user-select:none!important;
  touch-action:manipulation!important;
}
.esg-arrow:before,.esg-arrow:after{content:none!important;display:none!important}
.esg-arrow{top:50%!important;line-height:1!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important}
.esg-prev{left:18px!important}.esg-next{right:18px!important}
.esg-crop-frame{touch-action:none;cursor:default}.esg-crop-frame img{pointer-events:none}
.esg-crop-select{position:absolute;z-index:5;border:2px solid rgba(255,255,255,.96);box-shadow:0 0 0 999px rgba(0,0,0,.34),0 4px 18px rgba(0,0,0,.35);border-radius:5px;cursor:move;touch-action:none;box-sizing:border-box;background:rgba(255,255,255,.04)}
.esg-crop-select:before,.esg-crop-select:after{content:"";position:absolute;left:0;right:0;border-top:1px dashed rgba(255,255,255,.55)}
.esg-crop-select:before{top:33.333%}.esg-crop-select:after{top:66.666%}
.esg-crop-frame.dragging .esg-crop-select{cursor:grabbing}
.esg-crop-box.ready .esg-crop-hint{display:block}
@media(max-width:900px){
  .esg-wrap{width:100%;max-width:calc(100% - 20px)!important;overflow:hidden}
  .esg-hero{overflow:hidden;contain:layout paint}
  .esg-carousel-row{overflow:hidden!important}
  .esg-strip{overflow-x:auto!important;-webkit-overflow-scrolling:touch;scrollbar-width:none;touch-action:pan-x;padding-left:10px!important;padding-right:10px!important}
  .esg-strip::-webkit-scrollbar{display:none}
  .esg-prev{left:8px!important}.esg-next{right:8px!important}
  .esg-arrow{width:34px!important;height:44px!important;font-size:36px!important;background:rgba(0,0,0,.48)!important}
}
@media(max-width:520px){.esg-prev{left:6px!important}.esg-next{right:6px!important}.esg-arrow{width:30px!important;height:40px!important;font-size:32px!important}}


/* v0.1.7 hard fixes: arrows are no longer BUTTON elements, so theme/mobile button styles cannot create blue ghost buttons. */
.esg-arrow{
  position:absolute!important;
  z-index:20!important;
  border:none!important;
  outline:none!important;
  box-shadow:none!important;
  text-decoration:none!important;
  -webkit-tap-highlight-color:rgba(0,0,0,0)!important;
  -webkit-touch-callout:none!important;
  cursor:pointer!important;
  background:rgba(0,0,0,.42)!important;
  color:#fff!important;
  overflow:hidden!important;
}
.esg-arrow:focus,.esg-arrow:active,.esg-arrow:hover,.esg-arrow:visited{
  background:rgba(0,0,0,.42)!important;
  color:#fff!important;
  outline:none!important;
  box-shadow:none!important;
  text-decoration:none!important;
}
.esg-arrow *{pointer-events:none!important}
.esg-crop-frame{cursor:move!important;touch-action:none!important}
.esg-crop-select{pointer-events:none!important}
.esg-crop-frame:after{
  content:"Trascina il rettangolo di ritaglio";
  position:absolute;right:10px;bottom:8px;z-index:7;
  background:rgba(0,0,0,.55);color:#fff;border-radius:999px;
  padding:5px 9px;font-size:11px;line-height:1;pointer-events:none;
}
@media(max-width:900px){
  .esg-hero{position:relative!important;max-width:100%!important}
  .esg-arrow{top:50%!important;transform:translateY(-50%)!important}
  .esg-prev{left:10px!important}.esg-next{right:10px!important}
  .esg-carousel-row{position:relative!important;z-index:1!important}
  .esg-strip{position:relative!important;z-index:1!important}
}


/* v0.1.8 mobile/iPad hard fix: arrows are inert spans handled on pointerdown.
   This avoids iOS/Chrome transient blue active/focus controls near the thumbnail strip. */
.esg-arrow{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  -webkit-appearance:none!important;
  appearance:none!important;
  -webkit-user-select:none!important;
  user-select:none!important;
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:transparent!important;
  background:rgba(0,0,0,.44)!important;
  color:#fff!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
.esg-arrow:active,.esg-arrow:focus,.esg-arrow:hover{
  background:rgba(0,0,0,.44)!important;
  color:#fff!important;
  outline:0!important;
  box-shadow:none!important;
}
.esg-arrow::-moz-focus-inner{border:0!important}
.esg-wrap a,.esg-wrap button,.esg-wrap span,.esg-wrap div{
  -webkit-tap-highlight-color:transparent!important;
}
@media (hover:none) and (pointer:coarse){
  .esg-arrow{
    top:50%!important;
    transform:translateY(-50%)!important;
    background:rgba(0,0,0,.50)!important;
  }
  .esg-arrow:active{
    transform:translateY(-50%) scale(.96)!important;
    background:rgba(0,0,0,.50)!important;
  }
}

/* v0.1.11 hard fix: keep the lightbox close X visible even when a theme resets button text styles. */
.esg-lightbox button,
.esg-lightbox button:hover,
.esg-lightbox button:focus,
.esg-lightbox button:active{
  position:absolute!important;
  top:20px!important;
  right:24px!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:#fff!important;
  color:transparent!important;
  box-shadow:0 4px 16px rgba(0,0,0,.28)!important;
  cursor:pointer!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  overflow:hidden!important;
  -webkit-appearance:none!important;
  appearance:none!important;
}
.esg-lightbox button:before,
.esg-lightbox button:after{
  content:""!important;
  position:absolute!important;
  width:20px!important;
  height:3px!important;
  border-radius:999px!important;
  background:#17233d!important;
  left:50%!important;
  top:50%!important;
  display:block!important;
  transform-origin:center!important;
}
.esg-lightbox button:before{transform:translate(-50%,-50%) rotate(45deg)!important}
.esg-lightbox button:after{transform:translate(-50%,-50%) rotate(-45deg)!important}

/* v0.1.13 crop fidelity and lazy-loading layout fixes. */
.esg-hero-stage{
  height:auto!important;
  aspect-ratio:16/9!important;
}
.esg-hero-img{
  object-fit:contain!important;
  background:#07111f!important;
}
.esg-thumb{
  aspect-ratio:16/9!important;
  height:auto!important;
}
.esg-thumb img{
  aspect-ratio:16/9!important;
  object-fit:cover!important;
  background:#111!important;
}
.esg-thumb img:not([src]),
.esg-hero-img:not([src]){
  visibility:hidden!important;
}

/* v0.1.15 frontend login and per-user delete controls. */
.esg-login-panel{display:none;position:fixed;inset:0;z-index:99999;background:rgba(4,10,22,.72);padding:30px;overflow:auto}
.esg-login-panel.open{display:block}
.esg-login-card{max-width:560px}
.esg-login-close{position:absolute!important;top:14px!important;right:16px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#edf2f7!important;color:#17233d!important;font-size:24px!important;line-height:34px!important;text-align:center!important;display:flex!important;align-items:center!important;justify-content:center!important;cursor:pointer!important;box-sizing:border-box!important;transform:none!important}
.esg-upload-bar{flex-direction:column!important;gap:8px!important;align-items:center!important;justify-content:center!important}
.esg-login-state{display:block;color:#fff;font-size:12px;font-weight:800;line-height:1.2;text-align:center;max-width:190px;overflow:hidden;text-overflow:ellipsis}
.esg-login-open,.esg-logout,.esg-login-submit{background:#10213d;color:#fff;border:0;border-radius:9px;padding:11px 16px;font-weight:800;cursor:pointer}
.esg-logout{background:#334155}
.esg-open-upload{margin-top:10px!important}
.esg-delete-thumb{top:4px!important;left:4px!important;right:auto!important;bottom:auto!important}

/* v0.1.17 compact homepage sizing with shortcode overrides. */
.esg-wrap{
  width:var(--esg-width,100%)!important;
  max-width:var(--esg-max-width,720px)!important;
}
@media(max-width:900px){
  .esg-wrap{
    width:100%!important;
    max-width:calc(100% - 20px)!important;
  }
}

/* v0.1.19 smaller thumbnail strip: about 40% less than the previous size. */
.esg-strip{
  gap:7px!important;
  padding:8px 10px 10px!important;
}
.esg-thumb{
  flex-basis:82px!important;
  border-radius:7px!important;
}
.esg-thumb span{
  left:5px!important;
  bottom:4px!important;
  border-radius:5px!important;
  padding:2px 5px!important;
  font-size:10px!important;
  line-height:1.1!important;
}
.esg-delete-thumb{
  top:3px!important;
  left:3px!important;
  width:18px!important;
  height:18px!important;
  font-size:14px!important;
  line-height:18px!important;
}
@media(max-width:900px){
  .esg-strip{
    gap:6px!important;
    padding:8px 10px!important;
  }
  .esg-thumb{
    flex-basis:67px!important;
    border-radius:6px!important;
  }
  .esg-thumb span{
    font-size:9px!important;
    padding:2px 4px!important;
  }
  .esg-delete-thumb{
    width:16px!important;
    height:16px!important;
    font-size:13px!important;
    line-height:16px!important;
  }
}

/* v0.1.20 compact logged-in controls: keep the thumbnail row height stable. */
.esg-carousel-row{
  min-height:68px!important;
}
.esg-upload-bar{
  flex:0 0 156px!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:auto auto!important;
  gap:4px 6px!important;
  align-content:center!important;
  justify-content:center!important;
  align-items:center!important;
  padding:6px 8px!important;
}
.esg-login-state{
  grid-column:1 / -1!important;
  max-width:140px!important;
  font-size:9px!important;
  line-height:1.05!important;
  font-weight:700!important;
  opacity:.9!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.esg-logout,
.esg-open-upload,
.esg-login-open{
  min-width:0!important;
  width:100%!important;
  min-height:24px!important;
  height:24px!important;
  margin:0!important;
  padding:4px 7px!important;
  border-radius:7px!important;
  font-size:11px!important;
  line-height:1!important;
  box-shadow:none!important;
}
.esg-login-open{
  grid-column:1 / -1!important;
  justify-self:center!important;
  max-width:86px!important;
}
@media(max-width:900px){
  .esg-carousel-row{
    min-height:62px!important;
  }
  .esg-upload-bar{
    grid-template-columns:72px 72px!important;
    flex-basis:auto!important;
    padding:6px 8px!important;
  }
  .esg-login-state{
    max-width:150px!important;
    font-size:9px!important;
  }
}
