/* Certificates 3D Album Styles - 从根目录styles.css分离出来 */

/* Certificates Section */
.certificates-section {
    position: relative;
    padding: 5rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/certificate_bg.jpg');
    background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)), url('../images/certificate_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
    overflow: visible;
}
.certificates-section .section-title{
    color:#000000 !important;
}

.certificates-section .container {
    position: relative;
    z-index: 10;
    max-width: 100%;
    width: 100%;
    margin: 0;
    text-align: center;
    overflow: hidden;
    padding: 0 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 3D Album Styles */
.certificates-3d-album {
    width: 100%;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    overflow: visible;
    max-width: 800px;
    margin: 0 auto;
    perspective: 1000px;
}

.album-container {
    position: relative;
    /* width: 1400px;
    max-width: 90vw; */
    height: 500px;
    perspective: 2000px;
    perspective-origin: center center;
    margin: 0 auto;
}

.certificate-3d-card {
    position: absolute;
    width: 280px;
    height: 380px;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    /* 默认位置 - 隐藏在后面 */
    transform: translate(-50%, -50%) rotateY(0deg) translateZ(-300px) scale(0.6);
    opacity: 0.2;
    z-index: 1;
}

.certificate-3d-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* 激活状态 - 固定在中心位置 */
.certificate-3d-card.active {
    transform: translate(-50%, -50%) rotateY(0deg) translateZ(0px) scale(1.0);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* 左侧卡片 - 水平排列 */
.certificate-3d-card.left {
    transform: translate(calc(-50% - 250px), -50%) rotateY(0deg) translateZ(-50px) scale(0.85);
    opacity: 1;
    z-index: 5;
}

/* 右侧卡片 - 水平排列 */
.certificate-3d-card.right {
    transform: translate(calc(-50% + 250px), -50%) rotateY(0deg) translateZ(-50px) scale(0.85);
    opacity: 1;
    z-index: 5;
}

/* 远左侧卡片 - 水平排列 */
.certificate-3d-card.far-left {
    transform: translate(calc(-50% - 400px), -50%) rotateY(0deg) translateZ(-100px) scale(0.75);
    opacity: 1;
    z-index: 3;
}

/* 远右侧卡片 - 水平排列 */
.certificate-3d-card.far-right {
    transform: translate(calc(-50% + 400px), -50%) rotateY(0deg) translateZ(-100px) scale(0.75);
    opacity: 1;
    z-index: 3;
}

/* 悬停效果 */
.certificate-3d-card:hover {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.certificate-3d-card.active:hover {
    transform: translate(-50%, -50%) rotateY(0deg) rotateX(-5deg) translateZ(50px) scale(1.1);
}

/* 控制按钮 */
.album-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 20;
    pointer-events: none;
}

.album-btn {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.album-btn.prev-btn {
    left: -100px;
}

.album-btn.next-btn {
    right: -100px;
}

.album-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #000;
}

.certificates-note {
    position: relative;
    z-index: 15;
    color: var(--text-white);
    color: black;
    font-size: 1rem;
    text-align: center;
}

/* 证书大图查看模态框样式 */
.certificate-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.certificate-modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.certificate-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.certificate-modal-close:hover,
.certificate-modal-close:focus {
    color: #ccc;
    text-decoration: none;
}

#certificateModalImg {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalImageFadeIn 0.3s ease-out;
}

.certificate-modal-caption {
    margin-top: 20px;
    text-align: center;
    color: #fff;
    font-size: 18px;
    padding: 0 20px;
}

@keyframes modalImageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式设计 */
/* 大屏幕优化 */
@media (min-width: 1600px) {
    .album-container {
        /* width: 1400px;
        max-width: 85vw; */
        margin: 0 auto;
    }
    
    .album-btn.prev-btn {
        left: -200px;
    }
    
    .album-btn.next-btn {
        right: -200px;
    }
}

/* 模态框响应式设计 */
@media (max-width: 768px) {
    .certificate-modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    #certificateModalImg {
        max-height: 70vh;
        margin: 0 10px;
    }
    
    .certificate-modal-caption {
        font-size: 16px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .certificate-modal-close {
        top: 5px;
        right: 15px;
        font-size: 25px;
    }
    
    #certificateModalImg {
        max-height: 60vh;
        margin: 0 5px;
    }
    
    .certificate-modal-caption {
        font-size: 14px;
        padding: 0 10px;
        margin-top: 15px;
    }
}

/* 中等屏幕 */
@media (max-width: 1400px) and (min-width: 769px) {
    .album-container {
        width: 1200px;
        max-width: 85vw;
        margin: 0 auto;
    }
    
    .album-btn.prev-btn {
        left: -80px;
    }
    
    .album-btn.next-btn {
        right: -80px;
    }
}

/* 平板端 */
@media (max-width: 1024px) and (min-width: 769px) {
    .certificates-section .container {
        padding: 0 80px;
    }
    
    .album-container {
        max-width: 90vw;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    .certificates-section{
        padding: 2rem 0;
    }
    .certificates-section .container {
        padding: 0 20px;
        overflow: hidden;
    }
    .certificates-section .container .text-center.mb-5{
        margin-bottom: 1.25rem !important;
    }
    
    .certificates-3d-album .album-container {
        width: 100% !important;
        max-width: 100vw !important;
        height: 400px !important;
        overflow: hidden !important;
        position: relative !important;
    }
    
    .certificates-3d-album .certificate-3d-card {
        width: 200px !important;
        height: 280px !important;
        display: block !important;
        opacity: 1 !important;
    }
    
    .certificates-3d-album .certificate-3d-card.active {
        transform: translate(-50%, -50%) rotateY(0deg) translateZ(0px) scale(1) !important;
        opacity: 1 !important;
        z-index: 3 !important;
    }
    
    .certificates-3d-album .certificate-3d-card.left {
        transform: translate(calc(-50% - 120px), -50%) rotateY(0deg) translateZ(-30px) scale(0.75) !important;
        opacity: 0.8 !important;
        z-index: 2 !important;
    }
    
    .certificates-3d-album .certificate-3d-card.right {
        transform: translate(calc(-50% + 120px), -50%) rotateY(0deg) translateZ(-30px) scale(0.75) !important;
        opacity: 0.8 !important;
        z-index: 2 !important;
    }
    
    .certificates-3d-album .certificate-3d-card.far-left,
    .certificates-3d-album .certificate-3d-card.far-right {
        display: none !important;
    }
    
    .certificates-3d-album .album-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border: none !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .certificates-3d-album .album-btn.prev-btn {
        left: -10px !important;
    }
    
    .certificates-3d-album .album-btn.next-btn {
        right: -10px !important;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .certificates-section .container {
        padding: 0 15px;
    }
    
    .album-container {
        height: 320px;
        max-width: 100vw;
    }
    
    .certificate-3d-card {
        width: 160px;
        height: 220px;
    }
    
    .certificate-3d-card.left {
        transform: translate(calc(-50% - 90px), -50%) rotateY(0deg) translateZ(-20px) scale(0.7);
    }
    
    .certificate-3d-card.right {
        transform: translate(calc(-50% + 90px), -50%) rotateY(0deg) translateZ(-20px) scale(0.7);
    }
    
    .album-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .album-btn.prev-btn {
        left: 5px;
    }
    
    .album-btn.next-btn {
        right: 5px;
    }
}