/* 未来造物案例展示 - 前台样式 v3.0
   核心修复：图片严格限定在占位区内，使用 object-fit: cover 防止溢出/错位
   新增：案例详情弹窗（多图画廊） */

.wlzw-portfolio *,
.wlzw-portfolio *::before,
.wlzw-portfolio *::after {
    box-sizing: border-box;
}

.wlzw-portfolio {
    --wlzw-bg: #0a0a0f;
    --wlzw-text: #ffffff;
    --wlzw-text-muted: rgba(255, 255, 255, 0.65);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    background-color: var(--wlzw-bg);
    color: var(--wlzw-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

/* 顶部标题区 */
.wlzw-portfolio-header {
    max-width: 640px;
    margin-bottom: 48px;
}

.wlzw-section-tag {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #00d084;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.wlzw-section-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.wlzw-gradient-text {
    background: linear-gradient(90deg, #ff2d78, #7b2ff7, #2563ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.wlzw-section-desc {
    font-size: 16px;
    color: var(--wlzw-text-muted);
    line-height: 1.75;
    margin: 0;
}

/* 筛选栏 */
.wlzw-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.wlzw-filter-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.wlzw-filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.wlzw-filter-btn.active {
    background: linear-gradient(90deg, #ff2d78, #7b2ff7, #2563ff);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(123, 47, 247, 0.25);
}

/* 画廊网格 */
.wlzw-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 360px;
    gap: 24px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .wlzw-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 280px;
        gap: 16px;
    }
}

.wlzw-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wlzw-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

/* 图片占位区 */
.wlzw-image-slot {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #7b2ff7 0%, #2563ff 100%);
}

.wlzw-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
    margin: 0;
    padding: 0;
    border: 0;
}

.wlzw-card:hover .wlzw-card-image {
    transform: scale(1.04);
}

/* 多图数量徽章 */
.wlzw-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 2px;
    pointer-events: none;
    z-index: 2;
}

/* 占位提示 */
.wlzw-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.wlzw-placeholder-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.wlzw-placeholder-text {
    font-size: 15px;
    font-weight: 600;
}

/* 卡片信息 */
.wlzw-card-info {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #111118;
}

.wlzw-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.wlzw-card-category {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

/* 筛选隐藏 */
.wlzw-card.hidden {
    display: none;
}

/* 空状态 */
.wlzw-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--wlzw-text-muted);
    padding: 60px 20px;
}

/* ============================================================
   案例详情弹窗（多图画廊）
   ============================================================ */

.wlzw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wlzw-fade-in 0.3s ease;
}

@keyframes wlzw-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wlzw-modal {
    position: relative;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    background: #111118;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: wlzw-scale-in 0.3s ease;
}

@keyframes wlzw-scale-in {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.wlzw-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 100;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wlzw-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wlzw-modal-content {
    display: flex;
    flex-direction: row;
    max-height: 90vh;
    overflow: hidden;
}

@media (max-width: 768px) {
    .wlzw-modal-content {
        flex-direction: column;
    }
}

/* 左侧：画廊区 */
.wlzw-modal-gallery {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #0a0a0f;
}

.wlzw-modal-main-image-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

@media (max-width: 768px) {
    .wlzw-modal-main-image-wrap {
        min-height: 300px;
    }
}

#wlzw-modal-main-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

/* 导航箭头 */
.wlzw-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}

.wlzw-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wlzw-nav-prev {
    left: 16px;
}

.wlzw-nav-next {
    right: 16px;
}

.wlzw-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* 图片计数器 */
.wlzw-image-counter {
    position: absolute;
    bottom: 14px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

/* 缩略图条 */
.wlzw-modal-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    background: #0d0d14;
    flex-shrink: 0;
}

.wlzw-modal-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.wlzw-modal-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.wlzw-modal-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.wlzw-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.5;
}

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

.wlzw-thumb:hover {
    opacity: 0.85;
}

.wlzw-thumb.active {
    border-color: #7b2ff7;
    opacity: 1;
}

/* 右侧：信息区 */
.wlzw-modal-info {
    width: 340px;
    flex-shrink: 0;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    background: #111118;
}

@media (max-width: 768px) {
    .wlzw-modal-info {
        width: 100%;
        padding: 24px 20px;
        max-height: 30vh;
    }
}

.wlzw-modal-category {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #00d084;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.wlzw-modal-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 20px;
    line-height: 1.2;
}

.wlzw-modal-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 加载状态 */
.wlzw-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}
