/*
 * 现代化卡片设计
 * 创新设计，视觉效果提升
 */

/* ========== 现代化案例展示 ========== */

.cases-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
.cases-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(216, 183, 106, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.cases-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(19, 61, 122, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.cases-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.modern-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
    justify-items: center;
    align-items: start;
    padding: 0 20px;
}

.modern-case-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
}

/* 边框闪动效果 */
.modern-case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d8b76a, #f0c969, #d8b76a);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    z-index: 2;
}

/* 全边框发光效果 */
.modern-case-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    background: linear-gradient(45deg, #d8b76a, #f0c969, #d8b76a);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.modern-case-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: #d8b76a;
}

.modern-case-card:hover::before {
    transform: scaleX(1);
}

.modern-case-card:hover::after {
    opacity: 0.3;
}

.modern-case-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    z-index: 3;
}

.modern-case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 增强放大效果 */
.modern-case-card:hover .modern-case-image img {
    transform: scale(1.2);
}

/* 图片遮罩 */
.modern-case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(19, 61, 122, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px;
}

.modern-case-card:hover .modern-case-overlay {
    opacity: 1;
}

.modern-case-overlay .view-btn {
    background: #fff;
    color: #133D7A;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
}

.modern-case-card:hover .modern-case-overlay .view-btn {
    transform: translateY(0);
    opacity: 1;
}

/* 分类标签 */
.modern-case-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #d8b76a, #f0c969);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(216, 183, 106, 0.4);
}

.modern-case-content {
    padding: 25px;
}

.modern-case-title {
    font-size: 20px;
    font-weight: 700;
    color: #133D7A;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-case-subtitle {
    font-size: 14px;
    color: #d8b76a;
    font-weight: 500;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-case-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-case-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    gap: 10px;
    flex-wrap: wrap;
}

.modern-case-date {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.modern-case-date i {
    margin-right: 5px;
    color: #d8b76a;
}

.modern-case-arrow {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #d8b76a, #f0c969);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    transform: translateX(0);
    flex-shrink: 0;
    margin-left: 8px;
    font-size: 12px;
}

.modern-case-card:hover .modern-case-arrow {
    transform: translateX(3px);
    box-shadow: 0 3px 10px rgba(216, 183, 106, 0.4);
}

/* ========== 现代化新闻中心 ========== */

.news-section {
    padding: 50px 0;
    background: #fff;
}

.modern-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
    justify-items: center;
    align-items: start;
    padding: 0 20px;
}

