/**
 * Plugin Name: ZEN Associazioni (MU)
 * Description: Sezione Associazioni con lista/dettaglio pubblici e gestione amministrativa completa.
 * Version: 1.2.0
 */


/*** FRONT END ***/

.nv-page-title-wrap{
   display:none!important
}
.site-footer {
   background-color:#1c5340 !important
}
.site-footer .wp-block-column {
   flex-basis: 48% !important;
}

.zen-assoc-fillarea {
   background: linear-gradient(to bottom, #1c5340, #b3d7c1);
   color: #ffffff;
}
.zen-assoc-filldett {
   background-color:#1c5340;
   color: #ffffff;
   background-position: center;
   background-repeat: no-repeat;
   background-size: cover;
   padding-top: 2.2rem !important;
	padding-bottom: 2rem !important;
	margin-bottom: 30px;
}
.zen-assoc-container {
  text-shadow: -1px -1px 2px #000000d1, 1px -1px 2px #000000d1, -1px 1px 2px #000000d1, 1px 1px 2px #000000d1;
}
.zen-assoc-container .zen-assoc-hero h1 {
  text-shadow: -3px -3px 5px #0000008e, 3px -3px 5px #0000008e, -3px 3px 5px #0000008e, 3px 3px 5px #0000008e;
}

.zen-assoc{
   max-width:1100px;
   
   margin:0 auto;
   padding:1.5rem 0
}

.zen-assoc-header h1,.zen-assoc-hero h1{
   margin-bottom:.3rem
}
.zen-assoc-header h2 {
   margin-bottom: 14px;
}
.zen-assoc-header h3 {
   margin-bottom: 0px;
}
.zen-assoc-header p,.zen-assoc-hero p{
   opacity:.8
}
.zen-assoc-grid{
   display:grid;
   grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
   gap:1.2rem;
   margin-top:1rem;
   color: #404040;
}
.zen-assoc-card{
   background:#fff;
   border:1px solid rgba(0,0,0,.08);
   border-radius:16px;
   overflow:hidden;
   box-shadow:0 8px 22px rgba(0,0,0,.06);
   display:flex;
   flex-direction:column
}
.zen-assoc-thumb img{
   width:100%;
   height:180px;
   object-fit:cover;
   display:block
}
.zen-assoc-card-content{
   padding:1rem 1rem 1.2rem;
}
.zen-assoc-card-content h3 a{
   --linkdeco: none !important;
}
.zen-assoc-card-content h3 a:hover{
   color: #068d59;
}

.zen-assoc-meta{
   list-style:none;
   padding:0;
   display:grid;
   font-size:.95rem;
   margin: 0px !important;
   gap: 0px !important;
   /*
   margin:.8rem 0;
   gap:.35rem;
   */
}
.zen-assoc-meta li{
   margin: 0px !important;
	padding: 0px !important;
}

.zen-assoc-link{
   display:inline-block;
   margin-top:.5rem;
   font-weight:600
}
.zen-assoc-code{
   margin:.25rem 0 .6rem;
   font-size:.86rem;
   opacity:.75;
   font-weight:600;
   letter-spacing:.02em
}
.zen-assoc-back{
   display:inline-block;
   margin-bottom:1rem;
   color: #ffffff;
}
.zen-assoc-back:hover{
   color: #efceb3;
}

.zen-assoc-story{
   position:relative;
   line-height:1.7;
   font-size:1.02rem
}
.zen-assoc-story strong{
   font-size:1.32rem
}
.zen-assoc-doc{
   margin-bottom:1.2rem
}
.zen-assoc-inline-image{
   max-width:42%;
   margin:.4rem 0 1rem
}
.zen-assoc-inline-image.left{
   float:left;
   margin-right:1rem
}
.zen-assoc-inline-image.right{
   float:right;
   margin-left:1rem
}
.zen-assoc-inline-image img,.zen-assoc-gallery img{
   display:block;
   width:100%;
   height:auto;
   border-radius:14px;
   box-shadow:0 8px 20px rgba(0,0,0,.12)
}
.zen-assoc-gallery{
   margin:1rem 0
}
.zen-assoc-story::after{
   content:"";
   display:block;
   clear:both
}
.zen-assoc-data{
   margin-top:2rem;
   padding:1.2rem;
   background:rgba(255,255,255,.8);
   border:1px solid rgba(0,0,0,.08);
   border-radius:14px
}
.zen-assoc-table{
   display:grid;
   gap:.5rem
}
.zen-assoc-row{
   display:grid;
   grid-template-columns:220px 1fr;
   gap:.8rem;
   padding:.55rem .7rem;
   border-radius:10px;
   background:rgba(0,0,0,.03)
}
.zen-assoc-key{
   font-weight:600;
   opacity:.9
}
.zen-assoc-val{
   word-break:break-word
}

.zen-assoc-flag {
   display: inline-block;
   width: 20px;
   height: 20px;
   border: 2px solid #6f8e7f;
   border-radius: 5px;
   background: #ffffff;
   vertical-align: middle;
   position: relative;
   box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
   margin-right: 8px;
}

.zen-assoc-flag.is-checked {
   border-color: #1c5340;
   background: #1c5340;
}

.zen-assoc-flag.is-checked::after {
   content: '';
   position: absolute;
   left: 5px;
   top: 1px;
   width: 6px;
   height: 11px;
   border: solid #ffffff;
   border-width: 0 2px 2px 0;
   transform: rotate(45deg);
}

@media (max-width:768px){
   .zen-assoc-inline-image{
      float:none!important;
      max-width:100%;
      margin:1rem 0
   }
   .zen-assoc-row{
      grid-template-columns:1fr
   }
}


/* ------------------------------------------------------------------------------------------------------------------------ */

/*** LISTA TABELLARE ***/

.zen-assoc-table-wrap {
   margin-top: 1rem;
   background: rgba(255, 255, 255, 0.96);
   border: 1px solid rgba(0, 0, 0, 0.422);
   border-radius: 10px;
   box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
   overflow: auto;
}

.zen-assoc-list-table {
   width: 100%;
   border-collapse: collapse;
   min-width: 760px;
   color: #2b3a31;
   background: #ffffff;
}

.zen-assoc-list-table thead th {
   position: sticky;
   top: 0;
   z-index: 1;
   background: #1c5340;
   color: #ffffff;
   font-weight: 700;
   text-align: left;
   padding: 12px 14px;
   border-bottom: 1px solid rgba(255, 255, 255, 0.22);
   white-space: nowrap;
}

.zen-assoc-list-table tbody td {
   padding: 11px 14px;
   border-bottom: 1px solid rgba(0, 0, 0, 0.08);
   vertical-align: top;
}

.zen-assoc-list-table tbody tr:nth-child(even) {
   background: #f5f8f6;
}

.zen-assoc-list-table tbody tr:hover {
   background: #e9f3ee;
}

.zen-assoc-table-link {
   font-weight: 600;
   color: #0f5f42;
   text-decoration: none;
}

.zen-assoc-table-link:hover {
   color: #0b7b50;
}

.zen-assoc-addr-mobile {
   display: none;
}

.zen-assoc-list-thumb-cell {
   width: 104px;
}

.zen-assoc-list-thumb {
   width: 84px;
   height: 56px;
   object-fit: cover;
   border-radius: 8px;
   border: 1px solid rgba(0, 0, 0, 0.12);
   display: block;
}

@media (max-width: 860px) {
   .zen-assoc-table-wrap {
      overflow: visible;
      background: transparent;
      border: 0;
      box-shadow: none;
      border-radius: 0;
   }

   .zen-assoc-list-table {
      min-width: 0;
      border-collapse: separate;
      border-spacing: 0 12px;
      background: transparent;
   }

   .zen-assoc-list-table thead {
      display: none;
   }

   .zen-assoc-list-table,
   .zen-assoc-list-table tbody,
   .zen-assoc-list-table tr {
      display: block;
      width: 100%;
   }

   .zen-assoc-list-table tr {
      display: grid;
      grid-template-columns: 160px 1fr;
      grid-template-rows: repeat(3, minmax(40px, auto));
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 6px 16px rgba(0,0,0,.08);
      margin-bottom: 10px;
   }

   .zen-assoc-list-table td {
      display: none;
      width: 100%;
      border-bottom: 1px solid rgba(0, 0, 0, 0.07);
      padding: 10px 12px;
      position: relative;
      min-height: 40px;
   }

   .zen-assoc-list-table tbody td {
      padding: 6px 14px;
   }

   .zen-assoc-list-table td:nth-child(1),
   .zen-assoc-list-table td:nth-child(2),
   .zen-assoc-list-table td:nth-child(3),
   .zen-assoc-list-table td:nth-child(7) {
      display: block;
   }

   .zen-assoc-list-table td.zen-assoc-list-thumb-cell {
      grid-column: 1;
      grid-row: 1 / span 3;
      border-bottom: 0;
      border-right: 1px solid rgba(0, 0, 0, 0.08);
      background: #f4f8f5;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px;
      width: 100%;
   }

   .zen-assoc-list-table td.zen-assoc-list-thumb-cell::before {
      display: none;
   }

   .zen-assoc-list-table td:not(.zen-assoc-list-thumb-cell) {
      grid-column: 2;
      padding-left: 132px;
   }

   .zen-assoc-list-table td:nth-child(2) { grid-row: 1; }
   .zen-assoc-list-table td:nth-child(7) { grid-row: 2; }
   .zen-assoc-list-table td:nth-child(3) { grid-row: 3; }

   .zen-assoc-list-table td:not(.zen-assoc-list-thumb-cell)::before {
      content: attr(data-label);
      position: absolute;
      left: 12px;
      top: 10px;
      width: 112px;
      font-weight: 700;
      color: #1c5340;
      white-space: nowrap;
   }

   .zen-assoc-list-table td:nth-child(3) {
      border-bottom: 0;
   }

   .zen-assoc-addr-desktop {
      display: none;
   }

   .zen-assoc-addr-mobile {
      display: inline;
   }

   .zen-assoc-list-thumb {
      width: 138px;
      height: 92px;
      border-radius: 10px;
      box-shadow: 0 4px 10px rgba(0,0,0,.16);
   }
}

/* ------------------------------------------------------------------------------------------------------------------------ */

/*** MAPS ***/

.mapsBox {
	border: 1px solid #083400;
	width: 93vw;
	max-width: 100%;
	margin: 0 auto 4vh auto;
}
#mapsArea {
   width:100%;
   height:80vh;
}
.mapPopupRow {
   display: flex;
   width: 290px;
   justify-content: space-between;
}
.mapPopupRowLeft {
   display: inline-block;
   color: #005218;
}
.mapPopupRowLeft b {
	display: inline-block;
	margin-bottom: 6px;
}
.mapPopupRowRight {
   display: inline-block;
}


