/*************************************
Build the scene and rotate on hover
**************************************/

.scene {
	width: 22%/*182px*/;
	/*height: 160px;*/
	float: left;
	-webkit-perspective: 1000px;
	-moz-perspective: 1000px;
	perspective: 1000px;
	margin-bottom:15px;
}

.movie {
	width: 260px;
	height: 160px;
	-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 350ms;
	-moz-transition: -moz-transform 350ms;
	transition: transform 350ms;
}

.movie:hover {
	-webkit-transform: rotateY(-78deg) translateZ(20px);
	-moz-transform: rotateY(-78deg) translateZ(20px);
	transform: rotateY(-78deg) translateZ(20px);
}

/*************************************
Transform and style the two planes
**************************************/

.movie .poster, 
.movie .info {
	position: absolute;
	width: 260px;
	height: 160px;
	background-color: #fff;
	-webkit-backface-visibility: hidden;
	-moz-backface-visibility: hidden;
	backface-visibility: hidden;
}

.movie .poster  {
	-webkit-transform: translateZ(130px);
	-moz-transform: translateZ(130px);
	transform: translateZ(130px);
	background-size: cover;
	background-repeat: no-repeat;
}

.movie .info {
	-webkit-transform: rotateY(90deg) translateZ(130px);
	-moz-transform: rotateY(90deg) translateZ(130px);
	transform: rotateY(90deg) translateZ(130px);
	border: 1px solid #B8B5B5;
	font-size: 0.75em;
}

/*************************************
Shadow beneath the 3D object
**************************************/

.movie::after {
	content: '';
	width: 260px;
	height: 160px;
	position: absolute;
	bottom: 0;
	box-shadow: 0 30px 50px rgba(0,0,0,0.3);
	-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;
}

.movie:hover::after {
	box-shadow: 20px -5px 50px rgba(0,0,0,0.3);
}

/*************************************
Movie information
**************************************/

.info header {
	color: #FFF;
	padding: 7px 10px;
	font-weight: bold;
	height: 195px;
	background-size: contain;
	background-repeat: no-repeat;
	text-shadow: 0px 1px 1px rgba(0,0,0,1);
}

/*************************************
Generate "lighting" using box shadows
**************************************/

.movie .poster,
.movie .info,
.movie .info header {
	-webkit-transition: box-shadow 350ms;
	-moz-transition: box-shadow 350ms;
	transition: box-shadow 350ms;
}

/*************************************
Posters and still images
**************************************/

.scene:nth-child(1) .movie .poster {
  background-image: url(../img/subpage/school/kobayashihs/kobayashihs_futsuBtn_pc.png);
}

.scene:nth-child(1) .info header {
	background-image: url(../img/subpage/school/kobayashihs/kobayashihs_futsuBtn_smp.png);
}

.scene:nth-child(2) .movie .poster {
  background-image: url(../img/subpage/school/kobayashihs/kobayashihs_tankyuBtn_pc.png);
}

.scene:nth-child(2) .info header {
	background-image: url(../img/subpage/school/kobayashihs/kobayashihs_tankyuBtn_smp.png);
}

.scene:nth-child(3) .movie .poster {
  background-image: url(../img/subpage/school/kobayashihs/kobayashihs_taiikuBtn_pc.png);
}

.scene:nth-child(3) .info header {
	background-image: url(../img/subpage/school/kobayashihs/kobayashihs_taiikuBtn_smp.png);
}

/*************************************
Fallback
**************************************/
.no-csstransforms3d .movie .poster, 
.no-csstransforms3d .movie .info {
	position: relative;
}

@media screen and (max-width: 768px) {
.scene {
	width: 22%;
	float: left;
	-webkit-perspective: 1000px;
	-moz-perspective: 1000px;
	perspective: 1000px;
	margin-bottom:15px;
}

/*
.cubeStage {
	overflow:hidden;
}
*/

.movie .poster, 
.movie .info {
	position: absolute;
	width: 260px;
	height: 160px;
	background-color: #fff;
	-webkit-backface-visibility: hidden;
	-moz-backface-visibility: hidden;
	backface-visibility: hidden;
}
}

@media screen and (max-width: 568px) {
.scene {
	width: 20%;
	float: left;
	-webkit-perspective: 1000px;
	-moz-perspective: 1000px;
	perspective: 1000px;
	margin:10px 0%;
}	
}

@media screen and (max-width: 480px) {
.scene {
	width: 260px;
	height: 123px;
	float: left;
	-webkit-perspective: 1000px;
	-moz-perspective: 1000px;
	perspective: 1000px;
	margin:10px 0%;
}

.cubeStage {
	margin:0px 15% 0px 4%;
}

.movie .poster, 
.movie .info {
	position: absolute;
	width: 260px;
	height: 160px;
	background-color: #fff;
	-webkit-backface-visibility: hidden;
	-moz-backface-visibility: hidden;
	backface-visibility: hidden;
}
}
