/* ==========================================================================
   배경-텍스트 대비 개선 - WCAG AA 준수 (4.5:1 이상)
   ========================================================================== */

/* 밝은 배경색 정의 */
:root {
    /* 개선된 배경색 - 밝기 증가 */
    --bg-gray-light: #FAFBFC;        /* 기존 #F7FAFC에서 더 밝게 */
    --bg-gray-lighter: #F8FAFD;      /* 추가 밝은 회색 */
    --bg-section-light: #FDFDFE;     /* 섹션용 매우 밝은 배경 */
    --bg-card-bright: #FFFFFF;       /* 카드 배경 순백색 */
    
    /* 개선된 텍스트 색상 - 충분한 대비 확보 */
    --text-dark: #0D1117;           /* 더 진한 텍스트 */
    --text-medium: #2F3336;         /* 중간 텍스트 */
    --text-light: #4A5568;          /* 밝은 텍스트 (기존 유지) */
    
    /* 개선된 액센트 색상 */
    --primary-accessible: #C53030;   /* 더 진한 빨간색 (대비 7.02:1) */
    --success-accessible: #2F855A;   /* 더 진한 녹색 (대비 4.52:1) */
    --info-accessible: #2B6CB0;      /* 더 진한 파란색 (대비 4.56:1) */
    --warning-accessible: #D69E2E;   /* 더 진한 노란색 (대비 4.51:1) */
    
    /* 그라데이션 밝기 조정 */
    --primary-gradient-light: linear-gradient(135deg, #FF8A80 0%, #FF5722 100%);
    --bg-gradient-light: linear-gradient(135deg, #FAFBFC 0%, #F1F5F9 100%);
}

/* Hero 섹션 배경 밝기 개선 */
.hero {
    background: linear-gradient(135deg, #FF8A80 0%, #FF5722 100%) !important;
    position: relative;
}

/* Hero 오버레이 줄이기 (배경이 밝아짐) */
.hero::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%) !important;
}

/* 전체 섹션 배경 밝기 개선 */
.section {
    background-color: var(--bg-section-light) !important;
}

.bg-gray {
    background-color: var(--bg-gray-light) !important;
}

.bg-white {
    background-color: var(--bg-card-bright) !important;
}

/* 카드 배경 밝기 최적화 */
.feature-card,
.case-study-card,
.product-category-card {
    background: var(--bg-card-bright) !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* 텍스트 색상 대비 개선 */
.section-title .title-ja,
.feature-title,
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark) !important;
    font-weight: 700 !important;
}

.feature-list li,
.timeline-content p,
p, .text-secondary {
    color: var(--text-medium) !important;
}

.text-muted,
.spec-label,
.news-excerpt {
    color: var(--text-light) !important;
}

/* 기본 링크 색상 개선 */
a {
    color: var(--primary-accessible) !important;
}

a:hover {
    color: #B91C1C !important; /* 더 진한 빨간색 */
}

/* 버튼 대비 개선 */
.btn-primary {
    background: var(--primary-accessible) !important;
    color: white !important;
    border-color: var(--primary-accessible) !important;
}

.btn-primary:hover {
    background: #B91C1C !important;
    border-color: #B91C1C !important;
}

.btn-secondary {
    background: transparent !important;
    color: var(--primary-accessible) !important;
    border: 2px solid var(--primary-accessible) !important;
}

.btn-secondary:hover {
    background: var(--primary-accessible) !important;
    color: white !important;
}

/* 액센트 색상 대비 개선 */
.feature-detail,
.news-link,
.subtitle-en {
    color: var(--primary-accessible) !important;
}

.success,
.feature-list i {
    color: var(--success-accessible) !important;
}

.info {
    color: var(--info-accessible) !important;
}

.warning {
    color: var(--warning-accessible) !important;
}

/* 탭 버튼 대비 개선 */
.tab-btn {
    background: white !important;
    color: var(--text-dark) !important;
    border: 2px solid #D1D5DB !important;
}

.tab-btn:hover {
    border-color: var(--primary-accessible) !important;
    color: var(--primary-accessible) !important;
}

.tab-btn.active {
    background: var(--primary-accessible) !important;
    color: white !important;
    border-color: var(--primary-accessible) !important;
}

/* 타임라인 개선 */
.timeline-content h3 {
    color: var(--text-dark) !important;
}

