* {
  padding: 0;
  margin: 0;
}

:root {
  --headerbgcolor: #f2f2f2;
  --headercolor: #205e86;
  --bgcolor: #fff;
  --txtcolor: #000;
  --contentbgcolor: #f2f4f7;
  --breadlinkcolor: #fbff50;
  --unvisitedcolor: #fbff50;
  --linkcolor: #4b7c81;
  --bordercolor: #000;
  --submitcolor: var(--headerbgcolor);
  --visitedcolor: #000;
  --menuvisitedcolor: var(--headercolor);
  --disabledtxtcolor: #595959;
  --carouselcolor: var(--headercolor);
  --carouselactivecolor: var(--headerbgcolor);
  --errorcolor: red;
  --tablebgcolor: #fff;
  --shadowcolor: rgba(0, 0, 0, 0.15);
  --footerlinkcolor: #000;
  --footerbgcolor: var(--headerbgcolor);
  --footercolor: var(--txtcolor);
  --bttsrc: url(../images/back-to-top-icon.webp);
}

@font-face {
	font-family: "Bitter";
  font-style: normal;
	src: url(../fonts/Bitter-VariableFont_wght.ttf) format("truetype");
	font-weight: 400;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.none {
  display: none;
}

.nascosto {
  position: absolute;
  left: -999rem;
}

html {
  font-size: 80%;
  font-family: 'Bitter', Times, serif;
  line-height: 1.5em;
  color: var(--txtcolor);
  background-color: var(--bgcolor);
  border: 0;
  vertical-align: baseline;
  min-height: 100%;
}

body {
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 9fr;
  overflow-x: hidden;
  margin: auto;
}

ol,
ul {
  list-style: none;
}

a {
  color: var(--linkcolor);
}

a:visited {
  color: var(--visitedcolor);
}

strong {
  color: var(--txtcolor);
}

.util-btn {
  display: none;
}

#top-help {
  display: none;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
  display: none;
}

/*////////////*/
/* HEADER */
/*////////////*/

header {
  grid-row: 1;
  grid-column: 1;
  height: 80px;
  width: 200px;
  background: url('../images/logo.webp') no-repeat center;
  background-size: contain;
}

header h1 {
  position: absolute;
  text-indent: 250px;
  margin-top: 25px;
}

#hamb {
  display: none;
}

/*
==============
THEME TOGGLE
==============
*/

#theme-container {
  display: none;
}

/*////////////*/
/* MENU */
/*////////////*/

#menu {
  display: none;
}

#menu ul {
  display: flex;
  height: 3em;
}

/*////////////*/
/* BREADCRUMB */
/*////////////*/

#breadcrumb {
  grid-row: 2;
  grid-column: 1/4;
  color: var(--txtcolor);
  padding: 0.2rem;
  border: 1px solid var(--bordercolor);
  border-radius: 5px;
}

#breadcrumb ol {
  display: flex;
  margin-left: 0.5em;
  padding: 0.18rem;
}

#breadcrumb a {
  color: var(--txtcolor);
  padding: 0 0.2em;
  border-radius: 3px;
}

#breadcrumb li+li::before {
  content: '>';
  margin: 0 0.5em;
}

#home {
  text-decoration: underline dotted;
}

/*////////////*/
/* MAIN */
/*////////////*/

main {
  grid-row: 3;
  grid-column: 1/4;
  margin-left: 3%;
  margin-right: 3%;
}

main h1 {
  margin: 20px 0;
  line-height: 1.5em;
  text-align: center;
  font-size: 2em;
}

/*////////////*/
/* CAROSELLO */
/*////////////*/

#carosello {
  position: relative;
  margin: 2% 7% 2% 7%;
}

.immaginiCarosello {
  list-style-type: none;
  position: relative;
  padding: .8em;
  background: var(--headercolor);
  border-radius: 1em;
  height: 25vh;
  box-shadow: 2px 2px 20px var(--shadowcolor);
}

.immaginiCarosello {
  box-shadow: inset 0 0 10px var(--shadowcolor);
  background: var(--bgcolor);
}

.immaginiCarosello img {
  box-sizing: content-box;
  max-width: 100%;
  height: 25vh;
  position: relative;
  padding: 0;
  margin: auto;
  z-index: 0;
  border-radius: 1em;
  box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.1);
  display: none;
}

#carosello .onCarosello {
  display: block;
}

#scopridipiu {
  position: absolute;
  text-indent: -9999px;
}

.puntiniCarosello {
  display: none;
}

