:root {
    --primary-color: #ff8c42; /* 오렌지색 강조 색상 */
    --gray-light: #f5f5f5;
    --gray-dark: #666;
}

/* 1. 전체 페이지 설정 및 중앙 정렬 */

body {
    /* 기존의 중앙 정렬(flex) 속성을 제거하거나 수정합니다. */
    /* display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; */
    
    min-height: 100vh; /* 뷰포트 전체 높이 사용은 유지 (스크롤 없이 가운데 오도록) */
    margin: 0;
    padding: 0; 
    background-color: var(--gray-light); 
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    color: #333;
}

/* 2. 첫 페이지 중앙 정렬 컨테이너 (새로 추가) */
.main-container-wrapper {
    display: flex;
    justify-content: center; /* 수평 중앙 정렬 */
    align-items: center; /* 수직 중앙 정렬 */
    min-height: 100vh; /* 뷰포트 높이만큼 영역 확보 */
    width: 100%;
}

.main-container {
    /* 이전에 body에 있던 width, max-width 속성을 여기에 옮깁니다. */
    width: 100%;
    max-width: 600px; /* 검색 영역 최대 너비 설정 */
    text-align: center;
    padding: 20px;
    /* 추가적인 margin/padding 조정이 필요하면 여기서 합니다. */
}

/* (나머지 .header-logo, .search-area 등 스타일은 그대로 유지합니다.) */

/* 2. 상단 로고 및 제목 스타일 */
.header-logo {
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 5px;
    display: block;
    width: fit-content;
    margin: 0 auto 10px;
    /* 폴더 아이콘의 회색 부분 구현을 위한 그림자 (선택 사항) */
    text-shadow: 2px 2px 0px #a0a0a0; 
}

h2 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* 3. 검색 영역 스타일 */
.search-area {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    margin-bottom: 100px; /* 하단 링크와의 간격 */
    border: 2px solid var(--primary-color); /* 검색창 전체 테두리 */
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08); /* 약간의 그림자 */
}

#searchInput {
    flex-grow: 1; /* 인풋 창이 대부분의 공간 차지 */
    padding: 12px 15px;
    font-size: 16px;
    border: none; /* 부모 요소의 테두리만 사용 */
    outline: none;
    box-sizing: border-box;
}

/* 검색 버튼 (돋보기 아이콘) */
.search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0; /* 부모 요소의 둥근 모서리를 따르도록 */
}

/* 상세 검색 버튼 (드롭다운) */
.dropdown-container {
    border-left: 1px solid #ddd; /* 경계선 */
}

