/* ============================================
   BSC ECOLAB - Unified Apple Style Design System
   Website + Online System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   Root Variables
   ============================================ */

:root {
  --primary-blue: #0071e3;
  --primary-blue-dark: #0055cc;
  --primary-blue-light: #e8f0ff;
  --neutral-50: #fbfbfd;
  --neutral-100: #f5f5f7;
  --neutral-200: #e5e5e7;
  --neutral-300: #d2d2d7;
  --neutral-400: #a1a1a6;
  --neutral-500: #86868b;
  --neutral-600: #6e6e73;
  --neutral-700: #424245;
  --neutral-800: #1d1d1f;
  --green-100: #d1fae5;
  --green-600: #059669;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --cyan-100: #cffafe;
  --cyan-600: #0891b2;
  --yellow-100: #fef3c7;
  --yellow-600: #d97706;
  --purple-100: #f3e8ff;
  --purple-600: #9333ea;
  --red-100: #fee2e2;
  --red-600: #dc2626;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--neutral-50);
  color: var(--neutral-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; line-height: 1.2; }
h2 { font-size: 2.25rem; line-height: 1.3; }
h3 { font-size: 1.875rem; line-height: 1.3; }
h4 { font-size: 1.5rem; line-height: 1.4; }
p { font-size: 1rem; line-height: 1.6; }

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-blue-dark);
}

/* ============================================
   Navigation
   ============================================ */

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.nav-logo:hover {
  color: var(--primary-blue-dark);
}

.nav-menu {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav-menu a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.nav-menu a:hover {
  color: var(--primary-blue);
  background-color: var(--primary-blue-light);
}

.nav-menu a.active {
  color: var(--primary-blue);
  background-color: var(--primary-blue-light);
}

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

/* ============================================
   Container & Layout
   ============================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.5rem; }
}

.hero-section {
  padding: 5rem 0;
}

.section-spacing {
  padding: 4rem 0;
}

/* ============================================
   Cards & Components
   ============================================ */

.card {
  background-color: white;
  border-radius: 1rem;
  border: 1px solid var(--neutral-200);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.card h3 {
  margin-bottom: 1rem;
  color: var(--neutral-800);
}

.card p {
  color: var(--neutral-600);
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.card-icon.green {
  background-color: var(--green-100);
  color: var(--green-600);
}

.card-icon.blue {
  background-color: var(--blue-100);
  color: var(--blue-600);
}

.card-icon.purple {
  background-color: var(--purple-100);
  color: var(--purple-600);
}

.card-icon.cyan {
  background-color: var(--cyan-100);
  color: var(--cyan-600);
}

.card-icon.yellow {
  background-color: var(--yellow-100);
  color: var(--yellow-600);
}

/* ============================================
   Grid Layouts
   ============================================ */

.grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

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

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

/* ============================================
   Buttons
   ============================================ */

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-blue-dark);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
  background-color: var(--primary-blue-light);
}

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

/* ============================================
   Forms
   ============================================ */

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--neutral-700);
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--neutral-200);
  border-radius: 0.75rem;
  background-color: white;
  color: var(--neutral-800);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px var(--primary-blue-light);
}

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

/* ============================================
   Footer
   ============================================ */

footer {
  background-color: var(--neutral-800);
  color: white;
  padding: 4rem 0;
  margin-top: 5rem;
}

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

footer h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

footer p, footer li {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.8;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
  color: white;
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: 0.5rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Utilities
   ============================================ */

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

.text-primary {
  color: var(--primary-blue);
}

.text-muted {
  color: var(--neutral-600);
}

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

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

.hidden {
  display: none;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Hero Sections
   ============================================ */

.hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #f0fdf4 100%);
  text-align: center;
  padding: 5rem 0;
}

.hero h1 {
  margin-bottom: 1.5rem;
  color: var(--neutral-800);
}

.hero p {
  font-size: 1.25rem;
  color: var(--neutral-600);
  margin-bottom: 2rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0055cc 100%);
  color: white;
  text-align: center;
  padding: 4rem 0;
  border-radius: 1rem;
  margin: 4rem 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

/* ============================================
   System Styles
   ============================================ */

.system-hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #e8f0ff 100%);
  padding: 3rem 0;
  text-align: center;
}

.system-hero h1 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.system-hero p {
  color: var(--neutral-600);
  font-size: 1.1rem;
}

.system-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid var(--neutral-200);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

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

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

.stat-box {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  border-radius: 0.75rem;
  border: 1px solid var(--neutral-200);
}

.stat-box h3 {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.stat-box p {
  font-size: 0.875rem;
  color: var(--neutral-600);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: white;
    border-bottom: 1px solid var(--neutral-200);
    padding: 1rem 0;
    gap: 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero-section {
    padding: 3rem 0;
  }

  .section-spacing {
    padding: 2rem 0;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

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