/* ============================================
   DataPro Web - Professional Design System
   Color Scheme:
   - Primary: #0a1628 (Dark Navy Blue)
   - Accent: #3b82f6 (Blue)
   - Background: White
   ============================================ */

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

:root {
  /* Primary Colors - Dark Navy Blue */
  --primary: #0a1628;
  --primary-light: #162337;
  --primary-dark: #050d17;

  /* Accent Colors - Blue */
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;

  /* Semantic Colors */
  --success: #22c55e;
  --success-light: #dcfce7;
  --error: #ef4444;
  --error-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

html {
  height: -webkit-fill-available; /* iOS Safari fix */
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available; /* iOS Safari fix */
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Navigation Bar
   ============================================ */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  background: transparent;
  transition: var(--transition-normal);
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-link-whatsapp {
  color: #25D366;
}

.nav-link-whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
  color: #25D366;
}

.nav-link-webapp {
  color: var(--accent);
}

.nav-link-webapp:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.nav-link-primary {
  color: var(--primary);
}

.nav-link-primary:hover {
  background: rgba(10, 22, 40, 0.1);
  color: var(--primary);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  padding-top: 72px;
}

/* ============================================
   Hero Section (Landing Page)
   ============================================ */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 80px 32px;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px); /* Dynamic viewport height for mobile Safari */
  display: flex;
  align-items: center;
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--white);
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--accent-light);
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero-description {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

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

/* Device Showcase */
.device-showcase {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  position: relative;
}

/* iPad Frame */
.device-ipad {
  position: relative;
  z-index: 1;
  background: #1a1a1a;
  border-radius: 20px;
  padding: 14px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.device-ipad::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: #333;
  border-radius: 50%;
}

.device-ipad img {
  display: block;
  width: 320px;
  height: auto;
  border-radius: 8px;
}

/* iPhone Frame */
.device-iphone {
  position: relative;
  z-index: 2;
  margin-left: -40px;
  margin-bottom: 10px;
  background: #1a1a1a;
  border-radius: 32px;
  padding: 10px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.device-iphone::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background: #0a0a0a;
  border-radius: 12px;
  z-index: 10;
}

.device-iphone img {
  display: block;
  width: 140px;
  height: auto;
  border-radius: 24px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

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

.btn-white:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
}

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

.btn-dark:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10, 22, 40, 0.25);
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
  padding: 100px 32px;
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--gray-600);
  line-height: 1.6;
}

.features-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition-normal);
  border: 1px solid var(--gray-200);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-icon.primary {
  background: rgba(10, 22, 40, 0.1);
  color: var(--primary);
}

.feature-icon.accent {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.feature-card p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: 80px 32px;
  background: var(--primary);
  text-align: center;
}

.cta-container {
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.cta-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 32px;
  text-align: center;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer p {
  font-size: 14px;
  color: var(--gray-400);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  .hero-image {
    order: -1;
  }

  .device-showcase {
    transform: scale(0.9);
  }

  .device-ipad img {
    width: 280px;
  }

  .device-iphone img {
    width: 120px;
  }

  .hero-description {
    margin: 0 auto 40px;
    max-width: 100%;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .nav-links {
    gap: 8px;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 13px;
  }

  .nav-link svg {
    width: 20px;
    height: 20px;
  }

  .hero-section {
    padding: 40px 20px;
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    min-height: -webkit-fill-available; /* iOS Safari fallback */
    align-items: center;
    justify-content: center;
  }

  .hero-container {
    gap: 40px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-description {
    font-size: 16px;
    margin-bottom: 32px;
  }

  .hero-text {
    width: 100%;
    padding: 0;
    align-items: stretch;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .features-section {
    padding: 60px 20px;
  }

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

  .section-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 30px 16px;
  }

  .hero-text {
    width: 100%;
    padding: 0;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: none;
    justify-content: center;
    text-align: center;
    margin-left: 0;
    margin-right: 0;
  }

  .device-showcase {
    transform: scale(0.65);
    margin-bottom: -50px;
    margin-top: -20px;
  }

  .nav-link span {
    display: none;
  }

  .cta-title {
    font-size: 28px;
  }
}
