/* 中医学习站 - 统一样式文件 */

/* 全局样式 */
body {
    font-family: 'Noto Serif SC', serif;
    background-color: #F8F4E9;
    color: #2C3333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', serif;
    color: #2D6A4F;
    font-weight: 600;
    margin-top: 0;
}

/* 链接样式 */
a {
    color: #2D6A4F;
    transition: color 0.3s ease;
    text-decoration: none;
}

a:hover {
    color: #D9AE79;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8f4e9;
}

::-webkit-scrollbar-thumb {
    background: #2D6A4F;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1B4332;
}

/* 导航栏样式 */
#navbar {
    background-color: rgba(45, 106, 79, 0.95);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

/* 导航栏标题样式 */
#navbar h1 {
    color: #FFFFFF !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

#navbar a {
    color: white;
    transition: color 0.3s ease;
}

#navbar a:hover {
    color: #D9AE79;
}

#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 导航栏激活状态 */
.nav-active {
    color: #D9AE79 !important;
    font-weight: 500;
}

/* 自定义按钮样式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2D6A4F;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    min-height: 48px;
    min-width: 120px;
}

.btn-primary:hover {
    background-color: #1B4332;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #2C3333;
    border: 2px solid #D9AE79;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer;
    min-height: 48px;
    min-width: 120px;
}

.btn-secondary:hover {
    background-color: #D9AE79;
    color: #2C3333;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* 页面内按钮样式增强 */
a[class*="hover:"], .btn-like-link {
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
}

/* 分隔线样式 */
.divider {
    width: 80px;
    height: 3px;
    background-color: #D9AE79;
    margin: 16px auto 24px;
}

/* 内容导航样式 */
.content-nav {
    background-color: #F8F4E9;
    border: 1px solid rgba(45, 106, 79, 0.1);
    border-radius: 8px;
}

.content-nav a {
    color: #2C3333;
    transition: all 0.3s ease;
}

.content-nav a:hover {
    color: #2D6A4F;
    transform: translateX(3px);
}

.content-nav a.active {
    color: #2D6A4F;
    font-weight: 600;
    border-bottom: 2px solid #2D6A4F;
}

/* 页脚样式 */
.footer {
    background-color: #2D6A4F;
    color: white;
    padding: 2rem 0;
}

.footer a {
    color: #D9AE79;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* 页脚链接样式 - 修复核心学科行间距过大问题 */
.footer-links {
    padding-left: 0;
}

.footer-link-item {
    padding: 0.25rem 0 !important;
    margin: 0;
}

/* 在移动设备上也保持紧凑的行间距 */
@media (max-width: 768px) {
    .footer-link-item {
        padding: 0.25rem 0 !important;
    }
}

/* 图标圆圈样式 */
.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(45, 106, 79, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* 渐变背景样式 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #2D6A4F 0%, #1B4332 100%);
}

/* 文本阴影样式 */
.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 步骤数字样式 */
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2D6A4F;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.step-number::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid rgba(45, 106, 79, 0.3);
    z-index: -1;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 列表样式 */
ul, ol {
    padding-left: 1.5rem;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 移动端菜单样式 */
#mobileMenu {
    transition: all 0.3s ease;
}

/* 移动端菜单按钮 */
.menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.menu-btn:hover, .menu-btn:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: 2px solid rgba(255, 255, 255, 0.3);
}

#mobileMenu a {
    display: block;
    width: 100%;
    padding: 12px 0;
    text-align: left;
}

/* 表单样式 */
input, textarea, select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2D6A4F;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease-out forwards;
}

/* 内容区域样式 */
.content-section {
    scroll-margin-top: 100px;
}

/* 概念卡片样式 */
.concept-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 动画延迟类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* 引用样式 */
blockquote {
    border-left: 4px solid #2D6A4F;
    position: relative;
}

blockquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: -10px;
    font-size: 4rem;
    color: rgba(45, 106, 79, 0.1);
    font-family: Georgia, serif;
}

