/* =========================================================
   PORTAL BOARD - 공통
========================================================= */

.portal_board,
.portal_board * {
    box-sizing: border-box;
}

.portal_board {
    width: 100%;
}


/* =========================================================
   게시판 상단
========================================================= */

.portal_board_head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;
}

.portal_board_head h1 {
    margin: 0;

    color: #111827;

    font-size: 27px;
    font-weight: 700;
    line-height: 1.4;
}

.portal_board_head p {
    margin: 7px 0 0;

    color: #8a919c;

    font-size: 13px;
}


/* 글쓰기 */

.portal_write_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 78px;
    height: 40px;

    padding: 0 18px;

    border-radius: 7px;

    background: #0f172a;

    color: #ffffff !important;

    font-size: 13px;

    text-decoration: none;

    flex-shrink: 0;
}

.portal_write_btn:hover {
    background: #1e293b;
    color: #ffffff !important;
}


/* =========================================================
   카테고리
========================================================= */

.portal_category {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 18px;
}

.portal_category a {
    padding: 8px 14px;

    border: 1px solid #e5e7eb;
    border-radius: 20px;

    background: #ffffff;

    color: #64748b;

    font-size: 13px;

    text-decoration: none;
}

.portal_category a:hover,
.portal_category a.active {
    border-color: #0f172a;

    background: #0f172a;

    color: #ffffff;
}


/* =========================================================
   게시판 테이블
========================================================= */

.portal_board_table {
    width: 100%;

    overflow: hidden;

    border: 1px solid #1e3a5f;
    border-radius: 14px;

    background: #111c33;
}


/* 테이블 헤더 + 행 */

.portal_board_table_head,
.portal_board_row {
    display: grid;

    grid-template-columns:
        70px
        minmax(0, 1fr)
        120px
        80px
        70px;

    align-items: center;
}


/* 테이블 헤더 */

.portal_board_table_head {
    min-height: 48px;

    border-bottom: 1px solid #24415f;

    background: #0c172b;

    color: #8ca2bf;

    font-size: 12px;

    text-align: center;
}


/* 게시글 */

.portal_board_row {
    min-height: 53px;

    border-bottom: 1px solid #20334d;

    background: #111c33;
}

.portal_board_row:last-child {
    border-bottom: 0;
}

.portal_board_row:hover {
    background: #17243d;
}


/* 번호 / 작성자 / 날짜 / 조회 */

.portal_col_num,
.portal_col_writer,
.portal_col_date,
.portal_col_hit {
    padding: 10px;

    color: #8499b5;

    font-size: 12px;

    text-align: center;
}


/* 제목 */

.portal_col_subject {
    min-width: 0;

    padding: 10px 15px;
}

.portal_col_subject a {
    display: inline-block;

    max-width: 100%;

    overflow: hidden;

    color: #f8fafc !important;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;

    text-decoration: none;

    text-overflow: ellipsis;
    white-space: nowrap;

    vertical-align: middle;
}

.portal_col_subject a:hover {
    color: #38bdf8 !important;
}


/* 카테고리 */

.portal_category_name {
    display: inline-block;

    margin-right: 8px;
    padding: 3px 7px;

    border-radius: 4px;

    background: #164e63;

    color: #67e8f9;

    font-size: 11px;

    vertical-align: middle;
}


/* 댓글 숫자 */

.portal_comment {
    margin-left: 5px;

    color: #38bdf8;

    font-size: 11px;
}


/* 게시물 없음 */

.portal_board_empty {
    padding: 80px 20px;

    color: #8190a6;

    text-align: center;
}


/* =========================================================
   페이징
========================================================= */

.portal_paging {
    margin: 30px 0;

    text-align: center;
}


/* =========================================================
   검색
========================================================= */

.portal_board_bottom {
    display: flex;
    justify-content: center;

    margin-top: 25px;
}

.portal_search {
    display: flex;

    height: 40px;
}

.portal_search select {
    width: 100px;
    height: 40px;

    padding: 0 10px;

    border: 1px solid #dce1e7;
    border-right: 0;

    background: #ffffff;

    color: #333333;

    font-size: 13px;

    outline: none;
}

.portal_search input {
    width: 240px;
    height: 40px;

    padding: 0 13px;

    border: 1px solid #dce1e7;

    background: #ffffff;

    color: #333333;

    font-size: 13px;

    outline: none;
}

.portal_search button {
    width: 65px;
    height: 40px;

    padding: 0;

    border: 0;

    background: #0f172a;

    color: #ffffff;

    font-size: 13px;

    cursor: pointer;
}

.portal_search button:hover {
    background: #1e293b;
}


/* =========================================================
   게시판 공통 레이아웃
========================================================= */

#aside {
    display: none !important;
}

#container_title {
    display: none !important;
}

#container_wr {
    width: 100% !important;
    max-width: 1240px !important;

    margin: 0 auto !important;
}

#container {
    float: none !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
}


/* =========================================================
   게시글 상세보기
========================================================= */

.portal_view,
.portal_view * {
    box-sizing: border-box;
}

.portal_view {
    width: 100%;

    margin: 10px 0 60px;
}


/* 제목 영역 */

.portal_view_head {
    padding: 28px 30px;

    border: 1px solid #1e3a5f;
    border-radius: 14px 14px 0 0;

    background: #0c172b;
}

.portal_view_subject {
    margin: 0;

    color: #ffffff;

    font-size: 28px;
    font-weight: 700;
    line-height: 1.45;

    word-break: keep-all;
}

.portal_view_meta {
    display: flex;
    flex-wrap: wrap;

    gap: 18px;

    margin-top: 15px;

    color: #8499b5;

    font-size: 12px;
}

