You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

306 lines
5.3 KiB

/**
* Block Cooperate Styles
* 合作伙伴区块样式文件
*
* @package Nenghui Energy Theme
* @since 1.0.0
*/
/* 合作伙伴区块基础样式 */
.cooperate-block {
padding: 60px 0;
background: #ffffff;
overflow: hidden;
}
.cooperate-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* 标题区域样式 */
.cooperate-header {
text-align: center;
margin-bottom: 50px;
padding: 30px 0;
}
.cooperate-title {
font-size: 36px;
font-weight: 700;
color: #333333;
margin: 0;
line-height: 1.3;
letter-spacing: -0.5px;
position: relative;
}
.cooperate-title::after {
content: '';
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 4px;
background: linear-gradient(90deg, #3498db, #2980b9);
border-radius: 2px;
}
/* 合作伙伴内容区域 */
.cooperate-content {
margin-top: 40px;
}
/* 合作伙伴卡片样式 */
.cooperate-cards {
position: relative;
overflow: hidden;
border-radius: 12px;
background: #f8f9fa;
padding: 20px;
}
.cards-wrapper {
display: flex;
flex-wrap: wrap;
gap: 30px;
align-items: center;
justify-content: center;
}
.card-slide {
display: flex;
align-items: center;
justify-content: center;
background: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
flex: 0 0 calc(25% - 22.5px);
min-height: 120px;
min-width: 200px;
max-width: 250px;
position: relative;
overflow: hidden;
}
.card-slide::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(0, 123, 255, 0.02), rgba(0, 86, 179, 0.02));
opacity: 0;
transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
pointer-events: none;
}
.card-slide:hover {
transform: translateY(-8px) scale(1.02);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 123, 255, 0.08);
}
.card-slide:hover::before {
opacity: 1;
}
.card-slide img {
max-width: 100%;
max-height: 80px;
width: auto;
height: auto;
object-fit: contain;
filter: grayscale(0%);
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
opacity: 0.85;
}
.card-slide:hover img {
filter: grayscale(0%) brightness(1.1);
opacity: 1;
}
/* 响应式设计 */
@media (max-width: 1024px) {
.cooperate-title {
font-size: 32px;
}
.cards-wrapper {
gap: 20px;
}
.card-slide {
flex: 0 0 calc(25% - 15px);
min-height: 100px;
padding: 15px;
min-width: 160px;
max-width: 200px;
}
.card-slide img {
max-height: 60px;
}
}
@media (max-width: 768px) {
.cooperate-block {
padding: 40px 0;
}
.cooperate-container {
padding: 0 15px;
}
.cooperate-header {
margin-bottom: 30px;
padding: 20px 0;
}
.cooperate-title {
font-size: 28px;
}
.cooperate-cards {
padding: 30px 15px;
}
.cards-wrapper {
gap: 15px;
}
.card-slide {
flex: 0 0 calc(50% - 7.5px);
min-height: 80px;
padding: 10px;
min-width: 150px;
max-width: none;
}
.card-slide img {
max-height: 50px;
}
}
@media (max-width: 480px) {
.cooperate-title {
font-size: 24px;
line-height: 1.4;
}
.cards-wrapper {
flex-direction: column;
gap: 15px;
}
.card-slide {
flex: none;
width: 100%;
max-width: 280px;
}
}
/* 动画效果 */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.cooperate-header {
animation: fadeInUp 0.8s ease-out;
}
.cooperate-cards {
animation: fadeInUp 0.8s ease-out 0.2s both;
}
/* 动画效果增强 */
.cooperate-block {
opacity: 0;
transform: translateY(30px);
transition: all 0.6s ease-out;
}
.cooperate-block.animate-in {
opacity: 1;
transform: translateY(0);
}
/* 悬停效果增强 */
.card-slide.dimmed {
opacity: 0.5;
transition: opacity 0.3s ease;
}
.card-slide img.loaded {
opacity: 1;
}
.card-slide img.error {
opacity: 0.3;
filter: grayscale(100%);
}
/* 性能优化 - 启用硬件加速 */
.card-slide {
will-change: transform, box-shadow;
backface-visibility: hidden;
perspective: 1000px;
}
/* 减少动画时的重绘 */
.card-slide:hover,
.card-slide:focus {
will-change: auto;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* 移动端布局调整 */
.cards-wrapper.mobile-layout {
flex-direction: column;
align-items: center;
}
.cards-wrapper.mobile-layout .card-slide {
min-width: 150px;
margin-bottom: 15px;
}
/* 打印样式 */
@media print {
.cooperate-block {
padding: 20px 0;
background: white;
}
.card-slide {
box-shadow: none;
border: 1px solid #ddd;
}
.card-slide img {
filter: none;
}
}