#caroselloIndietro,
#caroselloAvanti {
  display: none;
}

/*////////////////*/
/* DETTAGLIO SALA */
/*////////////////*/

.dettaglioSala {
  margin: 2% 7% 2% 7%;
  background-color: var(--contentbgcolor);
  border-radius: 1em;
  box-shadow: 3px 3px 20px var(--shadowcolor);
  overflow: auto;
}

.dettaglioSala {
  box-shadow: inset 0 0 10px var(--shadowcolor);
}

.dettaglioSala h1 {
  text-align: center;
  font-size: 2rem;
  padding: 1rem;
  margin: 0;
}

.dettaglioSala p {
  padding: 1rem;
  padding-top: 0;
  margin: 0;
}

#titoloListaOpere {
  text-align: center;
  font-size: 2rem;
  padding: 1rem;
  line-height: 1.5em;
}

#listaOpere {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column-gap: 5px;
  list-style-type: none;
  margin: 0 auto;
  padding: 0;
}

#listaOpere>li {
  display: flex;
  flex-direction: column;
  /* Imposta una colonna di layout per ciascun elemento */
  align-items: center;
  text-align: left;
  /* Allinea il testo a sinistra */
  border-radius: 1em;
  box-shadow: 5px 5px 20px var(--shadowcolor);
  padding: 1em;
  margin: auto;
  width: 170px;
  margin-bottom: 20px;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

#listaOpere>li {
  box-shadow: inset 0 0 10px var(--shadowcolor);
}

#listaOpere li img {
  /* min-height: fit-content; */
  max-width: 100px;
  background-size: contain;
  margin: 0;
  margin-bottom: 1em;
  border-radius: 10px;
  border: 1px solid var(--txtcolor);
}

#listaOpere li h3 {
  font-style: italic;
  align-self: flex-start;
  /* Allinea il titolo a sinistra */
  margin-bottom: 0;
}

#listaOpere li p {
  align-self: flex-start;
  display: -webkit-box;
  line-clamp: 3;
  box-orient: vertical;
  -webkit-line-clamp: 4;
  /* Numero di righe visibili */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Allinea il titolo a sinistra */
  margin-bottom: 0.1em;
}

#listaOpere li a {
  display: none;
}


/*////////////*/
/* SECTION */
/*////////////*/

.mainSection {
  margin: 2% 7% 2% 7%;
  border: 2px solid var(--headerbgcolor);
  border-radius: 1em;
  box-shadow: 5px 5px 20px var(--shadowcolor);
}

.mainSection h1 {
  text-align: center;
  font-size: 1.5rem;
  padding: 1rem;
  margin-bottom: 0;
}

.mainSection h2 {
  font-size: 1.2rem;
  padding: 1rem;
  padding-top: 0;
  margin-bottom: 0;
}

.mainSection p {
  padding-right: 1rem;
  padding-left: 1rem;
  padding-bottom: 1em;
}

#torna-su {
  display: none;
}

/*////////////*/
/* FOOTER */
/*////////////*/

footer {
  grid-row: 5;
  grid-column: 1/4;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  color: var(--footercolor);
  font-size: 0.75rem;
  padding: 0 10px;
  margin-top: 5px;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

footer a {
  color: var(--footerlinkcolor);
}

footer a:visited {
  color: var(--footercolor);
}

footer dl {
  min-width: 14rem;
  margin: 0;
  flex: 1 0 20%;
  padding: 3rem 0;
}

footer dt {
  float: left;
  padding-right: 0.2rem;
}

footer h2 {
  flex: 1 0 13%;
  background-image: url('../images/logo.webp');
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  text-indent: -999rem;
  min-height: 8rem;
}

/*//////////////////////////*/
/* TABELLA ORARI MUSEO */
/*//////////////////////////*/

#orari-museo {
  flex: 1 0 30%;
  max-width: 30rem;
  text-align: center;
}

#orari-museo caption {
  font-weight: bold;
  font-size: 1rem;
}

#orari-museo tr:nth-child(even),
#orari-museo thead th,
#orari-museo thead td {
  background-color: var(--tablebgcolor);
}

#orari-museo tr:nth-child(odd) {
  background-color: var(--headerbgcolor);
}


/*////////////*/
/* MOSTRE */
/*////////////*/
#mostre h1 {
  text-align: center;
  font-size: 1.5em;
  margin-bottom: 0;
}

.tipoMostre {
  font-weight: bold;
  margin: 10px 0;
}

.nomeMostra {
  margin: 10px 5%;
  background-image: url("../images/pokeball.ico");
  background-size: 1.3em;
  background-repeat: no-repeat;
  padding-left: 30px;
}

