﻿/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #222021;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Wood Look Tile Section */
.tile-section {
    width: 100%;
    background-color: #1e0c06;
    padding: 24px 0;
}

.tile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tiles-image {
    width: 100%;
    border-radius: 24px;
}

.tile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tile-title {
    font-size: 42px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
}

.tile-title-underline {
    width: 100%;
    height: 4px;
    background-color: #f7c35f;
    margin: 8px 0 24px 0;
    border-radius: 2px;
}

.tile-description {
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
}

.features-title {
    font-size: 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: #f7c35f;
    margin-bottom: 32px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    color: #f5f5f5;
}

/* Application Gallery - 优化后的响应式设计 */
.gallery-section {
    width: 100%;
    background-color: #222021;
    padding: 32px 0;
}

.gallery-title {
    font-size: 32px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #f7c35f;
    text-align: center;
    margin-bottom: 24px;
}

.gallery-container {
    position: relative;
}

.gallery-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    /* 移动端优化高度 */
    min-height: 240px;
}

.gallery-nav {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(247, 195, 95, 0.1);
}

    .gallery-nav:hover {
        opacity: 1;
        background-color: rgba(247, 195, 95, 0.2);
        transform: scale(1.05);
    }

    .gallery-nav img {
        width: 20px;
        height: 20px;
        object-fit: contain;
        flex-shrink: 0;
        filter: brightness(0) saturate(100%) invert(82%) sepia(56%) saturate(388%) hue-rotate(4deg) brightness(96%) contrast(96%);
        transition: filter 0.3s ease;
    }

    .gallery-nav:hover img {
        filter: brightness(0) saturate(100%) invert(82%) sepia(56%) saturate(388%) hue-rotate(4deg) brightness(110%) contrast(110%);
    }

    .gallery-nav:first-of-type,
    .gallery-nav:last-of-type {
        min-width: 40px;
        min-height: 40px;
        max-width: 40px;
        max-height: 40px;
    }

        .gallery-nav:last-of-type img {
            transform: scaleX(-1);
        }

.gallery-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    border-radius: 16px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
}

.gallery-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

    .gallery-image:hover {
        transform: scale(1.02);
    }

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.indicator {
    width: 16px;
    height: 16px;
    border-radius: 8px;
    border: 3px solid #728bad;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .indicator:hover {
        border-color: #f7c35f;
    }

    .indicator.active {
        background-color: #f7c35f;
        border-color: #f7c35f;
    }


/* iPhone 12 Pro 特定优化 (390x844) */
@media (min-width: 390px) and (max-width: 430px) {
    .gallery-wrapper {
        min-height: 280px;
        gap: 14px;
    }

    .gallery-image-container {
        min-height: 280px;
    }

    .gallery-image {
        height: 280px;
    }

    .gallery-nav {
        width: 44px;
        height: 44px;
    }

        .gallery-nav:first-of-type,
        .gallery-nav:last-of-type {
            min-width: 44px;
            min-height: 44px;
            max-width: 44px;
            max-height: 44px;
        }

        .gallery-nav img {
            width: 24px;
            height: 24px;
        }

    .gallery-title {
        font-size: 36px;
    }
}

/* 小平板优化 */
@media (min-width: 640px) {
    .gallery-title {
        font-size: 42px;
    }

    .gallery-wrapper {
        min-height: 360px;
    }

    .gallery-image-container {
        min-height: 360px;
        /* 开始去除灰色背景 */
        background-color: transparent;
    }

    .gallery-image {
        height: 360px;
        object-fit: cover;
    }

    .gallery-nav {
        width: 50px;
        height: 50px;
    }

        .gallery-nav:first-of-type,
        .gallery-nav:last-of-type {
            min-width: 50px;
            min-height: 50px;
            max-width: 50px;
            max-height: 50px;
        }

        .gallery-nav img {
            width: 28px;
            height: 28px;
        }
}

