@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&display=swap');

:root {
  --primary-color: #0b52e2; /* 主色調 - 藍色 */
  --primary-dark: #0942b8; /* 主色調深色版本 */
  --primary-light: #e6eeff; /* 主色調淺色版本 */
  --primary-transparent: rgba(11, 82, 226, 0.1); /* 半透明版本 */
  
  /* 次要色調 - 橙色 */
  --secondary-color: #ff6600;
  --secondary-dark: #e05a00;
  --secondary-light: #fff0e6;
  --secondary-transparent: rgba(255, 102, 0, 0.1);
}

body{
  font-family: 'Noto Sans TC', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
}

/* 使用變量的通用類 */
.text-primary {
  color: var(--primary-color);
}

.bg-primary {
  background-color: var(--primary-color);
}

.border-primary {
  border-color: var(--primary-color);
}

.hover\:text-primary:hover {
  color: var(--primary-color);
}

.hover\:bg-primary:hover {
  background-color: var(--primary-color);
}

.hover\:border-primary:hover {
  border-color: var(--primary-color);
}

/* 加載條樣式 */
.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--primary-color);
  z-index: 9999;
  width: 0;
  animation: loading-animation 2s ease-in-out forwards;
}

/* 加載條動畫 */
@keyframes loading-animation {
  0% { width: 0; }
  50% { width: 70%; }
  80% { width: 90%; }
  100% { width: 100%; }
}

/* 按鈕樣式覆蓋 */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

/* 導航鏈接懸停效果 */
.nav-link:hover {
  color: var(--primary-color);
}

/* 左側導航選中項目樣式 */
.nav-active {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* 覆蓋其他藍色元素 */
.text-blue-400, .text-blue-500, .text-blue-600, .text-blue-700 {
  color: var(--primary-color);
}

.bg-blue-50 {
  background-color: var(--primary-light);
}

.bg-blue-600, .bg-blue-700 {
  background-color: var(--primary-color);
}

.hover\:bg-blue-50:hover {
  background-color: var(--primary-light);
}

.hover\:bg-blue-700:hover, .hover\:bg-blue-600:hover {
  background-color: var(--primary-dark);
}

.hover\:text-blue-600:hover, .hover\:text-blue-700:hover {
  color: var(--primary-color);
}

/* 固定導航樣式 */
.fixed-nav {
  position: fixed;
  top: 0;
  left: max(0px, calc(50% - 80rem));
  transition: top 0.3s ease;
  z-index: 30;
}

/* 調整left-nav的頂部位置 */
#left-nav {
  transition: top 0.3s ease, position 0.3s ease;
  z-index: 20; /* 确保 z-index 小于 header 的 z-index */
  display: none;
}

/* 當left-nav固定時的位置 */
#left-nav.fixed-nav {
  /* top 值会由 JavaScript 动态设置 */
}

/* 确保 header 的 z-index 大于 left-nav */
header {
  z-index: 30;
}

/* 調整頁面內容，為頂部導航欄留出空間 */
#vr-class {
  background: linear-gradient(135deg, #0942b8 0%, var(--primary-color) 50%, #0942b8 100%);
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

/* 添加網格紋理 */
#vr-class::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: center center;
  z-index: 1;
}

/* 添加光暈效果 */
#vr-class::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  z-index: 1;
  animation: rotate 30s linear infinite;
}

/* 確保內容在背景效果之上 */
#vr-class > .container {
  position: relative;
  z-index: 2;
}

/* 旋轉動畫 */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 导航过渡效果 */
.nav-collapsed {
  width: 40px;
  overflow: hidden;
}

.nav-collapsed .nav-link span,
.nav-collapsed #solutions-arrow {
  display: none;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 导航链接激活状态 */
.nav-link.active {
  /* border-left-color: var(--primary-color) !important; */
  background-color: var(--primary-light) !important;
}

/* 移动导航过渡 */
#mobile-nav-toggle {
  transition: opacity 0.3s, transform 0.3s;
}

/* 辅助功能 - 焦点样式 */
a:focus, button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  #side-nav {
    display: none !important;
  }
}

/* 键盘导航支持 */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 动画效果 */
.transition-all {
  transition-property: all;
}

/* 确保内容区域在导航栏出现后有适当的左边距 */
@media (min-width: 769px) {
  body.nav-visible .container {
    margin-left: 200px;
    width: calc(100% - 200px);
    max-width: none;
  }
  
  body.nav-collapsed .container {
    margin-left: 60px;
    width: calc(100% - 60px);
    max-width: none;
  }
}

/* 次要色調的通用類 */
.text-secondary {
  color: var(--secondary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color);
}

.border-secondary {
  border-color: var(--secondary-color);
}

.hover\:text-secondary:hover {
  color: var(--secondary-color);
}

.hover\:bg-secondary:hover {
  background-color: var(--secondary-color);
}

.hover\:border-secondary:hover {
  border-color: var(--secondary-color);
}

/* CTA按鈕樣式 - 使用次要色調 */
.cta-button {
  background-color: var(--secondary-color);
  color: white;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  box-shadow: 0 4px 6px rgba(255, 102, 0, 0.2);
}

.cta-button:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(255, 102, 0, 0.3);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 102, 0, 0.2);
}

/* 左侧导航高亮样式 - 使用更明显的样式 */
.left-nav li.active, #left-nav li.active {
  background-color: rgba(11, 82, 226, 0.1) !important;
  border-left: 3px solid #0b52e2 !important;
  font-weight: bold !important;
  color: #0b52e2 !important;
}

.left-nav li.active a, #left-nav li.active a {
    font-size: .95rem;
}

/* 确保所有导航项都有过渡效果 */
.left-nav li, #left-nav li {
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

