/* 移动端我的故事页面样式 - 简体中文 */

/* 移动端断点 */
@media (max-width: 768px) {

    /* 整体布局架构 - CSS Grid两段式 */
    .main-content {
        display: grid;
        grid-template-rows: auto 1fr auto;
        min-height: calc(100vh - 60px);
        gap: 0;
    }

    /* 图片画廊区域 */
    .gallery-section {
        width: 100%;
        aspect-ratio: 3/4;
        position: relative;
        overflow: hidden;
        background: #000;
    }

    .gallery-container {
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;
    }

    .gallery-slides {
        display: flex;
        width: 1200%; /* 12张图片 × 100% */
        height: 100%;
        transition: transform 0.3s ease-in-out;
        will-change: transform;
    }

    .slide {
        width: calc(100% / 12);
        height: 100%;
        position: relative;
        flex-shrink: 0;
    }

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    /* 图片说明信息覆盖层 */
    .slide-info {
        position: absolute;
        bottom: 30px;
        left: 10%;
        right: auto;
        width: 300px;           /* 限定宽度为280px（可根据需要调整） */
        color: #FFFFFF;
        padding: 40px 20px 20px;
        transform: translateY(0);
        transition: transform 0.3s ease;
    }

    .slide-info h3 {
        font-size: 28px;
        font-weight: 600;
        margin: 0 0 8px 0;
        line-height: 1.3;
        text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),    /* 主要阴影 */
        1px 1px 2px rgba(0, 0, 0, 0.9);    /* 加强阴影 */
        
    }

    .slide-info p {
        font-size: 20px;
        line-height: 1.4;
        margin: 0;
        opacity: 0.9;
        text-shadow: 
        2px 2px 6px rgba(0, 0, 0, 0.9),    /* 主要黑色阴影 */
        0px 0px 4px rgba(0, 0, 0, 0.5),    /* 扩散阴影 */
        1px 1px 2px rgba(0, 0, 0, 1);      /* 锐化阴影 */
        
    }

    /* 导航按钮 */
    .gallery-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        font-size: 20px;
        font-weight: bold;
        color: #333;
        cursor: pointer;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
    }

    .gallery-nav:hover {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .gallery-nav:active {
        transform: translateY(-50%) scale(0.95);
    }

    .gallery-nav.prev {
        left: 16px;
    }

    .gallery-nav.next {
        right: 16px;
    }

    /* 圆点指示器 */
    .gallery-dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
        z-index: 100;
    }

    .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .dot.active {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.2);
    }

    .dot:hover {
        background: rgba(255, 255, 255, 0.8);
    }

    /* 文章区域 */
    .story-article-section {
        flex: 1;
        padding: 32px 20px;
        background: var(--color-bg, #f8f8f8);
    }

    .story-article {
        max-width: 100%;
        margin: 0 auto;
    }

    .story-article h1 {
        font-size: 28px;
        font-weight: 700;
        text-align: center;
        margin: 0 0 32px 0;
        color: var(--color-text, #000000);
        line-height: 1.2;
        font-family: var(--font-zh-cn);
    }

    .article-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .article-content p {
        font-size: 16px;
        line-height: 1.6;
        color: var(--color-text, #000000);
        margin: 0;
        text-align: justify;
        font-family: var(--font-zh-cn);
        letter-spacing: 0.02em;
        text-indent: 2em;        /* 首行缩进2字符，2em = 2个字符宽度 */
        /* 限制段落宽度 */
        max-width: 350px;        /* 最大宽度600px（可调整） */
        margin-left: auto;       /* 配合margin-right: auto实现居中 */
        margin-right: auto;      /* 配合margin-left: auto实现居中 */
        margin-bottom: 20px;     /* 保持段落间距 */
    }

    /* 页脚在grid布局中的位置 */
    .footer {
        grid-row: 3;
    }

    /* 激活状态的幻灯片显示 */
    .gallery-slides[data-current="1"] { transform: translateX(0%); }
    .gallery-slides[data-current="2"] { transform: translateX(-8.333%); }
    .gallery-slides[data-current="3"] { transform: translateX(-16.666%); }
    .gallery-slides[data-current="4"] { transform: translateX(-25%); }
    .gallery-slides[data-current="5"] { transform: translateX(-33.333%); }
    .gallery-slides[data-current="6"] { transform: translateX(-41.666%); }
    .gallery-slides[data-current="7"] { transform: translateX(-50%); }
    .gallery-slides[data-current="8"] { transform: translateX(-58.333%); }
    .gallery-slides[data-current="9"] { transform: translateX(-66.666%); }
    .gallery-slides[data-current="10"] { transform: translateX(-75%); }
    .gallery-slides[data-current="11"] { transform: translateX(-83.333%); }
    .gallery-slides[data-current="12"] { transform: translateX(-91.666%); }

    /* 触摸滑动优化 */
    .gallery-slides {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    /* 性能优化 */
    .slide {
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .slide img {
        will-change: transform;
    }
}