/* ===================================
   웨딩센스 - 접근성 개선 스타일시트
   accessibility-fixes.css
   WCAG 2.1 AA 기준 색상 대비 개선
   =================================== */

/* ===================================
   Form Controls - 색상 대비 개선
   =================================== */
/* 폼 라벨 대비 강화 */
.form-floating > label,
.form-label {
    color: #2d2d2d !important; /* 기존 #6c6c6c → 진한 회색 */
    font-weight: 500;
}

/* 폼 입력 필드 */
.form-control,
.form-select {
    color: #2d2d2d !important; /* 진한 텍스트 */
    background-color: #ffffff !important;
    border: 1.5px solid #6b6b6b !important; /* 더 진한 보더 */
}

.form-control::placeholder {
    color: #595959 !important; /* 플레이스홀더 대비 개선 */
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    border-color: #d4547e !important; /* 더 진한 핑크 */
    box-shadow: 0 0 0 0.2rem rgba(212, 84, 126, 0.25) !important;
}

/* Quick Reservation Form 특별 처리 */
.quick-reservation .form-control {
    color: #2d2d2d !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.quick-reservation label {
    color: #2d2d2d !important;
    font-weight: 600;
}

/* ===================================
   Event Cards - 색상 대비 개선
   =================================== */
/* 이벤트 아이템 텍스트 */
.event-item p,
.event-card p {
    color: #2d2d2d !important; /* 기존 연한 색상 → 진한 회색 */
    font-weight: 500;
}

.event-item .event-venue,
.event-card .event-venue {
    color: #1a1a1a !important;
    font-weight: 600;
}

/* 날짜 표시 */
.event-date {
    background-color: #d4547e !important; /* 더 진한 배경 */
    color: #ffffff !important;
    font-weight: 600;
}

/* ===================================
   Destination Tags - 색상 대비 개선
   =================================== */
