/* 加冠工程有限公司網站樣式 */

:root {
  --primary-color: #0056b3;
  --secondary-color: #003a75;
  --accent-color: #e0f0ff;
  --text-color: #333;
  --light-text: #fff;
  --background-color: #fff;
  --footer-bg: #003a75;
  --border-color: #ddd;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 頂部導航欄 */
.header {
  background-color: var(--background-color);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 70px;
  margin-right: 10px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 0;
}

.logo-text span {
  font-size: 0.9rem;
  color: var(--text-color);
}

.contact-info {
  display: none;
}

/* 導航菜單 */
.nav-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

.nav {
  position: fixed;
  top: 80px;
  left: -100%;
  width: 100%;
  height: calc(100vh - 80px);
  background-color: var(--background-color);
  transition: var(--transition);
  z-index: 999;
  overflow-y: auto;
}

.nav.active {
  left: 0;
}

.nav-list {
  list-style: none;
  padding: 20px;
}

.nav-item {
  margin-bottom: 15px;
}

.nav-link {
  display: block;
  padding: 10px;
  color: var(--text-color);
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-color);
}

.nav-link:hover {
  color: var(--primary-color);
}

/* 主要內容區域 */
.main-content {
  margin-top: 80px;
  padding: 20px 0;
}

.section {
  padding: 40px 0;
}

.section-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
}

.section-subtitle {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

/* 首頁樣式 */
.hero {
  background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: var(--light-text);
  padding: 60px 0;
  text-align: center;
  min-height: 100vh; /* 讓英雄區域覆蓋整個屏幕 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 86, 179, 0.85) 0%, rgba(0, 58, 117, 0.85) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--light-text);
  color: var(--primary-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--accent-color);
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 40px;
}

.feature-item {
  background-color: var(--background-color);
  padding: 20px;
  border-radius: 5px;
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.feature-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

/* 工程案例樣式 */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.project-card {
  background-color: var(--background-color);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 20px;
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.project-description {
  margin-bottom: 15px;
}

.project-link {
  display: inline-block;
  color: var(--primary-color);
  font-weight: bold;
}

/* 聯繫我們樣式 */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.contact-info-card {
  background-color: var(--background-color);
  padding: 20px;
  border-radius: 5px;
  box-shadow: var(--shadow);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.contact-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-right: 10px;
  min-width: 20px;
}

.map-container {
  height: 300px;
  border-radius: 5px;
  overflow: hidden;
}

/* 工程報價樣式 */
.quote-section {
    text-align: center;
    padding-top: 20px;
}

.quote-section p {
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: center;
}

.price-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
    border-collapse: collapse;
    box-shadow: var(--shadow);
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
}

.price-table th,
.price-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.price-table th {
    background-color: var(--primary-color);
    color: var(--light-text);
    font-weight: 500;
}

.price-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.price-table tbody tr:hover {
    background-color: var(--accent-color);
}

.price-table td:last-child {
    font-weight: bold;
    color: var(--secondary-color);
}

.quote-button-container {
    text-align: center;
    margin-top: 20px;
}

.quote-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 5px;
    border: none;
}

.quote-btn:hover {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

/* 頁腳樣式 */
.footer {
  background-color: var(--footer-bg);
  color: var(--light-text);
  padding: 40px 0 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 40px;
  margin-right: 10px;
}

.footer-contact {
  margin-bottom: 20px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.footer-icon {
  font-size: 1rem;
  margin-right: 10px;
  min-width: 20px;
}

.footer-nav {
  list-style: none;
}

.footer-nav-item {
  margin-bottom: 10px;
}

.footer-nav-link {
  color: var(--light-text);
}

.footer-nav-link:hover {
  color: var(--accent-color);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
  font-size: 0.9rem;
}

/* 響應式設計 */
@media (min-width: 768px) {
  .header-container {
    padding: 15px 30px;
  }

  .contact-info {
    display: flex;
    align-items: center;
  }

  .contact-item {
    display: flex;
    align-items: center;
    margin-left: 20px;
  }

  .contact-icon {
    font-size: 1rem;
    color: var(--primary-color);
    margin-right: 5px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    height: auto;
    width: auto;
    background: none;
    overflow: visible;
    display: flex;
    justify-content: flex-end;
  }

  .nav-list {
    display: flex;
    padding: 0;
    justify-content: flex-end;
  }

  .nav-item {
    margin: 0 0 0 20px;
    margin-bottom: 0;
  }

  .nav-link {
    padding: 0;
    border: none;
  }

  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-categories {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
  text-align: center;
}

.category-btn {
  display: block;
  padding: 10px 15px;
  background-color: #fff;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  color: var(--primary-color);
  font-weight: bold;
  transition: var(--transition);
}

.category-btn:hover,
.category-btn.active {
  background-color: var(--primary-color);
  color: #fff;
}

/* 平板裝置以上：2 欄 */
@media (min-width: 600px) {
  .project-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 桌面裝置以上：4 欄 */
@media (min-width: 992px) {
  .project-categories {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 圖片畫廊 */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 30px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  cursor: pointer;
}

.gallery-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 56, 179, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  color: var(--light-text);
  text-align: center;
  padding: 0 10px;
}

/* 模態框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1100;
  overflow: auto;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.modal-image {
  display: block;
  max-width: 100%;
  max-height: 90vh;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--light-text);
  font-size: 2rem;
  cursor: pointer;
}

.modal-title {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  color: var(--light-text);
  text-align: center;
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.modal-nav-btn {
  background: none;
  border: none;
  color: var(--light-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
  margin: 0 20px;
}

@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 項目詳情頁面 */
.project-detail {
  padding: 30px 0;
}

.project-detail-header {
  margin-bottom: 30px;
}

.project-detail-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.project-detail-meta-item {
  margin-right: 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.project-detail-meta-icon {
  color: var(--primary-color);
  margin-right: 5px;
}

.project-detail-image {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 30px;
}

.project-detail-content {
  margin-bottom: 30px;
}

.project-detail-section {
  margin-bottom: 30px;
}

.project-detail-section-title {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

/* 語言切換 */
[lang="en"] .zh-content {
  display: none;
}

[lang="zh"] .en-content {
  display: none;
}
