/* src/main/resources/static/resources/home/css/notice-detail.css */

/* Breadcrumb 스타일 */
.title-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.title-box .back {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.title-box .back:hover {
    color: #111827;
}

.title-box h2 {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
    margin: 0;
}

.title-box h2::before {
    content: ">";
    margin: 0 0.5rem;
    color: #d1d5db;
}

/* Styles for board-write structure */
.board-write {
    margin-top: 0;
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
}

/* 카드 헤더 스타일 */
.card-header {
    padding: 2rem 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.meta-icon {
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

.meta-divider {
    color: #d1d5db;
    font-weight: 300;
}

.meta-item strong {
    color: #4b5563;
    font-weight: 600;
}

/* 본문 내용 */
.card-content {
    padding: 1.5rem 0;
    min-height: 200px;
}

.card-content .content-area > div {
    line-height: 1.9 !important;
}

/* Toast UI Editor 컨텐츠 내부 요소들 */
.card-content .content-area p,
.card-content .content-area div,
.card-content .content-area span,
.card-content .content-area li {
    line-height: 1.8 !important;
}

/* 제목 태그들도 적절한 line-height */
.card-content .content-area h1,
.card-content .content-area h2,
.card-content .content-area h3,
.card-content .content-area h4,
.card-content .content-area h5,
.card-content .content-area h6 {
    line-height: 1.6 !important;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

/* 공지사항 내용의 이미지 센터 정렬 */
.card-content .content-area img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}

/* 첨부파일 영역 */
.card-attachments {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.attachments-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attachments-label::before {
    content: "📎";
    font-size: 1rem;
}

.card-attachments .file-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-attachments .file-item {
    display: flex;
    align-items: center;
}

.card-attachments .file-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #fff;
    border-radius: 0.375rem;
    transition: all 0.2s;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
}

.card-attachments .file-link:hover {
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

.card-attachments .file-link img {
    width: 18px;
    height: 18px;
}

.board-write table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-top: 1px solid #333; /* Changed to black and bolder top border */
    table-layout: fixed; /* Ensure column widths are respected */
}

.board-write th,
.board-write td {
    /* border: 1px solid #eee; */ /* Removed all borders */
    border-bottom: 1px solid #d9d9d9; /* Add horizontal border */
    padding: 18px 15px;
    text-align: left;
    vertical-align: middle;
    font-size: 15px;
    color: #333;
}

.board-write th {
    background-color: #f8f8f8;
    font-weight: bold;
    color: #555;
    text-align: center;
}

.board-write .editor-td {
    padding: 20px 15px;
    line-height: 1.8;
    min-height: 200px;
}

.board-write .content-area {
    /*text-align: center;*/
}

/* 공지사항 내용 영역 스타일 */
.board-write .content-area > div {
    line-height: 1.9 !important;
}

/* Toast UI Editor 컨텐츠 내부 요소들 */
.board-write .content-area p,
.board-write .content-area div,
.board-write .content-area span,
.board-write .content-area li {
    line-height: 1.8 !important;
}

/* 제목 태그들도 적절한 line-height */
.board-write .content-area h1,
.board-write .content-area h2,
.board-write .content-area h3,
.board-write .content-area h4,
.board-write .content-area h5,
.board-write .content-area h6 {
    line-height: 1.6 !important;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

/* 공지사항 내용의 이미지만 센터 정렬 */
.board-write .content-area img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}

.board-write .file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.board-write .file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.board-write .file-item img {
    width: 20px; /* Adjust as needed for file icon size */
    height: 20px;
}

.board-write .file-item a {
    color: #333; /* Changed from blue to dark grey */
    text-decoration: none; /* Removed underline */
    font-size: 14px;
}

.board-write .file-item a:hover {
    text-decoration: none; /* Ensure no underline on hover */
}

/* Button styles */
.button-box {
    text-align: center;
    margin-top: 30px;
}

.btn-list {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333; /* Changed to black background */
    color: #fff !important; /* White font, added !important */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none; /* For <a> tag */
}

.btn-list:hover {
    background-color: #000; /* Darker black on hover */
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .title-box {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    .title-box .back {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        font-size: 13px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .title-box h2 {
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .board-write {
        padding: 16px;
    }

    .card-header {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .card-meta {
        font-size: 0.75rem;
        gap: 0.375rem;
    }

    .card-content {
        padding: 1rem 0;
    }

    .card-attachments {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .button-box {
        margin-top: 24px;
    }

    .btn-list {
        display: block;
        width: 100%;
        padding: 14px 20px;
    }
}