/* css styles */
/* Enhanced CSS styles for your blog */

/* 기존 home 버튼 스타일 유지 */
.fixed-home-btn {
  position: fixed;
  top: 50%;
  right: 20%;
  transform: translateY(-50%);
  background-color: #6c757d;
  color: white !important;
  text-decoration: none;
  border-radius: 25px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #6c757d;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: inline-block;
}

.fixed-home-btn:hover {
  background-color: #5a6268 !important;
  color: white !important;
  text-decoration: none !important;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 1. 동적 footer bar - cosmo 테마 색상 */
.dynamic-footer {
  position: fixed;
  bottom: -80px; /* 처음에는 숨김 */
  left: 0;
  right: 0;
  background-color: #f8f9fa;
  color: #495057;
  padding: 15px 20px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-top: 1px solid #dee2e6;
}

.dynamic-footer.show {
  bottom: 0;
}

.dynamic-footer.hide {
  bottom: -80px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-link {
  color: #6c757d;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.footer-link:hover {
  color: #495057;
  opacity: 1;
  transform: translateY(-1px);
  text-decoration: none;
}

.footer-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* 2. 네비게이션 바 - 참고 블로그 스타일 active 효과 */
.navbar {
  background-color: #f8f9fa !important;
}

.navbar-brand, .navbar-nav .nav-link {
  color: #495057 !important;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: #212529 !important;
  transform: translateY(-1px);
}

/* About 페이지에서만 active 효과 - 밑줄 스타일 */
body[data-page="about"] .navbar-nav .nav-link[href*="about"] {
  color: #212529 !important;
  font-weight: 500;
}

body[data-page="about"] .navbar-nav .nav-link[href*="about"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background-color: #495057;
  border-radius: 1px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .dynamic-footer {
    padding: 12px 15px;
  }
  
  .fixed-home-btn {
    right: 15px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  body[data-page="about"] {
    padding-bottom: 100px;
  }
  
  body[data-page="about"] .about-contents {
    margin-bottom: 80px;
  }
}

/* 스크롤 인디케이터 - cosmo 테마 색상 */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #6c757d, #495057);
  z-index: 1002;
  transition: width 0.1s ease;
}

/* 부드러운 스크롤 */
html {
  scroll-behavior: smooth;
}

/* CTA 이미지 스타일 - 호버 효과 없이 깔끔하게 */
.quarto-post .thumbnail img,
.quarto-post .card-img-top img,
.quarto-post .listing-item-img-placeholder {
  cursor: pointer;
  border-radius: 8px;
}

/* Title banner positioning for search */
.quarto-title-banner {
  position: relative !important;
}

/* Navbar search positioning - 더 오른쪽으로 이동 */
.navbar #quarto-search {
  margin-left: auto !important;
  margin-right: 20px !important;
  order: 999 !important;
}

/* 검색 기능 스타일 */
.search-container {
  position: absolute;
  top: 60%;
  right: -2%;
  max-width: 250px;
  width: 250px;
  height: 40px; /* 명시적인 높이 설정 */
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 100;
  /* overflow: hidden; */
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 16px;
  font-size: 13px;
  background: transparent;
  /* border-radius: 20px 0 0 20px; */
  color: #495057;
  cursor: text;
  width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box; /* 패딩 포함한 전체 크기 계산 */
  line-height: normal; /*컨테이너 높이와 동일하게 설정하여 세로 중앙 정렬*/
}

.search-input::placeholder {
  color: #6c757d;
  opacity: 0.8;
}

.search-button {
  background: none;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  /* border-radius: 0 20px 20px 0; */
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 100%;
  width: 48px;
}

.search-button:hover {
  background-color: rgba(108, 117, 125, 0.1);
}

.search-icon {
  width: 16px;
  height: 16px;
  fill: #6c757d;
  transition: fill 0.3s ease;
  pointer-events: none;
}

.search-button:hover .search-icon {
  fill: #495057;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.search-results.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f4;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 500;
  color: #212529;
  margin-bottom: 4px;
  font-size: 14px;
}

.search-result-excerpt {
  color: #6c757d;
  font-size: 12px;
  line-height: 1.4;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

.search-result-title strong,
.search-result-excerpt strong {
  background-color: #fff3cd;
  color: #856404;
  padding: 1px 2px;
  border-radius: 2px;
}

/* 반응형 검색 */
@media (max-width: 768px) {
  .search-container {
    position: relative;
    top: auto;
    right: auto;
    max-width: 90%;
    width: auto;
    margin: 15px auto 0;
    z-index: 100;
  }
  
  .search-input {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .search-button {
    padding: 10px 14px;
  }
  
  .search-icon {
    width: 16px;
    height: 16px;
  }
}

/* 폰트 스타일 추가 */
@import url("https://fonts.googleapis.com/css2?family=Hahmlet:wght@300..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300..900&display=swap");

:root {
  --bs-font-sans-serif: "Inter", "Source Han Sans KR", sans-serif;
  --bs-font-serif: "Hahmlet", "Inter", "Source Han Sans KR", serif;
  --bs-font-monospace: "JetBrains Mono", monospace;
}
body       { font-family: var(--bs-font-serif); }
pre, code  { font-family: var(--bs-font-monospace); }

/* 포스트 제목과 카테고리 간의 간격 조절 */
.listing-title {
  margin-bottom: 0.7rem;
}

.listing-category {
  margin-top: 0.5rem;
}