/* 引入字体 */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");



/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

body {
    font-family: "DM Sans", sans-serif;
    overflow: hidden !important; /* 禁止页面整体滚动 */
    height: 100vh; /* 固定body高度为视口高度 */
    width: 100vw; /* 固定body宽度为视口宽度 */
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    text-transform: uppercase;
    font-size: 6rem;
    font-weight: 600;
    line-height: 1;
    /* 移动端适配*/
    font-size: clamp(2.5rem, 8vw, 6rem);
}

p {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
}

/* 覆盖层基础样式 */
.preloader, .split-overlay, .tags-overlay {
    position: fixed;
    width: 100vw;
    height: 100svh;
}

.preloader, .split-overlay {
    background-color: #000000;
    color: #fff;
}

.preloader, .tags-overlay {
    z-index: 2;
}

.split-overlay {
    z-index: 1;
}

/* 标题定位 */
.intro-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

.outro-title {
    position: absolute;
    top: 50%;
    left: calc(50% + 10rem);
    transform: translate(-50%, -50%);
    /* 移动端适配*/
    left: calc(50% + 5rem);
}

/* 标签样式 */
.tag {
    position: absolute;
    width: max-content;
    color: #e77676;
    overflow: hidden;
}

.tag-1 {
    top: 15%;
    left: 15%;
}

.tag-2 {
    bottom: 15%;
    left: 25%;
}

.tag-3 {
    bottom: 30%;
    right: 15%;
}

/* 主容器 */
.container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    clip-path: polygon(0 48%, 0 48%, 0 52%, 0 52%);
    z-index: 2;
}

.container .hero-img {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* 导航和页脚 */
nav, footer {
    position: relative;
    width: 100vw;
    padding: 2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000000;
    z-index: 2;
    /* 移动端适配：修改 */
    padding: 1em;
}

nav p#logo {
    font-weight: 600;
    font-size: 50px;
}

/* 卡片样式 - 核心修复 */
.card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 85%;
    display: flex; /* 横向布局 */
    justify-content: flex-start; /* 避免居中挤压 */
    align-items: center;
    background-color: #ffd5d5;
    opacity: 0.95;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); /* 完整显示卡片 */
    border-radius: 8px;
    overflow: hidden;
    padding: 2rem;
    
}

/* 左侧标题区域 - 核心修复 */
.card-title-area {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 圆形头像 */
.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


/* 标题样式 - 修复选择器错误 */
.card-title-area h1 {
    text-align: center;
    width: 100%;
    font-size: 3rem;
    transform: translateX(0);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title-area p {
    text-align: center;
    width: 100%;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #333;
}

/* 按钮样式 - 核心修复 */
.trigger-btn {
    background-color: #e77676;
    padding: 0.8rem 2rem;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    opacity: 1.0;
    position: absolute;
    bottom: 2rem; /* 卡片内右下角 */
    right: 2rem;
    cursor: pointer;
    z-index: 11;
}

.trigger-btn:hover {
    opacity: 0.8;
}

/* 右侧博客区 - 核心修复（优先级+隐藏） */
.card-blog-area {
    text-align: right;
    position: relative;
    padding: 0 !important;
    overflow: auto;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
      scrollbar-width: none; 
}

/* 博客内容容器 */
.blog-content-wrapper {
    padding: 0 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    
}

/* 博客卡片列表 */
.blog-cards {
      display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.2rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;

}

.blog-card{
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    
}

 .blog-card-img {
            height: 120px;
        }

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
        }

.blog-card-info {
            padding: 1rem;
        }
.blog-card-info h3 {
            font-size: 1rem;
            margin-bottom: 0.3rem;
        }
.blog-card-info p {
            font-size: 0.75rem;
            color: #666;
            margin-bottom: 0.5rem;
            text-transform: none;
        }
.blog-card-info span {
            font-size: 0.75rem;
            color: #e77676;
            font-weight: 600;
        }    

.blog-post {
            display: block;
            padding: 0.5rem;
        }
.back-btn {
            background: #e77676;
            color: #fff;
            border: none;
            padding: 0.5rem 1.2rem;
            border-radius: 6px;
            cursor: pointer;
            margin-bottom: 1rem;
        }
.blog-post h3 {
            color: #e77676;
            margin-bottom: 1rem;
        }
.blog-post p {
            font-size: 1rem;
            line-height: 1.6;
            text-transform: none;
            margin-bottom: 1rem;
        }

.blog-card:hover{
    transform: translateY(-5px);
    box-shadow:0 8px 20px rgbd(0,0,0,0.1);
}

.card-blog-area.blog-content-wrapper.blog-content img{
    opacity: 1 !important;
}

/* 博客区激活样式 - 核心修复（!important 保证生效） */
.card-blog-area.active {
    width: 100% !important;
    height: 100% !important;
    margin-left: 2rem !important;
    visibility: visible !important;
}

/* 博客区文字样式 */
.card-blog-area h2 {
    font-size: 2rem;
    color: #e77676;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    text-align: left;
}

.card-blog-area.blog-content p{
    font-size: 1rem;
}

.card-blog-area p {
    font-size:1rem;
    text-align: left;
}

.card-blog-area .blog-content {
    font-size: 1rem;
    text-transform: none;
    line-height: 1.6;
    color: #333;
    margin-bottom: 2rem;
   
}



.back-btn:hover {
    background: #d06060;
}

.blog-post h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
   
}

.blog-post p {
    font-size: 1rem;
    line-height: 1.6;
    text-transform: none;
    margin-bottom: 1rem;
    color: var(--text-main);
}

#blog-post-container {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
}

.blog-post img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
   
     margin-top: 9rem !important; /* 🔴 关键：增大和上方博客卡片的间距（核心修复） */
     position: relative;
    z-index: 10; /* 确保不被覆盖 */
    width: 100%; /* 确保占满父容器宽度，居中更稳定 */
    flex-shrink: 0; /* 防止被flex布局挤压 */
   
    }

.page-btn {
    background: var(--bg-blog-card);
    border: none;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: var(--accent);
    color: #fff;
}

.page-btn.active {
    background: var(--accent);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-blog-card);
    color: var(--text-secondary);
}
/* 隐藏初始非第一页的内容 */
.blog-page {
    display: none;
}

.blog-page.active {
    display: block;
}

/* 文字拆分样式（GSAP用） */
.card .char span {
    position: relative;
    display: inline-block;
    transform: translateY(100%);
    will-change: transform;
}

.intro-title .char, .outro-title .char, .card .char {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.intro-title .char, .outro-title .char {
    margin-top: 0.75rem;
}

.intro-title .char span, .outro-title .char span, .tag .word {
    position: relative;
    display: inline-block;
    transform: translateY(-100%);
    will-change: transform;
}

.intro-title .first-char {
    transform-origin: top left;
}

/* 响应式适配 */
@media (max-width: 1000px) {
    h1 {
        font-size: 2.5rem;
    }
    .outro-title {
        left: calc(50% + 4rem);
    }
    .card {
        width: 75%;
        height: auto;
        flex-direction: column;
        padding: 1rem;
    }
    .card-title-area h1 {
        font-size: 2.5rem;
    }
    .avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    .card-blog-area.active {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 1rem !important;
    }
}