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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  color: #333;
  background: #f8f9fc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* ===== CSS Variables ===== */
:root {
  --primary: #4361a6;
  --primary-light: #5b7cc9;
  --primary-dark: #2c4480;
  --accent: #6b8dd6;
  --bg-light: #eef2fa;
  --bg-card: #ffffff;
  --text-dark: #2c3e50;
  --text-body: #4a5568;
  --text-muted: #718096;
  --border-color: #d6dff2;
  --gradient-start: #c7d5f0;
  --gradient-end: #e8edf8;
  --section-padding: 60px 0;
  --container-width: 1100px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(67, 97, 166, 0.1);
  --shadow-card: 0 4px 20px rgba(67, 97, 166, 0.12);
}

/* ===== Container ===== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Top Bar / Navbar ===== */
.navbar {
  background: #fff;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.navbar__logo img {
  height: 36px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar__title {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 60%, #f8f9fc 100%);
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23f8f9fc' d='M0,60 C360,100 720,20 1440,60 L1440,100 L0,100 Z'/%3E%3C/svg%3E");
  background-size: cover;
}

.hero__subtitle {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 500;
}

.hero__title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.hero__buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 97, 166, 0.3);
}

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

.btn--outline:hover {
  background: var(--bg-light);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 8px 20px;
  font-size: 13px;
}

.hero__downloads {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero__download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50px;
  font-size: 13px;
  color: var(--primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.hero__download-link:hover {
  background: #fff;
  box-shadow: var(--shadow);
}

/* ===== Section Common ===== */
.section {
  padding: var(--section-padding);
}

.section__title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 40px;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== Cards Section (申請對象與受理期間) ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card__icon {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__icon svg {
  width: 64px;
  height: 64px;
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.card__desc {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 20px;
  flex: 1;
  line-height: 1.7;
}

.card__btn {
  display: inline-block;
  padding: 8px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.card__btn:hover {
  background: var(--primary-dark);
}

/* ===== Info Section (申請資格與開班規格) ===== */
.info-section {
  background: var(--bg-light);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.info-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.info-block__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-list__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
}

.info-list__item::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ===== Documents Section (申請應備資料) ===== */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.docs-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.docs-block__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.docs-list__item {
  font-size: 14px;
  color: var(--text-body);
  padding-left: 20px;
  position: relative;
  line-height: 1.7;
}

.docs-list__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.docs-list__item--sub {
  padding-left: 36px;
  font-size: 13px;
  color: var(--text-muted);
}

.docs-list__item--sub::before {
  left: 20px;
  width: 4px;
  height: 4px;
  background: var(--text-muted);
}

/* ===== Process Section (申請流程) ===== */
.process-section {
  background: var(--bg-light);
}

.process-steps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
  padding: 0 12px;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 32px;
  right: -10%;
  width: 50%;
  height: 2px;
  background: var(--border-color);
}

.process-step__icon {
  width: 64px;
  height: 64px;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.process-step__icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.process-step__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.process-step__desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Form Section (線上申請表單) ===== */
.form-section {
  background: var(--bg-light);
  padding-bottom: 80px;
}

.form-section .section__desc {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: -28px;
  margin-bottom: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.form-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
}

.form-block__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.form-block__header-icon {
  color: var(--primary);
}

.form-block__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.form-group {
  margin-bottom: 18px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-label .required {
  color: #e53e3e;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-body);
  background: #fff;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 166, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #b0b8c9;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-file-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-light);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-file-btn:hover {
  background: #dde5f5;
  border-color: var(--primary);
}

.form-file-name {
  font-size: 13px;
  color: var(--text-muted);
}

.form-submit-row {
  text-align: center;
  margin-top: 32px;
}

.form-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.7;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
.footer {
  background: var(--primary-dark);
  color: #c5d3ec;
  padding: 32px 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__logo img {
  height: 28px;
  filter: brightness(0) invert(1);
}

.footer__info {
  font-size: 13px;
  text-align: right;
}

.footer__info p {
  margin-bottom: 4px;
}

.footer__info a {
  color: #a8bfe0;
  text-decoration: underline;
}

.footer__info a:hover {
  color: #fff;
}

/* ===== Robot Mascot (SVG Placeholder) ===== */
.mascot-icon {
  width: 80px;
  height: 80px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    flex-wrap: wrap;
    gap: 24px;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 40px 0;
  }

  .navbar__title {
    font-size: 12px;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .hero__title {
    font-size: 28px;
  }

  .hero__subtitle {
    font-size: 14px;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero__downloads {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .info-grid,
  .docs-grid,
  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .info-block,
  .docs-block,
  .form-block {
    padding: 24px 20px;
  }

  .section__title {
    font-size: 20px;
    margin-bottom: 28px;
  }

  .process-steps {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .process-step {
    flex-direction: row;
    text-align: left;
    gap: 16px;
    width: 100%;
    max-width: 320px;
    padding: 0;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }

  .process-step__icon {
    margin-bottom: 0;
    min-width: 56px;
    width: 56px;
    height: 56px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer__info {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 24px;
  }

  .btn {
    padding: 10px 24px;
    font-size: 14px;
  }
}

/* ===== Accessibility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .hero__buttons,
  .hero__downloads,
  .form-section {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section {
    padding: 20px 0;
  }
}