.destination-tag {
    background-color: #d4547e !important; /* 기존 #e8b4b8 → 더 진한 색상 */
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.destination-tag:hover {
    background-color: #b8406a !important; /* 호버 시 더 진하게 */
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Hero Section - 색상 대비 개선
   =================================== */
.hero-badge {
    background: linear-gradient(135deg, #d4547e 0%, #b8406a 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(212, 84, 126, 0.3);
}

.hero-title {
    color: #1a1a1a !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
    color: #2d2d2d !important;
    font-weight: 500;
}

/* ===================================
   Links - 색상 대비 개선
   =================================== */
a {
    color: #b8406a !important; /* 기본 링크 색상 강화 */
}

a:hover {
    color: #8f2f52 !important; /* 호버 시 더 진하게 */
}

/* 네비게이션 링크 */
.nav-link {
    color: #2d2d2d !important;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: #b8406a !important;
    font-weight: 600;
}

/* ===================================
   Buttons - 색상 대비 개선
   =================================== */
.btn-primary {
    background: linear-gradient(135deg, #d4547e 0%, #b8406a 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(212, 84, 126, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b8406a 0%, #8f2f52 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(184, 64, 106, 0.4);
}

.btn-outline-primary {
    color: #b8406a !important;
    border-color: #b8406a !important;
    border-width: 2px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: #b8406a !important;
    border-color: #b8406a !important;
    color: #ffffff !important;
}

/* ===================================
   Cards & Badges - 색상 대비 개선
   =================================== */
.card-title {
    color: #1a1a1a !important;
    font-weight: 600;
}

.card-text {
    color: #2d2d2d !important;
}

.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.badge-primary {
    background-color: #b8406a !important;
    color: #ffffff !important;
}

.badge-secondary {
    background-color: #5a5a5a !important;
    color: #ffffff !important;
}

/* ===================================
   Section Titles - 색상 대비 개선
   =================================== */
.section-title {
    color: #1a1a1a !important;
    font-weight: 700;
}

.section-subtitle {
    color: #2d2d2d !important;
    font-weight: 500;
}

/* ===================================
   Tables - 색상 대비 개선
   =================================== */
.table th {
    color: #1a1a1a !important;
    font-weight: 600;
    background-color: #f5f5f5;
}

.table td {
    color: #2d2d2d !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(212, 84, 126, 0.08);
}

/* ===================================
   Alerts - 색상 대비 개선
   =================================== */
.alert {
    font-weight: 500;
}

.alert-primary {
    background-color: #f5e0e7 !important;
    border-color: #d4547e !important;
    color: #5a1a2e !important;
}

.alert-success {
    background-color: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

.alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    color: #856404 !important;
}

.alert-danger {
    background-color: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

/* ===================================
   Breadcrumbs - 색상 대비 개선
   =================================== */
.breadcrumb-item a {
    color: #b8406a !important;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #2d2d2d !important;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #5a5a5a !important;
}

/* ===================================
   Footer - 색상 대비 개선
   =================================== */
.footer-text {
    color: #2d2d2d !important;
}

.footer-link {
    color: #b8406a !important;
    font-weight: 500;
}

.footer-link:hover {
    color: #8f2f52 !important;
}

/* ===================================
   Accessibility Focus States
   =================================== */
*:focus {
    outline: 2px solid #b8406a !important;
    outline-offset: 2px;
}

button:focus,
.btn:focus,
a:focus {
    outline: 2px solid #b8406a !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(184, 64, 106, 0.25) !important;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #b8406a;
    color: white !important;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    font-weight: 600;
}

.skip-to-main:focus {
    top: 0;
}

/* ===================================
   High Contrast Mode Support
   =================================== */
@media (prefers-contrast: high) {
    * {
        border-color: #000000 !important;
    }
    
    .form-control,
    .form-select {
        border-width: 2px !important;
    }
    
    .btn {
        border: 2px solid currentColor !important;
    }
}

/* ===================================
   Reduced Motion Support
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    * {
        color: #000000 !important;
        background: #ffffff !important;
    }
    
    a {
        text-decoration: underline !important;
    }
}

/* ===================================
   Link Visibility Enhancement
   링크 가시성 강화
   =================================== */
/* 모든 링크에 밑줄 추가 (접근성 향상) */
a:not(.btn):not(.nav-link):not(.destination-tag) {
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    color: #8f2f52 !important; /* 매우 진한 핑크/와인색 */
    font-weight: 500;
}

a:not(.btn):not(.nav-link):not(.destination-tag):hover {
    text-decoration: underline !important;
    text-decoration-thickness: 2px;
    color: #5a1a2e !important; /* 호버 시 더 진하게 */
    background-color: rgba(184, 64, 106, 0.08);
}

a:not(.btn):not(.nav-link):not(.destination-tag):focus {
    outline: 2px solid #b8406a !important;
    outline-offset: 2px;
    background-color: rgba(184, 64, 106, 0.12);
}

/* Footer의 회사 정보 링크 특별 처리 */
.company-info a,
.footer-bottom a {
    color: #5a1a2e !important; /* 매우 진한 색상 */
    text-decoration: underline !important;
    text-decoration-color: #b8406a !important;
    text-decoration-thickness: 1.5px;
    font-weight: 600;
}

.company-info a:hover,
.footer-bottom a:hover {
    color: #3a0a1e !important;
    text-decoration-thickness: 2px;
    background-color: rgba(184, 64, 106, 0.15);
}

/* 제작사 링크 강조 */
a[href*="drsoft.co.kr"] {
    color: #5a1a2e !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-decoration-color: #b8406a !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 2px !important;
    padding: 2px 4px;
    background: linear-gradient(to bottom, transparent 60%, rgba(184, 64, 106, 0.2) 60%);
}

a[href*="drsoft.co.kr"]:hover {
    color: #ffffff !important;
    background: #b8406a !important;
    text-decoration-color: #ffffff !important;
    border-radius: 3px;
}

/* ===================================
   Heading Hierarchy Fixes
   제목 계층 구조 수정
   =================================== */
/* 사이드바 제목 계층 수정 */
.sidebar-title {
    /* h3 대신 h2로 변경되어야 하지만 CSS로는 시맨틱 변경 불가 */
    /* 시각적으로 구분 강화 */
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 3px solid #b8406a !important;
}

/* 카드 제목 계층 일관성 */
.card h5,
.event-card h5 {
    /* h5 대신 h4로 변경되어야 함 */
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

/* 섹션 내 서브 제목 */
.section-content h3 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

.section-content h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #2d2d2d !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
}

/* ===================================
   ARIA Labels & Screen Reader Support
   스크린 리더 지원
   =================================== */
/* 스크린 리더 전용 텍스트 */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 포커스 시 표시 */
.sr-only-focusable:focus,
.visually-hidden-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* ===================================
   Interactive Elements Enhancement
   상호작용 요소 개선
   =================================== */
/* 클릭 가능 영역 최소 크기 보장 (WCAG 2.5.5) */
button,
.btn,
select {
    min-height: 44px !important;
    min-width: 44px !important;
}

/* 링크는 패딩으로 클릭 영역 확보 */
a {
    min-height: 44px !important;
}

/* 체크박스와 라디오는 기본 크기 유지, 라벨로 클릭 영역 확보 */
/* 체크박스/라디오 자체는 크기 제한 없음 - 디자인 유지 */
input[type="checkbox"],
input[type="radio"] {
    /* 기본 브라우저 스타일 유지 */
    cursor: pointer;
}

/* 체크박스/라디오의 라벨을 통해 접근성 확보 */
.form-check {
    min-height: 44px; /* 전체 영역 최소 높이 */
    display: flex;
    align-items: center;
}

.form-check-label {
    cursor: pointer;
    padding: 0.375rem 0; /* 클릭 영역 확대 */
    flex: 1;
}

/* 사이드바 빠른예약 체크박스 */
.quick-reservation .agreement-checkbox {
    width: 14px !important;
    height: 14px !important;
}

/* 사이드바는 컴팩트하게 */
.quick-reservation .form-check,
.quick-reservation .agreement-item {
    min-height: auto;
}

/* 작은 버튼/링크를 위한 패딩 추가 */
.btn-sm,
.badge,
.tag {
    padding: 0.5rem 1rem !important;
    min-height: 36px !important;
}

/* ===================================
   Error & Validation States
   오류 및 유효성 검사 상태
   =================================== */
.is-invalid,
.invalid {
    border-color: #dc3545 !important;
    border-width: 2px !important;
}

.invalid-feedback {
    color: #721c24 !important;
    font-weight: 600 !important;
    background-color: #f8d7da;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.is-valid,
.valid {
    border-color: #28a745 !important;
    border-width: 2px !important;
}

.valid-feedback {
    color: #155724 !important;
    font-weight: 600 !important;
    background-color: #d4edda;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* ===================================
   Keyboard Navigation Enhancement
   키보드 네비게이션 개선
   =================================== */
/* Tab 포커스 인디케이터 강화 */
:focus-visible {
    outline: 3px solid #b8406a !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 5px rgba(184, 64, 106, 0.2) !important;
}

/* Skip Links */
.skip-links {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 10000;
    background: #1a1a1a;
    padding: 1rem;
}

.skip-links:focus-within {
    top: 0;
}

.skip-links a {
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 0.5rem 1rem;
    display: inline-block;
    margin: 0 0.5rem;
    background: #b8406a;
    border-radius: 4px;
}

.skip-links a:hover,
.skip-links a:focus {
    background: #8f2f52;
}

/* ===================================
   Color Blind Friendly Adjustments
   색맹 친화적 조정
   =================================== */
/* 색상만으로 정보를 전달하지 않도록 아이콘 추가 */
.success-message::before {
    content: "✓ ";
    font-weight: bold;
}

.error-message::before {
    content: "✗ ";
    font-weight: bold;
}

.warning-message::before {
    content: "⚠ ";
    font-weight: bold;
}

.info-message::before {
    content: "ⓘ ";
    font-weight: bold;
}