
/* === 基礎設定 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang HK', 'Microsoft JhengHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.8;
  color: #333;
  background-color: #f8f9fa;
  font-size: 16px;
}

/* === 容器 === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* === 緊急橫幅 === */
.emergency-banner {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 20px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(220,53,69,0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

.emergency-banner h2 {
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 700;
}

.emergency-contact {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #dc3545;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  background: #fff5f5;
}

.contact-btn svg {
  width: 20px;
  height: 20px;
}

/* === 標題區域 === */
.header-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 40px;
  border-radius: 0 0 30px 30px;
}

.header-section h1 {
  font-size: 42px;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header-meta {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 14px;
  opacity: 0.95;
}

.header-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === 主要內容區 === */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  margin-top: 40px;
}

.main-content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* === 目錄 === */
.table-of-contents {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 40px;
  border-left: 4px solid #667eea;
}

.table-of-contents h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #667eea;
}

.table-of-contents ul {
  list-style: none;
}

.table-of-contents li {
  margin-bottom: 10px;
}

.table-of-contents a {
  color: #495057;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
}

.table-of-contents a:hover {
  background: white;
  color: #667eea;
  padding-left: 20px;
}

/* === 側邊欄 === */
.sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.sidebar-widget {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  margin-bottom: 25px;
}

.sidebar-widget h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #667eea;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.quick-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 14px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(102,126,234,0.3);
}

.quick-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102,126,234,0.4);
}

.quick-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.quick-info p {
  margin-bottom: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === 內容區段 === */
.content-section {
  margin-bottom: 50px;
  scroll-margin-top: 120px;
}

.content-section h2 {
  font-size: 32px;
  color: #2c3e50;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #667eea;
  font-weight: 700;
}

.content-section h3 {
  font-size: 24px;
  color: #34495e;
  margin: 30px 0 20px;
  font-weight: 600;
}

.content-section h4 {
  font-size: 20px;
  color: #495057;
  margin: 25px 0 15px;
  font-weight: 600;
}

.content-section p {
  margin-bottom: 20px;
  text-align: justify;
  color: #555;
}

.content-section ul, .content-section ol {
  margin: 20px 0;
  padding-left: 25px;
}

.content-section li {
  margin-bottom: 12px;
  color: #555;
  line-height: 1.8;
}

/* === 資訊卡片 === */
.info-card {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left: 5px solid #2196f3;
  padding: 25px;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(33,150,243,0.1);
}

.warning-card {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
  border-left: 5px solid #ffc107;
  padding: 25px;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(255,193,7,0.1);
}

.danger-card {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
  border-left: 5px solid #dc3545;
  padding: 25px;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(220,53,69,0.1);
}

.success-card {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-left: 5px solid #28a745;
  padding: 25px;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(40,167,69,0.1);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === 表格樣式 === */
.responsive-table {
  width: 100%;
  overflow-x: auto;
  margin: 30px 0;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

th {
  padding: 18px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
}

td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  color: #555;
}

tbody tr:hover {
  background: #f8f9fa;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* === 列表增強 === */
.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  padding-left: 35px;
  position: relative;
  margin-bottom: 15px;
}

.checklist li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
  font-size: 20px;
}

.numbered-list {
  counter-reset: item;
  list-style: none;
  padding-left: 0;
}

.numbered-list li {
  counter-increment: item;
  padding-left: 45px;
  position: relative;
  margin-bottom: 20px;
}

.numbered-list li:before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

/* === FAQ區塊 === */
.faq-section {
  margin: 50px 0;
}

.faq-item {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102,126,234,0.1);
}

.faq-question {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px 25px;
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 25px;
  color: #555;
  line-height: 1.8;
  border-top: 1px solid #e9ecef;
}

/* === CTA區塊 === */
.cta-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 50px 40px;
  border-radius: 20px;
  text-align: center;
  margin: 50px 0;
  box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.cta-section h2 {
  font-size: 32px;
  margin-bottom: 20px;
  border: none;
  color: white;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: #667eea;
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.cta-btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.cta-btn-secondary:hover {
  background: white;
  color: #667eea;
}

/* === 響應式設計 === */
@media (max-width: 992px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    order: -1;
  }
  
  .header-section h1 {
    font-size: 32px;
  }
  
  .content-section h2 {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .main-content {
    padding: 25px 20px;
  }
  
  .header-section {
    padding: 40px 20px;
  }
  
  .header-section h1 {
    font-size: 28px;
  }
  
  .header-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .emergency-banner h2 {
    font-size: 20px;
  }
  
  .emergency-contact {
    flex-direction: column;
    gap: 12px;
  }
  
  .contact-btn, .cta-btn {
    width: 100%;
    justify-content: center;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .responsive-table {
    font-size: 14px;
  }
  
  th, td {
    padding: 12px 10px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  
  .header-section h1 {
    font-size: 24px;
  }
  
  .content-section h2 {
    font-size: 22px;
  }
  
  .content-section h3 {
    font-size: 20px;
  }
  
  .numbered-list li:before {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .numbered-list li {
    padding-left: 40px;
  }
}

/* === 打印樣式 === */
@media print {
  .emergency-banner,
  .sidebar,
  .cta-section,
  .table-of-contents {
    display: none;
  }
  
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .main-content {
    box-shadow: none;
    padding: 0;
  }
  
  body {
    background: white;
  }
  
  a {
    color: #000;
    text-decoration: none;
  }
}

/* === 可訪問性增強 === */
:focus {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* === 動畫效果 === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* === 圖片優化 === */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.image-caption {
  text-align: center;
  font-size: 14px;
  color: #6c757d;
  margin-top: 10px;
  font-style: italic;
}
