:root {
  --theme-color: #e18b9b;
}

.theme-color {
  color: var(--theme-color) !important;
}

.theme-background {
  background-color: var(--theme-color) !important;
  border-color: var(--theme-color) !important;
}

/* 헤더 스타일 */
.header {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: white;
}

/* 네비게이션 바 타이틀 스타일 */
.navbar-brand.site-name {
  color: var(--theme-color) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  padding: 0.5rem 1rem !important;
  border: none !important;
  box-shadow: none !important;
  text-align: left !important;
  background-color: transparent !important;
  width: auto !important;
  display: inline-block !important;
  margin: 0 !important;
  min-width: auto !important;
  max-width: none !important;
}

/* 사이트 이름 스타일 */
.site-name {
  font-weight: 700;
  font-size: 1.5rem;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--theme-color) !important;
}

/* 메인 메뉴 스타일 */
.main-menu {
  font-weight: 500;
}

.main-menu .nav-item {
  position: relative;
  margin: 0 5px;
}

.main-menu .nav-item.active > .nav-link {
  color: var(--theme-color) !important;
  font-weight: 500;
}

.main-menu .nav-link {
  padding: 8px 12px;
  white-space: nowrap;
}

/* 드롭다운 메뉴 스타일 */
.dropdown-menu {
  border-radius: 0;
  border: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  padding: 0.5rem 0;
  min-width: 200px;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  white-space: normal;
  word-break: keep-all;
}

.dropdown-item.active, 
.dropdown-item:active,
.dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--theme-color);
}

.dropdown-item.active {
  font-weight: 500;
}

/* 서브 메뉴 바 스타일 */
.sub-menu-bar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.sub-menu {
  padding: 0.5rem 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* 푸터 스타일 */
.footer {
  background-color: #f8f9fa;
  padding: 30px 0;
  margin-top: 50px;
}

/* 컨텐츠 스타일 */
.content-section {
  padding: 30px 0;
}

.content {
  word-break: keep-all;
}

/* 반응형 이미지 */
.img-fluid {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 텍스트 컴포넌트 스타일 */
.txt_component {
  margin-bottom: 1.5rem;
  width: 100% !important;
  word-break: keep-all;
}

/* 탭 스타일 */
.tab-container {
  margin: 2rem 0;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-item {
  margin-bottom: -1px;
}

.nav-tabs .nav-link {
  display: block;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  text-decoration: none;
  color: #495057;
}

.nav-tabs .nav-link:hover {
  border-color: #e9ecef #e9ecef #dee2e6;
}

.nav-tabs .nav-link.active {
  color: white;
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

.tab-content {
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-top: none;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* 링크 버튼 스타일 */
.btn-link {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background-color: var(--theme-color);
  color: white;
  border-radius: 0.25rem;
  text-decoration: none;
  margin: 0.25rem 0;
  transition: background-color 0.2s;
}

.btn-link:hover {
  background-color: #d07a8a;
  color: white;
  text-decoration: none;
}

/* 모두 버튼 스타일 */
.btn_wrap {
  margin: 1rem 0;
  text-align: center;
}

.btn_wrap ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-block;
}

.btn_wrap ul li {
  margin-bottom: 0.5rem;
}

.btn_wrap .btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  background-color: var(--theme-color);
  color: white;
  text-decoration: none;
  transition: background-color 0.2s;
  text-align: center;
  font-weight: 500;
}

.btn_wrap .btn:hover {
  background-color: #d07a8a;
}

.btn_wrap .btn .in {
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn_wrap .btn .btn_text {
  flex: 1;
  text-align: center;
}

.btn_wrap .btn .ic {
  margin-left: 0.5rem;
}

.btn_wrap .btn .ic_v {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* 이미지 컨테이너 */
.image-container {
  max-width: 100%;
  margin-bottom: 1rem;
  text-align: center;
}

/* 지도 스타일 */
.map-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 비율 */
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 테이블 스타일 */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 모바일 메뉴 */
@media (max-width: 768px) {
  .navbar-collapse {
    margin-top: 15px;
  }
  
  .nav-item {
    margin: 5px 0;
  }
  
  .dropdown-menu {
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }
  
  .sub-menu-bar {
    display: none; /* 모바일에서는 서브메뉴바 숨김 */
  }
  
  .content h1, .content h2, .content h3, .content h4 {
    font-size: 1.5rem;
  }
  
  .txt_component {
    font-size: 1rem !important;
  }
}

/* 카드 스타일 */
.card {
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-img-top {
  max-height: 200px;
  object-fit: cover;
}

/* 주소 정보 스타일 */
.address-info {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.address-info ul {
  padding-left: 1.5rem;
}

/* 문의 양식 스타일 */
.form-label {
  font-weight: 500;
}

.form-control:focus {
  border-color: var(--theme-color);
  box-shadow: 0 0 0 0.25rem rgba(225, 139, 155, 0.25);
}

.form-check-input:checked {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

.btn-primary {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

.btn-primary:hover {
  background-color: #d07a8a;
  border-color: #d07a8a;
}

.btn-outline-primary {
  color: var(--theme-color);
  border-color: var(--theme-color);
}

.btn-outline-primary:hover {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

/* 버튼 링크 스타일 개선 */
.btn-link {
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.375rem 0.75rem;
  color: var(--theme-color);
  text-decoration: none;
  min-width: 120px;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.btn-link:hover {
  color: #d07a8a;
  background-color: rgba(0,0,0,0.05);
  border-radius: 4px;
}

/* 페이지당 버튼 폭 통일화 */
.content .btn-link {
  min-width: 180px;
}

/* 리스트나 동일한 컨테이너에 있는 버튼들은 같은 폭으로 맞추기 */
.content .txt_component .btn-link,
.content .component_box .btn-link {
  width: 100%;
  max-width: 250px;
}

/* 프로그램 버튼 폭 통일화 - 네비게이션 타이틀 제외 */
.content .btn, 
.content .btn-primary, 
.content a[class*="프로그램"], 
.content a[href*="program"], 
.content a[class*="program"] {
  width: 300px !important;
  display: block !important;
  margin: 5px auto !important;
  text-align: center !important;
}

/* 네비게이션 요소는 버튼 스타일에서 제외 */
.navbar a,
.navbar-brand,
.navbar .nav-link,
.navbar-nav a {
  width: auto !important;
  display: inline-block !important;
  margin: 0 !important;
  background-color: transparent !important;
  text-align: left !important;
  border: none !important;
  box-shadow: none !important;
}

/* 프로그램 버튼 중앙 정렬 */
.content > div, .content > p {
  text-align: center;
}

/* 기존 테마 색상 유지 */
body {
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  word-break: keep-all; /* 한글 단어 단위로 줄바꿈 */
  overflow-wrap: break-word; /* 긴 단어 줄바꿈 */
  line-height: 1.6;
  color: #333;
}

.theme-border {border-color: var(--theme-color) !important;}
.theme-gradient {
  background: linear-gradient(to bottom, transparent 0%, var(--theme-color) 60px);
}
