/* TW Start — Taiwan Startup Resource Platform */
/* Brand: Deep Navy #0D1B2A, Electric Teal #00C2CB, Warm White #F8FAFB */

:root {
  --primary: #0D1B2A;
  --primary-mid: #1A3552;
  --teal: #00C2CB;
  --teal-light: #33D4DC;
  --teal-dark: #009CA5;
  --accent: #FF6B35;
  --bg-light: #F8FAFB;
  --bg-card: #FFFFFF;
  --text-dark: #0D1B2A;
  --text-body: #374151;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 10px;
  --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  color: var(--text-body);
  background: var(--bg-light);
  line-height: 1.7;
}

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

a { color: var(--teal-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal); }

/* ── Navbar ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--primary);
  border-bottom: 2px solid var(--teal);
  padding: 0;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav-brand .brand-mark {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-brand .brand-text {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-brand .brand-text span { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(0,194,203,0.15);
  color: var(--teal-light);
}

.nav-cta {
  background: var(--teal) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
  padding: 0.5rem 1rem !important;
}

.nav-cta:hover {
  background: var(--teal-light) !important;
}

#hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.25rem;
}

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--primary);
}

.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,42,0.9) 0%, rgba(13,27,42,0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,194,203,0.15);
  border: 1px solid rgba(0,194,203,0.4);
  color: var(--teal-light);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight { color: var(--teal); }

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 580px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--teal-light);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,194,203,0.35);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff;
}

.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal-light);
  transform: translateY(-1px);
}

/* ── Layout Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section Styles ── */
section { padding: 4rem 0; }

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

.section-tag {
  display: inline-block;
  background: rgba(0,194,203,0.1);
  color: var(--teal-dark);
  border: 1px solid rgba(0,194,203,0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-body { padding: 1.5rem; }

.card-img { width: 100%; height: 200px; object-fit: cover; }

.card-icon {
  width: 48px; height: 48px;
  background: rgba(0,194,203,0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
  text-decoration: none;
  transition: gap 0.2s;
}

.card-link:hover { gap: 0.6rem; color: var(--teal); }

/* ── Grid Systems ── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ── Feature Strip ── */
.feature-strip {
  background: var(--primary);
  color: #fff;
  padding: 3rem 0;
}

.feature-strip .strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.feature-strip .strip-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 0.25rem;
}

.feature-strip .strip-item p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: var(--primary);
  padding: 7rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,194,203,0.08) 0%, transparent 70%);
}

.page-hero-img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
  opacity: 0.2;
}

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

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.page-hero .breadcrumb a { color: rgba(255,255,255,0.6); }
.page-hero .breadcrumb span { color: rgba(255,255,255,0.4); }
.page-hero .breadcrumb .current { color: var(--teal-light); }

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.page-hero .subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 600px;
}

/* ── Article Content (inner pages) ── */
.article-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.article-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.article-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal);
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-mid);
  margin: 1.5rem 0 0.5rem;
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--text-body);
  line-height: 1.8;
  font-size: 1.02rem;
}

.article-content ul, .article-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-body);
  line-height: 1.7;
}

.article-content strong { color: var(--text-dark); }

.article-content a {
  color: var(--teal-dark);
  border-bottom: 1px solid rgba(0,156,165,0.3);
  padding-bottom: 1px;
}

.article-content a:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.article-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  width: 100%;
  box-shadow: var(--shadow-md);
}

/* ── Sidebar Layout ── */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  align-items: start;
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal);
}

.sidebar-widget ul { list-style: none; }

.sidebar-widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-widget li:last-child { border: none; }

.sidebar-widget a {
  color: var(--text-body);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.sidebar-widget a::before {
  content: '›';
  color: var(--teal);
  font-weight: 700;
}

.sidebar-widget a:hover { color: var(--teal-dark); }

/* ── Stat Cards ── */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Alert/Highlight Box ── */
.highlight-box {
  background: rgba(0,194,203,0.06);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.highlight-box p { margin: 0; font-size: 0.95rem; }

/* ── Contact Form ── */
.contact-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-body);
  background: var(--bg-light);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--teal); }

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

/* ── Footer ── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  padding: 0 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand h3 span { color: var(--teal); }

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-light);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--teal-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: var(--teal-light); }

/* ── Tag Chips ── */
.tag {
  display: inline-block;
  background: rgba(0,194,203,0.08);
  color: var(--teal-dark);
  border: 1px solid rgba(0,194,203,0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0.15rem;
}

/* ── 404 Page ── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--primary);
  padding: 2rem;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  color: var(--teal);
  line-height: 1;
  opacity: 0.3;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0.75rem 0;
}

.error-msg {
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--primary);
    padding: 1rem;
    border-top: 1px solid rgba(0,194,203,0.2);
    gap: 0.25rem;
  }
  #hamburger { display: flex; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