/* 第一个新闻卡片 - 保持正常大小 */
.modern-news-card:first-child {
    background: linear-gradient(135deg, #d8b76a 0%, #f0c969 100%);
    color: #fff;
}

.modern-news-card:first-child .modern-news-content {
    padding: 25px;
    min-height: auto;
}

.modern-news-card:first-child .modern-news-title {
    color: #fff;
    font-size: 18px;
}

.modern-news-card:first-child .modern-news-excerpt {
    color: rgba(255, 255, 255, 0.8);
}

.modern-news-card:first-child .modern-news-meta {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.modern-news-card:first-child .modern-news-date {
    color: rgba(255, 255, 255, 0.8);
}

.modern-news-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.modern-news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.modern-news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.modern-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-news-card:hover .modern-news-image img {
    transform: scale(1.1);
}

/* 新闻类型标签 */
.modern-news-type {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #133D7A;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.modern-news-card:first-child .modern-news-type {
    background: rgba(216, 183, 106, 0.9);
    color: #fff;
}

.modern-news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modern-news-title {
    font-size: 18px;
    font-weight: 700;
    color: #133D7A;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.modern-news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.modern-news-date {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
}

.modern-news-date i {
    margin-right: 5px;
    color: #d8b76a;
}

.modern-news-views {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
}

.modern-news-views i {
    margin-right: 5px;
    color: #d8b76a;
}

/* 磁性按钮效果 */
.magnetic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    background: linear-gradient(135deg, #d8b76a 0%, #f0c969 100%);
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 20px rgba(216, 183, 106, 0.4);
    position: relative;
    overflow: hidden;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.magnetic-btn:hover::before {
    width: 300px;
    height: 300px;
}

.magnetic-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(216, 183, 106, 0.5);
}

/* ========== 响应式设计 ========== */

@media (max-width: 1200px) {
    .modern-cases-grid,
    .modern-news-grid {
        gap: 25px;
    }

    .modern-case-image,
    .modern-news-image {
        height: 220px;
    }
}

@media (max-width: 991px) {
    .modern-cases-grid,
    .modern-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .cases-section,
    .news-section {
        padding: 25px 0;
    }

    .cases-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .modern-cases-grid,
    .modern-news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
        margin: 0;
    }

    .modern-case-card {
        width: 100%;
        margin: 0;
        border-radius: 15px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid transparent;
    }

    /* 手机端边框闪动效果 */
    .modern-case-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #d8b76a, #f0c969, #d8b76a);
        transform: scaleX(0);
        transition: transform 0.3s ease;
        z-index: 2;
    }

    /* 手机端全边框发光效果 */
    .modern-case-card::after {
        content: '';
        position: absolute;
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
        border-radius: 16px;
        background: linear-gradient(45deg, #d8b76a, #f0c969, #d8b76a);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 1;
    }

    .modern-case-card:hover,
    .modern-case-card:active {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        border-color: #d8b76a;
    }

    .modern-case-card:hover::before,
    .modern-case-card:active::before {
        transform: scaleX(1);
    }

    .modern-case-card:hover::after,
    .modern-case-card:active::after {
        opacity: 0.3;
    }

    /* 手机端放大效果 */
    .modern-case-card:hover .modern-case-image img,
    .modern-case-card:active .modern-case-image img {
        transform: scale(1.1);
    }

    .modern-case-card:hover .modern-case-arrow,
    .modern-case-card:active .modern-case-arrow {
        transform: translateX(3px);
        box-shadow: 0 3px 10px rgba(216, 183, 106, 0.4);
    }

    .modern-case-image,
    .modern-news-image {
        height: 200px;
    }

    .modern-case-content,
    .modern-news-content {
        padding: 15px;
    }

    .modern-case-title {
        font-size: 18px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .modern-news-title {
        font-size: 16px;
        -webkit-line-clamp: 2;
    }

    /* 修复案例展示的meta区域 */
    .modern-case-meta {
        margin-top: 15px;
        padding-top: 15px;
        gap: 8px;
    }

    .modern-case-date {
        font-size: 12px;
        flex: 1;
        min-width: 60px;
    }

    .modern-case-arrow {
        width: 20px;
        height: 20px;
        font-size: 9px;
        margin-left: 0;
        flex-shrink: 0;
    }

    .magnetic-btn {
        padding: 12px 28px;
        font-size: 14px;
    }

    /* 恢复移动端动画效果 */
    .modern-case-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }

    .modern-case-card:hover .modern-case-arrow {
        transform: translateX(3px);
        box-shadow: 0 3px 10px rgba(216, 183, 106, 0.4);
    }
}

@media (max-width: 480px) {
    .modern-cases-grid,
    .modern-news-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .modern-case-image,
    .modern-news-image {
        height: 150px;
    }

    .modern-case-content,
    .modern-news-content {
        padding: 12px;
    }

    .modern-case-category,
    .modern-news-type {
        font-size: 9px;
        padding: 4px 10px;
        top: 12px;
        right: 12px;
    }

    .modern-case-title,
    .modern-news-title {
        font-size: 14px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        line-height: 1.3;
    }

    .modern-case-desc,
    .modern-news-excerpt {
        font-size: 11px;
        -webkit-line-clamp: 2;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    /* 小屏幕动画效果 */
    .modern-case-card {
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modern-case-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .modern-case-card:hover .modern-case-arrow {
        transform: translateX(2px);
        box-shadow: 0 2px 8px rgba(216, 183, 106, 0.4);
    }

    /* 特别优化案例展示的meta区域 */
    .modern-case-meta {
        margin-top: 12px;
        padding-top: 12px;
        gap: 6px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .modern-case-date {
        font-size: 10px;
        flex: 1;
        min-width: 50px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .modern-case-arrow {
        width: 20px;
        height: 20px;
        font-size: 9px;
        margin-left: 0;
        flex-shrink: 0;
    }

    .magnetic-btn {
        padding: 8px 20px;
        font-size: 12px;
        border-radius: 20px;
        width: auto;
        min-width: 100px;
    }

    /* 小屏幕动画效果 */
    .modern-case-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .modern-case-card:hover .modern-case-arrow {
        transform: translateX(2px);
        box-shadow: 0 2px 8px rgba(216, 183, 106, 0.4);
    }

    /* 针对超小屏幕的额外优化 */
    @media (max-width: 360px) {
        .modern-case-meta {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }
        
        .modern-case-date {
            width: 100%;
            text-align: left;
        }
        
        .modern-case-arrow {
            align-self: flex-end;
        }
    }
}
}

/* ========== 动画效果 ========== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* 延迟动画 */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* ========== 加载更多按钮区域 ========== */

.load-more-section {
    text-align: center;
    margin-top: 50px;
}

/* ========== 悬浮装饰元素 ========== */

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: #d8b76a;
    top: 10%;
    left: 5%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: #133D7A;
    top: 60%;
    right: 8%;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
    width: 40px;
    height: 40px;
    background: #d8b76a;
    bottom: 20%;
    left: 15%;
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ========== 图片占位符 ========== */

.img-placeholder-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d8b76a;
    font-size: 48px;
    position: relative;
}

.img-placeholder-modern::after {
    content: '加载中...';
    position: absolute;
    font-size: 14px;
    color: #999;
    bottom: 20px;
}

/* ========== 滚动触发的动画 ========== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
