
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 per i vecchi browser */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

a { 
  outline: 0; 
}
a:active { 
  outline: none; 
}

* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
  
/***** Generale **********/body {background-color: #FFFFFF;}  
#intro_header{
width:100%;
height:70px;
background:#191970;	
}
#intro_header::after{
	content:"";
	height:0;
	width:0;
	position:absolute;
	top:70px;
	left:50%;
	border-bottom:20px solid transparent;
	border-top:20px solid #191970;
	border-left:20px solid transparent;
	border-right:20px solid transparent;
}
#intro_header p{
text-align:center;
text-transform:uppercase;
color:#fff;
font-size:1.5em;
padding:20px;	
}
#wrapper {
  margin: 70px auto 100px auto;
  max-width: 960px;

}

.cont_libri{
  list-style: none;
  padding: 0;
}
footer{

float:left;
margin-top:120px;
height:70px;
width:100%;
background:#333;	
}
footer p{
color:#fff;
text-align:center;
padding:20px;	
}

/*************************************
      Costruiamo il libro
**************************************/

.forma {
  width: 260px;
  height: 400px;
  margin: 30px;
  float: left;
  -webkit-perspective: 1000px;
  -moz-perspective: 1000px;
  perspective: 1000px;
-webkit-box-shadow: -1px -1px 5px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow:    -1px -1px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow:         -1px -1px 5px 0px rgba(50, 50, 50, 0.75);
} 



.libro {
  width: 260px;
  height: 400px;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transform: translateZ(-130px);
  -moz-transform: translateZ(-130px);
  transform: translateZ(-130px);
  -webkit-transition: -webkit-transform 320ms;
  -moz-transition: -moz-transform 320ms;
  transition: transform 320ms;
  cursor: pointer;

 
}

/*************************
     RUOTIAMO FORMA
**************************/

.libro:hover {
  -webkit-transform: rotateY(-78deg) translateZ(20px);
  -moz-transform: rotateY(-78deg) translateZ(20px);
  transform: rotateY(-78deg) translateZ(20px);
}

/*************************************
TRASFORMA E STILE
**************************************/

.libro .front, 
.libro .info {
  position: absolute;
  width: 260px;
  height: 400px;
  background-color:#191970;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
}



.libro .front  {
  -webkit-transform: translateZ(130px);
  -moz-transform: translateZ(130px);
  transform: translateZ(130px);
  background-size: cover;
  background-repeat: no-repeat;
 
  
}

.libro .info {
  -webkit-transform: rotateY(90deg) translateZ(130px);
  -moz-transform: rotateY(90deg) translateZ(130px);
  transform: rotateY(90deg) translateZ(130px);
  border: 1px solid #ccc;
  font-size: 0.75em;
}

/*************************************
ombra base alla forma del libro
**************************************/

.libro::after {
  content: '';
  width: 260px;
  height: 260px;
  position: absolute;
  bottom: 0;
  box-shadow: 0 30px 50px rgba(0,0,0,0.9);
  -webkit-transform-origin: 100% 100%;
  -moz-transform-origin: 100% 100%;
  transform-origin: 100% 100%;
  -webkit-transform: rotateX(90deg) translateY(130px);
  -moz-transform: rotateX(90deg) translateY(130px);
  transform: rotateX(90deg) translateY(130px);
  -webkit-transition: box-shadow 350ms;
  -moz-transition: box-shadow 350ms;
  transition: box-shadow 350ms;
}

.libro:hover::after {
  box-shadow: 50px -5px 50px rgba(0,0,0,0.4);
}

/*************************************
Info libro
**************************************/

.info header {
  color: #191970;
  padding: 7px 10px;
  font-weight: bold;
  height: 195px;
  background-repeat: no-repeat;
  text-shadow: 0px 1px 1px rgba(0,0,0,2);

}

.info header h1 {
  margin: 10px 0 0 3px;
  font-size: 1.3em;
text-align:center;
}

.info header .prezzo{
	width:50%;
	margin-left:25%;
  margin-top:40px;
  padding: 10px;
  float:left;
  background:#191970;
  color:#FFFFF0;
  text-align:center;
  border-radius:5px;

}

.info header .autore{
width:100%;
float:left;	
margin-top:20px;
text-align:center;
}

.info p {
  padding: 1.2em 1.4em;
  margin: 2px 0 0;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.4em;
  border-top: 20px solid #FFFFFF;
}

/******************************************
OMBRA BOX
*******************************************/


.libro .front {
  box-shadow: inset 0px 0px 40px rgba(255,255,255,0);
}

.libro:hover .front {
  box-shadow: inset 300px 0px 40px rgba(255,255,255,0.8);
}

.libro .info, 
.libro .info header {
  box-shadow: inset -300px 0px 40px rgba(0,0,0,0.5);

}

.libro:hover .info, 
.libro:hover .info header {
  box-shadow: inset 0px 0px 40px rgba(0,0,0,0);
}

.libro .front,
.libro .info,
.libro .info header {
  -webkit-transition: box-shadow 350ms;
  -moz-transition: box-shadow 350ms;
  transition: box-shadow 350ms;
}

/*************************************
copertina e immagine
**************************************/

.forma:nth-child(1) .front {
  background-image: url('../img/libro2.jpg');
}

.forma:nth-child(2) .front {
  background-image: url('../img/libro3.jpg');
}

.forma:nth-child(3) .front {
  background-image: url('../img/libro1.jpg');
}



.forma:nth-child(1) .info header {
  background-color:#FFFFF0
  
}

.forma:nth-child(2) .info header {
  background-color:#FFFFF0;
 
}

.forma:nth-child(3) .info header {
  background-color:#FFFFF0;
  
}

/*************************************
Media Queries
**************************************/
@media screen and (max-width: 480px){
  .forma {
    float: none;
    margin: 30px auto 60px;
  }
}
