/* ===================================
   NOTICE BOARD - 통합 CSS
   =================================== */

/* 기본 컨테이너 스타일 - overflow-x 제거 */
body {
    width: 100%;
    max-width: 100vw;
}

html {
    width: 100%;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

/* 모든 이미지 반응형 처리 */
img {
    max-width: 100%;
    height: auto;
}

/* 컨테이너 클래스 - overflow-x 제거하고 width 문제 해결 */
.container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
}

/* ===================================
   NOTICE LIST PAGE STYLES
   =================================== */

.notice-content {
    padding: 50px 0;
    width: 100%;
    max-width: 100%;
}

.board-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

.board-header {
    margin-bottom: 30px;
}

.board-header h3 {
    font-size: 28px;
    font-weight: 600;
}

/* 테이블 컨테이너 - X축 스크롤 문제 해결 */
.board-list {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.board-list table {
    width: 100%;
    border-top: 2px solid #333;
    border-collapse: collapse;
    min-width: 0; /* min-width 제거 */
}

.board-list th,
.board-list td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
}

.board-list th {
    background: #f8f8f8;
    font-weight: 600;
}

.board-list td.title {
    text-align: left;
}

.board-list td.title a {
    color: #333;
    text-decoration: none;
    word-break: break-all;
}

.board-list td.title a:hover {
    text-decoration: underline;
}

/* 테이블 셀 너비를 더 유연하게 */
.board-list .num { 
    width: 80px;
    min-width: 60px;
}

.board-list .title { 
    width: auto; /* 유동적으로 변경 */
    min-width: 150px; /* 최소 너비 축소 */
}

.board-list .date { 
    width: 100px;
    min-width: 80px;
}

.board-list .view { 
    width: 80px;
    min-width: 60px;
}

.board-pagination {
    margin-top: 30px;
    text-align: center;
}

.board-search {
    margin-top: 20px;
    text-align: center;
}

.board-search form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.board-search select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.board-search input[type="text"] {
    padding: 8px;
    width: 300px;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.board-search button {
    padding: 8px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.board-search button:hover {
    background: #555;
}

.fa-paperclip {
    margin-left: 5px;
    color: #666;
}

/* ===================================
   NOTICE VIEW PAGE STYLES
   =================================== */

.notice-view-content {
    padding: 50px 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.board-view-header {
    padding: 20px;
    border-top: 2px solid #333;
    border-bottom: 1px solid #ddd;
}

.board-view-header h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    word-break: keep-all;
    line-height: 1.4;
}

.board-info {
    color: #666;
    font-size: 14px;
}

.board-info span {
    margin-right: 20px;
}

.board-view-content {
    padding: 40px 20px;
    min-height: 300px;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

.content-wrapper {
    width: 100%;
    overflow-x: auto;
}

.content-wrapper img {
    max-width: 100%;
    height: auto;
}

.content-wrapper p {
    margin: 10px 0;
    word-wrap: break-word;
}

.content-wrapper table {
    width: 100% !important;
    max-width: 100%;
    margin: 10px 0;
    border-collapse: collapse;
}

.content-wrapper table td {
    padding: 8px;
    border: 1px solid #ddd;
    word-wrap: break-word;
}

.board-files {
    padding: 20px;
    background: #f8f8f8;
    margin-top: 20px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.board-files h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.board-files ul {
    list-style: none;
    padding: 0;
}

.board-files li {
    margin-bottom: 5px;
    word-wrap: break-word;
}

.board-files a {
    color: #333;
    text-decoration: none;
    margin-left: 5px;
    word-break: break-all;
}

.board-files a:hover {
    text-decoration: underline;
}

.board-view-buttons {
    margin-top: 30px;
    text-align: center;
}

.btn-list {
    display: inline-block;
    padding: 10px 30px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.btn-list:hover {
    background: #555;
    color: #fff;
}

/* ===================================
   PAGINATION STYLES
   =================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination li {
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination li.active span {
    background: #333;
    color: #fff;
    border-color: #333;
}

.pagination li a:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.pagination li.disabled span {
    color: #ccc;
    cursor: not-allowed;
}

.pagination li:first-child a,
.pagination li:last-child a {
    font-size: 13px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* 992px 이하 - 태블릿 */
@media (max-width: 992px) {
    .board-wrap {
        padding: 30px 15px;
    }
    
    .board-header h3 {
        font-size: 24px;
    }
    
    .board-search input[type="text"] {
        width: 250px;
    }
}

/* 768px 이하 - 모바일 */
@media (max-width: 768px) {


    .mobile-logo{
        background: white;
    }

    .notice-content {
        padding: 30px 0;
    }
    
    .board-wrap {
        padding: 20px 10px;
        max-width: 100%;
    }

    .board-view-header h3 {
        font-size: 20px;
    }

    .board-info span {
        display: block;
        margin-bottom: 5px;
        margin-right: 0;
    }

    .board-view-content {
        padding: 20px 15px;
    }
    
    .board-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .board-list table {
        min-width: 0;
        width: 100%;
    }
    
    .board-list th,
    .board-list td {
        padding: 10px 5px;
        font-size: 14px;
    }
    
    /* 모바일에서 테이블 컬럼 조정 */
    .board-list .num { 
        width: 50px;
        min-width: 40px;
    }

    .board-list .title { 
        width: auto;
        min-width: 120px;
    }

    .board-list .date { 
        width: 80px;
        min-width: 70px;
        font-size: 12px;
    }

    .board-list .view { 
        width: 60px;
        min-width: 50px;
        font-size: 12px;
    }
    
    .board-search form {
        flex-direction: column;
        gap: 10px;
    }
    
    .board-search input[type="text"] {
        width: 100%;
        max-width: 300px;
    }
    
    .board-search select,
    .board-search button {
        width: 100%;
        max-width: 300px;
    }
    
    .board-files {
        padding: 15px;
    }
    
    .content-wrapper {
        overflow-x: auto;
    }
    
    .content-wrapper table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* 576px 이하 - 작은 모바일 */
@media (max-width: 576px) {
    .board-wrap {
        padding: 15px 5px;
    }
    
    .board-header h3 {
        font-size: 20px;
    }
    
    .board-view-header h3 {
        font-size: 18px;
    }
    
    .board-list table {
        min-width: 0;
        width: 100%;
    }
    
    .board-list th,
    .board-list td {
        padding: 8px 3px;
        font-size: 13px;
    }
    
    /* 작은 모바일에서 테이블 컬럼 더 축소 */
    .board-list .num { 
        width: 40px;
        min-width: 35px;
    }

    .board-list .title { 
        width: auto;
        min-width: 100px;
    }

    .board-list .date { 
        width: 70px;
        min-width: 60px;
        font-size: 11px;
    }

    .board-list .view { 
        width: 50px;
        min-width: 40px;
        font-size: 11px;
    }
    
    .board-view-content {
        padding: 15px 10px;
    }
    
    .btn-list {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .pagination {
        gap: 3px;
    }

    .pagination li a,
    .pagination li span {
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        font-size: 13px;
    }
} 