/* ========================================
   仟鈞國際有限公司 - 自定義樣式表
   配色方案：鮮艷高級食品色（橙/紅）
   ======================================== */

/* === 全局變量定義 === */
:root {
  /* 主色調 - 溫暖橙色，體現食欲與活力 */
  --primary-color: #e85d04;
  --primary-dark: #b34700;
  --primary-light: #ff8a3d;
  
  /* 輔色 - 高級紅色，體現熱情與品質 */
  --secondary-color: #dc2f02;
  --secondary-dark: #a61c00;
  --secondary-light: #ff5733;
  
  /* 中性色 */
  --dark-color: #2c3e50;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  
  /* 字體設置 - 適合繁體中文 */
  --font-family-base: "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "蘋方-繁", 
                      "Heiti TC", "黑體-繁", sans-serif;
}

/* === 基礎樣式重置 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-base);
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--white);
  overflow-x: hidden;
}

/* === 導航欄樣式 === */
.navbar {
  background-color: var(--primary-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background-color: var(--primary-dark) !important;
  padding: 0.5rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand i {
  font-size: 1.8rem;
  color: var(--secondary-light);
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.2rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white) !important;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 80%;
}

/* === 輪播圖樣式 === */
.carousel {
  margin-bottom: 0;
}

.carousel-item {
  /* height: 600px; */
  /* background-color: #000; */
}

.carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  opacity: 0.7;
}

.carousel-caption {
  bottom: 30%;
  text-align: center;
}

.carousel-caption h5 {
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

.carousel-caption p {
  font-size: 1.3rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--primary-color);
  border-radius: 50%;
  padding: 2rem;
}

/* === 區塊通用樣式 === */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.section-title p {
  font-size: 1.1rem;
  color: #6c757d;
  margin-top: 1.5rem;
}

/* === 卡片樣式 === */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.card-text {
  color: #6c757d;
  line-height: 1.7;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 95, 122, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* === 服務特色樣式 === */
.feature-box {
  text-align: center;
  padding: 2rem;
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-box i {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-box h4 {
  font-size: 1.3rem;
  color: var(--dark-color);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.feature-box p {
  color: #6c757d;
  line-height: 1.7;
}

/* === 客戶評價樣式 === */
.testimonial-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin: 1rem;
  text-align: center;
}

.testimonial-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.testimonial-card .stars {
  color: #ffc107;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.testimonial-card blockquote {
  font-style: italic;
  color: #6c757d;
  margin-bottom: 1rem;
}

.testimonial-card cite {
  font-weight: 600;
  color: var(--primary-color);
  font-style: normal;
}

/* === 頁腳樣式 === */
.footer {
  background-color: var(--dark-color);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer h5 {
  color: var(--secondary-light);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.footer a:hover {
  color: var(--secondary-light);
  padding-left: 5px;
}

.footer i {
  margin-right: 0.5rem;
  width: 20px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* === 頁面標題區域 === */
.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  padding: 4rem 0;
  color: var(--white);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* === 產品篩選按鈕 === */
.filter-btn {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  margin: 0.3rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
}

/* === 聯繫表單樣式 === */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 95, 122, 0.1);
}

.contact-info-box {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.contact-info-box i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info-box h4 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.contact-info-box p {
  color: #6c757d;
}

/* === 時間軸樣式（公司歷史）=== */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background-color: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-content {
  width: 45%;
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* === 模態框樣式 === */
.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.btn-close {
  filter: brightness(0) invert(1);
}

/* === 響應式設計優化 === */
@media (max-width: 992px) {
  .carousel-item {
    height: 400px;
  }
  
  .carousel-caption h5 {
    font-size: 2rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
  }
  
  .timeline-dot {
    left: 20px;
  }
}

@media (max-width: 768px) {
  .carousel-item {
    height: 300px;
  }
  
  .carousel-caption h5 {
    font-size: 1.5rem;
  }
  
  .carousel-caption p {
    font-size: 1rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
}

/* === 動畫效果 === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* === 圖片懸停效果 === */
.hover-zoom {
  overflow: hidden;
  border-radius: 12px;
}

.hover-zoom img {
  transition: transform 0.3s ease;
}

.hover-zoom:hover img {
  transform: scale(1.1);
}

/* === 加載動畫 === */
.loading {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 5px solid rgba(26, 95, 122, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
