/* ======================== */
/* 오버레이 스타일 */
/* ======================== */
#menuOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}
#menuOverlay.active {
  opacity: 1;
  visibility: visible;
}

/* ======================== */
/* 네비게이션 */
/* ======================== */
/* 배경색 */
#blog-content {
  background-color: #f5f5f5;
}

#blog-content nav.nav {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 100px; /* 메뉴 간격 */
}
#blog-content nav.nav a.nav-link {
  flex-shrink: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

/* ======================== */
/* 사이드바 */
/* ======================== */
.sidebar {
  position: fixed;
  top: 0; right: -250px; /* 숨김 상태 */
  width: 250px; height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  z-index: 1050; /* 모달보다 위 */
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.sidebar.active {
  right: 0;
}
.sidebar-close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #333;
  align-self: flex-end;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
}
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}
.sidebar-menu li {
  margin-bottom: 15px;
}
.sidebar-menu a {
  text-decoration: none;
  color: #333;
  font-size: 1.1rem;
  font-weight: bold;
  display: block;
  padding: 5px 0;
  transition: color 0.2s ease;
}
.sidebar-menu a:hover {
  color: #007bff;
}
.sidebar-social {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}
.sidebar-social a {
  font-size: 1.8rem;
  color: #555;
  margin: 0 10px;
  transition: color 0.2s ease;
}
.sidebar-social a:hover {
  color: #007bff;
}

/* ======================== */
/* 모바일 검색창 토글 기본 스타일 */
/* ======================== */
.search-input-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  background-color: #f8f9fa;
  padding: 0 1rem;
  border-bottom: 1px solid #eee;
}
.search-input-wrapper.active {
  max-height: 100px;
  padding: 10px 1rem;
}
.search-input-mobile {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

/* ======================== */
/* 공통 헤더 요소 스타일 */
/* ======================== */
.blog-header-logo {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: bold;
}
.header-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.header-icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}
.header-icon-button svg,
.header-icon-button .fa-solid,
.header-icon-button .fas {
  width: 24px;
  height: 24px;
}
.fa-bars {
  font-size: 24px;
}
#mobileMenuToggleButton {
  margin-left: 0.5rem; /* Bootstrap ms-2와 동일 */
}

/* ======================== */
/* 반응형: 768px 이하 */
/* ======================== */
@media (max-width: 768px) {
  #blog-content nav.nav {
    display: none !important;
  }
  .nav-scroller.border-bottom {
    border-top: none !important;
    border-bottom: none !important;
  }
  #mobile-search-wrapper {
    display: none;
  }
  #mobile-search-wrapper.active {
    display: block;
  }
}

/* ======================== */
/* 반응형: 768px 이상 (PC) */
/* ======================== */
@media (min-width: 768px) {
  /* 모바일 전용 요소 숨김 */
  .search-input-wrapper,
  .blog-header-search-icon,
  #mobileMenuToggleButton,
  .sidebar,
  #menuOverlay .overlay {
    display: none !important;
  }
  /* 로고 크기 고정 */
  .blog-header-logo {
    font-size: 1.8rem;
  }
  /* 헤더 아이콘 영역 */
  .col-3.col-md-4.d-flex.justify-content-end.align-items-center.position-relative {
    display: flex !important;
    flex-grow: 1;
    justify-content: flex-end;
  }
  /* PC 검색폼 스타일 */
  #search-form-pc {
    display: flex !important;
    align-items: center;
    width: auto;
  }
  .search-input-pc {
    width: 200px;
    margin-right: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
  }
  .search-button-pc svg {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ======================== */
/* 블록 애니메이션 공통 기능 */
/* ======================== */
.main-content-box:hover,
.more-news-box:hover,
.testimonial-card:hover,
.layout-2col-card:hover,
.blog-card:hover {
  transition: transform 0.2s ease;
  transform: translateY(-4px);
}

.main-content-box,
.more-news-box,
.layout-2col-card,
.blog-card {
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ======================== */
/* 스크롤 잠금 (사이드바 열렸을 때) */
/* ======================== */
body.no-scroll {
  overflow: hidden;
}

/* ======================== */
/* 컨텐츠 패널 */
/* ======================== */
.content-panel {
  position: relative;
  z-index: 1;
}

/* ========================
   메인 타이틀 섹션
======================== */
.main-hero-box {
  padding: 1rem 0 1.5rem 0;
  margin-bottom: 1.5rem;
  color: #212529; /* text-body-emphasis */
}

/* ========================
   2열 카드 섹션
======================== */
.blog-card-section {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 24px;
}

.blog-card {
  height: 100%;
}

.card-text-area {
  flex-grow: 1;
  padding: 1rem;
}

.block-image {
  width: 200px;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ========================
   2:1 레이아웃 섹션
======================== */
.custom-layout-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.main-content-section {
  flex: 0 0 calc(66.6666% - 12px);
  box-sizing: border-box;
}

.more-news-section {
  flex: 0 0 calc(33.3333% - 12px);
  box-sizing: border-box;
}

.main-content-box {
  box-sizing: border-box;
  height: 100%;
}

.main-image {
  width: 100%;
  height: auto;
  display: block;
}

abbr[title] {
  text-decoration: none;
  border-bottom: none;
  color: #666666;
  font-size: 12px;
  cursor: inherit;
}

/* ========================
   반응형
======================== */
@media (max-width: 1000px) {
  .block-image {
    display: none;
  }

  .main-content-section,
  .more-news-section {
    width: 100% !important;
    flex: 0 0 100% !important;
  }
}

/* ========================
   이미지 지그재그 배치
======================== */

.section-title {
  font-size: 24px;
  font-weight: bold;
  margin-top: 0px;
  margin-bottom: 20px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
}

.testimonial-card img {
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.testimonial-card.tall img {
  height: 300px;
}

.testimonial-card.short img {
  height: 200px;
}

.testimonial-card .text {
  margin-top: 10px;
}

.testimonial-card strong {
  display: block;
  margin-bottom: 8px;
}

/* ========================
   2열 사진/텍스트 배치
======================== */
.layout-2col-section {
  padding-top: 24px;
  padding-bottom: 40px;
}

.layout-2col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 40px;
  max-width: 1320px;
  margin: 0 auto;
}

.layout-2col-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
}

.layout-2col-card img {
  width: 100%;
  aspect-ratio: 526 / 276;
  height: auto;
  object-fit: cover;
  display: block;
}

.layout-2col-content {
  padding: 20px;
}

.layout-2col-tag {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
  display: inline-block;
}

.layout-2col-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.layout-2col-desc {
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 16px;
}

.layout-2col-author {
  font-size: 14px;
  color: #666;
}

@media (max-width: 400px) {
  .layout-2col-grid {
    grid-template-columns: 1fr;
  }
}