.infoMostra {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 15px;
  box-shadow: 0 4px 8px var(--shadowcolor);
  background: var(--bgcolor);
  margin: auto;
  width: 600px;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

.infoMostra>img {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 220px;
  border-radius: 10px;
}

/* con questo vengono sommati i due margini tra bot del primo e top del secondo risolvi */
.infoMostra>p {
  margin-top: 10px;
}

.giorniMostra {
  text-align: center;
}

.infoMostra time {
  font-weight: bold;
}

.button {
  padding: 0.6em;
  font-size: 1em;
  border: 2px solid var(--txtcolor);
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  color: var(--txtcolor);
  text-decoration: none;
}

.accordion {
  width: 100%;
  margin-top: 1em;
  padding: 0.6em;
  font-size: 1.3em;
  font-weight: bold;
  font-family: 'Bitter', Times, serif;
  background-color: var(--bgcolor);
  color: var(--txtcolor);
  cursor: pointer;
  border: 1px solid var(--txtcolor);
  border-radius: 5px;
}

.accordion::after {
  content: "\002B";
  color: var(--txtcolor);
  font-weight: bold;
  float: right;
}

.accordion.active::after {
  content: "\2212";
}

.accordion-panel {
  display: none;
}

.accordion-panel.active {
  display: block;
}

/*///////////////*/
/* PRENOTAZIONI */
/* REGISTRAZIONE */
/* MODIFICA MOSTRA */
/*///////////////*/

.compilazione {
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("../images/sala.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 25rem;
  margin-top: 10px;
  border-radius: 3em;
  padding: 1em 0;
}

.contenitoreCompilazione {
  width: 24%;
  min-width: 16em;
  padding: 1em;
  padding-top: 0;
  background-color: var(--bgcolor);
  border-radius: 10px;
  opacity: 0.96;
}

#contenitoreRecensione {
  min-width: 20.5em;
}

.form-errors {
  color: var(--errorcolor);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.formCompilazione {
  margin-top: 5px;
}

.formCompilazione input,
.formCompilazione select {
  box-sizing: border-box;
  padding: 0.4em;
  border: solid 2px #000;
  border-radius: 5px;
  display: block;
}

.formCompilazione input[type="submit"],
a.button {
  display: none;
}

.formCompilazione input[type="file"] {
  width: 100%;
}

.formCompilazione label {
  display: block;
  margin: 1em 0 0.25em;
  font-size: 1.15rem;
}

.formCompilazione .errorSuggestion {
  color: var(--errorcolor);
  font-size: 0.96rem;
  font-weight: normal;
  line-height: 0;
}

.formCompilazione #err_voto {
  display: block;
  margin-top: 1em;
}

.formCompilazione #err_voto.none {
  display: none;
}

.required-label::after {
  content: "*";
  color: var(--errorcolor);
}

.required-msg::before {
  content: "* ";
  color: var(--errorcolor);
}

.required-msg {
  margin: 0.5em 0;
}

/*////////////*/
/* RECENSISCI */
/* MODIFICA MOSTRA */
/*////////////*/

.contenitoreCompilazione h1 {
  font-size: 1.5em;
  text-align: left;
}

.formCompilazione fieldset {
  border: none;
  margin-bottom: 1em;
}

.formCompilazione fieldset input {
  display: inline;
}

.formCompilazione fieldset legend,
.domandaRecensione {
  text-align: left;
  font-size: 1.15rem;
  width: 100%;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

#rating-fs {
  text-align: left;
  font-size: 1.15rem;
}

span#giudizio {
  margin: 0 1em;
}

.formCompilazione fieldset label {
  text-align: left;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.formCompilazione input[type="radio"] {
  transform: scale(2);
  margin: 0 0.3rem 1em;
  cursor: pointer;
}

.formCompilazione input[type="radio"][name="rating"] {
  margin-bottom: 0em;
}

.rating-option {
  display: inline;
}


.formCompilazione input[type="text"],
.formCompilazione input[type="email"],
.formCompilazione input[type="password"] {
  width: 100%;
  font-size: 1.0rem;
}

.formCompilazione input[type="number"] {
  width: 25%;
  font-size: 1.15rem;
}

.formCompilazione input[type="date"] {
  font-size: 1.1rem;
}

.rating[type="radio"] {
  margin-bottom: 2em;
}

.formCompilazione textarea {
  width: 100%;
  padding: 0.5em;
  border: 2px solid var(--txtcolor);
  border-radius: 0.5em;
  font-size: 1rem;
  box-sizing: border-box;
  resize: none;
  height: 100px;
}

/*////////////*/
/* RECENSIONI */
/*////////////*/

#primoContenuto>a {
  display: none;
}

