/* /css/headMeun/userNoticeDetail.css */

/* === Google Fonts (이미 userNoticeList.css에 있지만, 단독 사용 가능하도록 포함) === */
@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* === CSS Variables (userNoticeList.css와 동일하게 사용) === */
:root {
    --primary-color: #fd7e14;
    --primary-color-dark: #e8700f;
    --secondary-color: #ff9a40;
    --text-color: #e9ecef;
    --text-light-color: #adb5bd;
    --bg-color: #212529;
    --bg-alt-color: #343a40; /* 본문 영역 배경 등에 사용 */
    --border-color: #495057;
    --border-color-light: #3e444a;
    --font-main: 'Noto Sans KR', 'Gowun Dodum', sans-serif;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.3);
    --transition-speed: 0.3s;
    --container-width: 1000px; /* 상세 페이지는 목록보다 약간 좁게 설정 가능 */

    /* userTemp 레이아웃의 헤더 높이에 따라 조정될 수 있는 값 */
    --header-height-pc: 80px;
    --header-height-mobile-tablet: 10px;
}

/* === Base Styles === */
body { /* userTemp 레이아웃에서 이미 정의되었을 수 있지만, 일관성 위해 포함 */
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: rgb(17, 17, 17); /* 전체 페이지 배경 */
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.content-text {
    white-space: pre-line; /* 줄바꿈 문자를 실제 줄바꿈으로 처리 */
    word-wrap: break-word; /* 긴 단어 줄바꿈 */
}
/* === Layout & Container === */
.userNoticeDetail-container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--header-height-pc); /* userTemp의 헤더 고려 */
    margin-bottom: 40px;
    padding: 30px 40px; /* 좌우 패딩을 목록보다 약간 더 줌 */
    background-color: var(--bg-color);
    box-shadow: var(--shadow-medium);
    border-radius: var(--border-radius-md);
    opacity: 0; /* JS로 is-visible 추가 전 숨김 */
    transform: translateY(20px); /* JS로 is-visible 추가 전 아래로 이동 */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.userNoticeDetail-container.is-visible { /* JS로 이 클래스가 추가되면 애니메이션 실행 */
    opacity: 1;
    transform: translateY(0);
}

/* === Page Title ("공지사항") & Divider === */
h1.userNoticeDetail-title {
    font-size: 2.2rem; /* 목록 페이지보다 약간 작게 설정 가능 */
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 15px;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
/* 페이지 제목 밑줄 애니메이션 */
.userNoticeDetail-container.is-visible h1.userNoticeDetail-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0px; /* 초기 너비 0 */
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    opacity: 0; /* 초기 투명도 0 */
    /* 컨테이너 등장 후, 0.3초 뒤에 0.5초 동안 애니메이션 */
    transition: width 0.5s 0.3s ease-out, opacity 0.5s 0.3s ease-out;
}
.userNoticeDetail-container.is-visible h1.userNoticeDetail-title::after {
    width: 100px; /* 최종 너비 (목록보다 약간 짧게) */
    opacity: 1; /* 최종 투명도 */
}

.userNoticeDetail-container hr { /* 구분선 */
    border: 0;
    height: 1px;
    background-color: var(--border-color-light);
    margin: 20px 0 30px 0; /* 위아래 마진 조정 */
}

/* === Detail Section Wrapper === */
.userNoticeDetail-detail {
    background-color: var(--bg-alt-color); /* 본문 영역 배경은 약간 다른 어두운 색 */
    padding: 25px 30px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-light);
    opacity: 0;
    transform: translateY(15px);
    /* 컨테이너 등장 후, 0.2초 뒤에 0.5초 동안 애니메이션 */
    transition: opacity 0.5s 0.2s ease-out, transform 0.5s 0.2s ease-out;
}
.userNoticeDetail-container.is-visible .userNoticeDetail-detail {
    opacity: 1;
    transform: translateY(0);
}

/* === Notice Actual Title (게시글 제목) === */
.userNoticeDetail-detail-title {
    font-size: 1.8rem; /* "공지사항" 헤딩보다 작게 */
    font-weight: 700;
    color: var(--text-color); /* 밝은 텍스트 색상 */
    margin-bottom: 20px;
    line-height: 1.4;
    word-break: keep-all; /* 한글 단어 단위 줄바꿈 */
}

