/* Import component styles */
@import url('components/top-navigation.css');
@import url('components/footer.css');
@import url('style.css');

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fonts-size-body);
    background-color: var(--color-bg);
    color: var(--color-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* Page Wrapper */
.page-wrapper {
    display: block;
    min-height: 100vh;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
}

/* Main Container */
.container {
    padding: 12% 8% 4% 8%;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.photo-gallery {
    column-count: 2;
    column-gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 100%;
}

/* 防止第一个元素顶部有多余间距 */
.photo-item:first-child {
    margin-top: 0;
}

.photo-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease;
    background-color: #f5f5f5;
    width: 100%;
    margin-bottom: 2rem;
    break-inside: avoid;
    /* 防止在列中间断开 */
    display: inline-block;
}

.photo-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.photo-item img {
    width: 100%;
    height: auto;
    /* 保持原始比例 */
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* 让点击事件穿透到图片 */
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-caption {
    color: var(--color-inverse);
    font-size: var(--fonts-size-body);
    font-weight: 500;
    text-align: center;
    padding: 2rem;
}

/* 移除了旧的Modal样式，现在使用Business Module System页面相同的JavaScript实现 */

/* Media Queries */
@media (min-width: 962px) {}

@media (max-width: 962px) {
    .container {
        padding: 16% 8% 4% 8%;
    }

    .photo-gallery {
        column-gap: 1.5rem;
    }
}

@media (max-width: 768px) {

    .photo-gallery {
        column-count: 1;
        /* 移动端单列 */
        column-gap: 0;
    }

    .photo-item {
        margin-bottom: 0.5rem;
    }

    .photo-caption {
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 28% 2rem 0;
    }
}