#titolo-recens-museo {
  margin-bottom: 0.5em;
}

#titolo-recens-virtual {
  margin-top: 1em;
  margin-bottom: 1em;
}

#scrivi-rev::before {
  content: "\270D";
  margin-right: 0.5em;
}

.recensioni>li {
  margin-top: 1em;
  margin-bottom: 2em;
  padding: 0.8em;
  border: 1px solid var(--txtcolor);
  border-radius: 15px;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

.recensioni>li dt {
  display: none;
}

.recensioni>li dt.lbl-punteggio,
.recensioni>li dt.lbl-punteggio+dd {
  display: inline;
  font-weight: bold;
}

.recensioni>li dd {
  margin: 0.3em 0;
}

.recensioni>li label {
  font-weight: bold;
  margin-right: 0.5em;
}

.recensioni>li time {
  display: block;
  font-size: 0.7em;
}

svg {
  fill: var(--txtcolor);
  height: 1em;
}

/*/////////////////////////*/
/* DETTAGLIO OPERA (CARTA) */
/*/////////////////////////*/

main[class="opera"] {
  color: var(--newstxtcolor);
  background-color: var(--bgcolor);
  margin: 10px auto;
  width: 80%;
  padding: 0.5em;
  border: 1px solid var(--contentxtcolor);
  box-shadow: 0 4px 10px var(--shadowcolor);
  border-radius: 8px;
}

main[class="opera"] {
  box-shadow: inset 0 0 10px var(--shadowcolor);
}

.opera h1 {
  text-align: center;
  line-height: 1em;
}

.opera h2 {
  text-align: center;
}

#carta-immagine {
  display: block;
  margin: 0 auto;
  border: 1px solid var(--txtcolor);
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--shadowcolor);
  max-height: 300px;
  max-width: 100%;
  box-sizing: border-box;
}

#carta-immagine {
  box-shadow: 0 0 5px var(--shadowcolor);
}

#carta-descrizione {
  margin-top: 2em;
}

#carta-descrizione+p {
  text-align: justify;
  line-height: 1.5;
  margin: 0 10px;
}

#carta-dettagli {
  margin-top: 2em;
}

#lista-dettagli {
  width: 90%;
  margin: 0 auto;
}

#lista-dettagli dt {
  background: url('../images/pokeball.ico') no-repeat center left;
  background-size: 1.25em;
  padding: 0 0.5em 0 2em;
  float: left;
}

#lista-dettagli dd {
  margin: 0.2em 0;
}

#lista-dettagli dd:last-child {
  border-radius: 0 0 4px 4px;
}

/*/////////////////////////*/
/* VIRTUAL TOUR */
/*/////////////////////////*/

#virtualTour-mappa ol {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 0.25em;
  margin: 0 auto 2em;
  border: 8px solid var(--headerbgcolor);
  border-radius: 5px;
  background: var(--bgcolor);
  width: 80%;
  aspect-ratio: 5/3;
}

#virtualTour-mappa li {
  display: block;
  width: auto;
  border: solid #ccc;
  border-width: 2px;
  border-radius: 5px;
  text-indent: -999em;
}

#virtualTour-mappa li a {
  display: block;
  background-size: contain;
  width: 100%;
  height: 100%;
}

#dragon {
  grid-column: 1;
  grid-row: 1;
}

#dragon a {
  background: url("../images/sala-dragon-ball.webp") no-repeat center;
}

#pokemon {
  grid-row: 1;
  grid-column: 2/4;
}

#pokemon a {
  background: url("../images/sala-pokemon.webp") no-repeat center;
}

#gormiti {
  grid-row: 2;
  grid-column: 3;
}

#gormiti a {
  background: url("../images/sala-gormiti.webp") no-repeat center;
}

#yugioh {
  grid-row: 2;
  grid-column: 1/3;
}

#yugioh a {
  background: url("../images/sala-yu-gi-oh.webp") no-repeat center;
}

/* #virtualTour-mappa img {
  height: auto;
  border: 2px solid #ccc;
  border-radius: 5px;
  width: 75%;
} */

#virtualTour-elenco-sale {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#virtualTour-elenco-sale dl {
  max-width: 800px;
}

#virtualTour-elenco-sale dt {
  font-weight: bold;
  margin-top: 1.25em;
  color: var(--txtcolor);
  text-align: center;
}

