/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    text-align: center;
}

.hero-content {
    max-width: 1200px;
    z-index: 2;
    padding-top: 30px;
}



.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
    font-weight: 300;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(65, 142, 184, 0.6);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(65, 142, 184, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* About Project Section */
.section {
    position: relative;
    overflow: hidden;
    background-color: #D2DDF1;
    height: 100vh;
    width: 100vw;
}

.section-title {
    position: relative;
    z-index: 2;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-title p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--secondary);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.about-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: var(--primary);
    margin-bottom: 25px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--dark);
}

.about-text,
.about-text h3,
.about-text p,
.about-text a {
    font-family: Georgia, "Times New Roman", serif;
}

.about-image {
    flex: 1;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =============================problem============================ */

#problems {
    position: relative;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* 通用块：绝对定位 + 裁切溢出 */
.problem {
    position: absolute;
    overflow: hidden;
    box-sizing: border-box;
    /* 可选：开发期给个浅背景，方便看区域 */
    /* background: rgba(8,40,77,.06); */
}

/* 即使没有任何内容，也保持它的可见尺寸（兜底）*/
.problem:empty::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
}

.problems-car {
    position: absolute;
    height: 36vh;
    width: 28vw;
    left: 10vw;
    top: 5vh;
}

.problems-girl {
    position: absolute;
    height: 53vh;
    width: 24vw;
    left: 5vw;
    top: 50vh;
}

.problems-microscope {
    position: absolute;
    height: 45vh;
    width: 33vw;
    left: 60vw;
    top: 23vh;
}



/* =============================problem============================ */


/* Team Section */
.team {
    background: linear-gradient(to bottom, var(--light) 0%, var(--white) 100%);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.member-image {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.member-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(26, 58, 95, 0.8));
    z-index: 1;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member:hover .member-image img {
    transform: scale(1.05);
}

.member-info {
    padding: 25px 20px;
}

.member-info h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.member-info p {
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* Process Section */
.process {
    background-color: var(--light);
}

.process-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background: var(--accent);
    transition: height 0.4s ease;
    z-index: -1;
}

.step:hover::before {
    height: 100%;
}

.step-number {
    width: 60px;
    height: 60px;
    background: rgba(65, 184, 131, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.step:hover .step-number {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.step h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: var(--transition);
}

.step p {
    color: var(--text-light);
    transition: var(--transition);
}

.step:hover h3,
.step:hover p {
    color: var(--white);
}


/* 容器占满父级并裁切 */
.hero-video-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    /* 关键：启用容器查询，让内部能按“容器比例”响应 */
    container-type: size;
}

/* 让 iframe 居中，如同 background-size: cover */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    aspect-ratio: 16/9;
    /* 告诉浏览器这是 16:9 内容 */
    /* 先给个保底：至少撑满容器的一边，避免1px缝隙 */
    min-width: 100%;
    min-height: 100%;
    pointer-events: none;
}

/* 容器更宽于16:9 → 撑满宽度，高度自适应 */
@container (min-aspect-ratio:16/9) {
    .hero-video {
        width: 100%;
        height: auto
    }
}

/* 容器更窄于16:9 → 撑满高度，宽度自适应 */
@container (max-aspect-ratio:16/9) {
    .hero-video {
        height: 100%;
        width: auto
    }
}

/* 以下部分和ppt效果滚动有关 */

body {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    /* overflow-y: hidden; */
    /* Prevent manual scrolling */
}

.content-container {
    /* Stronger snap alignment */
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Added navigation controls */
.nav-controls {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.2);
}

.nav-dot:hover {
    background: rgba(0, 0, 0, 0.7);
}

@media (max-width: 500px) {
    .content-container>div {
        width: 150px;
        height: 200px;
    }

    .content-container h2 {
        font-size: 30px;
        left: calc(50% + 60px);
    }

    .nav-controls {
        right: 15px;
    }
}

/* 以下部分和水平滚动有关 */

.translateX-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.translateX-group-container {
    height: 100vh;
    width: 300vw;
    position: relative;
    display: flex;
    overflow: hidden;
}

.translateX-container {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
}

/* 主页主要标题统一 Georgia 字体 */
.section-title h2,
.section.car h2,
.section.girl h2 {
    font-family: Georgia, "Times New Roman", serif !important;
}


/* ========================下边框渐渐消失效果========================== */

/* 伪元素当“自定义下边框” */
.gradient-border::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 10px;
    /* 最大边框厚度 */
    pointer-events: none;

    /* 颜色从左→右：透明 → 实色（在 --start 处达到实色） */
    background: linear-gradient(to right,
            rgb(var(--color, 8 40 78) / 0) 0%,
            rgb(var(--color, 8 40 78) / 1) var(--start, 66.667%),
            rgb(var(--color, 8 40 78) / 1) 100%);

    /* 几何上变“薄”：左侧厚度为 0，到了 --start 处达到最大厚度，并向右保持 */
    clip-path: polygon(0 100%,
            /* 左下角（厚度=0） */
            var(--start, 50%) 0,
            /* 起始点处的上沿（厚度=最大） */
            100% 0,
            /* 右上角（保持最大厚度） */
            100% 100%
            /* 右下角 */
        );
}

