/* 基本樣式 */


.grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.effect-hera {
    position: relative;
    width: 30%;
    margin-bottom: 20px;
    overflow: hidden;
}

.effect-hera img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.effect-hera figcaption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.effect-hera:hover figcaption {
    opacity: 1;
}

.effect-hera h3 {
    font-size: 1.8em;
    color: #fff;
    margin-bottom: 20px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.effect-hera h3 span {
    color: #ff6f61;
}

.effect-hera:hover h3 {
    transform: translateY(0);
}

/* 原有 .effect-hera p 樣式 */
.effect-hera p {
    display: flex;
    gap: 15px;
}

/* 修改為置中單個圖標 */
.effect-hera p {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center; /* 垂直置中 */
}

/* 確保圖標樣式不變 */
.effect-hera p a {
    color: #fff;
    font-size: 1.5em;
    text-decoration: none;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.effect-hera:hover p a {
    transform: scale(1);
}


.effect-hera2 {
    position: relative;
    width: 24%;
    margin-bottom: 20px;
    overflow: hidden;
}

.effect-hera2 img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.effect-hera2 figcaption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.effect-hera2:hover figcaption {
    opacity: 1;
}

.effect-hera2 h3 {
    font-size: 1.8em;
    color: #fff;
    margin-bottom: 20px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.effect-hera2 h3 span {
    color: #ff6f61;
}

.effect-hera2:hover h3 {
    transform: translateY(0);
}

/* 原有 .effect-hera2 p 樣式 */
.effect-hera2 p {
    display: flex;
    gap: 15px;
}

/* 修改為置中單個圖標 */
.effect-hera2 p {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center; /* 垂直置中 */
}

/* 確保圖標樣式不變 */
.effect-hera2 p a {
    color: #fff;
    font-size: 1.5em;
    text-decoration: none;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.effect-hera2:hover p a {
    transform: scale(1);
}

/*-----------------*/

figure.effect-hera2 {
	background: #303fa9;
}

figure.effect-hera2 h2 {
	font-size: 158.75%;
}

figure.effect-hera2 h2,
figure.effect-hera2 p {
	position: absolute;
	top: 50%;
	left: 50%;
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
	-webkit-transform: translate3d(-50%,-50%,0);
	transform: translate3d(-50%,-50%,0);
	-webkit-transform-origin: 50%;
	transform-origin: 50%;
}

figure.effect-hera2 figcaption::before {
	position: absolute;
	  top: 49%;
	  left: 49%;
	  width: 160px;
	  height: 160px;
	border: 2px solid #fff;
	content: '';
	opacity: 0;
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
	-webkit-transform: translate3d(-50%,-50%,0) rotate3d(0,0,1,-45deg) scale3d(0,0,1);
	transform: translate3d(-50%,-50%,0) rotate3d(0,0,1,-45deg) scale3d(0,0,1);
	-webkit-transform-origin: 50%;
	transform-origin: 50%;
}

figure.effect-hera2 p {
	width: 100px;
	text-transform: none;
	font-size: 121%;
	line-height: 2;
}

figure.effect-hera2 p a {
	color: #fff;
}

figure.effect-hera2 p a:hover,
figure.effect-hera2 p a:focus {
	opacity: 0.6;
}

figure.effect-hera2 p a i {
	opacity: 0;
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
}

figure.effect-hera2 p a:first-child i {
	-webkit-transform: translate3d(-60px,-60px,0);
	transform: translate3d(-60px,-60px,0);
}

figure.effect-hera2 p a:nth-child(2) i {
	-webkit-transform: translate3d(60px,-60px,0);
	transform: translate3d(60px,-60px,0);
}

figure.effect-hera2 p a:nth-child(3) i {
	-webkit-transform: translate3d(-60px,60px,0);
	transform: translate3d(-60px,60px,0);
}

figure.effect-hera2 p a:nth-child(4) i {
	-webkit-transform: translate3d(60px,60px,0);
	transform: translate3d(60px,60px,0);
}

figure.effect-hera2:hover figcaption::before {
	opacity: 1;
	-webkit-transform: translate3d(-50%,-50%,0) rotate3d(0,0,1,-45deg) scale3d(1,1,1);
	transform: translate3d(-50%,-50%,0) rotate3d(0,0,1,-45deg) scale3d(1,1,1);
}

figure.effect-hera2:hover h2 {
	opacity: 0;
	-webkit-transform: translate3d(-50%,-50%,0) scale3d(0.8,0.8,1);
	transform: translate3d(-50%,-50%,0) scale3d(0.8,0.8,1);
}

figure.effect-hera2:hover p i:empty {
	-webkit-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0); /* just because it's stronger than nth-child */
	opacity: 1;
}
a  i.download,a  i.heart,a i.service,a i.share{
 width:32px;
 height:32px;
 display:inline-block;
 background:url(../images/icons.png) no-repeat -6px -60px;
   margin-right: 0.6em;
}
a  i.download:hover{
 background:url(../images/icons.png) no-repeat  -6px -92px;
}
a  i.heart{
  background:url(../images/icons.png) no-repeat  -37px -60px;
}
a  i.heart:hover{
  background:url(../images/icons.png) no-repeat  -37px -92px;
}
a  i.service{
  background:url(../images/icons.png) no-repeat  -68px -60px;
}
a  i.service:hover{
  background:url(../images/icons.png) no-repeat  -68px -92px;
}
a  i.share{
  background:url(../images/icons.png) no-repeat  -98px -60px;
}
a  i.share:hover{
  background:url(../images/icons.png) no-repeat  -98px -92px;
}

	figure.effect-hera2 p {
	  width: 100px;
	  font-size: 38%;
	  line-height: 2;
	}
	figure.effect-hera2 h2 {
	  font-size: 1.2em;
	}
	figure.effect-hera2 figcaption::before {
	  position: absolute;
	  top: 49%;
	  left: 49%;
	  width: 120px;
	  height: 120px;
	  }


/* 清除浮動 */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .effect-hera {
        width: 100%;
    }
    .effect-hera2 {
        width: 100%;
    }    
}