/* ======================================== */
/* Footer 통일 모듈 - 모바일과 PC 공통 적용 */
/* 모든 텍스트 중앙정렬, 여백/패딩 0, 높이 반으로 줄임 */
/* ======================================== */

/* ======================================== */
/* Footer 전체 높이 반으로 줄임 */
/* ======================================== */

/* Footer 전체 패딩 (높이 반으로 줄임) */
.footer {
    padding: calc((var(--spacing-12) + 1.5625rem) / 2) 30px calc(var(--spacing-4) + 1.5625rem - 10px) !important;
    background: var(--primary-color) !important;
    color: var(--white) !important;
}

/* Footer content 마진 (높이 반으로 줄임) */
.footer-content {
    margin-bottom: calc(var(--spacing-4) + 0.5rem) !important; /* 간격 더 줄임 */
    display: grid !important;
    grid-template-columns: 1fr 2fr !important;
    gap: var(--spacing-12) !important;
}

/* Footer bottom 패딩 (상하 균형 조정) */
.footer-bottom {
    padding: calc(var(--spacing-4) + 0.5rem) 0 !important; /* 상하 균등 패딩 */
    text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
}

/* ======================================== */
/* Footer 모든 텍스트 중앙정렬 */
/* ======================================== */

/* Footer logo 제목 중앙정렬 */
.footer-logo h3 {
    text-align: center !important;
    font-size: var(--font-size-3xl) !important;
    margin: 0 !important; /* 여백 0 */
    padding: 0 !important; /* 패딩 0 */
    color: #FFD700 !important;
    font-weight: var(--font-weight-semibold) !important;
    font-family: var(--font-family) !important;
    letter-spacing: -0.02em !important;
}

/* Footer logo 설명 중앙정렬 */
.footer-logo p {
    text-align: center !important;
    color: var(--white) !important;
    line-height: var(--line-height-relaxed) !important;
    margin: 0 !important; /* 여백 0 */
    padding: 0 !important; /* 패딩 0 */
}

/* Footer 섹션 제목 중앙정렬 */
.footer-section h4 {
    text-align: center !important;
    margin: 0 !important; /* 여백 0 */
    padding: 0 !important; /* 패딩 0 */
    color: var(--white) !important;
}

/* Footer 섹션 링크 중앙정렬 */
.footer-section a {
    text-align: center !important;
    display: block !important;
    color: var(--white) !important;
    text-decoration: none !important;
    margin: 0 !important; /* 여백 0 */
    padding: 0 !important; /* 패딩 0 */
    transition: opacity var(--transition-normal) !important;
}

/* Footer bottom 텍스트 중앙정렬 */
.footer-bottom p {
    text-align: center !important;
    color: var(--white) !important;
    margin: 0 !important; /* 여백 0 */
    padding: 0 !important; /* 패딩 0 */
}

/* ======================================== */
/* Footer links 그리드 중앙정렬 */
/* ======================================== */

.footer-links {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: var(--spacing-8) !important;
    justify-items: center !important; /* 그리드 아이템 중앙정렬 */
}

/* ======================================== */
/* Footer content 그리드 중앙정렬 */
/* ======================================== */

.footer-content {
    justify-items: center !important; /* 그리드 아이템 중앙정렬 */
    align-items: center !important; /* 그리드 아이템 수직 중앙정렬 */
}

/* ======================================== */
/* 모바일 특화 스타일 */
/* ======================================== */

@media (max-width: 768px) {
    /* 모바일에서 Footer 전체 패딩 (높이 반으로 줄임) */
    .footer {
        padding: calc((var(--spacing-8) + 1.5625rem) / 2) 15px calc(var(--spacing-2) + 1.5625rem - 10px) !important;
    }
    
    /* 모바일에서 Footer content 마진 (간격 더 줄임) */
    .footer-content {
        margin-bottom: calc(var(--spacing-2) + 0.25rem) !important; /* 간격 더 줄임 */
        grid-template-columns: 1fr !important; /* 모바일에서는 1열 */
        gap: var(--spacing-4) !important;
    }
    
    /* 모바일에서 Footer bottom 패딩 (상하 균형 조정) */
    .footer-bottom {
        padding: calc(var(--spacing-2) + 0.25rem) 0 !important; /* 상하 균등 패딩 */
    }
    
    /* 모바일에서 텍스트 오버플로우 처리 */
    .footer-logo p {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .footer-bottom {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* ======================================== */
/* PC 특화 스타일 */
/* ======================================== */

@media (min-width: 1025px) {
    /* PC에서 Footer 전체 패딩 (높이 반으로 줄임) */
    .footer {
        padding: calc((var(--spacing-12) + 1.5625rem) / 2) 30px calc(var(--spacing-4) + 1.5625rem - 10px) !important;
        text-align: center !important;
    }
    
    /* PC에서 Footer content 마진 (간격 더 줄임) */
    .footer-content {
        margin-bottom: calc(var(--spacing-4) + 0.5rem) !important; /* 간격 더 줄임 */
        grid-template-columns: 1fr !important; /* PC에서도 1열로 변경하여 중앙정렬 */
        gap: var(--spacing-12) !important;
        text-align: center !important;
        justify-items: center !important;
        align-items: center !important;
    }
    
    /* PC에서 Footer bottom 패딩 (상하 균형 조정) */
    .footer-bottom {
        padding: calc(var(--spacing-4) + 0.5rem) 0 !important; /* 상하 균등 패딩 */
        text-align: center !important;
    }
    
    /* PC에서 Footer logo 중앙정렬 강화 */
    .footer-logo {
        text-align: center !important;
        width: 100% !important;
    }
    
    .footer-logo h3 {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    .footer-logo p {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    .footer-bottom p {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* ======================================== */
/* 최고 특이성으로 확실하게 적용 */
/* ======================================== */

/* Footer 전체 높이 (반으로 줄임) - 최고 특이성 */
html body footer.footer {
    padding: calc((var(--spacing-12) + 1.5625rem) / 2) 30px calc(var(--spacing-4) + 1.5625rem) !important;
}

/* Footer 텍스트 중앙정렬 - 최고 특이성 */
html body footer.footer .footer-logo h3,
html body footer.footer .footer-logo p,
html body footer.footer .footer-section h4,
html body footer.footer .footer-section a,
html body footer.footer .footer-bottom p {
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
}

/* PC에서 Footer 전체 중앙정렬 - 최고 특이성 */
@media (min-width: 1025px) {
    html body footer.footer {
        text-align: center !important;
    }
    
    html body footer.footer .footer-content {
        text-align: center !important;
        justify-items: center !important;
        align-items: center !important;
        grid-template-columns: 1fr !important;
    }
    
    html body footer.footer .footer-logo {
        text-align: center !important;
        width: 100% !important;
    }
    
    html body footer.footer .footer-logo h3,
    html body footer.footer .footer-logo p {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    html body footer.footer .footer-bottom {
        text-align: center !important;
    }
    
    html body footer.footer .footer-bottom p {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* Footer content 중앙정렬 - 최고 특이성 */
html body footer.footer .footer-content {
    justify-items: center !important;
    align-items: center !important;
    margin-bottom: calc(var(--spacing-4) + 0.5rem) !important; /* 간격 더 줄임 */
}

/* Footer bottom 상하 균형 조정 - 최고 특이성 */
html body footer.footer .footer-bottom {
    padding: calc(var(--spacing-4) + 0.5rem) 0 !important; /* 상하 균등 패딩 */
}