#virtualTour-elenco-sale dd {
  margin: 5px 0 20px 0;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px var(--shadowcolor);
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

/*/////////////////////////*/
/* PERSONALE ADMIN */
/*/////////////////////////*/

#tab-mostre {
  width: 100%;
  text-align: left;
  margin-bottom: 30px;
}

#tab-mostre caption {
  font-size: 1.5em;
  margin-bottom: 1em;
}

#tab-mostre td,
#tab-mostre tbody th {
  font-weight: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tab-mostre th,
#tab-mostre td {
  border: 1px solid var(--txtcolor);
  padding: 0.5em;
}

#tab-mostre tr:nth-child(even),
#tab-mostre thead th {
  background-color: var(--tablebgcolor);
}

#tab-mostre tr:nth-child(odd) {
  background-color: var(--headerbgcolor);
}

#tab-mostre tr>*:nth-last-child(-n+2) {
  display: none;
}

#tab-mostre tr {
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
  margin-bottom: 10px;
}

/*Linearizzazione della tabella*/

#tab-mostre thead,
#tab-mostre tfoot {
  display: none;
}

#tab-mostre tr,
#tab-mostre tbody th,
#tab-mostre td {
  display: block;
  white-space: normal;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

th[data-title]:before,
td[data-title]:before {
  content: attr(data-title) ":\00A0";
  font-weight: bold;
}

#tab-mostre th {
  background-color: var(--headerbgcolor);
  color: var(--txtcolor);
}

#tab-mostre td,
#tab-mostre th {
  border-top: none;
}

#tab-mostre tr {
  border-top: 1px solid var(--bordercolor);
}

#tab-mostre tr th {
  border-top: 1px solid var(--bordercolor);
}

#tab-mostre td {
  background-color: var(--tablebgcolor);
}

#tab-mostre .mod-mostra,
#tab-mostre .elim-mostra {
  float: left;
  width: 50%;
  height: 2.7em;
}

#tab-mostre .mod-mostra {
  border-right: none;
}

/*/////////////////////////*/
/* Il mio profilo */
/*/////////////////////////*/

#dati-utente {
  margin: 1.5em;
  border-radius: 8px;
  background: url("../images/pokedex.webp") no-repeat right;
  background-size: contain;
  padding-right: 18%;
}

#dati-utente dt {
  font-weight: bold;
  margin-bottom: 0.5em;
  padding: 0.5em;
  width: 6em;
  color: var(--txtcolor);
  border-radius: 5px;
  float: left;
}

#dati-utente dd {
  margin: 0 0 0.5em 6.9em;
  padding: 0.5em;
  border: 1px solid var(--txtcolor);
  border-left: 4px solid black;
  border-radius: 5px;
  color: var(--txtcolor);
}

#tab-prenot {
  width: 100%;
  text-align: left;
  margin: 1em auto;
}

#tab-prenot th,
#tab-prenot td {
  border: 1px solid var(--txtcolor);
  padding: 0.5em;
}

#tab-prenot tr:nth-child(even),
#tab-prenot thead th {
  background-color: var(--tablebgcolor);
}

#tab-prenot tr:nth-child(odd) {
  background-color: var(--headerbgcolor);
}

#tab-prenot tr>*:nth-last-child(-n+1) {
  display: none;
}

dialog {
  border: 1px solid var(--txtcolor);
  border-radius: 8px;
  padding: 1em;
  margin: auto;
  font-size: 1.2em;
}

dialog button {
  margin-right: 1em;
  margin-top: 1em;
  padding: 0.5em;
  border: 1px solid var(--txtcolor);
  border-radius: 5px;
  cursor: pointer;
}

/*/////////////////////////*/
/* PAGINE DI ERRORE */
/*/////////////////////////*/

.error-page {
  display: grid;
  grid-template-columns: 2fr 2fr;
  text-align: center;
  row-gap: 2em;
}

.error-title {
  grid-row: 1;
  grid-column: 1/3;
}

.error-descr {
  grid-row: 2;
  grid-column: 1;
  margin: 5em 0;
}

.error-descr ul {
  margin-left: 2em;
}

.error-descr li {
  text-align: left;
  margin: 0.5em 0;
  background: url("../images/pokeball.ico") no-repeat top left;
  background-size: 1.25em;
  padding-left: 2em;
}

.error-img {
  display: block;
  margin: 0 auto;
  grid-row: 2;
  grid-column: 2;
  max-width: 100%;
  box-sizing: border-box;

}