/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* 导航栏样式 */
.banner {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #000;
}

/* 页面容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* 主要内容区域样式 */
main {
    margin-top: 80px;
    padding: 2rem 0;
}

/* 超宽屏幕适配 */
@media (min-width: 2000px) {
    .container {
        max-width: 1400px;
    }
}

/* 中等宽度屏幕适配 */
@media (max-width: 1200px) {
    .container {
        max-width: 900px;
    }
}

/* 主要内容区域样式 */
main {
    margin-top: 80px; /* 为顶部导航栏留出空间 */
}

/* Section 基础样式 */
.section {
    width: 100%;
    padding: 4rem 0;
}

/* Section 交替背景色 */
.section:nth-child(odd) {
    background-color: #ffffff;
}

.section:nth-child(even) {
    background-color: #f8f9fa;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.content {
    font-size: 1.1rem;
    color: #444;
}

/* 汉堡菜单按钮样式 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* 遮罩层样式 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* 页脚样式 */
.footer {
    padding: 1.5rem 0;
    background-color: #ffffff;
}

.copyright {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
}
.card {
    --card-padding: 1.5rem;
    --card-radius: 12px;
    position: relative;
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

/* 卡片背景 */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 卡片内容容器 */
.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 卡片标题 */
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: inherit;
}

/* 卡片主体内容 */
.card-body {
    flex: 1;
}

/* 暗色背景时的文字颜色 */
.card.dark-theme {
    color: #ffffff;
}

/* 卡片悬停效果 */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 背景叠加层（用于确保文字可读性） */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.card.dark-theme .card-overlay {
    opacity: 1;
}
.double-column {
    --left-width: 0.5; /* 默认左栏宽度比例为0.5 (50%) */
    display: grid;
    grid-template-columns: calc(var(--left-width) * 100%) calc((1 - var(--left-width)) * 100%);
    gap: 2rem;
    margin: 2rem 0;
}

.double-column .left-column,
.double-column .right-column {
    width: 100%;
}

/* 三栏布局 */
.triple-column {
    --left-width: 0.33;    /* 左栏宽度比例 */
    --middle-width: 0.34;  /* 中栏宽度比例 */
    display: grid;
    grid-template-columns: 
        calc(var(--left-width) * 100%) 
        calc(var(--middle-width) * 100%) 
        calc((1 - var(--left-width) - var(--middle-width)) * 100%);
    gap: 2rem;
    margin: 2rem 0;
}

.triple-column .left-column,
.triple-column .middle-column,
.triple-column .right-column {
    width: 100%;
}

/* 移动端布局 */
@media (max-width: 768px) {
    .triple-column {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 移动端布局 */
@media (max-width: 768px) {
    .double-column {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
@media (max-width: 768px) {
    .card {
        width: 100%;
    }
    .banner {
        padding: 1rem 2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: 80px 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .overlay.active {
        display: block;
    }

    /* 汉堡菜单动画 */
    .menu-toggle.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    main {
        padding: 1rem;
    }
}

.flip-container {
  position: relative;
  width: 100%;
  perspective: 1000px;
}

.flip-inner {
  position: relative;
  width: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-container:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  width: 100%;
  backface-visibility: hidden;
  border-radius: var(--card-radius);
}

.flip-front img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--card-radius);
}

.flip-back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.flip-back img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--card-radius);
  background: #ffffff;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: #c6dbfeff;
  width: 80%;
  height: 80%;
  border-radius: 12px;
  padding: 40px;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  color: #333;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #000;
}

.modal-body h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

.modal-body p {
  line-height: 1.6;
  margin-bottom: 15px;
}
