html {
  font-size: 16px; /* 기본 (데스크탑) */
}
@media (max-width: 768px) {
  html {
    font-size: 14px; /* 태블릿 */
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px; /* 모바일 */
  }
}

body  {
  font-family: 'NanumBarunGothic', 'Open Sans', sans-serif;
  background-color: #f5f5f0;
}

@media (max-width: 991.98px) {
  .page-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* 공통 메뉴 박스 스타일 */
.floating-box {
  position: fixed;
  top: 10px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  z-index: 1050;
  max-width: 45%;
}

/* 왼쪽 박스 위치 */
.left-menu {
  left: 10px;
}

/* 오른쪽 박스 위치 */
.right-menu {
  right: 10px;
}

/* 모바일 메뉴 토글 위치 보정 */
.collapse-mobile {
  position: absolute;
  top: 60px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  z-index: 1040;
  padding: 0.5rem 1rem;
  width: max-content;
}

@media (min-width: 992px) {
  .collapse-mobile {
    display: flex !important;
    position: static !important;
    border: none;
    padding: 0;
    width: auto;
  }

  .menu-toggle button {
    display: none;
  }

  .floating-box {
    max-width: none;
  }
}

/* 모바일 collapse 초기에는 숨김 */
@media (max-width: 991.98px) {
  .collapse-mobile {
    display: none;
  }

  .collapse-mobile.show {
    display: block;
  }
}

.dropdown-menu {
  border: none !important;      /* 테두리 제거 */
  box-shadow: none !important;  /* 그림자 제거 */
  background-color: transparent; /* 배경 투명하게 (필요시 조절) */
}

.dropdown-item,
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
  background-color: transparent !important; /* 배경색 제거 */
  color: inherit !important;               /* 글씨 색 상속 */
  box-shadow: none !important;             /* 그림자 제거 */
  outline: none !important;                /* 포커스 테두리 제거 */
  text-decoration: none !important;        /* 밑줄 제거 */
}

.submenu {
  background-color: #f8f9fa; /* 밝은 회색 (Bootstrap bg-light 비슷) */
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
  border-left: 3px solid #ccc;
  margin-left: 1rem;
  border-radius: 4px;
}

.submenu-item {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 6px 0;         /* 위아래 여백 */
  margin: 0;              /* 불필요한 여백 제거 */
  font-size: 0.95rem;     /* 텍스트 크기 조정 (선택) */
}

/*
.submenu-item:hover {
  text-decoration: underline;
}
*/

.submenu-item.all-items {
  display: inline-block;
  padding: 6px;
  /* margin: 4px; */
  background-color: #e6e6e6;
  color: #333;
  font-size: 0.8rem;
  font-weight: normal;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
}

/*
.submenu-item.all-items:hover {
  background-color: #0056b3;
  color: white;
}
*/

/* 검색창 전체 스타일 */
.search-form {
  border: none;
  background: none;
  padding: 0;
}

/* 입력창 스타일 */
.search-input {
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  outline: none;
  font-size: 0.95rem;
  background: transparent;
  width: 180px;
}

/* 돋보기 버튼 스타일 */
.search-btn {
  border: none;
  background: none;
  color: #333;
  padding-left: 6px;
  font-size: 1.1rem;
}

/* 버튼 hover 효과 제거 */
.search-btn:hover {
  background: none;
  color: #000;
}

@media (max-width: 575.98px) and (orientation: portrait) {
  .main-logo-img {
    padding: 0 1rem;         /* 좌우에 여유 */
    margin-top: 4.5rem;      /* 메뉴 아래로 여백 (조정 가능) */
    width: 100%;             /* 혹시라도 너무 커질 때 대비 */
    box-sizing: border-box;  /* padding 포함한 너비 계산 */
  }
}


.blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-link.first-article {
  background-color: #f0f0e5;
  border: 1px solid #536c53;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}


.blog {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding: 30px;
}
@media (max-width: 992px) {
  .blog {
    padding: 12px;
  }
}
.blog.first-article {
  border-bottom: none;
}

.blog-text {
  flex: 1;
}

.title {
  margin-top: 5px;
  font-size: 2rem;
}

.search-title {
  margin-top: 100px;
  padding: 12px;
  font-size: 2.5rem;
}

.thumbnail {
  width: 320px;
  height:160px;
  object-fit: cover;
  margin-left: 20px;
  border-radius: 4px;
}
/* 모바일에서는 숨기기 */
/*@media (max-width: 768px) { */
@media (max-width: 992px) {
  .thumbnail {
    display: none;
  }
}

.subtitle {
  font-size: 1.2rem;
  color: #4b4b4b;
  margin-top: 1.2rem;
  font-style: normal;
}

.large-thumbnail {
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 1rem 2rem;
  padding: 2rem;
  border-radius: 6px;
}

.article-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;      /* 수평 가운데 정렬 */
  max-width: 1300px;
  margin: 0 auto;
}
@media (max-width: 767px) {
  .article-container {
    margin: 5px;
  }
}

/* 제목 텍스트 스타일 */
.sidebar-title {
  font-weight: bold;
  color: #808080;
  margin-bottom: 10px;
  font-size: 16px;
}

/* 공통 sidebar 스타일 */
.sidebar {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 데스크탑에서만 보이는 왼쪽 sticky 사이드바 */
.sidebar.desktop-only {
  position: sticky;
  top: 100px;
  align-self: flex-start;
  width: 250px;
  margin-right: 40px;
  padding: 10px 40px;
  background-color: transparent;
  display: block;
}
/* 모바일에서는 숨김 */
/*@media (max-width: 767px) { */
@media (max-width: 1200px) {
  .sidebar.desktop-only {
    display: none;
  }
}

/* 모바일 전용 sidebar */
.sidebar.mobile-only {
  display: none;
  padding: 10px 20px;
}

/* 모바일일 때만 표시 */
@media (max-width: 767px) {
  .sidebar.mobile-only {
    display: block;
  }
}


/* 메뉴 리스트 */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 메뉴 항목 */
.sidebar li {
  margin-bottom: 8px;
  line-height: 1.4; /* 줄 간격을 조금 넉넉히 */
}

/* 링크를 일반 텍스트처럼 */
.sidebar a,
.sidebar a:visited,
.sidebar a:hover,
.sidebar a:active {
  text-decoration: none;
  color: #808080;
  font-weight: normal;
  display: inline-block;
  width: 100%;
  word-break: break-word; /* 긴 텍스트 줄바꿈 */
}

.article-title {
  margin: 80px 10px 40px 10px;
  font-size: 3rem;
}
@media (max-width: 767px) {
  .article-title {
    font-size: 2.5rem;
  }
}
.article-subtitle {
  margin: 40px 12px;
  font-size: 1.5rem;
}

/*
.article-thumbnail {
  width: 80%;
  height:;
  object-fit: cover;
  margin: 20px;
  border-radius: 4px;
}
*/
.article-thumbnail {
  width: 900px;
  height: auto;
  margin: 0 auto;
  display: block;
}
@media (max-width: 767px) {
/*@media (max-width: 1100px) { */
  .article-thumbnail {
    width: 100%;
    padding:10px;
  }
}

.article-content {
  width: 800px;
  margin: 12px;
  padding:10px;
}
@media (max-width: 767px) {
  .article-content {
    width: 100%;
  }
}

.article-body {
  font-size: 1.1rem;
  line-height:2;
}

.article-body-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
  line-height:2;
}

.section-title {
  font-size:2rem;
  color: #808080;
}

.section-list-item {
  font-weight: bold;
}

.section-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px auto; /* optional: 가운데 정렬 */
}

.section-image-corner-right {
  float: right;
  width: 200px;
  max-width: 40%;
  margin: 0 0 auto 10px;
}