/* 通用间距 */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* 响应式调整 */
@media (max-width: 768px) {
    /* 按钮尺寸优化 */
    .btn-primary, .btn-secondary {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 56px;
        min-width: 140px;
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
    }
    
    .icon-circle {
        width: 50px;
        height: 50px;
    }
    
    #navbar {
        padding: 0.75rem 1rem;
    }
    
    .menu-btn {
        display: flex;
    }
    
    /* 链接样式优化 */
    a {
        display: inline-block;
        padding: 0.5rem 0;
        min-height: 44px;
    }
    
    /* 列表项点击优化 */
    ul li, ol li {
        padding: 0.5rem 0;
    }
    
    /* 英雄区域按钮优化 */
    #home a {
        min-height: 56px;
    }
    
    /* 滚动指示器优化 */
    .absolute.bottom-8 a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }
}

/* 防止选中文字时的默认样式 */
::selection {
    background-color: #D9AE79;
    color: #2C3333;
}

::-moz-selection {
    background-color: #D9AE79;
    color: #2C3333;
}

/* 针对移动设备的触摸反馈 */
@media (hover: none) {
    .btn-primary,
    .btn-secondary,
    .card-hover,
    .concept-card {
        touch-action: manipulation;
    }
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  /* 字体大小调整 */
  h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  p {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  /* 容器内边距优化 */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* 导航栏调整 */
  #navbar {
    padding: 0.75rem 1rem;
  }
  
  .menu-btn {
    display: flex;
  }
  
  /* 英雄区域调整 */
  #home {
    padding-top: 16rem;
    padding-bottom: 6rem;
  }
  
  #home .container {
    padding: 2rem 1rem;
  }
  
  /* 按钮调整 */
  #home .flex a {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    text-align: center;
  }
  
  /* 内容区块调整 */
  section {
    padding-top: 12rem;
    padding-bottom: 12rem;
  }
  
  /* 简介部分调整 */
  #intro .text-center {
    margin-bottom: 3rem;
  }
  
  /* 网格布局调整 */
  #intro .grid {
    grid-template-columns: 1fr;
  }
  
  /* 核心学科卡片调整 */
  #subjects .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  #subjects .bg-white {
    margin-bottom: 2rem;
  }
  
  #subjects .h-48 {
    height: 200px;
  }
  
  /* 列表样式优化 */
  ul.list-disc {
    padding-left: 0.5rem;
  }
  
  ul.list-disc li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
  }
  
  /* 学习路径模块响应式优化 */
  #path {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
  
  /* 隐藏桌面版时间线 */
  #path .hidden.md\:block.absolute {
    display: none;
  }
  
  /* 调整步骤容器 */
  #path .md\:flex {
    display: block;
    padding-left: 2.5rem;
    position: relative;
  }
  
  /* 显示移动版图片 */
  #path .md\:pl-12.order-3.hidden {
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  /* 调整步骤数字位置 */
  #path .md\:w-12 {
    position: absolute;
    left: 0;
    top: 0;
  }
  
  /* 统一内容对齐 */
  #path .md\:text-right {
    text-align: left;
  }
  
  /* 调整间距 */
  #path .mt-8 {
    margin-top: 0;
  }
  
  /* 调整步骤项间距 */
  #path .space-y-24 > div {
    margin-bottom: 3rem;
  }
  
  /* 调整步骤数字大小 */
  #path .w-10.h-10 {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  
  /* 调整图片大小 */
  #path img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
  }
}

