/* CSS V15 */

@font-face {
  font-family: 'pwafont'; /* Name your font family */
  src: url('') format(''); /* directory*/
}

/* Generale */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
}



/* Contenitore della cover */
.cover-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Immagine a tutto schermo */
.cover-image {
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cover-image:hover {
  transform: scale(1.05);
}


a {
  text-decoration: none;
  color: #40727f;
  transition: color 0.2s ease;
}

a:hover {
  color: #344c69;
}

/* Titolo fisso */
.title-container {
  position: sticky;
  top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #40727f;
  color: white;
  padding: 10px 20px;
  z-index: 1000;
  -webkit-box-shadow: 2px 6px 5px -1px rgba(0,0,0,0.42);
  -moz-box-shadow: 2px 6px 5px -1px rgba(0,0,0,0.42);
  box-shadow: 2px 6px 5px -1px rgba(0,0,0,0.42);
}

.libro-container {
  position: sticky;
  top: 25px;
/*  height: 100px; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #40727f;
  color: white;
  padding: 10px 20px;
  z-index: 1000;
background-image: url(/images/cover-image.webp);
-webkit-box-shadow: 2px 6px 5px -1px rgba(0,0,0,0.42);
-moz-box-shadow: 2px 6px 5px -1px rgba(0,0,0,0.42);
box-shadow: 2px 6px 5px -1px rgba(0,0,0,0.42);
}

#chapter-libro{
	font-size: 5vw;
    color: white;
    margin-left: 10px;
    /* text-align: center;*/
}

.logo{
    width: 12vw;
    height: 12vw;
    background-image: url(/images/logo-pluma.webp);
    background-repeat: no-repeat;
    background-size: 12vw auto;
    background-position-x: center;
    background-position-y: center;
}

.title {
  font-size: 24px;
}

.section{
  font-size: 18px;
}



/* Hamburger menu */
.hamburger-menu {
  position: relative;
    display: flex;
    justify-content: flex-end;
    flex: auto;
}

.hamburger-icon {
  width: 30px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger-icon span {
  display: block;
  height: 4px;
  background: white;
  border-radius: 2px;
}

.menu {
  position: absolute;
  top: 40px;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 2000;
  text-align: center;
  text-wrap: nowrap;
  height: auto;
      padding-top: 10px;
    padding-bottom: 10px;
}

#sez .menu {
  height: 50vh;
  overflow-y: scroll;
}

.menu.open {
  display: block;
}

.menu a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #40727f;
  border-bottom: 1px solid #ddd;
  text-wrap: nowrap;
    width: auto;
    padding-left: 30px;
    padding-right: 30px;
}

.menu a:hover {
  background: #f0f0f0;
}

.menu a:last-child {
  border-bottom: none;
}


/* Pulsanti di navigazione */
.navigation {
      display: flex;
      justify-content: space-between;
      padding: 10px;
      background: #40727f;
    }

.nav-button {
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 22px;
    cursor: pointer;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
      color: #3cff83;
}
    
    
    
/* Contenuto */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 50px 20px 20px 20px;
  background: #f9f9f9;
  box-sizing: border-box;
}

.chapter-sezione {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}

.chapter-sezione li {
    margin-bottom: 10px;
    height: auto;
    display: flex;
	padding-top: 10px;
    padding-left: 10px;
    padding-bottom: 10px;
}

.chapter-sezione li a{
	color: white;
}

.chapter-image {
  width: 100%;
  margin-bottom: 20px;
}

#connection{
	background-color: rgba(128, 128, 128, 0.65);
	position: absolute;
	width: 100%;
	display: block;
    top: 5px;
}

#connection-status{
	display: block;
	position: relative;
    text-align: center;
    flex: auto;
	z-index: 10000;
	height: 25px;
	margin-top: 3px;
}

.block-brand {
    position: absolute;
    width: 50vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 5px;
    justify-content: center;
    bottom: 3%;
}

.brand{
    background-image: url(/images/logo-pluma.webp);
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position-x: center;
    height: 50%;
    background-position-y: center;
}

.title-frontpage{
	font-size: 8vw;
    color: white;
    text-align: center;
    font-weight: bold;
    display: flex;
    justify-content: center;
}
.subtitle-frontpage{
    font-size: 7vw;
    color: white;
    display: block;
    text-align: center;
    line-height: 1em;
    display: flex;
    justify-content: center;
}


.year-frontpage {
    font-size: 5vw;
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
}

#update-notification{
	position: relative;
    animation: fadeIn 0.5s ease-in-out;
}

.update-container {
    position: absolute;
    bottom: 20px;
    transform: translate(-50%, -50%);
    left: 50%;
    background-color: #222;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 40vw;
}


#reload-app {
  background: #ffcc00;
  border: none;
  padding: 5px 10px;
  margin-left: 10px;
  cursor: pointer;
  font-weight: bold;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/*
#image-cache-status {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: greenyellow;
}
*/


/* Schermata iniziale sovrapposta iniziale delle sezioni */
.chapter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Assicurati che sia sopra tutto */
  color: white;
}





@media screen and (orientation:landscape) {
.brand {
    height: 40%;
    margin-bottom: 10px;
}
.title-frontpage {
    font-size: 4vw;
}
.subtitle-frontpage {
    font-size: 3vw;
}
.year-frontpage {
    font-size: 3vw;
}
	#chapter-libro {
    font-size: 4vw;
	}
	.logo {
    width: 12vw;
    background-size: 9vw auto;
	}
}





/* Splash Screen - Fullscreen */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: white;
  background: #40727f; /* Cambia con il tuo colore */
  display: none; /* Nasconde la splash di default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-in-out;
}

/* Logo o testo della splash */
#splash-logo {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  opacity: 0;
  animation: fadeIn 1.5s forwards;
}

#splash-logo img{
	width: 30vw;
	height: auto;
}

/* Animazione di fade-in */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}





