/*
Theme Name: ADC Metal Tech
Theme URI: https://www.adc-metal.com
Description: 精密壓鑄科技公司企業網站主題，採用銳角幾何現代主義設計風格
Version: 1.2.0
Author: ADC Metal Tech
Author URI: https://www.adc-metal.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adc-metal-tech
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ============================================
   Google Fonts: Poppins (標題) + Inter (正文)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   CSS 變數定義 - ADC Metal Tech 色彩系統
   主色：鈷藍 (#0F4C8E)
   輔色：木炭灰 (#2C3E50)
   強調色：銀色 (#E8E8E8)
   ============================================ */
:root {
  --adc-primary: #0F4C8E;
  --adc-primary-foreground: #FFFFFF;
  --adc-secondary: #2C3E50;
  --adc-secondary-foreground: #FFFFFF;
  --adc-background: #FFFFFF;
  --adc-foreground: #1F2937;
  --adc-card: #FFFFFF;
  --adc-card-foreground: #1F2937;
  --adc-muted: #E8E8E8;
  --adc-muted-foreground: #6B7280;
  --adc-border: #D1D5DB;
  --adc-input: #F3F4F6;
  --adc-radius: 0.5rem;
  --adc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --adc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --adc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --adc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============================================
   全局樣式
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--adc-border);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--adc-background);
  color: var(--adc-foreground);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.875rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

h5, h6 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--adc-primary);
  text-decoration: none;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

button, input[type="button"], input[type="submit"] {
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* ============================================
   容器與佈局
   ============================================ */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1280px;
  }
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.col {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333%; }
.col-3 { width: 25%; }

@media (max-width: 768px) {
  .col-md-6 { width: 100%; }
  .col-md-4 { width: 100%; }
  .col-md-3 { width: 100%; }
  
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* ============================================
   按鈕樣式
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--adc-radius);
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--adc-shadow-lg);
}

.btn-primary {
  background-color: var(--adc-primary);
  color: var(--adc-primary-foreground);
}

.btn-primary:hover {
  background-color: #0a3a6e;
}

.btn-secondary {
  background-color: var(--adc-secondary);
  color: var(--adc-secondary-foreground);
}

.btn-secondary:hover {
  background-color: #1f2937;
}

.btn-outline {
  background-color: transparent;
  color: var(--adc-primary);
  border: 2px solid var(--adc-primary);
}

.btn-outline:hover {
  background-color: var(--adc-primary);
  color: var(--adc-primary-foreground);
}

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

.btn-white:hover {
  background-color: #f3f4f6;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ============================================
   卡片組件
   ============================================ */
.card {
  background-color: var(--adc-card);
  color: var(--adc-card-foreground);
  border: 2px solid var(--adc-border);
  border-radius: var(--adc-radius);
  padding: 1.5rem;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: var(--adc-primary);
  box-shadow: var(--adc-shadow-lg);
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--adc-border);
}

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

.card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--adc-border);
}

/* ============================================
   徽章組件
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background-color: var(--adc-primary);
  color: var(--adc-primary-foreground);
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--adc-foreground);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--adc-border);
  border-radius: var(--adc-radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background-color: var(--adc-input);
  color: var(--adc-foreground);
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--adc-primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 142, 0.1);
}

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

/* ============================================
   Header 導覽列
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: white;
  border-bottom: 1px solid var(--adc-border);
  box-shadow: var(--adc-shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
  padding: 0 1rem;
}

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

.logo img {
  height: 2.5rem;
  width: auto;
}

.logo-text {
  display: none;
}

@media (min-width: 640px) {
  .logo-text {
    display: flex;
    flex-direction: column;
  }
  
  .logo-text h1 {
    font-size: 1rem;
    margin: 0;
  }
  
  .logo-text p {
    font-size: 0.75rem;
    color: var(--adc-muted-foreground);
    margin: 0;
  }
}

nav {
  display: none;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  nav {
    display: flex;
  }
}

nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--adc-foreground);
  transition: color 200ms;
}

nav a:hover {
  color: var(--adc-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

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

.mobile-menu {
  display: none;
  border-top: 1px solid var(--adc-border);
  padding: 1rem 0;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--adc-foreground);
  transition: background-color 150ms;
}

.mobile-menu a:hover {
  background-color: var(--adc-muted);
}

/* ============================================
   Footer 頁腳
   ============================================ */
footer {
  background-color: var(--adc-foreground);
  color: white;
  padding: 4rem 0;
}

footer h3, footer h4 {
  color: white;
  margin-bottom: 1rem;
}

footer p, footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

footer a:hover {
  color: white;
}

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

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 2rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* ============================================
   Hero 區塊
   ============================================ */
.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 6rem 1rem;
  color: white;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 76, 142, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

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

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
  .hero {
    padding: 8rem 2rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
}

/* ============================================
   Section 區塊
   ============================================ */
section {
  padding: 5rem 1rem;
}

@media (min-width: 768px) {
  section {
    padding: 7rem 2rem;
  }
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--adc-foreground);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--adc-muted-foreground);
  margin-bottom: 3rem;
}

/* ============================================
   網格系統
   ============================================ */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

/* ============================================
   動畫效果
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDiagonal {
  from {
    opacity: 0;
    transform: translate(-30px, 30px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.animate-fade-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-slide-diagonal {
  animation: slideInDiagonal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================
   銳角幾何設計元素
   ============================================ */
.sharp-edge-top {
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
}

.sharp-edge-bottom {
  clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
}

.diagonal-divider {
  position: relative;
  overflow: hidden;
}

.diagonal-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 48%, var(--adc-primary) 48%, var(--adc-primary) 52%, transparent 52%);
  opacity: 0.1;
}

.metal-texture {
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F4F6 50%, #E8E8E8 100%);
  background-size: 200% 200%;
}

.gradient-text {
  background: linear-gradient(135deg, var(--adc-primary) 0%, var(--adc-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   產品卡片
   ============================================ */
.product-card {
  perspective: 1000px;
  transition: all 300ms ease-out;
}

.product-card:hover {
  box-shadow: var(--adc-shadow-xl);
  transform: rotateY(-5deg) rotateX(2deg) translateZ(20px);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--adc-radius) var(--adc-radius) 0 0;
  transition: transform 300ms;
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

/* ============================================
   實用工具類
   ============================================ */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.flex {
  display: flex;
}

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

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

.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.w-full {
  width: 100%;
}

.max-w-3xl {
  max-width: 48rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* ============================================
   WordPress 特定樣式
   ============================================ */
.wp-block-image {
  margin: 1.5rem 0;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--adc-radius);
}

.aligncenter {
  text-align: center;
}

.alignleft {
  float: left;
  margin-right: 1rem;
}

.alignright {
  float: right;
  margin-left: 1rem;
}

.wp-caption {
  background-color: var(--adc-muted);
  padding: 0.5rem;
  border-radius: var(--adc-radius);
  margin: 1rem 0;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--adc-muted-foreground);
}

/* ============================================
   回應式設計
   ============================================ */
@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  
  .show-mobile {
    display: block;
  }
  
  h1 {
    font-size: 1.875rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  section {
    padding: 3rem 1rem;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none;
  }
  
  .show-desktop {
    display: block;
  }
}
