/* =========================================================================
   Custom Gallery Theme — CSS consolidato (custom.css)

   Raccoglie le regole che prima erano sparse in tre punti:
   - header.php  (blocco <style> inline)
   - single.php  (blocco <style> inline)
   - Aspetto > CSS aggiuntivo  (database)

   Dopo aver caricato questo file: svuotare il blocco "CSS aggiuntivo"
   e togliere i <style> inline dai template (già fatto nei file nuovi).
   ========================================================================= */


/* -------------------------------------------------------------------------
   1. HEADER
   ------------------------------------------------------------------------- */
.custom-header {
  width: 100%;
  max-width: 1200px;
  margin: 100px auto 0 auto;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  box-sizing: border-box;
}
.header-left {
  font-size: 24px;
  font-weight: bold;
}
.header-right {
  display: flex;
  gap: 20px;
  position: relative;
}
.right-box {
  background: #f0f0f0;
  padding: 10px 20px;
  border-radius: 4px;
}
.logoname {
  text-decoration: none;
  color: #666;
  font-size: 12px;
}
.contact-box {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  padding: 15px;
  display: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  text-align: left;
  width: auto;
  max-width: 300px;
}
.contact-box .logoname {
  font-size: 14px;
}
.contact-box button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
}
.contact-box button:hover {
  color: #333;
}
#copyMsg {
  font-size: 12px;
  color: green;
  margin-left: 10px;
  display: none;
}


/* -------------------------------------------------------------------------
   2. LAYOUT PAGINA — menu laterale + colonna contenuti
   ------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 10px auto;
  display: flex;
  padding: 0 10px;
  border: none;
  flex-wrap: nowrap;
}
.left-menu {
  flex-basis: 20%;
  overflow: hidden;
  margin-left: 0;
  position: relative;
  background: white;
  padding: 0;
  box-sizing: border-box;
  z-index: 1;
  border-right: 1px solid #ccc;
}
.left-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, white 0%, transparent 100%);
  pointer-events: none;
  z-index: 11;
}
.left-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
  background: transparent;
}
.left-menu li {
  margin-bottom: 10px;
}
.left-menu a {
  text-decoration: none;
  color: #444;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}
.left-menu a:hover,
.left-menu .current-post {
  color: #000;
  font-weight: bold;
}
.gallery-content {
  flex-basis: 80%;
  padding-left: 20px;
  box-sizing: border-box;
  z-index: 0;
}


/* -------------------------------------------------------------------------
   3. DESCRIZIONE OPERA (testo sotto la gallery)
   Prima c'era una regola globale "p { ... !important }" che colpiva TUTTI
   i paragrafi del sito. Qui è ristretta alla colonna dei contenuti.
   ------------------------------------------------------------------------- */
.opera-descrizione {
  clear: both;
}
.gallery-content p {
  font-size: 14px;
  color: #444;
  margin-left: 40px;
}
.column {
  font-size: 14px;
  color: #444;
  margin-left: 40px;
}


/* -------------------------------------------------------------------------
   4. NEXTGEN — titolo file immagine nascosto
   ------------------------------------------------------------------------- */
.entry-title,
.default-view h3 {
  display: none !important;
}


/* -------------------------------------------------------------------------
   5. NEXTGEN — frecce e navigazione gallery
   Regole riprodotte fedeli all'originale (comprese le sovrapposizioni)
   per non alterare l'aspetto attuale.
   ------------------------------------------------------------------------- */
.ngg-imagebrowser-nav .back,
.ngg-imagebrowser-nav .next {
  background-color: white !important;
}
.ngg-imagebrowser-nav .back a,
.ngg-imagebrowser-nav .next a {
  color: gray !important;
  font-size: 20px !important;
}
.ngg-imagebrowser-nav .back a,
.ngg-imagebrowser-nav .next a,
.ngg-imagebrowser-nav .back i,
.ngg-imagebrowser-nav .next i {
  color: gray !important;
}

/* Contenitore immagine */
.ngg-imagebrowser {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}
/* Frecce posizionate dentro l'immagine */
.ngg-imagebrowser .back,
.ngg-imagebrowser .next {
  position: absolute;
  bottom: 10px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}
.ngg-imagebrowser .back { left: 10px; }
.ngg-imagebrowser .next { right: 10px; }
.ngg-imagebrowser .back a,
.ngg-imagebrowser .next a {
  color: white;
  font-size: 20px;
  text-decoration: none;
}
.ngg-imagebrowser-nav {
  text-align: center;
  margin-top: 10px;
}
.ngg-imagebrowser-nav .counter {
  color: #333;
  font-size: 14px;
}
.ngg-imagebrowser-nav .ngg-imagebrowser-desc {
  margin-top: 10px;
  font-size: 14px;
  color: #444;
}

/* Lightbox SimpleLightbox — sfondo caption trasparente */
.sl-wrapper .sl-image .sl-caption {
  background: none;
}


/* -------------------------------------------------------------------------
   6. RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .container {
    flex-wrap: wrap;
  }
  .left-menu {
    flex-basis: 100%;
    order: 2;
    margin-top: 20px;
    background: none;
    overflow: visible;
    white-space: normal;
    border-top: 1px solid #ccc;
    border-right: 0;
  }
  .left-menu::before {
    display: none;
  }
  .left-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 15px;
  }
  .left-menu li {
    display: inline-block;
    margin: 0;
  }
  .left-menu a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    color: #333;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
  }
  .left-menu a:hover,
  .left-menu .current-post {
    background: #f0f0f0;
    font-weight: bold;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  .left-menu a::after {
    font-size: 13px;
    color: #888;
  }
  .gallery-content {
    flex-basis: 100%;
    order: 1;
    padding-left: 0;
  }
  .column {
    margin-left: 0 !important;
  }
}

@media (max-width: 600px) {
  .ngg-imagebrowser .back,
  .ngg-imagebrowser .next {
    width: 32px;
    height: 32px;
    bottom: 8px;
  }
  .ngg-imagebrowser .back a,
  .ngg-imagebrowser .next a {
    font-size: 18px;
  }
  .ngg-imagebrowser-nav .counter,
  .ngg-imagebrowser-nav .ngg-imagebrowser-desc {
    font-size: 13px;
  }
}