/* 模板页面专用样式 - templates.html */

/* 页面头部样式 */
.page-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.page-header-text {
    flex: 1;
    padding-right: 50px;
    position: relative;
}

.page-header-text h1 {
    position: relative;
    overflow: hidden;
}

.page-header-text h1 span {
    position: relative;
    color: var(--primary);
    display: inline-block;
}

.page-header-text h1 span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    transform-origin: left;
}

.page-header-text p {
}

.page-header-btns {
}

.page-header-btns .btn {
    position: relative;
    overflow: hidden;
}



.page-header-image {
    flex: 1;
    position: relative;
    z-index: 2;
}

/* 简洁模板展示区 */
.templates-showcase-clean {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 主模板预览 */
.template-preview-main {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.template-preview-main:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.12);
}

.template-preview-header {
    padding: 24px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.preview-title i {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.template-preview-main:hover .preview-title i {
    transform: rotate(15deg);
    background: rgba(255, 255, 255, 0.3);
}

.preview-title h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.preview-badge {
    background: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
}

.template-preview-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 模板模拟样式 */
.template-mockup {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

/* AOS 动画完成后的持续浮动效果 */
.page-header-image.aos-animate .template-mockup {
    animation: floatMockup 6s ease-in-out infinite;
}

@keyframes floatMockup {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-15px); 
    }
}


.mockup-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    z-index: 10;
    pointer-events: none;
}


