/**
 * 聲音浮水印 - 專屬樣式表
 * Audio Watermark Custom Styles
 * Version: 1.0
 */

/* ===========================
   CSS Variables
   =========================== */
:root {
  --watermark-primary: #0066cc;
  --watermark-secondary: #0099e6;
  --watermark-accent: #00c4cc;
  --watermark-dark: #1a365d;
  --watermark-light: #f7fafc;
  --watermark-gray: #4a5568;
  --watermark-gray-light: #e2e8f0;
  
  --gradient-primary: linear-gradient(135deg, #0066cc 0%, #0099e6 100%);
  --gradient-hero: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #3182ce 100%);
  --gradient-accent: linear-gradient(135deg, #0099e6 0%, #00c4cc 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px rgba(0, 102, 204, 0.1);
  --shadow-card-hover: 0 8px 30px rgba(0, 102, 204, 0.2);
  
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Breadcrumbs Override
   =========================== */
/* 參考 advtech.cht.com.tw/q42web 做法：使用 fixed 定位 */
section#breadcrumbs {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin-top: 78px !important; /* header 高度 */
  padding: 12px 0 !important;
  min-height: 40px !important;
  background: hsla(0, 0%, 100%, 0.95) !important;
  z-index: 996 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid #eee !important;
}

/* ===========================
   Hero Section
   =========================== */
.hero-watermark {
  position: relative;
  background: var(--gradient-hero);
  padding: 100px 0 80px;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 153, 230, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 196, 204, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 102, 204, 0.1) 0%, transparent 60%);
  animation: patternMove 20s ease-in-out infinite;
}

@keyframes patternMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-10px, 10px) scale(1.02); }
  50% { transform: translate(10px, -10px) scale(1); }
  75% { transform: translate(-5px, -5px) scale(1.01); }
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 50px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge .badge-icon {
  color: var(--watermark-accent);
  font-size: 20px;
}

.hero-badge .badge-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
}

.hero-title .highlight-wave {
  display: block;
  width: 200px;
  height: 20px;
  margin-top: 8px;
  color: var(--watermark-accent);
}

.hero-title .highlight-wave svg {
  width: 100%;
  height: 100%;
}

.hero-title .highlight-wave path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawWave 2s ease forwards 0.5s;
}

@keyframes drawWave {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary-watermark,
.btn-secondary-watermark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary-watermark {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 196, 204, 0.4);
}

.btn-primary-watermark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 196, 204, 0.5);
  color: #fff;
}

.btn-secondary-watermark {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary-watermark:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

/* Waveform Animation */
.waveform-animation {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-xl);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.wave-bar {
  width: 8px;
  height: 60px;
  background: var(--gradient-accent);
  border-radius: 4px;
  animation: waveAnimation 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; height: 40px; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 60px; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 80px; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 100px; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; height: 120px; }
.wave-bar:nth-child(6) { animation-delay: 0.5s; height: 100px; }
.wave-bar:nth-child(7) { animation-delay: 0.6s; height: 80px; }
.wave-bar:nth-child(8) { animation-delay: 0.7s; height: 60px; }
.wave-bar:nth-child(9) { animation-delay: 0.8s; height: 40px; }
.wave-bar:nth-child(10) { animation-delay: 0.9s; height: 50px; }

@keyframes waveAnimation {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

.watermark-icon-float {
  position: absolute;
  bottom: -20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 102, 204, 0.4);
  animation: floatIcon 3s ease-in-out infinite;
}

.watermark-icon-float i {
  font-size: 40px;
  color: #fff;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Hero Wave */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* ===========================
   Section Styles
   =========================== */
.section-header {
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  background: var(--gradient-primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--watermark-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--watermark-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ===========================
   Introduction Section
   =========================== */
.introduction-section {
  padding: 80px 0;
  background: #fff;
}

.intro-card {
  background: var(--gradient-card);
  border-radius: var(--border-radius-xl);
  padding: 50px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 40px;
  align-items: flex-start;
  border: 1px solid var(--watermark-gray-light);
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

.intro-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.intro-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

.intro-icon i {
  font-size: 40px;
  color: #fff;
}

.intro-content {
  flex: 1;
}

.intro-text {
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--watermark-gray);
  margin-bottom: 24px;
}

.intro-text strong {
  color: var(--watermark-dark);
}

.intro-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 102, 204, 0.1);
  color: var(--watermark-primary);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.feature-tag i {
  color: var(--watermark-accent);
}

/* ===========================
   Demo Video Section
   =========================== */
.demo-section {
  padding: 80px 0;
  background: var(--watermark-light);
}

.video-container {
  position: relative;
  width: 100%;
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.video-placeholder {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
}

/* 當有影片時，隱藏背景並顯示影片 */
.video-placeholder video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
}

.placeholder-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.play-icon {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition);
  cursor: pointer;
}

.play-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.play-icon i {
  font-size: 48px;
  margin-left: 8px;
}

.placeholder-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.placeholder-content p {
  font-size: 1rem;
  opacity: 0.8;
}

/* Video iframe/video styles when content is added */
.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===========================
   Applications Section
   =========================== */
.applications-section {
  padding: 100px 0;
  background: #fff;
}

.application-card {
  position: relative;
  background: #fff;
  border-radius: var(--border-radius-xl);
  padding: 40px;
  height: 100%;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--watermark-gray-light);
  transition: var(--transition);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.application-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.application-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--watermark-primary);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.25);
}

.card-icon.accent {
  background: var(--gradient-accent);
  box-shadow: 0 8px 20px rgba(0, 196, 204, 0.25);
}

.card-icon i {
  font-size: 32px;
  color: #fff;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--watermark-dark);
  margin-bottom: 16px;
}

