/* ============================================
   尼日利亚国际照明展览会 - 往届回顾页面样式
   版本: 2.1 (英雄区域高度进一步优化至适中高度)
   ============================================ */

/* CSS变量定义 */
:root {
    --primary-color: #e67e22;
    --secondary-color: #27ae60;
    --accent-color: #f39c12;
    --dark-bg: #1a1a2e;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.12);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.15);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* ============================================
   头部区域 - Hero Section (高度进一步优化至适中)
   ============================================ */
.hero-section {
    position: relative;
    min-height: 30vh;      /* 从42vh降低至30vh，达到一般页面英雄区高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 20px 28px;  /* 大幅减小上下内边距，使区域更紧凑 */
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(230,126,34,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(39,174,96,0.1) 0%, transparent 50%);
    animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hero-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(230,126,34,0.15);
    border: 1px solid rgba(230,126,34,0.3);
    color: var(--primary-color);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
    animation: fadeInDown 0.8s ease-out;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

.hero-title {
    position: relative;
    font-size: clamp(1.4rem, 4.5vw, 2.6rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 6px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    position: relative;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-stats {
    position: relative;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 装饰粒子 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 35%; animation-delay: 4s; }
.particle:nth-child(4) { left: 50%; animation-delay: 1s; }
.particle:nth-child(5) { left: 65%; animation-delay: 3s; }
.particle:nth-child(6) { left: 80%; animation-delay: 5s; }
.particle:nth-child(7) { left: 90%; animation-delay: 2.5s; }

@keyframes float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* ============================================
   导航栏
   ============================================ */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 10px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo img {
    border-radius: 50%;
    object-fit: cover;
    width: 42px;
}

.nav-logo span {
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ============================================
   主内容区域
   ============================================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 16px 80px;
}

/* 分类标签 */
.filter-section {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   瀑布流布局 - Masonry Grid
   ============================================ */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

@media (max-width: 1024px) {
    .masonry-grid { column-count: 2; }
}

@media (max-width: 640px) {
    .masonry-grid { column-count: 1; }
}

/* 图片卡片 */
.photo-card {
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-slow);
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
}

.photo-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.photo-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px) scale(1.01);
}

/* 图片容器 */
.photo-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.photo-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(0,0,0,0.4) 100%
    );
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.photo-card:hover .photo-wrapper::before {
    opacity: 1;
}

.photo-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
    will-change: transform;
}

.photo-card:hover .photo-wrapper img {
    transform: scale(1.08);
}

/* 懒加载占位 */
.photo-wrapper .lazy-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.photo-wrapper img.loaded + .lazy-placeholder {
    display: none;
}

/* 图片信息覆盖层 */
.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-fast);
}

.photo-card:hover .photo-overlay {
    transform: translateY(0);
    opacity: 1;
}

.photo-category {
    display: inline-block;
    background: rgba(230,126,34,0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
}

.photo-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* 卡片底部信息 */
.card-info {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.card-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.card-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0;
    transform: scale(0.8);
}

.photo-card:hover .card-action {
    opacity: 1;
    transform: scale(1);
}

.card-action:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 15px rgba(230,126,34,0.4);
}

/* ============================================
   灯箱模态框
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(20px);
}

.lightbox.active {
    display: flex;
    animation: lightboxIn 0.3s ease-out;
}

@keyframes lightboxIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: lightboxImgIn 0.4s ease-out 0.1s both;
}

@keyframes lightboxImgIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    max-width: 600px;
    padding: 0 20px;
}

.lightbox-caption h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.lightbox-caption p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* 灯箱导航箭头 */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    z-index: 10;
    font-size: 1.5rem;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.lightbox-counter {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.4);
    color: rgba(255,255,255,0.8);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* ============================================
   Logo展示区域
   ============================================ */
.logo-section {
    margin-top: 60px;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.logo-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230,126,34,0.03) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    padding: 30px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
}

.logo-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.logo-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    display: block;
    object-fit: contain;
    object-position: center;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 24px;
    color: var(--text-primary);
}

.logo-desc {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 0.95rem;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--dark-bg);
    color: rgba(255,255,255,0.7);
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-top: 20px;
}

/* ============================================
   动画关键帧
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   响应式优化 (含英雄区域移动端适配)
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        min-height: 26vh;
        padding: 24px 16px 20px;
    }
    .hero-badge {
        margin-bottom: 8px;
        font-size: 0.7rem;
        padding: 4px 12px;
    }
    .hero-title {
        margin-bottom: 4px;
        font-size: clamp(1.2rem, 4vw, 2rem);
    }
    .hero-stats {
        gap: 20px;
    }
    .stat-number {
        font-size: 1.3rem;
    }
    .main-content {
        padding: 24px 12px 60px;
    }
    .masonry-grid {
        column-gap: 12px;
    }
    .photo-card {
        margin-bottom: 12px;
        border-radius: var(--radius-sm);
    }
    .card-info {
        padding: 12px 16px;
    }
    .nav-links {
        display: none;
    }
    .lightbox-img {
        max-width: 95vw;
        max-height: 70vh;
    }
    .logo-section {
        margin-top: 40px;
        padding: 40px 16px;
    }
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .lightbox-nav.prev { left: 10px; }
    .lightbox-nav.next { right: 10px; }
    .lightbox-caption {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 22vh;
        padding: 20px 16px 16px;
    }
    .hero-title {
        font-size: 1.2rem;
    }
    .hero-subtitle {
        font-size: 0.75rem;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .photo-overlay {
        padding: 12px;
    }
    .photo-title {
        font-size: 0.85rem;
    }
    .lightbox-nav {
        display: none;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .photo-overlay {
        transform: translateY(0);
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
        padding-top: 40px;
    }
    .card-action {
        opacity: 1;
        transform: scale(1);
    }
}

/* 图片点击放大优化 */
.photo-wrapper {
    cursor: zoom-in;
}
.photo-wrapper img {
    cursor: zoom-in;
}
.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 56px;
    height: 56px;
    background: rgba(230, 126, 34, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 3;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: 0 8px 30px rgba(230, 126, 34, 0.4);
}
.photo-card:hover .zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}
.zoom-icon svg {
    width: 24px;
    height: 24px;
}
.photo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background var(--transition-fast);
    z-index: 1;
    pointer-events: none;
}
.photo-card:hover .photo-wrapper::after {
    background: rgba(0, 0, 0, 0.15);
}