/* ============================================================
   學車天使 APASS - 全站主樣式
   Colors: White #ffffff | Primary #4245a4 | Accent #94c6ff
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --primary: #4245a4;
  --primary-dark: #33367d;
  --primary-light: #5558b8;
  --accent: #94c6ff;
  --accent-light: #c4e0ff;
  --accent-dark: #6aafff;
  --white: #ffffff;
  --bg: #f7f9fc;
  --bg-alt: #eef3fa;
  --text: #2c2c3a;
  --text-light: #6b6b80;
  --text-muted: #9999ad;
  --border: #dde3ed;
  --shadow-sm: 0 1px 3px rgba(66,69,164,0.08);
  --shadow-md: 0 4px 12px rgba(66,69,164,0.10);
  --shadow-lg: 0 8px 30px rgba(66,69,164,0.12);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.25s ease;
  --font-main: "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --font-heading: "Noto Sans TC", "PingFang HK", sans-serif;
  --container: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
ul, ol { list-style: none; }

/* --- Container --- */
.container {
  width: 92%;
  max-width: var(--container);
  margin: 0 auto;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: 2.4rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-accent {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: all var(--transition);
}
.btn-cta:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white) !important;
}
.btn-whatsapp {
  background: #25d366;
  color: var(--white);
}
.btn-whatsapp:hover {
  background: #1fb855;
  color: var(--white);
  transform: translateY(-2px);
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.main-nav .logo img {
  height: 44px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu > li > a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  color: var(--primary);
  background: var(--bg-alt);
}

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  color: var(--text);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.dropdown-menu li a:hover {
  background: var(--bg-alt);
  color: var(--primary);
  padding-left: 24px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.mobile-toggle:hover {
  background: var(--bg-alt);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: var(--accent);
  opacity: 0.08;
  border-radius: 50%;
}
.hero h1 {
  color: var(--white);
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
}
.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
}
.hero .btn-accent {
  font-size: 1.1rem;
  padding: 14px 36px;
}
.hero-badges {
  display: flex;
  gap: 16px;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
}

/* ============================================================
   SECTION LAYOUTS
   ============================================================ */
section {
  padding: 70px 0;
}
section:nth-child(even) {
  background: var(--bg);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  position: relative;
  display: inline-block;
}
.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 12px auto 0;
}
.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* --- Cards Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.card-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  color: var(--primary);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-light); font-size: 0.95rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}
.card-link:hover { gap: 8px; }

/* --- Feature Row --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 60px;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.feature-list {
  margin-top: 1rem;
}
.feature-list li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: var(--text-light);
}
.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* --- Price Table --- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.price-table thead {
  background: var(--primary);
  color: var(--white);
}
.price-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
}
.price-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.price-table tbody tr:hover {
  background: var(--bg-alt);
}
.price-highlight {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.comparison-table th,
.comparison-table td {
  padding: 14px 18px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.comparison-table thead th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}
.comparison-table tbody tr:hover {
  background: var(--bg-alt);
}

/* --- Steps / Process --- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  text-align: center;
  padding: 28px 20px;
  position: relative;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 auto 16px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--text-light); font-size: 0.9rem; }

/* --- Testimonials --- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
}
.testimonial-stars {
  color: #ffc107;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.testimonial p {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 16px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
}
.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.testimonial-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.faq-question:hover {
  color: var(--primary);
  background: var(--bg);
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform var(--transition);
}
.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-light);
  line-height: 1.8;
}
.faq-item.active .faq-answer {
  max-height: 500px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  text-align: center;
  padding: 60px 0;
  border-radius: 0;
}
.cta-banner h2 {
  color: var(--white);
  margin-bottom: 1rem;
}
.cta-banner p {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-light);
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb span {
  margin: 0 6px;
  color: var(--border);
}

/* --- Page Header (Inner Pages) --- */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 50px 0;
  text-align: center;
}
.page-header h1 {
  color: var(--white);
  font-size: 2.2rem;
}
.page-header p {
  opacity: 0.85;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

/* --- Tags / Badges --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-alt);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}
.tag-accent {
  background: var(--accent-light);
  color: var(--primary-dark);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-main);
  transition: border-color var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(66,69,164,0.1);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent-dark); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}
