/* --- KBO Market Footer Style (#km-footer) --- */

/* 색상 변수 (기존 템플릿과 통일) */
:root {
    --km-primary-red: #dc2626;
    --km-gray-50: #f9fafb;
    --km-gray-100: #f3f4f6;
    --km-gray-200: #e5e7eb;
    --km-gray-400: #9ca3af;
    --km-gray-500: #6b7280;
    --km-gray-600: #4b5563;
    --km-gray-700: #374151;
    --km-gray-800: #1f2937;
    --km-gray-900: #111827;
}

/* 메인 푸터 영역 */
#km-footer {
    background-color: var(--km-gray-50);
    border-top: 1px solid var(--km-gray-200);
    padding-top: 40px;
    padding-bottom: 100px; /* 모바일 하단 네비게이션 공간 확보 */
    font-size: 13px;
    color: var(--km-gray-500);
    line-height: 1.5;
    box-sizing: border-box;
}

#km-footer * {
    box-sizing: border-box;
}

/* 컨테이너 */
#km-footer .container {
    max-width: var(--rb-footer-width);
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

/* 그리드 레이아웃 */
#km-footer .footer-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 32px;
    text-align: left;
}

/* 공통 컬럼 스타일 */
#km-footer .footer-col {
    flex: 1;
}

/* 텍스트 스타일 */
#km-footer a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

#km-footer a:hover {
    color: var(--km-gray-900);
    text-decoration: underline;
}

#km-footer .font-bold { font-weight: 700; }
#km-footer .font-black { font-weight: 900; }
#km-footer .text-red { color: var(--km-primary-red); }

/* --- 컬럼 1: 정보 영역 --- */
#km-footer .footer-logo-wrap {
    margin-bottom: 16px;
}
#km-footer .footer-logo-wrap img {
    display: block;
    max-width: 100%;
    max-height: 40px;
    height: auto;
}
#km-footer .footer-slogan {
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--km-gray-600);
}
#km-footer .footer-info-text {
    line-height: 1.6;
    font-size: 13px;
}

/* --- 컬럼 2: 고객센터 --- */
#km-footer .cs-title {
    margin-bottom: 16px;
    color: var(--km-gray-900);
}
#km-footer .cs-phone {
    font-size: 24px;
    color: var(--km-gray-900);
    margin-bottom: 8px;
}
#km-footer .cs-desc {
    color: var(--km-gray-600);
    white-space: pre-line;
}
#km-footer .cs-desc-sub {
    color: var(--km-gray-400);
}

/* SNS 아이콘 */
#km-footer .sns-wrapper {
    display: flex;
    margin-top: 24px;
    gap: 8px;
}
#km-footer .footer-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid var(--km-gray-200);
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}
#km-footer .footer-icon-btn img {
    width: 45px; /* 이미지 크기 고정 */
    height: 45px;
    object-fit: contain;
}
#km-footer .footer-icon-btn:hover {
    background-color: var(--km-gray-100);
    border-color: var(--km-gray-400);
    transform: translateY(-2px);
    text-decoration: none !important;
}

/* --- 컬럼 3: 메뉴 및 앱 다운로드 --- */
#km-footer .footer-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-weight: 700;
    color: var(--km-gray-700);
}

#km-footer .app-down-wrap {
    margin-top: 20px;
}
#km-footer .app-down-btn {
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--km-gray-200);
    border-radius: 8px;
    background: #fff;
    transition: background-color 0.2s;
}
#km-footer .app-down-btn:hover {
    background-color: var(--km-gray-50);
}
#km-footer .app-down-btn img {
    width: 20px;
}
#km-footer .app-down-btn span {
    font-size: 12px;
    font-weight: 700;
}


/* --- 하단 카피라이트 영역 --- */
#km-footer .footer-bottom {
    border-top: 1px solid var(--km-gray-200);
    padding-top: 24px;
    text-align: left;
}
#km-footer .footer-notice {
    margin-bottom: 8px;
    color: var(--km-gray-400);
}
#km-footer .footer-copyright {
    color: var(--km-gray-400);
}


.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.progress-ring { transform: rotate(-90deg); position: absolute; }
.progress-ring__circle {
  transition: stroke-dashoffset 0.1s;
  stroke-dasharray: 125.6; /* 2 * π * r (2 * 3.14 * 20) */
  stroke-dashoffset: 125.6;
  stroke-width: 2px;
}

.arrow { position: relative; color:#000; z-index: 10; }


/* --- 반응형 (태블릿/PC) --- */
@media (min-width: 768px) {
    #km-footer {
        padding-bottom: 40px;
    }
    #km-footer .footer-grid {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

/* --- 반응형 (모바일) --- */
@media (max-width: 1024px) {
    #km-footer .footer-menu {
        display: block;
    }
    #km-footer .footer-menu a {
        margin-right: 20px;
    }
}