/* ========================================
   센터 선택 안내 랜딩 화면 v2.0
   ForNurse Medical Center - 세련된 반응형 UI
   ======================================== */

/* 전체 랜딩 화면 컨테이너 */
.center-selection-landing {
    position: fixed;
    top: 64px; /* 헤더 높이 */
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px 20px 30px; /* 상하 여백 축소 */
}

/* 숨김 상태 */
.center-selection-landing.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 초기 상태에서는 메인 콘텐츠 흐리게 */
body.no-center-selected .emr-container {
    opacity: 0.3;
    pointer-events: none;
}

/* 콘텐츠 컨테이너 - 여백 축소 & 폭 확대 */
.landing-content {
    text-align: center;
    max-width: 1100px; /* 800px → 1100px 확대 */
    width: 100%;
    padding: 16px 20px; /* 40px → 16px 축소 */
}

/* 아이콘 - 제거하거나 크기 축소 (선택사항) */
.landing-icon {
    font-size: 48px; /* 64px → 48px 축소 */
    color: #6c757d;
    margin-bottom: 12px; /* 24px → 12px 축소 */
}

/* 메인 타이틀 - 크기 증가 */
.landing-title {
    font-size: 32px; /* 28px → 32px 증가 */
    font-weight: 700; /* 600 → 700 강화 */
    color: #212529;
    margin-bottom: 10px; /* 12px → 10px 축소 */
    font-family: 'Noto Sans KR', sans-serif;
    letter-spacing: -0.02em;
}

/* 서브 타이틀 - 크기 증가 & 줄간격 조정 */
.landing-subtitle {
    font-size: 15px; /* 16px → 15px 약간 축소 */
    color: #6c757d;
    margin-bottom: 20px; /* 40px → 20px 축소 */
    line-height: 1.5; /* 1.6 → 1.5 */
}

/* 센터 선택 그리드 - 3×3 그리드 구조 (데스크탑) */
.center-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px; /* 20px → 18px */
    max-width: 1100px; /* 900px → 1100px 확대 */
    margin: 0 auto;
    padding: 0;
}

/* 센터 카드 - 현대적 세련된 스타일 */
.center-card {
    background: #ffffff;
    border: 1px solid #e5e7eb; /* 더 옅은 회색 */
    border-radius: 14px; /* 8px → 14px 증가 */
    padding: 32px 24px 16px 24px; /* 하단 패딩 16px */
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* 부드러운 easing */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px; /* 12px → 10px */
    min-height: 180px; /* 최소 높이만 지정 */
    height: auto; /* 고정 높이 제거 → 자동 높이 */
    width: 100%;
    /* 기본 상태: 은은한 그림자 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Hover 상태 - 세련된 피드백 */
.center-card:hover {
    border-color: #cbd5e1; /* 약간 진한 회색 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 그림자 강화 */
    transform: translateY(-3px); /* 2px → 3px 증가 */
}

/* Focus 상태 - 키보드 접근성 */
.center-card:focus,
.center-card:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 3px;
    border-color: #94a3b8;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.15);
}