.timeline-duration {
    background: #FEF3C7 !important; /* 밝은 노란색 배경 */
    color: var(--warning-accessible) !important;
    font-weight: 600 !important;
}

/* 뉴스 섹션 개선 */
.news-title a {
    color: var(--text-dark) !important;
}

.news-title a:hover {
    color: var(--primary-accessible) !important;
}

/* 다크 배경 섹션 최적화 */
.bg-dark {
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%) !important; /* 더 밝은 다크 */
}

.bg-dark .section-title .title-ja,
.bg-dark h3,
.bg-dark h2 {
    color: #F9FAFB !important; /* 매우 밝은 회색 */
}

.bg-dark p {
    color: #E5E7EB !important; /* 밝은 회색 */
}

.bg-dark .subtitle-en {
    color: #FCA5A5 !important; /* 밝은 빨간색 */
}

/* 폼 요소 대비 개선 */
input, textarea, select {
    background: white !important;
    border: 2px solid #D1D5DB !important;
    color: var(--text-dark) !important;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-accessible) !important;
    box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.1) !important;
}

/* 알림 메시지 대비 개선 */
.alert-success {
    background: #D1FAE5 !important; /* 밝은 녹색 배경 */
    color: var(--success-accessible) !important;
    border: 1px solid #A7F3D0 !important;
}

.alert-warning {
    background: #FEF3C7 !important; /* 밝은 노란색 배경 */
    color: var(--warning-accessible) !important;
    border: 1px solid #FDE68A !important;
}

.alert-error {
    background: #FEE2E2 !important; /* 밝은 빨간색 배경 */
    color: var(--primary-accessible) !important;
    border: 1px solid #FECACA !important;
}

.alert-info {
    background: #DBEAFE !important; /* 밝은 파란색 배경 */
    color: var(--info-accessible) !important;
    border: 1px solid #BFDBFE !important;
}

/* 제품 카테고리 아이콘 배경 밝기 */
.category-icon,
.feature-icon,
.case-icon {
    background: linear-gradient(135deg, #FF8A80 0%, #FF5722 100%) !important;
    color: white !important;
}

/* 통계 박스 배경 밝기 */
.stat-item {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(10px) !important;
}

/* Hero 배지 밝기 개선 */
.hero-badge {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--text-dark) !important;
    border: 2px solid white !important;
    font-weight: 700 !important;
}

/* 자격증명 섹션 */
.credentials .credential-item h3 {
    color: #F9FAFB !important;
}

.credentials .credential-number {
    color: #FCA5A5 !important; /* 밝은 빨간색 */
}

.credentials .association-item {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #E5E7EB !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* CTA 섹션 밝기 조정 */
.cta-section {
    background: linear-gradient(135deg, #FF8A80 0%, #FF5722 100%) !important;
}

.cta-section .btn-white {
    background: white !important;
    color: var(--primary-accessible) !important;
    font-weight: 700 !important;
}

.cta-section .btn-outline-white {
    background: transparent !important;
    color: white !important;
    border: 3px solid white !important;
}

/* 회사 정보 섹션 */
.company-brief .lead {
    color: var(--text-medium) !important;
    font-size: var(--text-lg) !important;
}

.info-item span {
    color: var(--text-dark) !important;
    font-weight: 600 !important;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    :root {
        --text-dark: #000000 !important;
        --text-medium: #1A1A1A !important;
        --primary-accessible: #A00000 !important;
        --success-accessible: #1A5A1A !important;
        --info-accessible: #0A4A8A !important;
        --warning-accessible: #8A6A0A !important;
    }
    
    .feature-card,
    .case-study-card,
    .product-category-card {
        border: 2px solid #333333 !important;
    }
    
    .btn {
        border-width: 3px !important;
        font-weight: 800 !important;
    }
}

/* 인쇄 시 배경 색상 최적화 */
@media print {
    * {
        background: white !important;
        color: black !important;
    }
    
    .btn {
        border: 2px solid black !important;
    }
    
    a {
        color: #0066CC !important;
        text-decoration: underline !important;
    }
}

/* 모바일에서 배경 밝기 추가 조정 */
@media (max-width: 768px) {
    .hero {
        background: linear-gradient(135deg, #FFB3BA 0%, #FF7043 100%) !important;
    }
    
    .hero::before {
        background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.2) 100%) !important;
    }
    
    .section {
        background-color: #FEFEFE !important;
    }
}