/* PROFOAM 網站全域樣式 */

/* ===== 基礎設定 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 顏色配置 - 可在此修改網站配色 */
  --primary-color: #003366;        /* 主色調（深藍色）*/
  --accent-color: #FF5722;         /* 強調色（橘紅色）*/
  --text-color: #333333;           /* 文字顏色 */
  --bg-color: #FFFFFF;             /* 背景顏色 */
  --light-bg: #F5F5F5;             /* 淺色背景 */
  --border-color: #E0E0E0;         /* 邊框顏色 */
  
  /* 字體設定 */
  --font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  font-size: 16px;
}

/* ===== 通用樣式 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

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

/* ===== 標題樣式 ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ===== 網站標頭 ===== */
.site-header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
  height: 50px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: var(--light-bg);
  color: var(--accent-color);
}

/* ===== Hero 區塊 ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #004080 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* ===== 按鈕樣式 ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: #E64A19;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--primary-color);
}

/* ===== 內容區塊 ===== */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.125rem;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
}

/* ===== 卡片樣式 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
  margin-bottom: 1rem;
}

.card ul {
  list-style: none;
  margin: 1rem 0;
}

.card li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* ===== 網站頁尾 ===== */
.site-footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
}

/* ===== 麵包屑導航 ===== */
.breadcrumb {
  padding: 1rem 0;
  background-color: var(--light-bg);
}

.breadcrumb ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb li::after {
  content: '/';
  margin-left: 0.5rem;
  color: #999;
}

.breadcrumb li:last-child::after {
  content: '';
}

/* ===== 表格樣式 ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--light-bg);
  font-weight: 600;
  color: var(--primary-color);
}

tr:hover {
  background-color: var(--light-bg);
}

/* ===== 表單樣式 ===== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ===== 實用工具類別 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.bg-light { background-color: var(--light-bg); }