/* 可选：想要超细“发丝线”效果（视网膜下更锐利） */
.gradient-border::after {
    transform: translateZ(0) scaleY(.5);
    transform-origin: bottom;
}

/* ========================下边框渐渐消失效果========================== */

.background-intro {
  font-family: var(--problem-font, Georgia, "Times New Roman", serif) !important;
  font-size: var(--problem-font-size, 2.2rem) !important;
  line-height: var(--problem-line-height, 1.35) !important;
  font-weight: var(--problem-weight, 400) !important;
  color: var(--problem-color, #000) !important;
  text-align: center;
  margin: 0 auto;
  max-width: var(--problem-max-width, 50vw);
  letter-spacing: 0;
  word-spacing: .15em;
}

/* 小屏适配：按比例缩小 */
@media (max-width: 900px) {
  .background-intro {
    font-size: calc(var(--problem-font-size, 2.2rem) * 0.78) !important;
    max-width: 90%;
  }
}

/* ========================第六页样式========================== */

.antifreeze-section {
  background-color: #d2ddf1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 5vh 5vw;
  position: relative;
  overflow: hidden;
}

.antifreeze-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a3a5f;
  text-align: center;
  margin: 5vh 0;
  max-width: 700px;
  line-height: 1.3;
}

.antifreeze-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.antifreeze-top, .trehalose-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.antifreeze-top {
  gap: 0;
}

.trehalose-content {
  gap: 5vw;
}

.trehalose-text {
  text-align: right;
  margin-top: 5vh;
}

.trehalose-text h3,
.trehalose-text ul,
.trehalose-text li {
  text-align: right;
}

.protein-img, .trehalose-img {
  width: 40%;
  max-width: 400px;
  height: auto;
}

.antifreeze-info {
  width: 50%;
  margin-top: 5vh;
}

.antifreeze-info h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a3a5f;
}

.antifreeze-info ul, .trehalose-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.antifreeze-info li, .trehalose-text li {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  color: #1a3a5f;
  line-height: 1.3;
  margin-bottom: 4px;
}

/* Enlarged variant for antifreeze section */
.antifreeze-section.antifreeze-large {
    padding: 7vh 6vw;
}

.antifreeze-section.antifreeze-large .antifreeze-title {
    font-size: 3.4rem;
    max-width: 900px;
}

.antifreeze-section.antifreeze-large .antifreeze-info h3 {
    font-size: 2.2rem;
}

.antifreeze-section.antifreeze-large .antifreeze-info li,
.antifreeze-section.antifreeze-large .trehalose-text li {
    font-size: 1.9rem;
}

.antifreeze-section.antifreeze-large .protein-img,
.antifreeze-section.antifreeze-large .trehalose-img {
    width: 48%;
    max-width: 520px;
}

.antifreeze-section.antifreeze-large .antifreeze-info {
    width: 52%;
}

@media (max-width: 1000px) {
    .antifreeze-section.antifreeze-large .antifreeze-title { font-size: 2.8rem; }
    .antifreeze-section.antifreeze-large .antifreeze-info h3 { font-size: 2rem; }
    .antifreeze-section.antifreeze-large .antifreeze-info li,
    .antifreeze-section.antifreeze-large .trehalose-text li { font-size: 1.6rem; }
}

@media (max-width: 700px) {
    .antifreeze-section.antifreeze-large .antifreeze-top,
    .antifreeze-section.antifreeze-large .trehalose-content { flex-direction: column; align-items: center; }
    .antifreeze-section.antifreeze-large .protein-img,
    .antifreeze-section.antifreeze-large .trehalose-img { width: 80%; }
    .antifreeze-section.antifreeze-large .antifreeze-info { width: 90%; text-align: center; }
    .antifreeze-section.antifreeze-large .trehalose-text { text-align: center; }
    .antifreeze-section.antifreeze-large .antifreeze-info h3 { font-size: 1.9rem; }
    .antifreeze-section.antifreeze-large .antifreeze-info li,
    .antifreeze-section.antifreeze-large .trehalose-text li { font-size: 1.4rem; }
}