/* 기본 설정 */
:root {
    --primary-blue: #0089D0;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --text-main: #1f2937;
    --text-sub: #6b7280;
    --accent-pink: #fdf2f8;
}

/* 상단 정보 박스 */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background-color: #fff;
    margin-bottom: 30px;
}

.info-icon {
    width: 80px;
    height: 80px;
    background-color: #eff6ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-text h2 {
    font-size: 1.25rem;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.info-text p {
    font-size: 0.95rem;
    color: var(--text-main);
}

.sub-text {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-sub);
}

.search-section {
    background-color: #f3f4f6;
    padding: 24px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.search-bar {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 8px;
}

.reset-btn {
    background: #e5e7eb;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.reset-btn:hover {
    background: #d1d5db;
}

.reset-btn:hover svg {
    transform: rotate(-180deg);
    transition: transform 0.5s ease;
}

@media (max-width: 600px) {
    .search-bar {
        flex-wrap: wrap;
    }
    .search-bar input {
        width: 100%;
    }
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.search-btn {
    background-color: var(--primary-blue);
    border: none;
    padding: 0 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background-color: #1d4ed8;
}


.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 데스크탑 6열 */
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.category-item:hover {
    background-color: #f0f7ff;
}

.icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fce7f3;
    border-radius: 50%;
    opacity: 0.6;
    transition: transform 0.2s;
}

.category-item:hover .icon-bg {
    transform: scale(1.1);
}

.icon {
    position: relative;
    z-index: 1;
    color: #4b5563;
}

.label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

/* 활성화 상태 스타일 */
.category-item.active .label {
    color: var(--primary-blue);
    border-bottom: 2px solid #93c5fd;
    background-color: #f1f9fe !important; /* 오버 시 나오는 은은한 푸른빛 배경색 (프로젝트 가이드 색상으로 조절 가능) */
    border-color: #0089D0 !important;    /* 테두리선도 액티브 색상으로 매칭 */
}

/* 반응형 처리 */
@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr); /* 태블릿 3열 */
    }
}

@media (max-width: 600px) {
    .info-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr); /* 모바일 2열 */
    }
    
    .container {
        margin: 20px auto;
    }
}

.category-item {
    cursor: pointer;
}

.category-item.active .label {
    border-bottom: 2px solid #0089D0;
    font-weight: bold;
    color: #0089D0;
    background-color: #f1f9fe !important; /* 오버 시 나오는 은은한 푸른빛 배경색 (프로젝트 가이드 색상으로 조절 가능) */
    border-color: #0089D0 !important;    /* 테두리선도 액티브 색상으로 매칭 */
}

.margin_t10.data th,
.margin_t10.data td {
    text-align: center;
    padding: 10px 5px;
}
.margin_t10.data td:nth-child(3),
.margin_t10.data th:nth-child(4),
.margin_t10.data td:nth-child(4),
.margin_t10.data th:nth-child(5),
.margin_t10.data td:nth-child(5) {
    text-align: left !important;
    padding-left: 15px;
}

.icon-new-window {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230089D0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    vertical-align: middle;
    margin-left: 4px;
}

.btn-new-window:after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 5px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230089D0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

/* 4, 5번째 컬럼 왼쪽 정렬 */
.data td:nth-child(4), 
.data td:nth-child(5) { 
    text-align: left !important; 
    padding-left: 10px; 
}


/* 1. 버튼 전체 박스 배경색 채우고 외곽선 정리 */
.category-item.active,
.govern_menu ul li.active, 
.govern_menu ul li a.active {
    background: #f1f9fe !important;
    background-color: #f1f9fe !important;
    
    /* [수정] 이중으로 생기는 모든 테두리 및 그림자 강제 제거 */
    border: 1px solid #0089D0 !important; /* 전체 테두리를 선명한 블루 하나로 통일 */
    border-right: 1px solid #0089D0 !important;
    border-bottom: 1px solid #0089D0 !important;
    box-shadow: none !important;          /* 하단/우측에 퍼지던 그림자(그레이선처럼 보임) 제거 */
    outline: none !important;             /* 브라우저 기본 포커스 선 제거 */
}

/* 2. 내부 텍스트 영역 투명화 및 글자색 매칭 */
.category-item.active .label,
.category-item.active span,
.govern_menu ul li.active a span {
    background: transparent !important;
    background-color: transparent !important;
    color: #0089D0 !important;
    font-weight: 700 !important;
    
    /* [추가] 혹시나 내부 span 태그 자체에 보더가 걸려있을 경우를 대비해 초기화 */
    border: none !important;
    box-shadow: none !important;
}

/* 3. 내부 아이콘 색상 동기화 */
.category-item.active .icon-wrapper svg,
.category-item.active .icon-wrapper .icon,
.govern_menu ul li.active .icon-wrapper svg {
    stroke: #0089D0 !important;
    color: #0089D0 !important;
}

/* 4. 마우스 오버(Hover) 시에도 깔끔하게 배경 처리 */
.category-item:hover,
.govern_menu ul li a:hover {
    background: #f1f9fe !important;
    background-color: #f1f9fe !important;
    border: 1px solid #0089D0 !important;
    box-shadow: none !important;
}