.section-image-corner-left {
  float: left;
  width: 200px;
  max-width: 40%;
  margin: 0 10px auto 0;
}
/*
.section-image-caption {
  max-width: 100%;
  text-align: center;
  width: fit-content;
  font-size: 0.9em;
  color: #555;
}
*/

.related-articles-wrapper {
  max-width: 1300px;
  margin: 60px auto 40px auto;
  padding: 0 15px;
}

.related-articles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.related-articles-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
}

.view-all-link {
  font-size: 1rem;
  color: #333;
  text-decoration: none;
}

.view-all-link:hover {
  text-decoration: underline;
}

.related-articles-divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 10px 0 30px;
}

.related-articles-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* 3열 고정 */
  gap: 20px;
  max-width: 1300px;                      /* 원하는 폭 조정 (예시) */
  margin: 0 auto;
}

.related-article-card {
  display: flex;
  flex-direction: column;
}

.related-article-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.related-article-meta {
  font-size: 0.9rem;
  color: #666;
}

.related-article-title-text {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

/* 모바일 반응형 처리 */
@media (max-width: 768px) {
  .related-article-card {
    flex: 1 1 100%;
  }

  .related-articles-container {
    grid-template-columns: 1fr;
  }

  .related-article-image {
    display: none;
  }
}

.related-article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

header.title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.notice-language {
  display: block;         /* 블록 요소로 만들기 */
  width: fit-content;     /* 텍스트 크기만큼만 넓이 지정 */
  margin-left: auto;      /* 왼쪽 여백을 자동으로 밀어서 오른쪽 정렬 */
  border: 0.5px solid #cccccc;
  border-radius: 3px;
  color: gray;
  padding: 2px 6px;
}

.notice-language a {
  color: inherit;          /* 부모 요소의 색을 그대로 사용 */
  text-decoration: none;   /* 밑줄 제거 */
}
.notice-language a:hover {
  text-decoration: none;
  color: inherit;
}

footer {
  background-color: #536c53ff;
  color:#e2e9e2;
  padding: 3rem;
}

.footer-link {
  display: flex;
  justify-content: center;
  gap: 3rem; /* 링크 간 간격 */
  margin-bottom: 2rem; /* footer-ending과 거리 */
}

.footer-link a {
  text-decoration: none; /* 밑줄 제거 */
  color: inherit;        /* 기본 색상 유지 */
  font-weight: 500;
}

/*
.footer-link a:hover {
  text-decoration: underline;
  color: #007bff;
}
*/
.footer-ending {
  text-align: center;
  font-size: 0.9rem;
  color: inherit;
}

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: -400px;
  width: 300px;
  max-width: 90%;
  background-color: #648264;
  color: #f0f4f0;
  padding: 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  transition: left 0.5s ease;
  z-index: 10000;
}

.cookie-banner.visible {
  left: 1rem;
}

/* 모바일 (화면 너비 600px 이하) */
@media (max-width: 600px) {
  .cookie-banner {
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem;
  }

  .cookie-banner.visible {
    left: 50%;
    transform: translateX(-50%);
  }
}

.cookie-buttons {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-buttons button {
  background-color: #e2e9e2;
  color: #2c3e2c;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

.cookie-buttons button:hover {
  background-color: #cfd9cf;
}

.cookie-buttons a {
  color: #e2e9e2;
  text-decoration: underline;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.hidden {
  display: none;
}

/* desktop */
@media screen and (min-width:80em) {
/* @media screen and (min-width:1280px) {
*/
}
@media screen and (min-width:64em){
/* @media screen and (min-width:1024px){ */
}
@media screen and (min-width:60em){
/* @media screen and (min-width:960px){ */

}/* pad */
@media screen and (min-width:40em) {
/* @media screen and (min-width:640px) {
*/
}
@media screen and (max-width:30em){
/*@ media screen and (max-width:480px){ */
/*
*/
}