/* === Meta Information (작성자, 작성일 등) === */
.userNoticeDetail-meta-info {
    display: flex;
    flex-wrap: wrap; /* 모바일에서 줄바꿈 처리 */
    gap: 10px 20px; /* 행 간격, 열 간격 */
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light-color); /* 기본 메타 텍스트는 약간 어둡게 */
}
.userNoticeDetail-meta-info p {
    margin: 0;
    display: flex; /* 아이콘 등과 정렬 용이하도록 */
    align-items: center;
}
/* 예시: Font Awesome 아이콘 사용 시
.userNoticeDetail-meta-info p::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
    color: var(--primary-color);
}
.userNoticeDetail-meta-info p:nth-child(1)::before { content: "\f007"; } // user
.userNoticeDetail-meta-info p:nth-child(2)::before { content: "\f073"; } // calendar
.userNoticeDetail-meta-info p:nth-child(3)::before { content: "\f044"; } // edit (수정일)
.userNoticeDetail-meta-info p:nth-child(4)::before { content: "\f06e"; } // eye (조회수)
*/
.userNoticeDetail-meta-info p span { /* 실제 값 부분 */
    color: var(--text-color); /* 값은 더 밝게 */
    margin-left: 5px; /* "작성자:" 와 실제 작성자 이름 사이 간격 */
}

/* === Content Area (본문 내용) === */
.userNoticeDetail-content {
    margin-bottom: 30px;
    line-height: 1.75; /* 가독성 좋은 줄간격 */
    font-size: 1rem;
    color: var(--text-color);
    word-break: break-word; /* 긴 영단어 등 줄바꿈 처리 */
}
/* 본문 내 기본 HTML 태그 스타일링 */
.userNoticeDetail-content p {
    margin-bottom: 1em;
}
.userNoticeDetail-content strong,
.userNoticeDetail-content b {
    font-weight: 600; /* 기본 bold보다 약간 연하게 (Noto Sans 기준) */
    color: var(--text-light-color); /* 또는 var(--primary-color) 등 강조색 사용 가능 */
}
.userNoticeDetail-content em,
.userNoticeDetail-content i {
    font-style: italic;
    color: var(--text-light-color);
}
.userNoticeDetail-content a {
    color: var(--secondary-color); /* 링크 색상 */
    text-decoration: underline;
    text-decoration-color: rgba(255, 154, 64, 0.5); /* 링크 밑줄은 약간 투명하게 */
    transition: color var(--transition-speed), text-decoration-color var(--transition-speed);
}
.userNoticeDetail-content a:hover {
    color: var(--primary-color);
    text-decoration-color: var(--primary-color);
}
.userNoticeDetail-content img {
    max-width: 100%; /* 이미지가 컨테이너를 넘어가지 않도록 */
    height: auto;
    border-radius: var(--border-radius-sm);
    margin: 15px 0; /* 위아래 여백 */
    display: block; /* 이미지 아래 불필요한 여백 제거 */
    background-color: var(--bg-color); /* 이미지 로딩 전 배경색 */
    box-shadow: var(--shadow-light);
}
.userNoticeDetail-content ul,
.userNoticeDetail-content ol {
    margin-bottom: 1em;
    padding-left: 25px; /* 기본 들여쓰기 */
}
.userNoticeDetail-content li {
    margin-bottom: 0.5em;
}
.userNoticeDetail-content blockquote {
    margin: 1.5em 0;
    padding: 10px 20px;
    border-left: 4px solid var(--primary-color);
    background-color: rgba(253, 126, 20, 0.05); /* 주황색 배경 아주 연하게 */
    color: var(--text-light-color);
    font-style: italic;
}
.userNoticeDetail-content pre {
    background-color: var(--bg-color); /* 코드 블록 배경은 더 어둡게 */
    color: #d1d5db; /* 코드 텍스트 색상 (밝은 회색 계열) */
    padding: 15px;
    border-radius: var(--border-radius-sm);
    overflow-x: auto; /* 가로 스크롤 */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    margin: 1.5em 0;
}
.userNoticeDetail-content code { /* 인라인 코드 */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    background-color: rgba(255,255,255,0.1);
    padding: 2px 5px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
}
.userNoticeDetail-content pre code { /* pre 내부의 code는 스타일 초기화 */
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit; /* pre의 폰트 크기 상속 */
}
.userNoticeDetail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    box-shadow: var(--shadow-light);
}
.userNoticeDetail-content th,
.userNoticeDetail-content td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
}
.userNoticeDetail-content th {
    background-color: var(--bg-color); /* 테이블 헤더 배경 */
    color: var(--text-color);
    font-weight: 600;
}
.userNoticeDetail-content tr:nth-child(even) td {
    background-color: var(--bg-alt-color); /* 테이블 짝수행 배경색은 본문 배경과 동일하게 */
}


