/* socail_contribution.css */

/* Social Contribution 섹션 기본 스타일 */
.social-contribution-section {
    background: #ffffff;
    padding: 60px 0;
    position: relative;
}

.social-contribution-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 중간 크기 화면에서 컨테이너 너비 제한 */
@media (max-width: 1024px) and (min-width: 769px) {
    .social-contribution-container {
        max-width: 720px;
    }
}

/* 작은 화면에서 컨테이너 너비 제한 */
@media (max-width: 768px) {
    .social-contribution-container {
        max-width: 498px;
    }
}

/* 섹션 헤더 */
.csr-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.csr-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    position: relative;
}

.csr-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: coral;
    border-radius: 2px;
    animation: titleUnderline 2s ease-in-out infinite alternate;
}

@keyframes titleUnderline {
    0% { width: 50px; opacity: 0.7; }
    100% { width: 70px; opacity: 1; }
}

.csr-section-subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

/* 캐러셀 컨테이너 - 보도자료와 동일한 구조 */
.csr-carousel-wrapper {
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.csr-cards-grid {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 0;
}

/* CSR 카드 스타일 */
.csr-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px;
    text-align: center;
}

.csr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 카드 링크 스타일 */
.csr-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.csr-card-link:hover {
    color: inherit;
    text-decoration: none;
}

/* 이미지 컨테이너 */
.csr-card-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin: 0 0 10px 0;
    padding: 0;
    border-radius: 10px;
}

.csr-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: block;
    margin: 0;
    padding: 0;
    opacity: 1;
    border-radius: 10px;
}

.csr-card:hover .csr-card-image {
    opacity: 0.9;
    transform: scale(1.05);
}

/* 카드 설명 */
.csr-card-description {
    margin: 0;
    padding: 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 36px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.csr-card:hover .csr-card-description {
    color: coral;
}

/* 네비게이션 점 */
.csr-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.csr-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.csr-dot.active {
    background: #ffab91; /* 살구색으로 변경 */
    transform: scale(1.2);
}

/* 상태 표시 */
.csr-empty-state, 
.csr-loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.csr-empty-state i, 
.csr-loading-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ddd;
}

.csr-loading-state i {
    color: coral;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* More 링크 스타일 */
.csr-more-link {
    position: absolute;
    top: 0px;
    right: 0;
    font-size: 14px;
    font-weight: bold;
    color: #4d4d4d;
    text-decoration: none;
    padding: 0px 20px;
    transition: all 0.3s ease;
}

.csr-more-link:hover {
    color: coral;
    text-decoration: underline;
}

/* 반응형 디자인 */
/* 데스크톱: 3개씩 (기본값) */
@media (min-width: 1025px) {
    .csr-card {
        flex: 0 0 calc(33.333% - 8px);
        margin-right: 12px;
    }
    
    .csr-card:nth-child(3n) {
        margin-right: 0;
    }
}

/* 태블릿: 2개씩 */
@media (max-width: 1024px) and (min-width: 769px) {
    .csr-card {
        flex: 0 0 calc(50% - 6px);
        margin-right: 12px;
        /* 높이 관련 속성 제거 - 기본 320px 유지 */
    }
    
    .csr-card:nth-child(2n) {
        margin-right: 0;
    }
}

/* 모바일: 1개씩 */
@media (max-width: 768px) {
    .social-contribution-section {
        padding: 40px 0;
    }

    .csr-section-title {
        font-size: 1.75rem;
    }

    .csr-card {
        flex: 0 0 100%;
        margin-right: 0;
        padding: 8px;
    }

    .csr-card-description {
        font-size: 14px;

        padding: 10px 0;
    }

    .csr-more-link {
        position: relative;
        display: block;
        text-align: right;
        padding: 10px 0;
    }
}