/* 클릭(Active) 상태 */
.center-card:active {
    transform: translateY(-1px); /* 살짝 눌림 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* 선택됨 상태 - 체크 아이콘 추가 */
.center-card.selected::after {
    content: '\f058'; /* Font Awesome check-circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    color: #10b981; /* 초록색 체크 */
    animation: checkAppear 0.3s ease-out;
}

@keyframes checkAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 센터 선택 후 - Accent 컬러 적용 (선택 상태 피드백) */
.center-card.selected {
    animation: centerSelectPulse 0.4s ease-out;
    border-width: 2px; /* 테두리 강조 */
}

@keyframes centerSelectPulse {
    0% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.03) translateY(-2px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

/* 센터별 선택 시 Accent 컬러 적용 */
.center-card[data-center="neuro"].selected {
    border-color: #6B8CAE;
    box-shadow: 0 6px 20px rgba(107, 140, 174, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(107, 140, 174, 0.03) 100%);
}

.center-card[data-center="emergency"].selected {
    border-color: #8B5555;
    box-shadow: 0 6px 20px rgba(139, 85, 85, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(139, 85, 85, 0.03) 100%);
}

.center-card[data-center="spine"].selected {
    border-color: #7A9B7E;
    box-shadow: 0 6px 20px rgba(122, 155, 126, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(122, 155, 126, 0.03) 100%);
}

.center-card[data-center="oncology"].selected {
    border-color: #6B8B8B;
    box-shadow: 0 6px 20px rgba(107, 139, 139, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(107, 139, 139, 0.03) 100%);
}

.center-card[data-center="cardio"].selected {
    border-color: #9B6B7E;
    box-shadow: 0 6px 20px rgba(155, 107, 126, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(155, 107, 126, 0.03) 100%);
}

.center-card[data-center="resp"].selected {
    border-color: #6B8B9B;
    box-shadow: 0 6px 20px rgba(107, 139, 155, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(107, 139, 155, 0.03) 100%);
}

.center-card[data-center="integrated"].selected {
    border-color: #8B7A9B;
    box-shadow: 0 6px 20px rgba(139, 122, 155, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(139, 122, 155, 0.03) 100%);
}

.center-card[data-center="gastro"].selected {
    border-color: #9B8B6B;
    box-shadow: 0 6px 20px rgba(155, 139, 107, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(155, 139, 107, 0.03) 100%);
}

.center-card[data-center="renal"].selected {
    border-color: #6B9B8B;
    box-shadow: 0 6px 20px rgba(107, 155, 139, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(107, 155, 139, 0.03) 100%);
}

/* 센터 아이콘 - 크기 증가 */
.center-card-icon {
    font-size: 46px; /* 40px → 46px (15% 증가) */
    margin-bottom: 8px;
    transition: transform 0.25s ease;
}

.center-card:hover .center-card-icon {
    transform: scale(1.08); /* hover 시 아이콘 살짝 커짐 */
}

/* 센터별 아이콘 색상 - EMR Accent 컬러 사용 */
.center-card[data-center="neuro"] .center-card-icon {
    color: #6B8CAE;
}

.center-card[data-center="emergency"] .center-card-icon {
    color: #8B5555;
}

.center-card[data-center="spine"] .center-card-icon {
    color: #7A9B7E;
}

.center-card[data-center="oncology"] .center-card-icon {
    color: #6B8B8B;
}

.center-card[data-center="cardio"] .center-card-icon {
    color: #9B6B7E;
}

.center-card[data-center="resp"] .center-card-icon {
    color: #6B8B9B;
}

.center-card[data-center="integrated"] .center-card-icon {
    color: #8B7A9B;
}

.center-card[data-center="gastro"] .center-card-icon {
    color: #9B8B6B;
}

.center-card[data-center="renal"] .center-card-icon {
    color: #6B9B8B;
}

/* 하위 호환성 */
.center-card[data-center="stroke"] .center-card-icon {
    color: #6B8CAE;
}

.center-card[data-center="trauma"] .center-card-icon {
    color: #8B5555;
}

.center-card[data-center="cancer"] .center-card-icon {
    color: #6B8B8B;
}

.center-card[data-center="respiratory"] .center-card-icon {
    color: #6B8B9B;
}

/* 센터 이름 - 크기 증가 */
.center-card-name {
    font-size: 17px; /* 18px → 17px (균형 조정) */
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

/* 센터 설명 - overflow 제거, 전체 텍스트 표시 */
.center-card-description {
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    line-height: 1.5; /* 1.4 → 1.5 가독성 개선 */
    max-width: 100%;
    word-break: keep-all; /* 한글 줄바꿈 개선 */
}

/* 안내 텍스트 - 작게 & 위치 조정 */
.landing-instructions {
    margin-top: 20px; /* 32px → 20px 축소 */
    font-size: 13px; /* 14px → 13px */
    color: #868e96;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* 8px → 6px */
}

.landing-instructions i {
    color: #0066cc;
    font-size: 14px;
}

/* ========================================
   반응형 디자인
   ======================================== */

/* 대형 데스크탑 (>=1400px) */
@media (min-width: 1400px) {
    .center-selection-grid {
        max-width: 1200px;
        gap: 20px;
    }
    
    .center-card {
        min-height: 180px; /* 최소 높이만 지정 */
        padding: 32px 24px 16px 24px;
    }
}

/* 데스크탑 (1200px ~ 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .center-selection-grid {
        max-width: 1050px;
        gap: 16px;
    }
}

/* 태블릿 (768px ~ 1199px): 2열 그리드 */
@media (max-width: 1199px) and (min-width: 768px) {
    .center-selection-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
        gap: 16px;
    }
    
    .landing-title {
        font-size: 28px;
    }
    
    .center-card {
        min-height: 170px; /* 최소 높이만 지정 */
        padding: 28px 20px 14px 20px;
    }
    
    .center-card-icon {
        font-size: 44px;
    }
}

/* 모바일 (<768px): 1열 그리드 */
@media (max-width: 767px) {
    .center-selection-landing {
        padding: 12px 16px 20px;
    }
    
    .landing-content {
        padding: 8px 12px;
    }
    
    .landing-icon {
        font-size: 40px;
        margin-bottom: 8px;
    }
    
    .landing-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .landing-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .center-selection-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        gap: 12px;
    }
    
    .center-card {
        min-height: 140px; /* 최소 높이만 지정 */
        padding: 20px 16px 14px 16px;
        border-radius: 12px;
    }
    
    .center-card-icon {
        font-size: 38px;
    }
    
    .center-card-name {
        font-size: 16px;
    }
    
    .center-card-description {
        font-size: 12px;
    }
    
    .landing-instructions {
        margin-top: 16px;
        font-size: 12px;
    }
}

/* 초소형 모바일 (<480px) */
@media (max-width: 479px) {
    .center-card {
        min-height: 130px; /* 최소 높이만 지정 */
        padding: 18px 14px 12px 14px;
    }
    
    .center-card-icon {
        font-size: 36px;
    }
}
