/* ========================================
   DOOSAY D1 - Notice Board Skin
   원본 HTML 디자인 그대로 적용
   ======================================== */

/* [Design Tokens] */
:root {
    --color-accent: #FFD700;
    --color-black: #111111;
    --color-dark-gray: #333333;
    --color-light-gray: #f2f2f2;
    --bg-white: #ffffff;
    --header-h: 90px;
    --container-w: 1320px;
    --border-bold: 3px solid var(--color-black);
}

/* [Sub Visual] */
.sub-visual {
    margin-top: var(--header-h);
    height: 350px;
    background: var(--color-black);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sv-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    z-index: 1;
}

.sv-title span {
    color: var(--color-accent);
}

.sv-desc {
    font-size: 1.1rem;
    opacity: 0.8;
    z-index: 1;
    font-weight: 400;
}

.sub-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px);
}

/* [Sticky Tabs - LNB] */
.lnb-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 900;
    background: var(--color-black);
    border-bottom: var(--border-bold);
}

.lnb-list {
    display: flex;
    justify-content: center;
}

.lnb-list li {
    flex: 1;
    max-width: 200px;
    text-align: center;
}

.lnb-list a {
    display: block;
    padding: 20px 0;
    color: #888;
    font-weight: 700;
    font-family: 'Noto Sans KR';
    font-size: 16px;
    background: var(--color-black);
    border-right: 1px solid #333;
    transition: 0.3s;
}

.lnb-list li:first-child a {
    border-left: 1px solid #333;
}

.lnb-list a:hover,
.lnb-list li.active a {
    background: var(--color-accent);
    color: var(--color-black);
}

/* [Search Bar] */
.search-wrap {
    margin-bottom: 60px;
    display: flex;
    justify-content: flex-end;
}

.search-box {
    display: flex;
    border: 2px solid var(--color-black);
    width: 100%;
    max-width: 400px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-family: 'Noto Sans KR';
    outline: none;
    background: #fff;
}

.search-btn {
    background: var(--color-black);
    color: #fff;
    border: none;
    padding: 0 25px;
    font-family: 'Montserrat';
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover {
    background: var(--color-accent);
    color: var(--color-black);
}

/* [Notice List] */
.notice-list {
    border-top: var(--border-bold);
}

.notice-head {
    display: flex;
    background: var(--color-black);
    color: #fff;
    padding: 20px 0;
    font-family: 'Montserrat';
    font-weight: 700;
    text-align: center;
    font-size: 14px;
}

.notice-item {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 25px 0;
    align-items: center;
    transition: 0.2s;
    cursor: pointer;
    background: #fff;
    position: relative;
}

.notice-item:hover {
    background: #f9f9f9;
    padding-left: 10px;
}

.notice-item:hover .n-subject {
    color: var(--color-black);
    font-weight: 700;
}

.notice-item:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--color-accent);
}

.notice-item.pinned {
    background: #fff;
    border-bottom: 2px solid var(--color-black);
}

.notice-item.pinned .n-num span {
    background: var(--color-accent);
    color: var(--color-black);
    padding: 5px 10px;
    font-weight: 700;
    font-size: 12px;
    border: 2px solid var(--color-black);
}

.n-num {
    width: 10%;
    text-align: center;
    font-family: 'Montserrat';
    font-weight: 700;
    color: #888;
}

.n-subject {
    width: 65%;
    padding-left: 20px;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.n-date {
    width: 15%;
    text-align: center;
    font-family: 'Montserrat';
    color: #666;
    font-size: 14px;
}

.n-hit {
    width: 10%;
    text-align: center;
    font-family: 'Montserrat';
    color: #888;
    font-size: 14px;
}

/* [Pagination] */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 80px;
}

.pagination a,
.pagination strong {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--color-black);
    font-weight: 700;
    font-family: 'Montserrat';
    transition: 0.3s;
    color: var(--color-black);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--color-black);
    color: #fff;
}

.pagination strong,
.pagination .on {
    background: var(--color-accent);
    border-color: var(--color-black);
}

/* Write Button */
.btn-write {
    display: inline-block;
    padding: 15px 40px;
    background: var(--color-black);
    color: #fff;
    font-weight: 700;
    font-family: 'Montserrat';
    border: 2px solid var(--color-black);
    transition: 0.3s;
}

.btn-write:hover {
    background: transparent;
    color: var(--color-black);
}

/* View Page Styles */
.view-wrap {
    border-top: var(--border-bold);
}

.view-header {
    border-bottom: 1px solid #ddd;
    padding: 30px 0;
}

.view-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-family: 'Noto Sans KR';
    font-weight: 700;
    line-height: 1.4;
}