.portal_view_writer {
    color: #a9bad0;
}


/* 첨부파일 */

.portal_view_files {
    padding: 25px 30px 0;

    border-left: 1px solid #e6e9ee;
    border-right: 1px solid #e6e9ee;

    background: #ffffff;
}

.portal_view_image {
    margin-bottom: 20px;

    text-align: center;
}

.portal_view_image img {
    max-width: 100%;
    height: auto;
}

.portal_view_file {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 10px;
    padding: 13px 15px;

    border: 1px solid #e5e7eb;
    border-radius: 6px;

    background: #f7f8fa;

    color: #475569;

    font-size: 13px;
}

.portal_view_file a {
    flex-shrink: 0;

    color: #2563eb;

    text-decoration: none;
}


/* 상세 본문 */

.portal_view_content {
    min-height: 350px;

    padding: 45px 40px 60px;

    border: 1px solid #e6e9ee;
    border-top: 0;

    background: #ffffff;

    color: #263445;

    font-size: 16px;
    line-height: 1.9;

    word-break: break-word;
}

.portal_view_content img {
    max-width: 100%;
    height: auto;
}

.portal_view_content iframe {
    max-width: 100%;
}


/* 상세 하단 버튼 */

.portal_view_actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 20px;
}

.portal_view_actions_left,
.portal_view_actions_right {
    display: flex;

    gap: 8px;
}

.portal_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 70px;
    height: 40px;

    padding: 0 17px;

    border-radius: 7px;

    background: #0f172a;

    color: #ffffff !important;

    font-size: 13px;

    text-decoration: none;
}

.portal_btn:hover {
    background: #1e293b;
}

.portal_btn_delete {
    background: #7f1d1d;
}

.portal_btn_delete:hover {
    background: #991b1b;
}


/* =========================================================
   모바일 게시판
========================================================= */

@media (max-width: 768px) {

    .portal_board {
        width: 100%;
    }


    /* 게시판 제목 */

    .portal_board_head {
        align-items: center;

        margin-bottom: 18px;
    }

    .portal_board_head h1 {
        font-size: 23px;
    }

    .portal_board_head p {
        margin-top: 4px;

        font-size: 12px;
    }

    .portal_write_btn {
        min-width: 65px;
        height: 36px;

        padding: 0 12px;
    }


    /* PC용 테이블 헤더 숨김 */

    .portal_board_table_head {
        display: none;
    }


    /* 게시판 카드 */

    .portal_board_table {
        border-radius: 10px;
    }


    /* 게시글 한 줄 */

    .portal_board_row {
        display: grid;

        grid-template-columns: minmax(0, 1fr) auto;

        min-height: 76px;

        padding: 13px 15px;
    }


    /* 번호/조회 모바일 숨김 */

    .portal_col_num,
    .portal_col_hit {
        display: none;
    }


    /* 제목 */

    .portal_col_subject {
        grid-column: 1 / 3;
        grid-row: 1;

        padding: 0 0 9px;
    }

    .portal_col_subject a {
        display: block;

        overflow: visible;

        color: #f8fafc !important;

        font-size: 15px;

        text-overflow: initial;
        white-space: normal;

        word-break: break-word;
    }


    /* 작성자 */

    .portal_col_writer {
        grid-column: 1;
        grid-row: 2;

        padding: 0;

        color: #8195aa;

        text-align: left;
    }


    /* 날짜 */

    .portal_col_date {
        grid-column: 2;
        grid-row: 2;

        padding: 0;

        color: #8195aa;

        text-align: right;
    }


    /* 검색 */

    .portal_board_bottom {
        width: 100%;

        margin-top: 20px;
    }

    .portal_search {
        width: 100%;
        height: 40px;
    }

    .portal_search select {
        width: 90px;

        flex-shrink: 0;
    }

    .portal_search input {
        width: auto;
        min-width: 0;

        flex: 1;
    }

    .portal_search button {
        width: 60px;

        flex-shrink: 0;
    }


    /* =====================================================
       상세 모바일
    ====================================================== */

    .portal_view {
        margin-top: 0;
    }

    .portal_view_head {
        padding: 22px 18px;

        border-radius: 10px 10px 0 0;
    }

    .portal_view_subject {
        font-size: 22px;
    }

    .portal_view_meta {
        gap: 10px 15px;

        margin-top: 12px;
    }

    .portal_view_files {
        padding: 18px 15px 0;
    }

    .portal_view_content {
        min-height: 250px;

        padding: 30px 20px 40px;

        font-size: 15px;
        line-height: 1.8;
    }

    .portal_view_actions {
        align-items: stretch;
    }

    .portal_btn {
        min-width: 62px;
        height: 38px;

        padding: 0 14px;
    }
}


/* =========================================================
   아주 작은 모바일
========================================================= */

@media (max-width: 480px) {

    .portal_board_head h1 {
        font-size: 22px;
    }

    .portal_search select {
        width: 78px;

        padding: 0 5px;

        font-size: 12px;
    }

    .portal_search button {
        width: 55px;
    }

    .portal_view_content {
        padding-left: 17px;
        padding-right: 17px;
    }
}

/* 게시판 작성자 글씨 색상 보정 */
.portal_col_writer,
.portal_col_writer a,
.portal_col_writer span {
    color: #8195aa !important;
}

/* 게시글 본문 가독성 */
.portal_view_content p {
    margin: 0 0 18px !important;
    line-height: 1.85;
}

.portal_view_content h2 {
    margin: 38px 0 16px !important;
    line-height: 1.45;
}

.portal_view_content h3 {
    margin: 28px 0 12px !important;
    line-height: 1.5;
}
