/**
 * 摄影画廊样式
 * Photography Gallery Styles
 */

/* ===== 画廊容器 ===== */
.photo-gallery-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

/* ===== 封面区域 ===== */
.category-photography .pattern-center {
    height: 480px;
}

.category-photography .pattern-attachment::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
}

.category-photography .pattern-center header.pattern-header {
    top: 50%;
    transform: translateY(-50%);
}

.category-photography .cat-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    letter-spacing: 0.28em;
    text-indent: 0.28em;
    font-weight: 600;
    text-shadow: 0 4px 24px rgba(0,0,0,0.45);
    position: relative;
    display: inline-block;
    padding-bottom: 18px;
}

.category-photography .cat-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
}

.category-photography .cat-des {
    margin-top: 14px;
    font-size: 0.95rem;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* ===== 瀑布流画廊（列式瀑布，保留照片原始比例） ===== */
.photo-gallery-grid {
    columns: 3 320px;
    column-gap: 18px;
    padding: 0;
}

.photo-gallery-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.photo-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* ===== 缩略图 ===== */
.photo-thumb {
    width: 100%;
    overflow: hidden;
}

.photo-thumb img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.photo-gallery-item:hover .photo-thumb img {
    transform: scale(1.06);
    filter: brightness(1.04) saturate(1.06);
}

.photo-placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8e8, #f7f7f7);
    color: #ccc;
    font-size: 3rem;
}

/* ===== 信息浮层（悬停浮现 + 玻璃拟态 EXIF） ===== */
.photo-overlay {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
    padding: 72px 22px 20px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.photo-gallery-item:hover .photo-overlay,
.photo-gallery-item:focus-within .photo-overlay {
    opacity: 1;
    transform: translateY(0);
}

.photo-info-grid {
    color: #fff;
}

.photo-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.photo-exif {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.72rem;
}

.exif-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.exif-item i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.exif-settings {
    font-family: 'Fira Code', 'Noto Sans SC', monospace;
}

/* ===== 空状态 ===== */
.photo-empty {
    text-align: center;
    padding: 100px 20px;
    color: #999;
}

.photo-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.photo-empty p {
    font-size: 1.1rem;
    margin: 0;
}

/* ===== 分页 ===== */
.photo-pagination {
    text-align: center;
    padding: 48px 0 8px;
}

.photo-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 6px;
    margin: 0 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.photo-pagination .page-numbers.current {
    background: var(--theme-skin-matching, #a4cdf6);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(164, 205, 246, 0.45);
}

.photo-pagination .page-numbers:hover {
    background: var(--theme-skin, #505050);
    color: #fff;
    transform: translateY(-2px);
}

/* ===== 详情页 ===== */
.single-post.category-photography .photo-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    padding: 15px 0;
    margin: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.photo-detail-meta .meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.photo-detail-meta .meta-row i {
    width: 20px;
    color: var(--theme-skin-matching, #a4cdf6);
    text-align: center;
}

.photo-detail-meta .meta-row strong {
    color: #333;
    margin-right: 4px;
}

/* ===== 深色模式适配 ===== */
body.dark .photo-gallery-item {
    background: rgba(30, 30, 35, 0.7);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

body.dark .photo-gallery-item:hover {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

body.dark .photo-pagination .page-numbers {
    background: rgba(40, 40, 46, 0.85);
    color: #ddd;
}

body.dark .photo-pagination .page-numbers.current {
    color: #fff;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .photo-gallery-grid {
        columns: 2 280px;
    }
}

@media (max-width: 768px) {
    .photo-gallery-wrapper {
        padding: 32px 14px 48px;
    }

    .category-photography .pattern-center {
        height: 340px;
    }

    .photo-gallery-grid {
        columns: 2 160px;
        column-gap: 12px;
    }

    .photo-gallery-item {
        margin-bottom: 12px;
        border-radius: 10px;
    }

    /* 触屏无 hover，浮层常驻精简版 */
    .photo-overlay {
        opacity: 1;
        transform: none;
        padding: 44px 14px 12px;
    }

    .photo-exif .exif-item:nth-child(n+3) {
        display: none;
    }

    .photo-title {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .exif-item {
        font-size: 0.66rem;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .photo-gallery-grid {
        columns: 1;
    }

    .photo-exif .exif-item:nth-child(n+3) {
        display: inline-flex;
    }
}