/* === Attachment Section (첨부파일) === */
.userNoticeDetail-attachment {
    margin-top: 20px;
    padding: 15px 20px;
    background-color: var(--bg-color); /* 첨부파일 영역 배경은 더 어둡게 */
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
}
.userNoticeDetail-attachment p {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: var(--text-light-color);
}
.userNoticeDetail-attachment p::before { /* 파일 아이콘 (이모지 또는 FontAwesome) */
    content: "📎"; /* 클립 이모지 */
    margin-right: 8px;
    font-size: 1.1em;
    /* FontAwesome 사용 시:
    font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f0c6"; // paperclip
    */
}
.userNoticeDetail-attachment a {
    color: var(--secondary-color);
    text-decoration: none;
    word-break: break-all; /* 파일명이 길 경우 줄바꿈 */
    transition: color var(--transition-speed);
    display: inline-block; /* 밑줄 효과 등 적용 용이 */
    padding: 3px 0;
}
.userNoticeDetail-attachment a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* === Buttons Area (목록 버튼 등) === */
.userNoticeDetail-buttons {
    margin-top: 30px;
    text-align: right; /* 버튼 오른쪽 정렬 */
    opacity: 0;
    transform: translateY(15px);
    /* 본문 내용 등장 후, 0.4초 뒤에 0.5초 동안 애니메이션 */
    transition: opacity 0.5s 0.4s ease-out, transform 0.5s 0.4s ease-out;
}
.userNoticeDetail-container.is-visible .userNoticeDetail-buttons {
    opacity: 1;
    transform: translateY(0);
}

.userNoticeDetail-list-button { /* 목록 버튼 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    font-family: var(--font-main); /* 버튼 폰트 명시 */
}
.userNoticeDetail-list-button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px); /* 살짝 위로 이동하는 효과 */
}


/* === Responsive Design === */

/* Tablet (1024px 이하) */
@media (max-width: 1024px) {
    .userNoticeDetail-container {
        padding: 25px 30px; /* 패딩 약간 축소 */
        margin-top: var(--header-height-mobile-tablet);
    }
    .userNoticeDetail-detail {
        padding: 20px 25px;
    }
    .userNoticeDetail-detail-title {
        font-size: 1.6rem;
    }
}


/* Mobile (768px 이하) */
@media (max-width: 768px) {
    .userNoticeDetail-container {
        padding: 20px 15px; /* 패딩 더 축소 */
        margin: var(--header-height-mobile-tablet) 10px 20px 10px; /* 좌우 마진 추가 */
    }
    h1.userNoticeDetail-title { /* 페이지 전체 타이틀 ("공지사항") */
        font-size: 1.6rem;
    }
    .userNoticeDetail-container.is-visible h1.userNoticeDetail-title::after {
        width: 70px; /* 제목 밑줄 길이 축소 */
    }

    .userNoticeDetail-detail {
        padding: 15px; /* 본문 섹션 패딩 축소 */
    }
    .userNoticeDetail-detail-title { /* 게시글 실제 제목 */
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    .userNoticeDetail-meta-info {
        gap: 8px; /* 메타 정보 간격 축소 */
        font-size: 0.85rem;
    }
    .userNoticeDetail-meta-info p {
        /* width: 100%; */ /* 각 메타정보 한 줄씩 차지 (선택사항) */
        /* flex-basis: calc(50% - 10px); */ /* 두 줄로 나눌 경우 */
    }

    .userNoticeDetail-content {
        font-size: 0.95rem; /* 본문 폰트 약간 축소 */
        line-height: 1.7;
    }
    .userNoticeDetail-content table,
    .userNoticeDetail-content th,
    .userNoticeDetail-content td {
        font-size: 0.85rem; /* 테이블 폰트 축소 */
        padding: 6px 8px;
    }
    /* 모바일에서 테이블 가로 스크롤 처리 (선택적) */
    .userNoticeDetail-content .table-responsive-wrapper {
        overflow-x: auto;
        margin-left: -15px; /* 부모 패딩 고려 */
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* 테이블을 div로 감싸서 사용: <div class="table-responsive-wrapper"><table>...</table></div> */


    .userNoticeDetail-attachment {
        padding: 10px 15px;
    }
    .userNoticeDetail-attachment p {
        font-size: 0.9rem;
    }
    .userNoticeDetail-attachment a {
        font-size: 0.9rem;
    }

    .userNoticeDetail-buttons {
        text-align: center; /* 버튼 중앙 정렬 (또는 stretch로 100%) */
    }
    .userNoticeDetail-list-button {
        width: 100%; /* 버튼 너비 100% */
        padding: 12px 20px; /* 패딩 조정 */
        box-sizing: border-box;
    }
}