@import url(http://fonts.googleapis.com/css?family=Roboto:400,300,100,700,100italic,300italic,400italic,700italic);
/*
Template Name: Multi
Version: 1.0
Author: ShapeBootstrap
Author URL: http://shapebootstrap.net
*/

/*************************
******* 全域盒模型修正 *******
**************************/
/* 確保所有元素的寬度計算包含內距與邊框，避免一行 4 個被擠下來 */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/*************************
*******Typography******
**************************/
body {
  padding-top: 100px;
  background: #fff;
  font-family: montserrat, Roboto, sans-serif;
  font-weight: 400;
  color: #64686d;
  line-height: 26px;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  color: #272727;
}
a {
  color: #053863;
  transition: color 400ms, background-color 400ms;
}
a:hover, a:focus {
  text-decoration: none;
  color: #0a4d85;
}

/*************************
******* Header **********
**************************/
.navbar.navbar-default {
  border: 0;
  border-radius: 0;
  margin-bottom: 0;
}
.navbar.navbar-default .navbar-brand {
  height: auto;
  padding: 5px;
}
@media only screen and (min-width: 768px) {
  #main-menu.navbar-default {
    background: #fff;
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1);
  }
  #main-menu.navbar-default .navbar-nav > li > a {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  #main-menu.navbar-default .navbar-nav > li.active > a {
    background: transparent;
    border-top: 3px solid #053863;
  }
}

/*************************
******* Slider 優化 ******
**************************/
#main-slider {
  overflow: hidden;
  max-width: 100%;
}
#main-slider .item {
  background-size: contain !important;
  background-repeat: no-repeat;
  background-position: center;
  height: 450px;
  background-color: #f9f9f9;
}
@media only screen and (min-width: 768px) {
  #main-slider .item {
    background-size: cover !important;
    height: 700px;
  }
}

/*************************
******* Portfolio 修正 ******
**************************/
#portfolio {
  padding: 60px 0;
  background: #f5f5f5;
}
#portfolio .portfolio-filter {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
#portfolio .portfolio-filter > li { margin: 5px; }
#portfolio .portfolio-filter > li a {
  display: block;
  padding: 10px 15px;
  background: #fff;
  color: #64686d;
  border-radius: 4px;
}

/* 修正一行 4 個的關鍵樣式 */
#portfolio .portfolio-items {
  margin: 0 -10px; /* 抵消項目的左右 padding */
}

#portfolio .portfolio-item {
  width: 25%; /* 精確的 25% */
  float: left;
  padding: 10px;
}

.preview { display: none !important; }

#portfolio .portfolio-item .portfolio-item-inner {
  position: relative;
  background: #fff;
  border: 1px solid #eee;
  overflow: hidden;
}

#portfolio .portfolio-item .portfolio-item-inner .portfolio-info {
  opacity: 1;
  position: relative;
  background: transparent;
  padding: 0;
}

.product-btn {
  display: block;
  background-color: #053863;
  color: #ffffff !important;
  text-align: center;
  padding: 12px 5px;
  font-size: 14px;
  font-weight: bold;
  width: 100%;
  transition: background 0.3s ease;
}
.product-btn:hover { background-color: #0a4d85; }

@media only screen and (max-width: 991px) {
  #portfolio .portfolio-item { width: 33.33%; } /* 平板 3 個 */
}

@media only screen and (max-width: 767px) {
  #portfolio .portfolio-filter > li { width: 46%; }
  #portfolio .portfolio-item { width: 50%; } /* 手機 2 個 */
}

/*************************
******* Contact (地圖懸浮) *
**************************/
#contact {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.map-container {
  width: 100%;
  height: 500px;
}

#contact .container-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* 穿透點擊到地圖 */
  z-index: 10;
}

#contact .contact-form {
  background: rgba(255, 255, 255, 0.98);
  padding: 30px;
  margin-top: 60px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  pointer-events: auto; /* 恢復框內點擊功能 */
  border-radius: 5px;
  position: relative;
}

#contact .contact-form h3, 
#contact .contact-form h4 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #053863;
  font-weight: bold;
}

#contact .contact-form p {
  margin-bottom: 15px !important;
  line-height: 1.8;
  color: #333;
}

#contact .contact-form a {
  display: inline-block;
  color: #053863;
  text-decoration: underline;
  cursor: pointer;
  word-break: break-all;
}

#contact .contact-form a:hover {
  color: #0a4d85;
}

@media only screen and (max-width: 767px) {
  .map-container { height: 300px; }
  #contact .container-wrapper {
    position: relative;
    height: auto;
    pointer-events: auto;
  }
  #contact .contact-form {
    margin: 0;
    padding: 30px 15px;
    box-shadow: none;
    border-top: 1px solid #eee;
  }
}

/***********************
********* Footer ******
************************/
#footer {
  padding: 30px 0;
  color: #fff;
  background: #202020;
}
#footer a { color: #fff; }
#footer a:hover { color: #053863; }