/* /soci/css/soci.css
   Derivato da Spettacoli: layout due colonne + dettaglio + iframe
*/

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
}

.page-title {
  font-family: "Playfair Display", serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: 0.2px;
  margin: 0;
}

.page-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  width: min(520px, 100%);
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 10px;
  background: #fff;
  outline: none;
}

.search:focus {
  border-color: rgba(0,0,0,.28);
}

/* --- layout stile “Spettacoli” --- */
.sp-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}

@media (max-width: 1023px) {
  .sp-layout {
    grid-template-columns: 1fr;
  }
}

.sp-list {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.sp-empty {
  padding: 14px 14px;
  opacity: .8;
}

.sp-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  border-top: 1px solid rgba(0,0,0,.06);
}

.sp-item:first-child { border-top: none; }

.sp-item:hover { background: rgba(0,0,0,.03); }

.sp-item.active {
  background: rgba(0,0,0,.04);
}

.sp-bullet {
  opacity: .7;
}

.sp-name {
  font-weight: 700;
}

/* --- dettaglio --- */
.sp-detail {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.sp-detail-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

@media (max-width: 1023px) {
  .sp-detail-head { grid-template-columns: 1fr; }
}

.sp-title {
  font-family: "Playfair Display", serif;
  font-weight: 800;
  font-size: 22px;
}

.sp-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 1023px) {
  .sp-actions { justify-content: flex-start; flex-wrap: wrap; }
}

.sp-frame-wrap {
  padding: 0;
}

.sp-iframe {
  width: 100%;
  height: 690px;
  border: 0;
  display: block;
}

/* --- Mobile accordion: soci.js usa .details/.opennew su mobile --- */
.details {
  margin: 10px 0 6px 0;
  padding: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.details iframe {
  width: 100%;
  height: 520px;
  border: 0;
  margin-top: 10px;
}

.opennew {
  display: inline-block;
  margin-top: 6px;
}

/* --- Calendario --- */
.sp-calendar-card {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.sp-calendar-iframe {
  width: 100%;
  height: 720px;
  border: 0;
  display: block;
}

/* --- Lista sinistra: IDENTICA a Spettacoli --- */
.sp-list{
  background: rgba(255,255,255,18);
  border: 1px solid rgba(0,0,0,12);
  border-radius: 18px;
  overflow:hidden;
  max-height: calc(100vh - 220px);
  overflow:auto;
}

.sp-empty{
  padding: 14px;
  font-weight: 800;
  opacity: .8;
}

.sp-item{
  padding: 12px 14px;
  cursor:pointer;
  border-bottom: 1px solid rgba(0,0,0,12);
  display:flex;
  gap:10px;
  align-items:center;
}

.sp-item:hover{
  background: rgba(255,255,255,12);
}

.sp-item.active{
  outline: 2px solid rgba(122,0,0,35);
  background: rgba(255,255,255,14);
}

.sp-bullet{
  font-size: 14px;
  opacity: .9;
}

.sp-name{
  font-weight: 900;
}

/* --- Mobile: accordion inline (come Spettacoli) --- */
@media (max-width: 1023px){
  .sp-item{
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 8px 10px;
    align-items: start;
  }
  .sp-bullet{
    grid-column: 1;
    line-height: 1.2;
    margin-top: 2px;
  }

  .sp-details{
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }

  .sp-details iframe{
    width:100%;
    height: 520px;
    border: 1px solid rgba(0,0,0,12);
    border-radius: 12px;
    background:#fff;
  }
}

/* Calendario: stessa card del dettaglio, ma iframe più alto */
.sp-calendar-detail .sp-title{
  /* identico feel ai titoli dettaglio */
  font-family: "Playfair Display", serif;
  font-weight: 800;
}

.sp-calendar-iframe{
  height: 740px; /* un filo più alto del default */
}

@media (max-width: 1023px){
  .sp-calendar-iframe{
    height: 720px;
  }
}
/* ===== Full width come spettacoli ===== */

.spettacoli-page .page {
  max-width: none;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (min-width: 1024px) {
  .spettacoli-page .sp-layout {
    grid-template-columns: 360px 1fr; /* stessa proporzione spettacoli */
    max-width: none;
  }

  .spettacoli-page .sp-list {
    max-height: calc(100vh - 220px);
  }

  .spettacoli-page .sp-detail {
    max-width: none;
  }
}

.sp-item.sp-disabled{
  opacity: .55;
  cursor: default;
}
.sp-item.sp-disabled:hover{
  background: transparent;
}
