/* 담소재 웹사이트 테마 CSS - 다크 모드 지원 */
/* CSS 변수 - 다크 모드 지원 */
:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --border-color: #eeeeee;
    --text-secondary: #666666;
    --text-tertiary: #888888;
    --hover-bg: #f9f9f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --error-color: #d32f2f;
    --button-bg: #111111;
    --button-text: #ffffff;
    --keyword-bg: #f5f5f5;
    --keyword-hover-bg: #eeeeee;
    transition: all 0.5s ease;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e8e8e8;
    --border-color: #333333;
    --text-secondary: #b0b0b0;
    --text-tertiary: #888888;
    --hover-bg: #252525;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --error-color: #ff6b6b;
    --button-bg: #2a2a2a;
    --button-text: #e8e8e8;
    --keyword-bg: #2a2a2a;
    --keyword-hover-bg: #333333;
}

/* 전역 링크 스타일 통일 */
a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* 링크에 밑줄이 필요한 경우 (예: 인라인 텍스트 링크) */
a[href]:not(.no-underline):not(.button):not(.submit-btn):not(.external-link-btn):not(.news-link-button):not(.home-button) {
    border-bottom: 1px solid transparent;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

a[href]:not(.no-underline):not(.button):not(.submit-btn):not(.external-link-btn):not(.news-link-button):not(.home-button):hover {
    border-bottom-color: var(--text-color);
    opacity: 1;
}

/* 헤더 내 다크 모드 토글 버튼 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dark-mode-toggle-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    border-radius: 50%;
}

.dark-mode-toggle-btn:hover {
    transform: scale(1.15);
    background-color: var(--hover-bg);
}

.dark-mode-icon {
    display: block;
    line-height: 1;
    user-select: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dark-mode-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.dark-mode-toggle-btn:hover .dark-mode-icon {
    transform: rotate(15deg);
}

@media (max-width: 768px) {
    .dark-mode-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .nav-right {
        gap: 15px;
    }
    
    .dark-mode-toggle-btn {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   푸터 링크 스타일 통일
   ============================================ */
footer {
    padding: 60px;
    background-color: var(--hover-bg);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    transition: background-color 0.5s ease, color 0.5s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* 푸터 링크 기본 스타일 - !important로 인라인 스타일 오버라이드 */
footer a,
footer .footer-link {
    color: var(--text-tertiary) !important;
    text-decoration: none !important;
    transition: opacity 0.3s ease, color 0.3s ease !important;
    letter-spacing: 0.02em;
    border-bottom: none !important;
}

/* 푸터 링크 hover 상태 */
footer a:hover,
footer .footer-link:hover {
    color: var(--text-color) !important;
    opacity: 1 !important;
    border-bottom: none !important;
}

/* 푸터 링크 visited 상태 (색상 유지) */
footer a:visited,
footer .footer-link:visited {
    color: var(--text-tertiary) !important;
}

footer a:visited:hover,
footer .footer-link:visited:hover {
    color: var(--text-color) !important;
}

/* 푸터 링크 active/focus 상태 */
footer a:active,
footer a:focus,
footer .footer-link:active,
footer .footer-link:focus {
    color: var(--text-color) !important;
    outline: none;
}

/* SNS 링크 컨테이너 */
.footer-sns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

/* SNS 링크 텍스트 */
.footer-sns-link {
    display: inline-block;
}

.footer-sns-text {
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

/* SNS 구분자 */
.footer-sns-separator {
    color: var(--text-tertiary);
    opacity: 0.5;
    margin: 0 2px;
}

/* 푸터 반응형 */
@media (max-width: 768px) {
    footer {
        padding: 40px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-sns {
        margin-top: 8px;
    }
}