.detail-search-button {
    /* 모달 버튼 스타일 */
    flex-shrink: 0; /* 공간이 부족해도 줄어들지 않도록 설정 */
    background-color: white; 
    color: #555; /* 돋보기 버튼보다 덜 강조 */
    border: 1px solid #ddd; 
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.detail-search-button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.detail-search-button i {
    margin-right: 5px;
}

/* 4. 하단 링크 스타일 */
.footer-link {
    margin-top: 50px;
    color: var(--gray-dark);
}

/* 새로 추가: 링크 스타일링 */
.footer-link-anchor {
    text-decoration: none; /* 링크 밑줄 제거 */
    color: var(--primary-color); /* 링크 텍스트 색상을 오렌지색으로 변경 */
    display: block; /* 블록 요소로 만들어 클릭 영역을 확장 */
    width: fit-content; /* 내용물 크기만큼 너비 조정 */
    margin: 0 auto; /* 중앙 정렬 */
    font-size: 12px; /* 텍스트 크기 지정 */
    transition: opacity 0.2s;
}

.footer-link-anchor:hover {
    opacity: 0.8; /* 호버 시 약간 흐려지도록 효과 추가 */
}

.folder-small {
    font-size: 25px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
    text-shadow: 1px 1px 0px #a0a0a0;
}

/*
.footer-link p {
    font-size: 12px;
    margin: 0;
    cursor: pointer;
}
*/

/* style.css에 추가 */

#resultsContainer {
    margin-top: 30px;
    text-align: left; /* 결과 목록은 왼쪽 정렬 */
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.results-list {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.result-item {
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item h3 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.result-item p {
    margin: 0;
    line-height: 1.5;
    color: var(--gray-dark);
    font-size: 0.9em;
}

.result-item .price {
    font-weight: bold;
    color: #4CAF50; /* 초록색 강조 */
    margin-top: 5px;
}

.info-message, .error-message, .loading-message {
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
}

.error-message {
    color: #D32F2F; /* 빨간색 오류 메시지 */
    font-weight: bold;
}

/* --- 결과 페이지 전용 스타일 --- */

/* 컨테이너 중앙 정렬 재설정 (결과 페이지는 상단에서 시작) */
.result-page-container {
    max-width: 800px; /* 결과 목록이 조금 더 넓어도 괜찮도록 */
   /* 여기서 margin: 50px auto; 가 중앙 정렬 역할을 합니다. */
	margin: 50px auto;
    padding-top: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* 상단 헤더 영역 (로고와 제목을 좌측 상단에 배치) */
.header-area {
    width: 100%;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    text-align: left; /* 전체 영역 왼쪽 정렬 */
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: fit-content;
    margin-left: 50px; /* 페이지 왼쪽 여백 */
}

.logo-icon-small {
    font-size: 30px;
    color: var(--primary-color);
    margin-right: 10px;
    text-shadow: 1px 1px 0px #a0a0a0;
}

.header-area h2 {
    font-size: 20px;
    color: #333;
    margin: 0;
    font-weight: 500;
}

/* 현재 검색어 및 재검색 박스 */
.current-search-box {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    /*margin-bottom: 20px;*/
    border-radius: 6px;
}

.current-search-box h3 {
    font-size: 1.2em;
    color: #555;
    margin-top: 15px;
}

/* 재검색 폼 스타일 (작게) */
.search-area-small {
    display: flex; /* 내부 요소들을 한 줄로 정렬 */
    gap: 8px; /* 요소들 간 간격 */
    align-items: center;
    width: 100%;
    max-width: 800px; /* 검색창 최대 너비 제한 (선택 사항) */
    margin: 0 auto 20px;
}

/* 2. 기본 검색 입력 박스 */
.search-area-small .search-box-main {
    display: flex;
    flex-grow: 1; /* 남은 공간을 채우도록 설정 */
    /*border: 1px solid #ddd;*/
	border: 2px solid var(--primary-color);
    border-radius: 6px;
    overflow: hidden; /* input과 button의 경계선을 하나로 합치기 위함 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-area-small input[type="text"] {
    border: none;
    padding: 10px 15px;
    font-size: 1em;
    flex-grow: 1;
    /* 포커스 시 테두리 제거 */
    outline: none; 
}

/* 3. 기본 검색 버튼 (돋보기) */
.search-button-small {
    /* flex-shrink: 0; */
    background-color: white; /* 흰색으로 유지 또는 #f9f9f9 (아주 연한 회색) */
    color: #555; /* 아이콘 색상을 진한 회색으로 변경 */
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1.1em;
}

.search-button-small:hover {
    background-color: #f0f0f0; /* 호버 시에만 연한 회색 */
    color: #333;
}

/* detail-search-area 스타일이 results_pg.php에서 잘 작동하도록 조정 */
.search-area-small .detail-search-area {
    /* 상세 검색 영역이 기본 검색창 아래로 잘 내려오도록 flex-direction을 column으로 설정 */
    flex-direction: column; 
    padding: 10px 0;
    width: 100%; /* 너비 전체 사용 */
}

/* 기존 search-row 스타일을 재활용 */
.search-area-small .search-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.search-area-small .search-row label {
    flex-shrink: 0;
    width: 80px; /* 라벨 너비 고정 */
    font-weight: bold;
}

/* 결과 목록 스타일 (이전 답변과 유사) */
.results-list {
    padding: 0 20px 20px 20px;
}

.result-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item h3 {
    color: var(--primary-color);
    font-size: 1.1em;
    margin: 0 0 5px 0;
}

/* style.css 파일에 추가 */

/* --- 상세 검색 모달 스타일 --- */

/* 모달 오버레이 (배경) */
.modal-overlay {
    display: none; /* 초기에는 숨김 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 반투명 검은색 배경 */
    z-index: 1000; /* 다른 요소 위에 표시 */
    justify-content: center;
    align-items: center;
}

/* 모달 내용 컨테이너 */
.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px; /* 이미지와 유사한 크기 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 모달 헤더 */
.modal-header h2 {
    font-size: 1.5em;
    color: #333;
    margin-top: 0;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
}

.modal-header p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

/* 폼 행 스타일 */
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-row label {
    width: 80px; /* 라벨 너비 고정 */
    font-weight: bold;
    color: #333;
    font-size: 1em;
    margin-right: 15px;
}

.form-row input[type="text"], 
.form-row input[type="date"],
.form-row select {
    flex-grow: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

/* 생산일자 구분자 */
.date-separator {
    margin: 0 10px;
}

/* 유형/형태를 한 줄에 표시하는 스타일 */
.form-row-inline {
    justify-content: space-between;
}

.field-group {
    display: flex;
    align-items: center;
    width: 48%; /* 너비 분할 */
}

.field-group label {
    width: auto; /* 라벨 너비 자동 */
    margin-right: 10px;
}

.field-group select {
    flex-grow: 1;
}

/* 모달 푸터 및 상세 검색 제출 버튼 */
.modal-footer {
    text-align: right;
    margin-top: 20px;
}

.detail-search-submit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.detail-search-submit-button:hover {
    background-color: #e07b34;
}

/* '상세검색' 버튼 디자인 수정 */
.detail-search-button-open {
    padding: 0 15px;
    font-size: 14px;
    color: #333;
    background-color: white;
    border: none;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    border-radius: 0 4px 4px 0; /* 우측 모서리만 둥글게 */
    border-left: 1px solid #ddd;
}
.detail-search-button-open i {
    margin-left: 5px;
    font-size: 0.8em;
}

/* 모달이 보일 때 */
.modal-overlay.active {
    display: flex;
}

/* style.css 파일에 페이지네이션 스타일 수정 */

/* --- 1. 페이지네이션 컨테이너 --- */
.pagination {
    margin-top: 40px; /* 위쪽 여백 증가 */
    margin-bottom: 20px;
    text-align: center;
    padding: 10px 0;
    font-family: Arial, sans-serif;
}

/* --- 2. 링크 및 버튼 기본 스타일 --- */
.page-link, .current-page, .page-dots {
    display: inline-flex; /* 콘텐츠 중앙 정렬을 위해 flex 사용 */
    align-items: center;
    justify-content: center;
    min-width: 38px; /* 최소 너비 지정으로 크기 통일 */
    height: 38px;
    padding: 0 10px; /* 내부 여백 조정 */
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 6px; /* 모서리를 약간 둥글게 */
    color: #555;
    font-size: 0.95em;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* 은은한 그림자 추가 */
}

/* --- 3. 호버(Hover) 효과 --- */
.page-link:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- 4. 현재 페이지 (선택된 페이지) 스타일 --- */
.current-page {
    background-color: var(--primary-color); /* 오렌지색 배경 */
    color: white;
    border-color: var(--primary-color);
    font-weight: bold;
    cursor: default;
    box-shadow: 0 2px 5px rgba(255, 140, 66, 0.4); /* 강조 색상 그림자 */
}

.current-page:hover {
    background-color: var(--primary-color); /* 호버 시에도 색상 유지 */
    color: white;
}

/* --- 5. 생략 기호 (...) 스타일 --- */
.page-dots {
    border: none;
    padding: 8px 0;
    color: #999;
    cursor: default;
    box-shadow: none;
}

/* style.css 파일에 추가 또는 수정 */

/* 1. 결과 항목 링크 컨테이너 */
.result-item-link {
    text-decoration: none; /* 링크의 기본 밑줄 제거 */
    color: inherit; /* 텍스트 색상을 부모 요소에서 상속받아 일반 텍스트처럼 보이게 함 */
    display: block; /* 블록 요소로 만들어 전체 너비를 차지하게 함 */
    margin-bottom: 15px; /* 항목 간격 조정 */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* 부드러운 전환 효과 */
}

/* 2. 실제 결과 항목 박스 */
.result-item {
    background-color: #ffffff; /* 배경을 흰색으로 설정 */
    border: 1px solid #e0e0e0; /* 연한 경계선 추가 */
    border-radius: 8px; /* 모서리 둥글게 */
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* 은은한 그림자 */
}

/* 3. 마우스 호버 시 효과 (클릭 유도) */
.result-item-link:hover {
    transform: translateY(-3px); /* 위로 살짝 떠오르는 효과 */
    box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.2); /* 강조색 그림자로 변화 */
}

/* 4. 항목 내부 텍스트 스타일 조정 */
.result-item h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.result-item p {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 0;
}

.result-item .meta-info {
    color: #888;
    font-size: 0.85em;
    margin-top: 10px;
    border-top: 1px dotted #eee;
    padding-top: 8px;
}

/* detail.php 또는 style.css에 추가 */

/* --- 기존 상세 컨테이너 스타일 유지 --- */

.detail-container {
	max-width: 800px;
	margin: 40px auto;
	padding: 30px;
	background-color: white;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.detail-container h1 {
	color: #333;
	border-bottom: 2px solid var(--primary-color);
	padding-bottom: 10px;
    /* ... (기존 스타일 유지) ... */
    margin-bottom: 25px; /* 제목 아래 여백 증가 */
}
.detail-container h3 {
    color: #555;
    font-size: 1.1em;
    font-weight: 400; /* 부제목은 얇게 */
    margin-bottom: 30px;
}

/* --- 1. 메타 정보 블록 스타일 --- */
/* --- 1. 메타 정보 블록 스타일 --- */
.detail-meta {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 35px; /* 내용과 분리 */
    background-color: #fcfcfc;
    
    /* ⭐⭐ 수정: 그리드 레이아웃 제거 및 일반 블록 스타일 적용 ⭐⭐ */
    display: block; 
    gap: 0; 
}
.detail-meta p {
    font-size: 0.90em; /* 0.95 -> 0.90 */
    margin: 8px 0; /* 항목 간 세로 간격 조정 */
    line-height: 1.5;
    border-left: none; 
    padding-left: 0;
    
    /* ⭐⭐ 수정: 각 항목 아래 얇은 구분선 추가 ⭐⭐ */
    border-bottom: 1px dotted #eee; 
    padding-bottom: 8px;
}

/* 마지막 항목에는 구분선 제거 */
.detail-meta p:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.detail-meta strong {
    color: #555; /* 라벨 색상 조정 */
    font-weight: 600;
    display: inline-block;
    min-width: 120px; /* 라벨 너비 확보 */
    margin-right: 10px;
}

/* --- 2. Contents/Sub-Title 영역 스타일 (가장 중요한 내용) --- */
.detail-content-area {
    margin-top: 30px;
}
.content-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 20px;
}
.content-body {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    line-height: 1.8; /* 줄 간격 넓혀 가독성 극대화 */
    font-size: 0.90em; /* 1.05 -> 0.90 */
    color: #444;
    white-space: pre-wrap; /* 줄 바꿈 유지 */
	/* ⭐⭐ 긴 문자열/URL 자동 줄바꿈 핵심 속성 추가 ⭐⭐ */
    word-wrap: break-word; /* 1. 구형 브라우저 지원 (대부분의 경우 사용) */
    overflow-wrap: break-word; /* 2. 최신 표준 속성 */
    word-break: break-all; /* 3. 하이픈 없이 긴 문자열도 강제로 줄바꿈 */
}

/* style.css 또는 results_pg.php 내부에 추가 */

/* --- 모달 컨테이너 (배경) --- */
.modal-overlay {
    display: none; /* 기본적으로 숨김 */
    position: fixed; /* 화면에 고정 */
    z-index: 1000; /* 다른 요소 위에 표시 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* 반투명 검은 배경 */
    justify-content: center;
    align-items: center;
}

/* --- 모달 내용 (팝업 창) --- */
.modal-content {
    background-color: #fefefe;
    margin: auto; /* flex/grid 사용 시 필요 없을 수 있지만, 안전을 위해 */
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px; /* 최대 너비 제한 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9); /* 애니메이션 초기 상태 */
    transition: transform 0.3s ease-out;
}

/* 모달이 활성화되었을 때 (JavaScript로 설정) */
.modal-overlay.active {
    display: flex; /* flex로 변경하여 중앙 정렬 활성화 */
}
.modal-overlay.active .modal-content {
    transform: scale(1); /* 부드럽게 나타나는 애니메이션 */
}

/* --- 모달 닫기 버튼 --- */
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    transition: color 0.2s;
}
.close-btn:hover,
.close-btn:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* 상세 검색 폼 스타일은 기존 .detail-search-area 스타일 유지 */
.modal-content .detail-search-area {
	display: flex; /* flex로 복원 */
    flex-direction: column; /* 1열 세로 배열 */
    gap: 15px; /* 항목 간 간격 조정 */
    padding: 0;
    border: none;
    background-color: transparent;
    box-shadow: none;
    margin-top: 10px;
}

/* 개별 검색 행 (.search-row) 스타일 개선 */
.modal-content .search-row {
    display: flex;
    align-items: center; /* 라벨과 입력 필드 수평 중앙 정렬 */
    gap: 15px;
    padding: 0;
}

/* 라벨 스타일 조정 */
.modal-content .search-row label {
    flex-shrink: 0;
    width: 80px; /* 라벨 너비 고정 */
    color: #333;
    font-size: 1em;
    font-weight: bold;
}

/* 입력 필드 및 드롭다운 스타일 개선 */
.modal-content .search-row input[type="text"],
.modal-content .search-row input[type="date"],
.modal-content .search-row select {
    padding: 10px 12px; /* 패딩을 늘려 높이 확보 */
    border: 1px solid #ccc;
    border-radius: 6px;
    flex-grow: 1;
    min-width: 150px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05); /* 약간의 내부 그림자 추가 */
}

/* 생산일자 그룹 (date_start ~ date_end) */
.modal-content .date-range-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1; /* 남은 공간을 채우도록 설정 */
}
.modal-content .date-range-group input {
    flex-grow: 1; /* 두 입력 필드가 공간을 균등 분할 */
}
.modal-content .date-range-group span {
    color: #777;
}

/* 검색 적용 버튼 컨테이너 (1열 전체 사용) */
.modal-content .search-button-container {
    text-align: right;
    margin-top: 20px;
}
.modal-content .search-button {
    font-size: 1em;
    padding: 10px 20px;
}

/* style.css 파일에 추가 */

/* results_pg.php 목록의 첨부파일 아이콘 */
.result-item .file-attached-icon {
    float: right;
    color: #007bff; /* 파란색 계열로 강조 */
    font-size: 0.9em;
    font-weight: 500;
    margin-left: 10px;
}

.result-item .file-attached-icon i {
    margin-right: 3px;
}

/* detail.php 첨부파일 목록 */
.attachment-area {
    /*margin-top: 10px;
    padding-top: 10px;*/
    /*border-top: 1px dashed #ddd;*/ 
	font-size: 0.9em;
}

.attachment-area .content-title {
	
}

.attachment-list ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.attachment-list li {
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
	display: flex; /* 내부 요소 정렬을 위해 flex 사용 */
    align-items: center;
    justify-content: space-between; /* 파일명과 크기를 양쪽 끝으로 분리 */
}

.attachment-list li:last-child {
    border-bottom: none;
}

.attachment-list li i {
    color: #6c757d;
    margin-right: 8px;
}

.attachment-list li a {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s;
	/* 파일명 링크가 flex에서 공간을 차지하도록 */
    flex-grow: 1; 
    margin-right: 15px;
}

.attachment-list li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.no-attachment-info {
    color: #999;
    font-style: italic;
    padding: 10px 0;
}
/* style.css 파일의 detail.php 첨부파일 목록 섹션에 추가 */

.attachment-list .file-size-display {
    color: #999;
    font-size: 0.9em;
    flex-shrink: 0; /* 크기가 줄어들지 않도록 */
}

/* 파일 아이콘 스타일 */
.attachment-list li .file-icon {
    color: var(--primary-color); /* 강조 색상으로 아이콘 색상 변경 */
    margin-right: 10px;
    font-size: 1.1em;
}

/* ⭐⭐ 다운로드 링크 버튼처럼 보이게 디자인 개선 ⭐⭐ */
.attachment-list li .file-download-link {
    /* 파일명을 강조하고 버튼처럼 보이게 */
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    
    /* 파일명 링크에 마우스 오버 시 효과 */
    transition: color 0.2s, background-color 0.2s;
    
    /* 기존 flex 스타일 유지 */
    flex-grow: 1; 
    margin-right: 15px;
    
    /* 다운로드 버튼 스타일링을 위한 인라인 블록 */
    display: inline-block;
    padding: 5px 0; 
}

.attachment-list li .file-download-link:hover {
    color: #1a1a1a; /* 텍스트 진하게 */
    text-decoration: underline;
    cursor: pointer;
}

/* 카테고리 탭 컨테이너 */
.category-tabs {
    margin-bottom: 25px;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
	justify-content: center;
}

/* 개별 카테고리 탭 스타일 */
.category-tab {
    text-decoration: none;
    color: #555;
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 20px; /* 둥근 뱃지 형태 */
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
    background-color: #f9f9f9;
}

.category-tab:hover {
    background-color: #eee;
    color: #333;
    border-color: #bbb;
}

/* 현재 활성화된 탭 스타일 */
.category-tab.active {
    background-color: var(--primary-color); 
    color: white;
    border-color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(var(--primary-rgb), 0.3);
}

.category-tab.active:hover {
    background-color: #e57e33; /* Hover 시 색상 약간 어둡게 */
    color: white;
}