/* 横向排列企业卡片样式 */

.horizontal-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

/* 横向卡片基础样式 */
.h-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.h-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* 卡片正面 */
.h-card-front {
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.h-partner-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.h-card-front h3 {
    font-size: 24px;
    color: #1e293b;
    margin: 15px 0 10px;
    font-weight: 600;
}

.h-project-name {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 25px;
}

/* 横向卡片统计 */
.h-mini-stats {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.h-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.h-stat-num {
    font-size: 28px;
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.h-stat-label {
    font-size: 13px;
    color: #64748b;
}

/* 展开按钮 */
.h-expand-btn {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.h-expand-btn:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: scale(1.05);
}

/* 卡片详情 */
.h-card-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: white;
}

.h-card[data-expanded="true"] .h-card-detail {
    max-height: 3000px;
    padding: 30px;
    border-top: 2px solid #e2e8f0;
}

.h-card[data-expanded="true"] .h-expand-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.h-card[data-expanded="true"] .h-expand-btn::after {
    content: " ▲";
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .horizontal-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .horizontal-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .h-partner-logo {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }

    .h-card-front h3 {
        font-size: 20px;
    }

    .h-stat-num {
        font-size: 24px;
    }
}

/* 展开时的动画效果 */
.h-card[data-expanded="true"] {
    grid-column: 1 / -1;
}

@media (min-width: 769px) {
    .h-card[data-expanded="true"] {
        animation: expandCard 0.5s ease;
    }
}

@keyframes expandCard {
    from {
        grid-column: auto;
    }
    to {
        grid-column: 1 / -1;
    }
}

/* 展开后的布局优化 */
.h-card[data-expanded="true"] .h-card-front {
    display: inline-block;
    width: 300px;
    vertical-align: top;
    margin-right: 30px;
}

.h-card[data-expanded="true"] .h-card-detail {
    display: inline-block;
    width: calc(100% - 360px);
    vertical-align: top;
    padding: 30px;
    border-top: none;
    border-left: 2px solid #e2e8f0;
}

@media (max-width: 768px) {
    .h-card[data-expanded="true"] .h-card-front,
    .h-card[data-expanded="true"] .h-card-detail {
        display: block;
        width: 100%;
        margin: 0;
        border: none;
    }

    .h-card[data-expanded="true"] .h-card-detail {
        border-top: 2px solid #e2e8f0;
    }
}