/* 平板优化 */
@media (min-width: 768px) {
    .content-container {
        padding: 0 32px;
    }

    .tile-content {
        flex-direction: row;
        gap: 32px;
    }

    .tiles-image {
        width: 40%;
    }

    .tile-info {
        width: 44%;
    }

    .tile-title {
        font-size: 64px;
    }

    .tile-description {
        font-size: 18px;
    }

    .features-title {
        font-size: 44px;
    }

    .feature-text {
        font-size: 22px;
    }

    .gallery-title {
        font-size: 48px;
    }

    .gallery-wrapper {
        gap: 20px;
        min-height: 420px;
    }

    .gallery-nav {
        width: 56px;
        height: 56px;
    }

        .gallery-nav:first-of-type,
        .gallery-nav:last-of-type {
            min-width: 56px;
            min-height: 56px;
            max-width: 56px;
            max-height: 56px;
        }

        .gallery-nav img {
            width: 32px;
            height: 32px;
        }

    .gallery-image-container {
        min-height: 420px;
        border-radius: 20px;
        background-color: transparent;
    }

    .gallery-image {
        height: 420px;
        border-radius: 20px;
        object-fit: cover;
    }
}

/* 小型桌面优化 */
/* 桌面端关键修复 - 完全显示图片，去除灰框，稳定高度 */
@media (min-width: 1024px) {
    .content-container {
        padding: 0 48px;
    }

    .tile-section {
        padding: 36px 0;
    }

    .tile-title {
        font-size: 65px;
    }

    .features-title {
        font-size: 40px;
    }

    .feature-text {
        font-size: 22px;
    }

    .gallery-section {
        padding: 48px 0;
    }

    .gallery-title {
        font-size: 52px;
    }

    .gallery-wrapper {
        gap: 24px;
        /* 固定最小高度，防止跳动 */
        min-height: 480px;
        /* 重要：设置固定高度来稳定布局 */
        height: 480px;
    }

    .gallery-nav {
        width: 64px;
        height: 64px;
        /* 确保导航按钮在容器顶部对齐 */
        align-self: flex-start;
        margin-top: 210px; /* 居中定位 */
    }

        .gallery-nav:first-of-type,
        .gallery-nav:last-of-type {
            min-width: 64px;
            min-height: 64px;
            max-width: 64px;
            max-height: 64px;
        }

        .gallery-nav img {
            width: 36px;
            height: 36px;
        }

    .gallery-image-container {
        /* 关键修复：去除背景和边框 */
        background-color: transparent !important;
        border-radius: 0;
        overflow: visible;
        /* 固定高度防止跳动 */
        height: 480px;
        min-height: 480px;
        max-height: 480px;
        /* 确保图片在容器中完美居中 */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-image {
        /* 完全显示图片内容，不裁剪 */
        object-fit: contain !important;
        object-position: center;
        border-radius: 16px;
        /* 让图片自适应大小，但不超过容器 */
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        /* 移除固定高度 */
        min-height: unset;
    }
}

/* 标准桌面优化 */
@media (min-width: 1280px) {
    .gallery-section {
        padding: 56px 0;
    }

    .gallery-title {
        font-size: 56px;
    }

    .gallery-wrapper {
        height: 540px;
        min-height: 540px;
    }

    .gallery-image-container {
        height: 540px;
        min-height: 540px;
        max-height: 540px;
        background-color: transparent !important;
        border-radius: 0;
    }

    .gallery-image {
        border-radius: 20px;
    }

    .gallery-nav {
        width: 72px;
        height: 72px;
        margin-top: 234px; /* 重新计算居中位置 */
    }

        .gallery-nav:first-of-type,
        .gallery-nav:last-of-type {
            min-width: 72px;
            min-height: 72px;
            max-width: 72px;
            max-height: 72px;
        }

        .gallery-nav img {
            width: 40px;
            height: 40px;
        }
}

/* 大型桌面优化 */
@media (min-width: 1920px) {
    .gallery-wrapper {
        height: 600px;
        min-height: 600px;
    }

    .gallery-image-container {
        height: 600px;
        min-height: 600px;
        max-height: 600px;
        background-color: transparent !important;
    }

    .gallery-image {
        border-radius: 24px;
    }

    .gallery-nav {
        width: 80px;
        height: 80px;
        margin-top: 260px; /* 重新计算居中位置 */
    }

        .gallery-nav:first-of-type,
        .gallery-nav:last-of-type {
            min-width: 80px;
            min-height: 80px;
            max-width: 80px;
            max-height: 80px;
        }

        .gallery-nav img {
            width: 44px;
            height: 44px;
        }
}

