/* 案例墙页面专用样式 */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --male-color: #3b82f6;
    --female-color: #ec4899;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    align-items: flex-start;
}

.brand-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.brand-tagline {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -2px;
    white-space: nowrap;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand:hover .brand-name {
    color: var(--secondary-color);
}

.navbar-brand:hover .brand-tagline {
    color: rgba(255, 255, 255, 1);
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.cases-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 100px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(2, 6, 23, 0.8) 100%),
        url('../img/bg/stu-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter Section */
.filter-section {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Cases Grid */
.cases-grid-section {
    min-height: 60vh;
}

.case-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    opacity: 1;
    transform: scale(1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: fadeInUp 0.6s ease-out;
}

/* 为Bootstrap列添加底部间距 */
.cases-grid-section .col-lg-4,
.cases-grid-section .col-md-6,
.cases-grid-section .col-sm-12 {
    margin-bottom: calc(2rem + 120px);
}

.case-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.case-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.case-avatar {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
}

.case-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    transition: all 0.3s ease;
    /* 优化图片显示，突出脸部 */
    filter: brightness(1.2) contrast(1.3) saturate(1.1);
    position: relative;
    z-index: 2;
}

/* 移除背景遮罩，让头像更清晰 */
.case-avatar::after {
    display: none;
}

/* 悬停时进一步优化头像显示 */
.case-card:hover .case-avatar img {
    filter: brightness(1.3) contrast(1.4) saturate(1.2);
    transform: scale(1.08);
}

.case-avatar::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    transition: all 0.3s ease;
}

.case-avatar.male::before {
    background: linear-gradient(45deg, var(--male-color), var(--accent-color));
}

.case-avatar.female::before {
    background: linear-gradient(45deg, var(--female-color), var(--secondary-color));
}

.case-card:hover .case-avatar::before {
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.case-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.case-field {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 0.25rem 1rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.case-field.ai {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

.case-field.security {
    background: linear-gradient(45deg, var(--danger-color), var(--warning-color));
}

.case-field.cloud {
    background: linear-gradient(45deg, var(--success-color), var(--accent-color));
}

.case-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    height: 3.2em; /* 固定高度为2行文本 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.case-content-top {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.case-content-bottom {
    margin-top: auto;
}

.case-achievements {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.achievement-badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Statistics Section */
.statistics-section {
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-muted);
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
    
    .case-card {
        padding: 1.5rem;
    }
    
    .case-avatar {
        width: 100px;
        height: 100px;
    }
    
    .case-name {
        font-size: 1.25rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-icon {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .case-card {
        padding: 1rem;
    }
    
    .case-avatar {
        width: 80px;
        height: 80px;
    }
    
    .achievements {
        flex-direction: column;
        align-items: center;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}



.stat-number {
    animation: pulse 2s infinite;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分页组件样式 */
.pagination-container {
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.pagination-info .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 44px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pagination-btn.disabled {
    background: rgba(30, 41, 59, 0.3);
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-btn.disabled:hover {
    background: rgba(30, 41, 59, 0.3);
    border-color: var(--border-color);
    color: var(--text-muted);
    transform: none;
    box-shadow: none;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0.75rem 0.5rem;
    font-weight: 500;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-nav i {
    font-size: 0.875rem;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination-container {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    
    .pagination-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.875rem;
        min-width: 40px;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-info {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .pagination-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        min-width: 36px;
    }
    
    .pagination-nav span {
        display: none;
    }
}

/* 班级合照区域样式 */
.class-photos-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.5) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.class-photo-card {
    height: 100%;
    transition: all 0.3s ease;
}

.photo-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 300px;
}

.class-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.photo-info h5 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.photo-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.class-photo-card:hover .photo-wrapper {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.class-photo-card:hover .class-photo {
    transform: scale(1.1);
}

.class-photo-card:hover .photo-overlay {
    transform: translateY(0);
}

/* 响应式班级合照 */
@media (max-width: 992px) {
    .photo-wrapper {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .photo-wrapper {
        height: 220px;
    }
    
    .photo-overlay {
        padding: 1.5rem 1rem 1rem;
    }
    
    .photo-info h5 {
        font-size: 1rem;
    }
    
    .photo-info p {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .photo-wrapper {
        height: 200px;
    }
    
    .photo-overlay {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .photo-info h5 {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }
    
    .photo-info p {
        font-size: 0.8rem;
    }
}