/* 非暴力沟通卡片系统 - 案例卡片页面专用样式 */

/* ====== 页面标题区域 ====== */
.page-header {
    padding: 2rem 0;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
    margin-bottom: 2rem;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(228, 235, 245, 0.8) 0%, rgba(248, 249, 250, 0.2) 70%);
    transform: rotate(45deg);
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.header-illustration {
    max-height: 300px;
    transform: translateY(0);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* NVC 元素标签动画效果 */
.nvc-element-pulse {
    animation: elementPulse 3s infinite;
}

.nvc-element-pulse-delay-1 {
    animation-delay: 0.5s;
}

.nvc-element-pulse-delay-2 {
    animation-delay: 1s;
}

.nvc-element-pulse-delay-3 {
    animation-delay: 1.5s;
}

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

/* ====== 指引卡片 ====== */
.guide-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.guide-icon {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e9ff 0%, #f1f5ff 100%);
    font-size: 24px;
    color: #4a6cf7;
    margin: 0 auto 1rem;
}

.guide-card h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.guide-card p {
    color: #6c757d;
    margin-bottom: 0;
}

/* ====== 筛选区域 ====== */
.filter-container {
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    margin-bottom: 2rem;
}

.filter-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
}

.filter-body {
    padding: 1.5rem;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #495057;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 50px;
    font-size: 0.875rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.filter-chip:hover, .filter-chip:focus {
    background-color: #e9ecef;
    color: #212529;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.filter-chip.active {
    background-color: #4a6cf7;
    color: white;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #adb5bd;
    z-index: 1;
}

.search-input {
    padding-left: 40px;
    border-radius: 50px;
    border: 1px solid #eaeaea;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    flex-grow: 1;
}

.search-button {
    margin-left: 1rem;
    border-radius: 50px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ====== 筛选统计与结果区域 ====== */
.filter-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: #e9ecef;
    border-radius: 50px;
    font-size: 0.75rem;
}

.active-filter-tag i {
    margin-left: 0.5rem;
    cursor: pointer;
}

.no-results {
    padding: 3rem;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin-top: 2rem;
}

.no-results-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    background-color: #e9ecef;
    font-size: 30px;
    color: #6c757d;
    margin: 0 auto 1.5rem;
}

/* ====== 案例卡片 ====== */
.case-card {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    background-color: #ffffff;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.case-card .card-body {
    padding: 1.5rem;
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.case-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.case-category {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.case-tag {
    padding: 0.25rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 50px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.case-tag.tag-authority {
    background-color: #e9f2ff;
    color: #4a6cf7;
}

.case-tag.tag-equal {
    background-color: #e9fff2;
    color: #4acf96;
}

.case-tag.tag-mixed {
    background-color: #fff6e9;
    color: #f7994a;
}

.case-tag.tag-emotion {
    background-color: #ffe9e9;
    color: #f74a6c;
}

.case-tag.tag-expression {
    background-color: #e9f9ff;
    color: #4aacf7;
}

.case-tag.tag-conflict {
    background-color: #f9e9ff;
    color: #a94af7;
}

.case-bookmark {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #adb5bd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.case-bookmark:hover {
    background-color: #e9ecef;
    color: #4a6cf7;
}

.case-bookmark.active {
    background-color: #4a6cf7;
    color: white;
}

.case-description {
    margin-bottom: 1.25rem;
    color: #495057;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.case-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.case-nvc-elements {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.case-nvc-element {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    display: inline-flex;
    align-items: center;
}

.case-nvc-element i {
    margin-right: 0.25rem;
    font-size: 0.7rem;
}

.case-nvc-element.nvc-observation {
    background-color: rgba(74, 108, 247, 0.1);
    color: #4a6cf7;
}

.case-nvc-element.nvc-feeling {
    background-color: rgba(247, 74, 108, 0.1);
    color: #f74a6c;
}

.case-nvc-element.nvc-need {
    background-color: rgba(74, 207, 150, 0.1);
    color: #4acf96;
}

.case-nvc-element.nvc-request {
    background-color: rgba(247, 153, 74, 0.1);
    color: #f7994a;
}

.case-actions {
    display: flex;
    gap: 0.5rem;
}

.case-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #eaeaea;
    background-color: #fff;
    color: #495057;
}

.case-btn i {
    margin-right: 0.4rem;
}

.case-btn:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.case-btn-primary {
    background-color: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}

.case-btn-primary:hover {
    background-color: #3755d8;
    color: white;
    border-color: #3755d8;
}

/* 案例详情模态框 */
.case-detail-modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.case-detail-modal .modal-header {
    border-bottom: none;
    padding: 1.5rem 1.5rem 0.5rem;
}

.case-detail-modal .modal-body {
    padding: 1rem 1.5rem;
}

.case-detail-modal .modal-title {
    font-weight: 600;
}

.case-detail-section {
    margin-bottom: 2rem;
}

.case-detail-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
}

.case-detail-section-title i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.traditional-expression, .nvc-expression {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.traditional-expression {
    background-color: #fff2f2;
    border-left: 4px solid #dc3545;
}

.nvc-expression {
    background-color: #f2fff5;
    border-left: 4px solid #4acf96;
}

.expression-label {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0 0 0 8px;
}

.traditional-expression .expression-label {
    background-color: #dc3545;
    color: white;
}

.nvc-expression .expression-label {
    background-color: #4acf96;
    color: white;
}

.nvc-analysis {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.nvc-element-block {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
}

.nvc-element-block:last-child {
    margin-bottom: 0;
}

.nvc-element-icon {
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
}

.nvc-element-content {
    flex-grow: 1;
}

.nvc-element-content h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.observation-block {
    background-color: rgba(74, 108, 247, 0.1);
}

.observation-block .nvc-element-icon {
    background-color: #4a6cf7;
    color: white;
}

.feelings-block {
    background-color: rgba(247, 74, 108, 0.1);
}

.feelings-block .nvc-element-icon {
    background-color: #f74a6c;
    color: white;
}

.needs-block {
    background-color: rgba(74, 207, 150, 0.1);
}

.needs-block .nvc-element-icon {
    background-color: #4acf96;
    color: white;
}

.requests-block {
    background-color: rgba(247, 153, 74, 0.1);
}

.requests-block .nvc-element-icon {
    background-color: #f7994a;
    color: white;
}

.case-detail-modal .modal-footer {
    border-top: none;
    padding: 0.5rem 1.5rem 1.5rem;
    justify-content: space-between;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* 加载指示器 */
.cards-loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .page-header {
        padding: 1.5rem 0;
    }
}

@media (max-width: 767.98px) {
    .search-container {
        flex-direction: column;
    }
    
    .search-button {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .case-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .case-actions {
        margin-top: 1rem;
        width: 100%;
    }
    
    .case-btn {
        flex: 1;
        justify-content: center;
    }
}

/* 修改渐变边框样式，默认隐藏渐变边框，只在悬停时显示 */
.case-card.gradient-border::before {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.case-card.gradient-border:hover::before {
    opacity: 1;
}

/* 确保卡片内容有白色背景 */
.case-card.gradient-border::after {
    background: white;
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 9px;
    z-index: -1;
} 