/* ===============================
   게시판 리스트 공통 스타일
   =============================== */
.board-list { font-size: .9375rem; }
.board-info { display: none; }

/* 관리자 설정 영역 */
.board-list .board-setup { position: relative; border: 1px solid #d5d5d5; height: 38px; margin-bottom: 20px; }
.board-list .board-setup .select { position: absolute; top: -1px; left: -1px; display: inline-block; width: 200px; }
.board-list .board-setup-btn-box { position: absolute; top: -1px; right: -1px; display: inline-block; width: 420px; }
.board-list .board-setup-btn { float: left; width: 25%; height: 38px; line-height: 38px; color: #fff; text-align: center; font-size: .8125rem; }
.board-list .board-setup-btn:nth-child(odd) { background-color: #000; }
.board-list .board-setup-btn:nth-child(even) { background-color: #3c3c3e; }
.board-list .board-setup-btn:hover { opacity: 0.8; }

/* 관심게시판 */
.board-list .favorite-setup { display: inline-block; width: 125px; margin-left: 15px; }
.board-list .favorite-setup .toggle { padding-right: 45px; }

/* ===============================
   상세검색
   =============================== */
#searchPanel { font-size: 13px; }
.search-table { width: 100%; border: 1px solid #ddd; border-collapse: collapse; table-layout: fixed; }
.search-table th, .search-table td { border: 1px solid #ddd; text-align: center; vertical-align: middle; padding: 5px; }
.search-table th { width: 150px; background: #f2f2f2; }

/* 검색 토글 */
.toggle-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.toggle-label { display: flex; align-items: center; white-space: nowrap; }
.toggle-label input[type="checkbox"] { display: none; }
.toggle-label span {
  padding: 3px 6px; border: 1px solid #ccc; border-radius: 3px;
  background: #f9f9f9; color: #333; cursor: pointer;
  font-size: 13px; font-weight: 600; min-width: 38px; min-height: 25px;
  display: flex; align-items: center; justify-content: center;
}
.toggle-label input[type="checkbox"]:checked + span { background: #035AC7; color: #fff; border-color: #035AC7; }

/* 활성화 스타일 */
.search-table .toggle-label.active,
.search-table .toggle-label.active span {
  background: #035AC7; color: #fff; border-color: #035AC7;
  border-radius: 3px;
}

/* 모바일 검색 */
@media (max-width: 768px) {
  #searchPanel .search-table { table-layout: auto; }
  #searchPanel .search-table th { width: 1%; white-space: nowrap; }
  #searchPanel .search-text-mobile { margin-top: 10px; display: flex; gap: 8px; }
  #searchPanel .search-text-mobile input { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; }
}

/* ===============================
   모달
   =============================== */
.modal {
  display: none; position: fixed; z-index: 9999; left: 0; top: 0;
  width: 100%; height: 100%; background-color: rgba(0,0,0,0.5);
  align-items: center; justify-content: center;
}
.modal-content {
  background: #fff; width: 60%; max-width: 800px; min-width: 300px;
  height: 80vh; max-height: calc(100vh - 60px);
  padding: 20px; border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; position: relative;
}
#modal-iframe { width: 100%; flex-grow: 1; border: none; }
.close-modal { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; }


/* ===============================
입시요강 게시판 v2.0 - 카드형 디자인
=============================== 
*/

/* --- 기본 & 관리자 영역 (기존 스타일 유지) --- */
.board-list { font-size: .9375rem; }
.board-info { display: none; }
.admin-bar { display: flex; align-items: center; gap: 15px; padding: 8px 12px; margin-bottom: 15px; background: #f8f9fa; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; color: #333; }
.admin-bar .admin-rss { color: #ff6600; font-size: 16px; text-decoration: none; }
.admin-bar .admin-count { font-weight: 500; color: #444; }
.admin-bar .admin-favorite { margin-left: auto; }
.admin-bar .admin-btn { background: #035AC7; color: #fff; padding: 6px 12px; border-radius: 4px; text-decoration: none; font-size: 13px; transition: background 0.2s ease; }
.admin-bar .admin-btn:hover { background: #003f91; }

/* ===============================
입시요강 카드 아이템 스타일
=============================== 
*/

/* --- 카드 전체 레이아웃 --- */
.ipsi-item {
	display: flex;
	gap: 20px;
	padding: 20px;
	margin-bottom: 15px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background-color: #fff;
	transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
	font-family: 'Noto Sans KR', sans-serif;
}
.ipsi-item:hover {
	border-color: #035AC7;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
/* 공지사항 스타일 */
.ipsi-item.item-notice {
	background-color: #f8f9fa;
	border-left: 4px solid #035AC7;
}
/* 광고글 스타일 */
.ipsi-item.bg-ad-item {
    background-color: #fffaf2 !important;
    border-color: #ff9800;
}


/* --- 1. 좌측 썸네일 (대학교 로고) --- */
.ipsi-thumb {
	flex: 0 0 90px;
	width: 90px;
	height: 90px;
	border: 1px solid #eee;
	border-radius: 50%; /* 원형 로고 */
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #fff;
}
.ipsi-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain; /* 로고가 잘리지 않도록 contain 사용 */
}


/* --- 2. 우측 정보 영역 --- */
.ipsi-content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}


/* --- 2-1. 카드 헤더 --- */
.ipsi-header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 15px;
}
/* --- [수정] 차분한 스타일의 모집시기 뱃지 --- */
.ipsi-tag-period {
	flex-shrink: 0;
	padding: 4px 12px;
	font-size: 0.85rem;
	font-weight: 500;
	border-radius: 4px;      /* 둥근 정도를 줄여 단정하게 */
	background-color: #f1f3f5; /* 아주 연한 회색 배경 */
	color: #495057;            /* 차분한 다크 그레이 텍스트 */
	border: 1px solid #dee2e6; /* 얇은 테두리 추가 */
	letter-spacing: -0.5px;
}
/* 수시/정시 구분 없이 통일된 차분한 스타일 적용 (필요시 아래 클래스로 색상 미세 조정 가능) */
.ipsi-tag-period.tag-early { } 
.ipsi-tag-period.tag-regular { }

.ipsi-title-group {
	display: flex;
	flex-direction: column;
}
.ipsi-university {
	font-size: 0.9rem;
	color: #666;
	font-weight: 500;
}
.ipsi-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	color: #222;
	line-height: 1.4;
	letter-spacing: -0.5px;
}
.ipsi-title a {
	color: inherit;
	text-decoration: none;
}
.ipsi-title a:hover {
	text-decoration: underline;
}


/* --- 2-2. 핵심 정보 테이블 --- */
.ipsi-info {
	margin-bottom: 15px;
	border-top: 1px solid #f0f0f0;
	padding-top: 15px;
}
.info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 20px;
}
.info-item {
	display: flex;
	flex-direction: column;
	font-size: 0.9rem;
}
.info-item-full {
	grid-column: 1 / -1; /* 한 줄 전체 사용 */
}
.info-label {
	font-weight: 600;
	color: #555;
	margin-bottom: 4px;
	font-size: 0.85rem;
}
.info-value {
	color: #333;
	font-weight: 500;
}

/* --- 2-3. 카드 푸터 (D-day, 버튼) --- */
.ipsi-footer {
	margin-top: auto; /* D-day와 버튼을 항상 하단에 위치시킴 */
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 10px;
}
/* --- [수정] 일정 리스트 스타일 (모집시기 뱃지 + 날짜) --- */
.ipsi-period-container {
	display: flex;
	flex-direction: column;
	gap: 6px; /* 줄 간격 */
	justify-content: center;
}

.ipsi-period-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* 모집시기 뱃지 (일정 리스트용) */
.period-badge {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	/* width: 54px;  <-- 이 줄을 삭제합니다 (PHP에서 제어) */
	height: 22px;
	padding: 0 4px;             /* 좌우 여백 최소화 */
	background-color: #e7f1ff;  /* 요청하신 차분한 배경색 */
	color: #495057;             /* 차분한 글자색 */
	border: 1px solid #cce0ff;  /* 얇은 테두리 */
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: -0.5px;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	flex-shrink: 0;
    box-sizing: border-box;     /* 패딩과 테두리를 너비에 포함 */
}

/* 날짜 텍스트 */
.period-date {
	font-size: 0.9rem;
	color: #444;
	font-weight: 500;
	letter-spacing: -0.3px;
}
.period-date i {
	margin-right: 4px;
	color: #888;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
	.ipsi-period-container {
		width: 100%;
		background-color: #f9f9f9;
		padding: 10px;
		border-radius: 6px;
		align-items: center; /* 가운데 정렬 */
	}
	
	.ipsi-period-row {
		justify-content: center;
		width: 100%;
	}
}

.ipsi-actions {
	display: flex;
	gap: 8px;
}
.btn-ipsi {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	font-size: 0.85rem;
	font-weight: 500;
	text-decoration: none;
	border-radius: 5px;
	border: 1px solid transparent;
	transition: all 0.2s;
}
.btn-ipsi i { font-size: 0.9em; }
.btn-view-detail {
	background-color: #fff;
	color: #555;
	border-color: #ccc;
}
.btn-view-detail:hover {
	background-color: #f5f5f5;
	border-color: #aaa;
}
.btn-go-homepage {
	background-color: #035AC7;
	color: #fff;
	border-color: #035AC7;
}
.btn-go-homepage:hover {
	background-color: #003f91;
	border-color: #003f91;
}

/* ===============================
반응형 스타일 (모바일)
=============================== 
*/
@media (max-width: 768px) {
	.ipsi-item {
		flex-direction: column;
		gap: 15px;
		padding: 15px;
	}
	.ipsi-thumb {
		flex-basis: 70px;
		width: 70px;
		height: 70px;
		margin: 0 auto; /* 로고 중앙 정렬 */
	}
	.ipsi-header {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 8px;
		margin-bottom: 15px;
	}
	.ipsi-tag-period { order: -1; } /* 태그를 위로 */
	.ipsi-title { font-size: 1.1rem; }

	.info-grid {
		grid-template-columns: 1fr; /* 1열로 변경 */
		gap: 12px;
	}
	.info-item {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding-bottom: 8px;
		border-bottom: 1px dashed #eee;
	}
    .info-item:last-child { border-bottom: none; }
	.info-label { margin-bottom: 0; }
	.info-value { text-align: right; }

	.ipsi-footer {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.ipsi-dday { text-align: center; }
	.ipsi-actions {
		justify-content: center;
	}
	.btn-ipsi {
		flex-grow: 1;
		justify-content: center;
	}
}

/* --- D-Day 미니 뱃지 스타일 --- */
.dday-mini {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: normal;
	line-height: 1.3;
	vertical-align: 1px; /* 텍스트 높이 보정 */
}

/* 상태별 색상 */
.dday-end   { background-color: #e9ecef; color: #868e96; } /* 종료: 회색 */
.dday-today { background-color: #ff6b6b; color: #fff; font-weight:bold; } /* 당일: 빨강 */
.dday-near  { background-color: #ff922b; color: #fff; } /* 임박(7일): 주황 */
.dday-far   { background-color: #e7f5ff; color: #228be6; } /* 여유: 파랑 */