/* 카드 스타일링 */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.card-body {
    padding: 1.5rem;
}

/* 프로필 이미지 스타일링 */
.rounded-circle {
    object-fit: cover;
    border: 2px solid #f8f9fa;
}

/* 배지 스타일링 */
.badge {
    font-weight: 500;
    padding: 0.5em 1em;
}

.badge.bg-primary {
    background-color: #215EA3 !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

/* 검색 필터 스타일링 */
.form-select, .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
}

.form-select:focus, .form-control:focus {
    border-color: #215EA3;
    box-shadow: 0 0 0 0.2rem rgba(33, 94, 163, 0.25);
}

/* 버튼 스타일링 */
.custom-button2 {
    background-color: #215EA3;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    transition: background-color 0.2s ease-in-out;
}

.custom-button2:hover {
    background-color: #1a4b82;
    color: white;
}

/* 페이지네이션 스타일링 */
.pagination .page-link {
    color: #215EA3;
    border: 1px solid #dee2e6;
    margin: 0 3px;
    border-radius: 5px;
}

.pagination .page-item.active .page-link {
    background-color: #215EA3;
    border-color: #215EA3;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #215EA3;
}

/* 별점 스타일링 */
.ratings .bi-star-fill {
    color: #ffc107;
}

/* 반응형 디자인을 위한 미디어 쿼리 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* 초기화 버튼 스타일링 */
.btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
    transition: all 0.2s ease-in-out;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #215EA3;
    color: #215EA3;
}

.btn-outline-secondary i {
    margin-right: 5px;
}

/* 정렬 선택 스타일링 */
#sortSelect {
    background-color: #fff;
}

#sortSelect:focus {
    border-color: #215EA3;
    box-shadow: 0 0 0 0.2rem rgba(33, 94, 163, 0.25);
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .col-md-2 {
        padding-left: 0;
    }
    
    #resetCategory {
        margin-top: 0.5rem;
    }
}

/* 카테고리 설문조사 스타일링 */
.category-survey {
    background-color: #f8f9fa;
    border-color: #dee2e6 !important;
}

.category-survey h5 {
    color: #215EA3;
    font-weight: 600;
}

.survey-questions .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.survey-questions .form-check {
    margin-bottom: 0.5rem;
}

.survey-questions .form-check-label {
    color: #6c757d;
}

/* 반응형 조정 */
@media (max-width: 992px) {
    .col-3, .col-9 {
        width: 100%;
    }
    
    .category-section {
        margin-bottom: 2rem;
    }
}



/* 로딩 스피너 */
/* #loadingSpinner: 로딩 스피너의 외부 컨테이너 스타일 */
#loadingSpinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex; /* flexbox로 자식 요소들을 정렬 */
    align-items: center; /* 자식 요소들을 세로 방향으로 중앙 정렬 */
    justify-content: center; /* 자식 요소들을 가로 방향으로 중앙 정렬 */
}

/* .spinner: 실제로 회전하는 원 모양의 로딩 스피너 스타일 */
.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: rgba(33, 94, 163, 1);
    animation: spin 1s linear infinite; /* spin 애니메이션을 1초 간격으로 무한 반복 */
}

/* spin 애니메이션: 회전 효과 */
@keyframes spin {
    0% { transform: rotate(0deg); } /* 시작 시 0도 회전 */
    100% { transform: rotate(360deg); } /* 끝날 때 360도 회전 */
}

/* #loadingSpinner p: 로딩 스피너 아래 텍스트의 스타일 */
#loadingSpinner p {
    margin-top: 10px;
    font-size: 14px;
    color: #215EA3;
    font-weight: bold;
    opacity: 0.8;
    animation: textFade 1.5s ease-in-out infinite; /* 텍스트에 fade 애니메이션을 적용 */
}

/* textFade 애니메이션: 텍스트의 투명도 변경 효과 */
@keyframes textFade {
    0% { opacity: 0.3; } /* 시작 시 텍스트 투명도 0.3 */
    50% { opacity: 1; } /* 중간에 텍스트 투명도 1 */
    100% { opacity: 0.3; } /* 끝날 때 텍스트 투명도 0.3 */
}