.card-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--watermark-gray);
  margin-bottom: 24px;
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--watermark-gray);
  font-size: 0.95rem;
}

.card-features li i {
  color: var(--watermark-accent);
  font-size: 18px;
}

.card-decoration {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  pointer-events: none;
}

.card-decoration svg {
  width: 100%;
  height: 100%;
  color: var(--watermark-primary);
}

.application-card:nth-child(2) .card-decoration svg {
  color: var(--watermark-accent);
}

/* ===========================
   How It Works Section
   =========================== */
.how-it-works-section {
  padding: 100px 0;
  background: var(--watermark-light);
}

.process-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap; /* 不換行 */
}

.process-step {
  flex: 0 1 auto;
  max-width: 220px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.process-step.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
  transition: var(--transition);
}

.step-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--watermark-dark);
  margin-bottom: 8px;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--watermark-gray);
  line-height: 1.6;
}

/* 橫向箭頭連接器（大螢幕） */
.process-connector {
  width: 60px;
  height: 2px;
  background: var(--watermark-gray-light);
  position: relative;
  flex-shrink: 0;
  margin: 0 10px;
}

.process-connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--watermark-primary);
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
  padding: 80px 0;
  background: var(--gradient-hero);
}

.cta-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
}

.cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-cta-primary,
.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-cta-primary {
  background: #fff;
  color: var(--watermark-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: var(--watermark-dark);
}

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

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

/* ===========================
   Responsive Styles
   =========================== */

/* 小螢幕優化（最高 576px）*/
@media (max-width: 576px) {
  /* Hero Section */
  .hero-watermark {
    padding: 60px 0 40px;
    min-height: 60vh;
  }
  
  .hero-badge {
    padding: 8px 16px;
  }
  
  .hero-badge .badge-icon {
    font-size: 16px;
  }
  
  .hero-badge .badge-text {
    font-size: 12px;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary-watermark,
  .btn-secondary-watermark {
    width: 100%;
    justify-content: center;
  }
  
  /* Waveform */
  .waveform-animation {
    padding: 20px;
    gap: 4px;
  }
  
  .wave-bar {
    width: 5px;
  }
  
  .watermark-icon-float {
    width: 60px;
    height: 60px;
    bottom: -10px;
    right: 10px;
  }
  
  .watermark-icon-float i {
    font-size: 30px;
  }
  
  /* Section Header */
  .section-header {
    margin-bottom: 30px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  /* Intro Card */
  .intro-card {
    padding: 25px 15px;
  }
  
  .intro-icon {
    width: 60px;
    height: 60px;
  }
  
  .intro-icon i {
    font-size: 30px;
  }
  
  .intro-text {
    font-size: 1rem;
  }
  
  /* Process Steps */
  .process-step {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .step-content h4 {
    font-size: 1rem;
  }
  
  .step-content p {
    font-size: 0.85rem;
  }
  
  /* Video */
  .video-container {
    border-radius: 12px;
  }
  
  .video-placeholder .play-icon {
    width: 60px;
    height: 60px;
  }
  
  .video-placeholder .play-icon i {
    font-size: 28px;
  }
  
  /* Application Cards */
  .application-card {
    padding: 25px 20px;
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .card-description {
    font-size: 0.9rem;
  }
  
  /* CTA */
  .cta-content h2 {
    font-size: 1.35rem;
  }
  
  .cta-content p {
    font-size: 0.95rem;
  }
  
  .cta-buttons {
    width: 100%;
  }
  
  .btn-cta-primary,
  .btn-cta-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* 平板螢幕（577px - 767px）*/
@media (min-width: 577px) and (max-width: 767px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .section-title {
    font-size: 1.85rem;
  }
  
  .process-step {
    max-width: 350px;
  }
}

/* 中等平板螢幕（768px - 991px）*/
@media (min-width: 768px) and (max-width: 991px) {
  .hero-watermark {
    padding: 80px 0 60px;
    min-height: 70vh;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .hero-subtitle {
    font-size: 1.35rem;
  }
  
  .hero-visual {
    margin-top: 50px;
  }
  
  .section-title {
    font-size: 2.15rem;
  }
  
  .intro-card {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
  }
  
  .intro-features {
    justify-content: center;
  }
  
  /* 平板螢幕：改為垂直佈局 */
  .process-timeline {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  
  .process-step {
    max-width: 450px;
    width: 100%;
  }
  
  /* 垂直箭頭 */
  .process-connector {
    width: 2px;
    height: 40px;
    margin: 0;
    background: var(--watermark-gray-light);
  }
  
  .process-connector::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(-50%);
    border-top: 8px solid var(--watermark-primary);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: none;
  }
  
  .cta-wrapper {
    flex-direction: column;
    text-align: center;
  }
  
  .cta-buttons {
    justify-content: center;
  }
}

/* 大平板和小筆電（992px - 1199px）*/
@media (min-width: 992px) and (max-width: 1199px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .process-step {
    max-width: 200px;
  }
  
  .process-connector {
    width: 50px;
  }
}

/* 大螢幕優化（1200px+）*/
@media (min-width: 1200px) {
  .process-step {
    max-width: 240px;
  }
  
  .process-connector {
    width: 80px;
  }
  
  .how-it-works-section .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: 3.75rem;
  }
}

/* 超大螢幕（1400px+）*/
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .process-step {
    max-width: 260px;
  }
  
  .process-connector {
    width: 100px;
  }
}

/* ===========================
   Animation Classes
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  
  .hero-bg-pattern {
    animation: none !important;
  }
  
  .wave-bar {
    animation: none !important;
  }
  
  .watermark-icon-float {
    animation: none !important;
  }
}