.view-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
    font-family: 'Montserrat';
}

.view-info span {
    position: relative;
    padding-right: 20px;
}

.view-info span:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: 8px;
    color: #ddd;
}

.view-content {
    padding: 60px 0;
    min-height: 400px;
    line-height: 1.8;
    font-size: 1.05rem;
}

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

.view-files {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
    margin-bottom: 30px;
}

.view-files strong {
    display: block;
    margin-bottom: 10px;
    font-family: 'Montserrat';
}

.view-files a {
    color: var(--color-dark-gray);
    padding: 8px 0;
    display: inline-block;
}

.view-files a:hover {
    color: var(--color-accent);
}

.view-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.btn-list {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--color-black);
    background: #fff;
    color: var(--color-black);
    font-weight: 700;
    transition: 0.3s;
}

.btn-list:hover {
    background: var(--color-black);
    color: #fff;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-edit,
.btn-delete {
    display: inline-block;
    padding: 12px 20px;
    border: 2px solid var(--color-black);
    background: #fff;
    color: var(--color-black);
    font-weight: 700;
    transition: 0.3s;
}

.btn-edit:hover {
    background: var(--color-accent);
    color: var(--color-black);
}

.btn-delete:hover {
    background: #ff5555;
    color: #fff;
    border-color: #ff5555;
}

/* Write Form Styles */
.write-wrap {
    border-top: var(--border-bold);
    padding: 40px 0;
}

.write-form {
    width: 100%;
}

.write-form table {
    width: 100%;
    border-collapse: collapse;
}

.write-form th {
    width: 150px;
    padding: 15px;
    background: var(--color-light-gray);
    border: 1px solid #ddd;
    font-weight: 700;
    text-align: left;
}

.write-form td {
    padding: 15px;
    border: 1px solid #ddd;
}

.write-form input[type="text"],
.write-form input[type="password"],
.write-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    font-size: 16px;
    font-family: 'Noto Sans KR';
    outline: none;
    transition: 0.3s;
}

.write-form input:focus {
    border-color: var(--color-accent);
}

.write-form textarea {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #ddd;
    font-size: 16px;
    font-family: 'Noto Sans KR';
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: 0.3s;
}

.write-form textarea:focus {
    border-color: var(--color-accent);
}

.write-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.btn-submit {
    display: inline-block;
    padding: 15px 50px;
    background: var(--color-black);
    color: #fff;
    font-weight: 700;
    font-family: 'Montserrat';
    border: 2px solid var(--color-black);
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: var(--color-accent);
    color: var(--color-black);
}

.btn-cancel {
    display: inline-block;
    padding: 15px 50px;
    background: #fff;
    color: var(--color-black);
    font-weight: 700;
    font-family: 'Montserrat';
    border: 2px solid var(--color-black);
    cursor: pointer;
    transition: 0.3s;
}

