/* 기업/기술인증 게시판 스타일 */
#company_certification {
    margin-top: 4rem;
}

#company_certification .con_wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3.2rem 2.4rem;
    padding: 0;
    list-style: none;
}

@media (max-width: 1170px) {
    #company_certification .con_wrap {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    #company_certification .con_wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.6rem 1.0rem;
        /* 2열 배치시 간격 조정 */
    }
}

#company_certification .cert_item {
    display: flex;
    flex-direction: column;
}

#company_certification .cert_item figure {
    position: relative;
    border: 1px solid var(--line-color);
    padding: 1.2rem;
    border-radius: 2rem;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    margin: 0;
    transition: all 0.3s ease;
}

#company_certification .cert_item figure:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

#company_certification .cert_item img {
    width: 100%;
    height: auto;
    border-radius: 1.2rem;
    vertical-align: top;
}

#company_certification .cert_item .hover_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--primary-rgb, 0, 0, 0), 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 2rem;
}

#company_certification .cert_item figure:hover .hover_overlay {
    opacity: 1;
}

#company_certification .cert_item .hover_overlay span {
    color: #fff;
    font-weight: 700;
    border: 1px solid #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 3rem;
    font-size: 1.4rem;
}

#company_certification .cert_item em {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 2.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: #333;
    font-style: normal;
}

#company_certification .cert_item small {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-weight: 500;
}

#company_certification .cert_item p {
    font-size: 1.6rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 관리자 버튼 */
.admin_btns {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.admin_btns a {
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    background: #f5f5f5;
    color: #666;
    border-radius: 0.4rem;
    transition: all 0.2s;
}

.admin_btns a:hover {
    background: #333;
    color: #fff;
}

.admin_btns a.btn_del:hover {
    background: #e74c3c;
    color: #fff;
}

/* 모달 스타일 */
.cert_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.modal_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.modal_content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    background: transparent;
    overflow: visible;
    z-index: 1;
}

.modal_close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    font-size: 5rem;
    cursor: pointer;
    color: #fff;
    z-index: 100;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.modal_body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal_body .img_full {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal_body .img_full img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #fff;
    padding: 1rem;
}

@media (max-width: 900px) {
    .modal_content {
        width: 95%;
    }
}

/* 카테고리 탭 - Premium Redesign */
#bo_cate {
    margin: 4rem 0 5rem;
    padding: 0 1rem;
}

#bo_cate_ul {
    display: flex;
    gap: 1.0rem;
    justify-content: center;
    padding: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
    /* 모바일에서 많아지면 줄바꿈 고려, 적으면 중앙 정렬 유지 */
    overflow-x: visible;
    /* 스크롤 대신 전체 표시 */
}

#bo_cate_ul li {
    flex-shrink: 0;
}

#bo_cate_ul li a {
    display: block;
    padding: 1.2rem 3.2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.8rem;
    /* Soft Square */
    font-size: 1.6rem;
    color: #4b5563;
    font-weight: 600;
    transition: all 0.2sease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

#bo_cate_ul li a:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    color: #111;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#bo_cate_ul li a#bo_cate_on {
    background: #333;
    background: var(--primary-color, #333);
    color: #fff;
    border-color: var(--primary-color, #333);
    box-shadow: 0 4px 6px -1px rgba(var(--primary-rgb, 0, 0, 0), 0.4);
}

@media (max-width: 768px) {
    #bo_cate {
        margin: 3rem 0;
    }

    #bo_cate_ul {
        gap: 0.8rem;
    }

    #bo_cate_ul li a {
        padding: 1rem 2.0rem;
        font-size: 1.4rem;
        border-radius: 0.6rem;
    }
}