/* 为导航项添加一些内边距，使高亮效果更明显 */
.left-nav li a, #left-nav li a {
  display: block;
  padding: 8px 12px;
}

/* 轮播图片样式 */
.carousel-image {
  transition: opacity 1.5s ease-in-out;
}

/* 为活动导航链接添加过渡效果 */
.nav-link {
    transition: all 0.3s ease;
}

.nav-link.active {
    border-left-color: var(--primary);
    padding-left: calc(0.75rem - 4px);
}

/* 部分标题装饰 */
.section-title-decoration {
    position: relative;
    display: inline-block;
}

.section-title-decoration::before,
.section-title-decoration::after {
    content: "";
    position: absolute;
    height: 2px;
    bottom: -8px;
}

.section-title-decoration::before {
    background-color: var(--primary);
    width: 70%;
    left: 0;
}

.section-title-decoration::after {
    background-color: var(--secondary);
    width: 30%;
    right: 0;
}

/* 添加部分之间的分隔线 */
section {
    position: relative;
    scroll-margin-top: 50vh; /* 设置滚动边距为视口高度的一半 */
}

section:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}

/* 确保 section 有足够的高度 */
section {
    min-height: 0vh; /* 至少占据视口高度的一半 */
}

/* 为标题添加动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title-animation {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* 滚动到视图时触发动画 */
.scroll-trigger {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-trigger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section 主题色方案 */
section#vision, section#ai-difference {
  border-left: 8px solid var(--primary-color);
  background-color: rgba(11, 82, 226, 0.03);
}


section#writing-lab {
  border-left: 8px solid #4CAF50; /* 绿色 */
  background-color: rgba(76, 175, 80, 0.03);
}



section#speaking, section#transform-speaking-confidence {
  border-left: 8px solid #9C27B0; /* 紫色 */
  background-color: rgba(156, 39, 176, 0.03);
}

section#vee-ai {
  border-left: 8px solid #2196F3; /* 蓝色 */
  background-color: rgba(33, 150, 243, 0.03);
}

section#implementing {
  border-left: 8px solid #FF5722; /* 橙红色 */
  background-color: rgba(255, 87, 34, 0.03);
}

section#success-stories {
  border-left: 8px solid #607D8B; /* 蓝灰色 */
  background-color: rgba(96, 125, 139, 0.03);
}

/* 为 section 添加过渡效果和边框 */
section {
  transition: all 0.3s ease;
}

/* 交互元素悬停效果 */
.hover-effect {
  transition: all 0.3s ease;
}

.hover-effect:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 为卡片添加悬停效果 */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 为按钮添加悬停效果 */
button, .btn, a.btn, .cta-button {
  transition: all 0.3s ease;
}

button:hover, .btn:hover, a.btn:hover, .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 为导航链接添加悬停效果 */
#left-nav a {
  transition: all 0.3s ease;
  position: relative;
}

#left-nav a:hover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background-color: var(--primary-color);
  transform: scaleY(1);
  transition: transform 0.2s;
}

/* 页面进度指示器 */
.progress-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  margin: 8px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.progress-dot:hover {
  background-color: #bbb;
}

.progress-dot.active {
  background-color: var(--primary-color);left-nav
  transform: scale(1.2);
  box-shadow: 0 0 0px 6px #ffffff;
}

.progress-dot .tooltip {
  position: absolute;
  right: 25px;
  top: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(-50%);
}

.progress-dot:hover .tooltip {
  opacity: 1;
  visibility: visible;
}


.open-sans {
  font-family: "Open Sans", "Noto Sans TC", sans-serif;
}

.open-sans-bold {
  font-family: "Open Sans", "Noto Sans TC",sans-serif;
  font-weight: bold;
}

/* 视频描述文本样式 */
.video-description {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(to right, rgba(11, 82, 226, 0.05), rgba(255, 102, 0, 0.05));
  border-radius: 8px;
  margin-top: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-color);
}

.video-description h3 {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 0.5rem;
}

.video-description h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.video-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1rem;
}

.video-description ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1rem;
}

.video-description li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.video-description li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.video-description .highlight {
  background-color: rgba(255, 102, 0, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-weight: 500;
  color: var(--secondary-color);
}

.video-description .cta-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
  transition: all 0.3s ease;
}

.video-description .cta-link:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}



/* 骨架屏 */
.skeleton-container .skeleton {
  background-color: #eee; /* 灰色背景 */
  border-radius: 4px;
  margin-bottom: 10px;
  animation: pulse 1.5s infinite ease-in-out; /* 添加動畫 */
}

.skeleton-title {
  height: 20px;
  width: 60%;
}

.skeleton-text {
  height: 14px;
  width: 90%;
}

.skeleton-text:last-child {
  width: 75%;
}

/* 加載動畫 */
@keyframes pulse {
  0% { background-color: #eee; }
  50% { background-color: #e0e0e0; }
  100% { background-color: #eee; }
}

/* 默認隱藏骨架屏 */
.skeleton-container .skeleton {
  display: none;
}
/* 默認顯示實際內容 */
.skeleton-container .skeleton-title,
.skeleton-container .skeleton-text {
  display: block; /* 或者其他適當的 display 值 */
}


/* 加載狀態下的樣式 */
.skeleton-container.is-loading .skeleton {
  display: block; /* 加載時顯示骨架屏 */
}
.skeleton-container.is-loading .skeleton-title,
.skeleton-container.is-loading .skeleton-text {
  display: none; /* 加載時隱藏實際內容 */
  /* 或者使用 visibility: hidden; height: 0; 等方式 */
}

/* (可選) 實際內容加載完成後，可能需要一點過渡效果 */
.skeleton-container:not(.is-loading) .skeleton-title,
.skeleton-container:not(.is-loading) .skeleton-text {
   animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}