.cca-homebands{--cca-green:#2e4e45;--cca-news-bg:#e4c2cd;--cca-news-border:#963b57;--cca-news-text:#5c1c31;--cca-events-bg:#c4dfe5;--cca-events-border:#357687;--cca-events-text:#153f4a;--cca-strisce-bg:#e2c9b3;--cca-strisce-border:#96613d;--cca-strisce-text:#653a23;width:calc(100% - 28px);max-width:100%;margin:16px auto 24px}
.cca-homebands__section{width:100%;margin:0 0 7px}
.cca-homebands__bar{display:grid;grid-template-columns:minmax(0,1fr) auto 42px;align-items:stretch;width:100%;border:1px solid;border-left-width:5px;border-radius:5px;overflow:hidden;transition:box-shadow .18s ease,filter .18s ease,transform .18s ease;background-image:linear-gradient(rgba(255,255,255,.08),rgba(255,255,255,.08))}
.cca-homebands__section--news .cca-homebands__bar{background:var(--cca-news-bg);border-color:var(--cca-news-border)}
.cca-homebands__section--news .cca-homebands__toggle{color:var(--cca-news-text)}
.cca-homebands__section--events .cca-homebands__bar{background:var(--cca-events-bg);border-color:var(--cca-events-border)}
.cca-homebands__section--events .cca-homebands__toggle{color:var(--cca-events-text)}
.cca-homebands__section--strisce .cca-homebands__bar{background:var(--cca-strisce-bg);border-color:var(--cca-strisce-border)}
.cca-homebands__section--strisce .cca-homebands__toggle{color:var(--cca-strisce-text)}
.cca-homebands__bar:hover{filter:saturate(1.06) brightness(.99);box-shadow:0 2px 8px rgba(35,60,52,.12);transform:translateY(-1px)}
.cca-homebands__section:has(.cca-homebands__toggle[aria-expanded="true"]) .cca-homebands__bar{filter:saturate(1.04);box-shadow:0 1px 5px rgba(35,60,52,.10)}
.cca-homebands__toggle{display:flex;align-items:center;min-width:0;padding:10px 13px;border:0;background:transparent;color:var(--cca-green);text-align:left;cursor:pointer}
.cca-homebands__titles{display:flex;align-items:baseline;gap:12px;min-width:0}
.cca-homebands__titles strong{font-family:Georgia,"Times New Roman",serif;font-size:1.08rem;line-height:1.15;font-weight:700;letter-spacing:-.01em;white-space:nowrap}
.cca-homebands__titles small{font-size:.78rem;line-height:1.25;font-weight:400;font-style:italic;color:currentColor;opacity:.72;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cca-homebands__arrow-button{display:flex;align-items:center;justify-content:center;width:42px;padding:0;border:0;border-left:1px solid rgba(0,0,0,.12);background:rgba(255,255,255,.16);color:inherit;cursor:pointer}
.cca-homebands__arrow-button[hidden]{display:none!important}
.cca-homebands__chevron{display:block;width:12px;height:12px;border-right:3px solid currentColor;border-bottom:3px solid currentColor;transform:rotate(45deg);margin:-5px 0 0}
.cca-homebands__actions{display:flex;align-items:center;justify-content:flex-end;min-width:0;padding:0 10px}
.cca-homebands__section--news .cca-homebands__actions{color:var(--cca-news-text)}
.cca-homebands__section--events .cca-homebands__actions{color:var(--cca-events-text)}
.cca-homebands__section--strisce .cca-homebands__actions{color:var(--cca-strisce-text)}
.cca-homebands__section--news .cca-homebands__arrow-button{color:var(--cca-news-text)}
.cca-homebands__section--events .cca-homebands__arrow-button{color:var(--cca-events-text)}
.cca-homebands__section--strisce .cca-homebands__arrow-button{color:var(--cca-strisce-text)}
.cca-homebands__arrow-button:hover{background:rgba(255,255,255,.34)}


.cca-homebands__actions a{display:inline-flex;align-items:center;color:inherit!important;font-size:.79rem;font-weight:700;text-decoration:none;white-space:nowrap;padding:4px 8px;border-radius:4px;background:rgba(255,255,255,.25)}
.cca-homebands__actions a:hover{text-decoration:underline;background:rgba(255,255,255,.42)}
.cca-homebands__panel{padding:10px 0 6px}
.cca-homebands__panel[hidden]{display:none!important}
.cca-homebands__children{display:grid;grid-template-columns:1fr;gap:10px;width:100%}
.cca-homebands__panel--events .cca-homebands__children{grid-template-columns:repeat(2,minmax(0,1fr))}
.cca-homebands__child{min-width:0}
.cca-homebands__child-title{margin:0 0 7px;padding:7px 10px;background:#f6f8f7;border:1px solid #d9dfdc;color:var(--cca-green);font-size:.95rem;font-weight:700}
.cca-homebands__empty{margin:0;padding:10px 12px;border:1px dashed #ccd4d0;color:#777;background:#fff;font-style:italic}

/* Quando News d’Autore è dentro la banda, la banda sostituisce il suo header interno. */
.cca-homebands__panel--news .mod-newsautore__header{display:none!important}
.cca-homebands__panel--news .mod-newsautore__grid{padding-top:0!important}

/* Neutralizza eventuali chrome/card del contenitore quando il modulo è in top-b. */
.cca-homebands,.cca-homebands *{box-sizing:border-box}

@media(max-width:900px){
  .cca-homebands__titles{flex-direction:column;align-items:flex-start;gap:1px}
  .cca-homebands__titles small{white-space:normal}
  .cca-homebands__panel--events .cca-homebands__children{grid-template-columns:1fr}
}
@media(max-width:600px){
  .cca-homebands__bar{grid-template-columns:minmax(0,1fr) auto 38px;align-items:stretch}
    .cca-homebands__toggle{padding:9px 10px}
  .cca-homebands__actions{padding:0 6px}
  .cca-homebands__arrow-button{width:38px}
  .cca-homebands__titles small{display:none}
  .cca-homebands__titles strong{white-space:normal}
}


/* =====================================================
   HOME - PRIMA FILA PIU COMPATTA
   Caricato solo dove e presente il modulo Bande Home.
   ===================================================== */
@media (min-width: 901px) {
  body.itemid-101 .container-top-a,
  body.itemid-101 .top-a {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  body.itemid-101 .cca-cards {
    gap: 12px !important;
    margin-top: 5px !important;
    margin-bottom: 9px !important;
  }

  body.itemid-101 .cca-card {
    padding: 7px 9px !important;
    border-radius: 10px !important;
  }

  body.itemid-101 .cca-card h2 {
    font-size: 1.08rem !important;
    line-height: 1.10 !important;
    margin: 2px 0 3px !important;
  }

  body.itemid-101 .cca-card p {
    font-size: .78rem !important;
    line-height: 1.16 !important;
    margin-bottom: 5px !important;
  }

  body.itemid-101 .cca-card .btn,
  body.itemid-101 .cca-card .btn-outline-dark {
    font-size: .75rem !important;
    line-height: 1.15 !important;
    padding: 3px 9px !important;
    margin-top: 1px !important;
  }

  body.itemid-101 .cca-card img {
    max-width: 250px !important;
  }

  /* Premio Letterario: loghi un po' piu compatti senza deformarli. */
  body.itemid-101 .cca-card .premio-loghi {
    margin: 3px 0 6px !important;
    gap: 4px !important;
  }

  body.itemid-101 .cca-card .premio-loghi .logo-municipio {
    width: 128px !important;
    max-width: 128px !important;
    height: auto !important;
  }

  body.itemid-101 .cca-card .premio-loghi .logo-cca {
    width: 255px !important;
    max-width: 255px !important;
    height: auto !important;
    margin-top: 2px !important;
  }
}

/* News d'Autore - invito a contribuire */
.cca-homebands__contribution{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:14px 0 2px;padding:14px 18px;border:1px solid #d8b6c2;border-left:4px solid var(--cca-news-border);background:#fbf5f7;border-radius:8px;text-align:left}
.cca-homebands__contribution-text{flex:1 1 auto;min-width:0}
.cca-homebands__contribution-text strong{display:block;margin:0 0 4px;color:var(--cca-news-text);font-size:1rem}
.cca-homebands__contribution-text p{margin:0;color:#4f4549;font-size:.9rem;line-height:1.4}
.cca-homebands__contribution-button,.cca-homebands__button-primary,.cca-homebands__button-secondary{border-radius:8px;padding:9px 14px;font-weight:700;cursor:pointer;white-space:nowrap}
.cca-homebands__contribution-button,.cca-homebands__button-primary{background:#fff;border:2px solid var(--cca-news-border);color:var(--cca-news-text)}
.cca-homebands__contribution-button:hover,.cca-homebands__button-primary:hover{background:var(--cca-news-border);color:#fff}
.cca-homebands__button-secondary{background:#fff;border:1px solid #b9b9b9;color:#444}
.cca-homebands__modal[hidden]{display:none!important}
.cca-homebands__modal{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;padding:18px}
.cca-homebands__modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.48)}
.cca-homebands__modal-dialog{position:relative;z-index:1;width:min(680px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:12px;padding:24px;box-shadow:0 18px 60px rgba(0,0,0,.28);text-align:left}
.cca-homebands__modal-dialog h3{margin:0 36px 6px 0;color:var(--cca-news-text);font-size:1.3rem}
.cca-homebands__modal-intro{margin:0 0 18px;color:#555;line-height:1.45}
.cca-homebands__modal-close{position:absolute;top:10px;right:12px;width:36px;height:36px;border:0;background:transparent;color:#555;font-size:28px;line-height:1;cursor:pointer}
.cca-homebands__form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.cca-homebands__field{margin-bottom:14px}
.cca-homebands__field label{display:block;margin-bottom:5px;font-weight:700;color:#39423e}
.cca-homebands__field input,.cca-homebands__field textarea{width:100%;box-sizing:border-box;border:1px solid #bfc7c3;border-radius:7px;padding:9px 10px;font:inherit;background:#fff}
.cca-homebands__field textarea{resize:vertical;min-height:120px}
.cca-homebands__field input:focus,.cca-homebands__field textarea:focus{outline:2px solid rgba(141,47,74,.18);border-color:var(--cca-news-border)}
.cca-homebands__honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.cca-homebands__form-error{margin:0 0 12px;color:#a31919;font-weight:700}
.cca-homebands__privacy-note{margin:0 0 16px;color:#666;font-size:.82rem;line-height:1.4}
.cca-homebands__form-actions{display:flex;justify-content:flex-end;gap:10px}
body.cca-homebands-modal-open{overflow:hidden}
@media(max-width:700px){.cca-homebands__contribution{align-items:stretch;flex-direction:column}.cca-homebands__contribution-button{width:100%}.cca-homebands__form-grid{grid-template-columns:1fr}.cca-homebands__modal-dialog{padding:20px 16px}.cca-homebands__form-actions{flex-direction:column-reverse}.cca-homebands__button-primary,.cca-homebands__button-secondary{width:100%}}