.leaflet-right {
   display: none;
}
.leaflet-popup-content {
   width: unset !important;
   height: 104px;
}
.leaflet-popup-content b {
   font-size: 16px;
}
.leaflet-popup-content img {
   border: 1px solid #dcdcdc;
}

.leaflet-container a {
   color: #005218;
}
.leaflet-container a:hover {
   color: #057326;
}


/* ------------------------------------------------------------------------------------------------------------------------ */

/*** ADMIN PAGE ***/

.zen-admin .zen-admin-table th,.zen-admin .zen-admin-table td{
   vertical-align:middle
}
.zen-admin .zen-admin-form .form-table th{
   width:240px
}
.zen-admin .zen-admin-files li{
   margin:.35rem 0
}
.zen-admin .zen-admin-images{
   display:grid;
   grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
   gap:12px;
   margin-top:10px
}
.zen-admin .zen-admin-images figure{
   margin:0;
   padding:8px;
   border:1px solid #ddd;
   background:#fff;
   border-radius:8px
}
.zen-admin .zen-admin-images img{
   width:100%;
   height:130px;
   object-fit:cover;
   border-radius:6px;
   display:block
}
.zen-admin .zen-admin-images figcaption{
   font-size:12px;
   margin-top:6px;
   word-break:break-word
}

