/* * 修复版 style.css
 * * 修复重点: 
 * 1. 恢复 Search/Dropdown 样式
 * 2. 缩减标题与内容、板块之间的间距 (Spacing)
 * 3. 保持 4 列布局
 */

/* 1. 引入 Inter 字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.5; /* 稍微减小行高以显得更紧凑 */
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 20px 10px; /* 减少顶部 padding (原 40px) */
}

/* --- 2. 修复 Controls (搜索框 & 下拉单) --- */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* 控件之间的间距 */
    margin-bottom: 0; /* 控件与第一个标题的距离 */
    align-items: center;
}

/* 搜索框 & 下拉菜单通用样式 */
input[type="search"], 
input[type="text"], 
select {
    flex: 1; /* 弹性宽度 */
    min-width: 200px;
    max-width: 320px; /* 限制最大宽度 */
    padding: 0.6rem 10px; /* 舒适的内边距 */
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    border: 1px solid #d1d5db; /* 浅灰边框 */
    border-radius: 8px; /* 圆角 */
    background-color: #fff;
    color: #374151;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* 悬停与聚焦状态 */
input:hover, select:hover {
    border-color: #9ca3af;
}

input:focus, select:focus {
    border-color: #0069ff;
    box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.1); /* 聚焦时的蓝色光晕 */
}

/* 搜索结果文字 */
.result-count {
    font-size: 0.9rem;
    color: #6b7280;
    margin-left: 5px;
}

/* --- 3. 调整排版与间距 (Spacing Fixes) --- */

h1 {
    font-weight: 700;
    font-size: 1.85rem; /* 稍微调小一点点让比例更协调 */
    margin-top: 0;
    margin-bottom: 0 0 6px 0; /* 极小的间距 -> Tags */
    color: #111827;
    letter-spacing: -0.02em;
}

.tags {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem; /* 减少 Tags -> Description 的距离 (原 1.5rem) */
}

.tag {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px; /* 稍微方一点的圆角看起来更专业 */
    white-space: nowrap;
}

.tag.blue { background-color: #e0f2fe; color: #0c4a6e; }
.tag.date { background-color: #f3f4f6; color: #4b5563; }

p.description {
    max-width: 100%;
    font-size: 1rem;
    margin-bottom: 1rem; /* 大幅减少 Description -> Photos 的距离 (原 2.5rem) */
    color: #4b5563;
    line-height: 1.6;
}

/* Section 容器 */
section.gallery-section {
    width: 100%;
    margin-top: 0 !important;    
    margin-bottom: 1.5rem; /* 减少不同活动之间的距离 (原 3rem) */
    border-bottom: 1px solid #e5e7eb; /* 可选：添加分割线让区分更明显 */
    padding-top: 0;
    padding-bottom: 2.0rem;
    /* 新增这行：消除 section 本身的顶部空白 */
  
}
/* 移除最后一个 section 的边框和边距 */
section.gallery-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --- 4. 保持网格布局 (Grid Layout) --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 电脑 4 列 */
    gap: 20px;
    width: 100%;
    align-items: start;
}

.image-card {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* 更轻的阴影 */
    background-color: #f3f4f6;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

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

/* Show More 按钮 */
.show-more-container {
    margin-top: 1.5rem; /* 减少按钮上方间距 */
    display: flex;
    justify-content: flex-start;
}

.show-more {
    padding: 0.6rem 1.5rem;
    background-color: #0069ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}
.show-more:hover { background-color: #0056d3; }

/* Lightbox - 保持不变 */
.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}
.lightbox.visible { opacity: 1; visibility: visible; }
.lightbox-content { max-width: 90vw; max-height: 90vh; }
.lightbox-content img { max-width: 100%; max-height: 90vh; object-fit: contain; }

/* --- 响应式 --- */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr); /* 平板 3 列 */
        gap: 12px;
    }
    .container { padding: 20px 15px; }
    input[type="search"], select { max-width: 100%; } /* 控件全宽 */
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* 手机 2 列 */
        gap: 8px;
    }
    h1 { font-size: 1.5rem; }
    .controls { flex-direction: column; align-items: stretch; gap: 10px; }
}