body {
  background-color: #f8f8f8;
  color: #333;
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none;
  color: inherit;
}
a:hover {
  color: #0078d7;
}
#header h1 a {
  font-size: 1.8em;
  font-weight: bold;
  transition: color 0.3s ease;
}
#header h1 a:hover {
  color: #0078d7;
}
.wrap {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  gap: 1.5rem;
}
.sidebar {
  background: none;
  box-shadow: none;
  padding: 0;
}
.content-area {
  flex: 1;
}
.post-box {
  background: white;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.post-box img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.post-meta {
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.4rem;
}
.post-box h2 {
  font-size: 1.2em;
  margin: 0 0 0.5rem 0;
}
.post-summary {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pagination {
  text-align: center;
  margin: 2rem 0;
}
.pagination a {
  display: inline-block;
  margin: 0 6px;
  padding: 0.4em 0.8em;
  border-radius: 6px;
  background: white;
  border: 1px solid #ccc;
}
.pagination a:hover {
  background: #0078d7;
  color: white;
}


/* 카테고리 박스 높이 자동 조절 및 최소화 */
.category-box {
  display: inline-block;
  padding: 1rem;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  width: fit-content;
  height: auto;
  min-height: 120px;
  overflow-y: auto;
  word-break: break-word;
  white-space: normal;
  transition: transform 0.2s ease, box-shadow 0.2s ease; /* ✅ 부드러운 효과 */
}

.category-box:hover {
  transform: translateY(-3px); /* ✅ 살짝 위로 이동 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* ✅ 그림자 강화 */
}


/* 로고 및 검색창이 같은 행에 있도록 정렬 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 검색창 애니메이션 */
.search-input {
    display: none;
    transition: all 0.3s ease-in-out;
    margin-left: auto;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 20px;
}

.search-button:hover + .search-input,
.search-input:focus {
    display: inline-block;
}

/* 사이드 헤더 상단 로고 및 검색 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.logo-box {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background-color: #0078d7;
  color: white;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.logo-box:hover {
  background-color: #005fa3;
}

/* 검색 버튼 및 애니메이션 입력창 */
.search-container {
  position: relative;
}

.search-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.search-input {
  width: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #fff;
  transition: width 0.4s ease, opacity 0.4s ease;
}

.search-input.open {
  width: 160px;
  opacity: 1;
}

/* 상단 박스형 로고 - 흰색 배경 */
.header-box {
  text-align: center;
  padding: 1.2rem 2rem;
  margin: 1.5rem auto;
  background-color: #ffffff;
  color: #333;
  font-weight: bold;
  border-radius: 12px;
  width: 320px;
  max-width: 90%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 1.8em;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.header-box:hover {
  color: #0078d7;                      
}

.visitor-box {
  margin-top: 2rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-size: 0.95rem;
  color: #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ✅ 호버 효과 동일하게 */
.visitor-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.visitor-box h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