.btn-cancel:hover {
    background: #f5f5f5;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .lnb-bar {
        top: 70px;
    }
    
    .lnb-list li {
        flex: auto;
        width: 50%;
    }
    
    .lnb-list {
        flex-wrap: wrap;
    }
    
    .lnb-list a {
        border-bottom: 1px solid #333;
    }
    
    .notice-head {
        display: none;
    }
    
    .notice-item {
        flex-wrap: wrap;
        padding: 20px 0;
    }
    
    .n-num {
        width: auto;
        margin-right: 10px;
        text-align: left;
        padding-left: 5px;
    }
    
    .n-subject {
        width: 100%;
        padding-left: 5px;
        margin-bottom: 10px;
        font-size: 1.1rem;
    }
    
    .n-date,
    .n-hit {
        width: auto;
        font-size: 12px;
        color: #999;
        margin-right: 15px;
        padding-left: 5px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .write-form th {
        width: 100px;
        font-size: 14px;
    }
    
    .view-btns {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .sub-visual {
        margin-top: 70px;
        height: 250px;
    }
    
    .sv-title {
        font-size: 2rem;
    }
    
    .pagination a,
    .pagination strong {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .write-form table,
    .write-form th,
    .write-form td {
        display: block;
        width: 100%;
    }
    
    .write-form th {
        border-bottom: none;
    }
}

/* ========================================
   리스트 페이지 스타일
   ======================================== */

.board-container {
    width: 90%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 60px 0 80px;
}

.board-list {
    border-top: 3px solid #111;
}

.bl-row {
    display: flex;
    align-items: center;
    padding: 18px 15px;
    border-bottom: 1px solid #ddd;
    gap: 15px;
    transition: 0.2s;
}

.bl-row:hover { background: #fafafa; }
.bl-notice { background: #fffef5; }
.bl-notice:hover { background: #fffde0; }

.bl-header {
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.bl-header:hover { background: #111; }

.bl-chk { width: 50px; text-align: center; flex-shrink: 0; }
.bl-num { width: 80px; text-align: center; flex-shrink: 0; color: #888; font-size: 14px; }
.bl-subject { flex: 1; min-width: 0; }
.bl-subject a { color: #333; text-decoration: none; font-size: 15px; }
.bl-subject a:hover { color: #111; text-decoration: underline; }
.bl-hit { width: 80px; text-align: center; flex-shrink: 0; color: #888; font-size: 14px; }
.bl-date { width: 100px; text-align: center; flex-shrink: 0; color: #888; font-size: 14px; }

.notice-badge {
    display: inline-block;
    background: #FFD700;
    color: #111;
    padding: 4px 12px;
    font-weight: 700;
    font-size: 12px;
    border: 2px solid #111;
}

.bl-empty {
    padding: 80px 20px;
    text-align: center;
    color: #888;
    font-size: 15px;
}

/* 버튼 영역 */
.btn-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 0 10px;
    gap: 20px;
}

.btn-left, .btn-right { flex-shrink: 0; }
.btn-center { display: flex; justify-content: center; }

/* 페이지네이션 */
.bl-paging {
    display: flex;
    gap: 5px;
}
.bl-paging a,
.bl-paging strong,
.bl-paging span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
}
.bl-paging a:hover { border-color: #111; background: #f5f5f5; }
.bl-paging strong { background: #FFD700; border-color: #FFD700; color: #111; }
.bl-paging .pg-off { color: #ccc; }

.btn-delete {
    height: 45px;
    padding: 0 25px;
    background: #fff;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}
.btn-delete:hover { background: #e74c3c; color: #fff; }

.btn-write {
    display: inline-flex;
    align-items: center;
    height: 45px;
    padding: 0 30px;
    background: #111;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    border: 2px solid #111;
}
.btn-write:hover { background: #FFD700; color: #111; }

/* 반응형 - 태블릿 */
@media (max-width: 1024px) {
    .board-container { width: 94%; }
    .bl-num { width: 60px; }
    .bl-hit { width: 60px; }
    .bl-date { width: 80px; }
}

/* 반응형 - 모바일 */
@media (max-width: 780px) {
    .board-container { width: 96%; padding: 30px 0 50px; }
    
    .bl-header { display: none; }
    .bl-row { padding: 12px 8px; gap: 8px; }
    .bl-chk { width: 25px; }
    .bl-num { width: 35px; font-size: 12px; }
    .bl-subject a { font-size: 13px; }
    .bl-hit { width: 40px; font-size: 11px; }
    .bl-date { width: 50px; font-size: 11px; }
    .notice-badge { font-size: 9px; padding: 2px 6px; border-width: 1px; }
    
    .pg-pc { display: none !important; }
    
    .btn-area { padding: 0 5px; gap: 10px; flex-wrap: wrap; justify-content: center; }
    .bl-paging a, .bl-paging strong, .bl-paging span { width: 35px; height: 35px; font-size: 12px; }
    .btn-delete { height: 35px; padding: 0 15px; font-size: 12px; border-width: 1px; }
    .btn-write { height: 35px; padding: 0 18px; font-size: 12px; border-width: 1px; }
}

/* 반응형 - 소형 모바일 */
@media (max-width: 480px) {
    .board-container { padding: 20px 0 40px; }
    
    .bl-row { padding: 10px 5px; gap: 5px; }
    .bl-chk { width: 22px; }
    .bl-num { width: 28px; font-size: 11px; }
    .bl-subject a { font-size: 12px; }
    .bl-hit { width: 35px; font-size: 10px; }
    .bl-date { width: 42px; font-size: 10px; }
    
    .btn-area { gap: 8px; }
    .bl-paging a, .bl-paging strong, .bl-paging span { width: 30px; height: 30px; font-size: 11px; }
    .btn-delete { height: 30px; padding: 0 12px; font-size: 11px; }
    .btn-write { height: 30px; padding: 0 14px; font-size: 11px; }
}

/* 반응형 - 갤럭시 폴드 */
@media (max-width: 380px) {
    .bl-row { padding: 8px 3px; gap: 3px; }
    .bl-num { width: 24px; font-size: 10px; }
    .bl-subject a { font-size: 11px; }
    .bl-hit { width: 30px; font-size: 9px; }
    .bl-date { width: 36px; font-size: 9px; }
    
    .bl-paging a, .bl-paging strong, .bl-paging span { width: 28px; height: 28px; font-size: 10px; }
    .btn-delete { height: 28px; font-size: 10px; }
    .btn-write { height: 28px; font-size: 10px; }
}