.template-preview-main:hover .template-mockup {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.mockup-header {
    padding: 20px;
    background: var(--primary-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mockup-logo {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.mockup-logo i {
}

/* AOS 动画完成后的图标脉冲效果 */
.page-header-image.aos-animate .mockup-logo i {
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}


.mockup-title {
    width: 150px;
    height: 20px;
    background: var(--primary);
    border-radius: 4px;
    opacity: 0.7;
}

.mockup-body {
    padding: 20px;
}

.mockup-section {
    margin-bottom: 25px;
}

.mockup-line {
    height: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    margin-bottom: 10px;
}

.mockup-line.short {
    width: 70%;
}

.mockup-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mockup-row {
    display: flex;
    gap: 10px;
    transition: all 0.3s ease;
}

.mockup-row:hover {
    transform: translateX(5px);
    background: rgba(0, 0, 0, 0.01);
}

.mockup-row.header .mockup-cell {
    background: rgba(0, 0, 0, 0.08);
}

.mockup-row.header:hover {
    transform: none;
    background: none;
}

.mockup-cell {
    flex: 1;
    height: 16px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
}

/* AOS 动画完成后的单元格脉冲效果 */
.page-header-image.aos-animate .mockup-cell {
    animation: pulseCells 3s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes pulseCells {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}


.mockup-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.mockup-total-label {
    width: 80px;
    height: 16px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
}

.mockup-total-value {
    width: 100px;
    height: 24px;
    background: var(--primary-light);
    border-radius: 4px;
}

.mockup-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mockup-signature {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--dark);
    font-weight: 600;
}

.mockup-date {
    font-size: 13px;
    color: #acacac;
    position: relative;
    overflow: hidden;
}

.mockup-date::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary);
}

/* AOS 动画完成后的日期下划线动画 */
.page-header-image.aos-animate .mockup-date::after {
    animation: dateUnderline 4s ease-in-out infinite;
}

@keyframes dateUnderline {
    0%, 100% { width: 0; }
    50% { width: 100%; }
}


.template-preview-footer {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.template-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
}

.stat-item i {
    color: var(--primary);
}

/* 模板类型卡片 */
.template-types {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.template-type-item {
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.template-type-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.type-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.type-icon i {
    font-size: 24px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.template-type-item:hover .type-icon {
    background: var(--primary);
}

.template-type-item:hover .type-icon i {
    color: white;
    transform: scale(1.1);
}

.type-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--dark);
}

.type-info p {
    margin: 0;
    color: var(--gray);
    font-size: 0.9rem;
}

/* 模板分类 */
.template-categories {
    background: white;
    position: relative;
}

.categories-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    background: white;
    border-radius: 50px;
    padding: 8px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.category-tab {
    padding: 12px 35px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.category-tab.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 5px 15px rgba(24, 144, 255, 0.3);
}

/* 模板展示 */
.template-showcase {
    background: linear-gradient(135deg, #f5f7fa 0%, #e6f7ff 100%);
    position: relative;
    overflow: hidden;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
}

.template-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
}

.template-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.template-preview {
    height: 250px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    padding: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.template-card:hover .template-preview img {
    /*transform: scale(1.05);*/
}

.template-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.template-info {
    padding: 25px;
}

.template-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.template-info p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.template-stats {
    display: flex;
    gap: 15px;
}

.template-stat {
    display: flex;
    align-items: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.template-stat i {
    margin-right: 5px;
    color: var(--primary);
}

.template-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.template-free {
    color: var(--accent);
}

.template-actions {
    display: flex;
    gap: 10px;
}

.template-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
}

/* 自定义模板 */
.custom-templates {
    background: white;
}

.custom-content {
    display: flex;
    align-items: center;
    gap: 60px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 60px 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.custom-text {
    flex: 1;
}

.custom-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.custom-text p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.custom-image {
    flex: 1;
    text-align: center;
}

.custom-template-demo {
    max-width: 400px;
    margin: 0 auto;
}

.demo-template {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.demo-template:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.demo-header {
    background: var(--primary);
    padding: 15px 20px;
    color: white;
}

.demo-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.demo-content {
    padding: 30px;
    text-align: center;
}

.demo-logo {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.4s ease;
}

.demo-template:hover .demo-logo {
    transform: scale(1.1) rotate(10deg);
    background: var(--primary);
}

.demo-logo i {
    font-size: 32px;
    color: var(--primary);
    transition: all 0.4s ease;
}

.demo-template:hover .demo-logo i {
    color: white;
}

.demo-content h5 {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    color: var(--dark);
}

.demo-content p {
    color: var(--gray);
    margin: 0;
}

.custom-features {
    list-style: none;
    margin-bottom: 30px;
    padding: 0;
}

.custom-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.custom-features li i {
    color: var(--primary);
    margin-right: 15px;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .page-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header-text {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .template-types {
        flex-direction: column;
    }
    
    .custom-content {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 768px) {

    
    .template-preview-header {
        padding: 20px;
    }
    
    .preview-title i {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .preview-title h3 {
        font-size: 1.2rem;
    }
    
    .template-preview-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .categories-tabs {
        flex-direction: column;
        width: 100%;
        border-radius: 12px;
    }
    
    .category-tab {
        width: 100%;
        border-radius: 8px;
        margin-bottom: 5px;
        padding: 10px;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .template-actions {
        flex-direction: column;
    }
    
    .custom-content {
        padding: 40px 30px;
    }
    
    .custom-text h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .template-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .preview-badge {
        align-self: flex-start;
    }
    
    .template-mockup {
        max-width: 100%;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .template-card {
        margin: 0 10px;
    }
    
    .template-info {
        padding: 20px;
    }
    
    .template-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .template-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* 分类标签链接样式 */
.category-tab {
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.category-tab:hover:not(.active) {
    text-decoration: none !important;
    color: var(--primary);
    transform: scale(1.05);
}

.category-tab:focus {
    text-decoration: none !important;
    outline: none;
}

.category-tab:visited {
    text-decoration: none !important;
}

/* 模板预览大图样式 */
#template-preview-overlay {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); 
    cursor: pointer;
}

#preview-image {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    max-width: 90%; 
    max-height: 90%; 
    object-fit: contain; 
    border-radius: 8px; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

#close-preview {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    width: 40px; 
    height: 40px; 
    border: none; 
    background: rgba(255,255,255,0.9); 
    color: #333; 
    font-size: 20px; 
    font-weight: bold; 
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s ease; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}