/* 响应式设计 - 移动设备 */
@media (max-width: 480px) {
  /* 移动设备优化 */
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  h4 {
    font-size: 1.1rem;
  }
  
  p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* 进一步优化交互元素 */
  .btn-primary, .btn-secondary {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 52px;
    width: 100%;
  }
  
  /* 导航链接优化 */
  #mobileMenu a {
    padding: 1rem 0;
    min-height: 48px;
    font-size: 1.1rem;
  }
  
  /* 学习路径模块在移动设备上的进一步优化 */
  #path {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
  
  #path h3 {
    font-size: 1.2rem;
  }
  
  /* 调整步骤容器内边距 */
  #path .md\:flex {
    padding-left: 2rem;
  }
  
  /* 调整步骤数字大小 */
  #path .w-10.h-10 {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  /* 调整步骤项间距 */
  #path .space-y-24 > div {
    margin-bottom: 2.5rem;
  }
  
  /* 调整图片高度 */
  #path img {
    max-height: 180px;
  }
  
  /* 调整标签样式 */
  #path .inline-block {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  /* 优化文本间距 */
  #path p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }
  
  /* 卡片链接优化 */
  #subjects a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  
  /* 英雄区域调整 */
  #home {
    padding-top: 14rem;
    padding-bottom: 4rem;
  }
  
  #home .container {
    padding: 1.5rem 1rem;
  }
  
  #home h1 {
    margin-bottom: 1.5rem;
  }
  
  #home p {
    margin-bottom: 2rem;
  }
  
  /* 按钮尺寸优化 */
  #home .flex {
    flex-direction: column;
    gap: 1rem;
  }
  
  #home .flex a {
    padding: 1rem;
    font-size: 1rem;
  }
  
  /* 向下滚动指示器 */
  #home .absolute.bottom-8 {
    bottom: 4rem;
  }
  
  /* 内容区块间距调整 */
  section {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
  
  /* 简介部分优化 */
  #intro .text-center {
    margin-bottom: 2rem;
  }
  
  #intro .bg-light {
    padding: 1.5rem;
  }
  
  #intro .w-16 {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
  }
  
  /* 核心学科卡片优化 */
  #subjects .h-48 {
    height: 180px;
  }
  
  #subjects .p-6 {
    padding: 1.5rem;
  }
  
  /* 列表样式优化 */
  ul.list-disc li {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

/* 响应式设计 - 小型手机 */
@media (max-width: 360px) {
  /* 小型手机优化 */
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  /* 内边距调整 */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* 英雄区域进一步优化 */
  #home {
    padding-top: 12rem;
    padding-bottom: 2rem;
  }
  
  #home .container {
    padding: 1rem 0.75rem;
  }
  
  /* 卡片内边距调整 */
  #intro .bg-light,
  #subjects .p-6 {
    padding: 1.25rem;
  }
  
  /* 图标容器调整 */
  #intro .w-16 {
    width: 100px;
    height: 100px;
  }
  
  /* 核心学科图片高度调整 */
  #subjects .h-48 {
    height: 160px;
  }
}

/* 子页面移动设备优化 */
@media (max-width: 768px) {
  /* 子页面内容容器优化 */
  .page-content {
    padding: 1rem;
    margin-top: 70px;
  }
  
  /* 子页面标题优化 */
  .page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .page-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  
  .page-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
  }
  
  /* 子页面段落优化 */
  .page-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
  }
  
  /* 列表优化 */
  .page-content ul, 
  .page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .page-content li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  /* 内容导航优化 */
  .content-nav {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .content-nav a {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
  
  /* 表格响应式处理 */
  .page-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.85rem;
  }
  
  /* 卡片优化 */
  .card {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* 子页面小型手机进一步优化 */
@media (max-width: 480px) {
  .page-content {
    padding: 0.75rem;
  }
  
  .page-content h1 {
    font-size: 1.6rem;
  }
  
  .page-content h2 {
    font-size: 1.3rem;
  }
  
  .page-content h3 {
    font-size: 1.1rem;
  }
  
  .page-content p, 
  .page-content li {
    font-size: 0.9rem;
  }
}

/* 按钮和交互元素移动端优化 */
@media (max-width: 768px) {
  /* 优化主按钮 */
  .btn-primary {
    padding: 14px 20px;
    font-size: 1rem;
    min-height: 52px;
    min-width: 140px;
    width: 100%;
    max-width: 300px;
    margin: 0.5rem 0;
  }
  
  /* 优化次要按钮 */
  .btn-secondary {
    padding: 14px 20px;
    font-size: 1rem;
    min-height: 52px;
    min-width: 140px;
    width: 100%;
    max-width: 300px;
    margin: 0.5rem 0;
  }
  
  /* 优化链接按钮 */
  a.btn-like-link {
    padding: 0.75rem 1rem;
    min-height: 48px;
    min-width: 48px;
    font-size: 1rem;
  }
  
  /* 优化表单元素 */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    padding: 14px;
    font-size: 1rem;
    height: 52px;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* 优化复选框和单选按钮 */
  input[type="checkbox"],
  input[type="radio"] {
    transform: scale(1.2);
    margin-right: 8px;
  }
  
  /* 优化下拉菜单 */
  select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%232D6A4F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
  }
  
  /* 优化内容导航的触摸区域 */
  .content-nav a {
    padding: 10px 12px;
    display: block;
    min-height: 44px;
    box-sizing: border-box;
  }
  
  /* 优化表格中的交互元素 */
  table button,
  table a {
    display: block;
    min-height: 44px;
    padding: 8px;
    text-align: center;
  }
}