/**
 * TourJin Custom Styles
 * Pretendard 폰트 오버라이드 및 한국어 스타일 커스터마이징
 */

/* =============================================
   Pretendard 폰트 오버라이드
   ============================================= */
:root {
    --ff-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    --ff-heading: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

body {
    font-family: var(--ff-primary);
    word-break: keep-all;
    word-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--ff-heading);
    word-break: keep-all;
}

/* 헤딩 크기 조정 (한국어 가독성 최적화) */
h1, .h1 { font-size: 32px; }
h2, .h2 { font-size: 24px; }
h3, .h3 { font-size: 20px; }
h4, .h4 { font-size: 18px; }
h5, .h5 { font-size: 16px; }
h6, .h6 { font-size: 14px; }

/* =============================================
   한국어 텍스트 스타일
   ============================================= */
p, li, span, a {
    word-break: keep-all;
}

/* 긴 텍스트 줄바꿈 */
.text-break-all {
    word-break: break-all;
}

/* =============================================
   네비게이션 커스텀
   ============================================= */
.navbar .nav-link {
    font-weight: 500;
}

/* 한국어 메뉴 간격 조정 */
.navbar .navbar-nav .nav-item {
    margin: 0 0.25rem;
}

/* =============================================
   카드 스타일 커스텀
   ============================================= */
.card-1 .card-title,
.card-5 .card-title,
.card-10 .card-title {
    line-height: 1.5;
}

/* 카드 호버 효과 강화 */
.card-1:hover .card-title a,
.card-5:hover .card-title a,
.card-10:hover .card-title a {
    color: var(--bs-primary);
}

/* =============================================
   푸터 스타일 커스텀
   ============================================= */
.section-footer-4 {
    background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .section-footer-4 {
    background-color: var(--bs-body-bg);
}

/* =============================================
   다크모드 추가 스타일
   ============================================= */
[data-bs-theme="dark"] .text-dark {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-tertiary-bg) !important;
}

[data-bs-theme="dark"] .border-300 {
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .dark-mode-invert {
    filter: invert(1);
}

/* =============================================
   검색 팝업 스타일
   ============================================= */
.search-popup .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* =============================================
   반응형 조정
   ============================================= */
@media (max-width: 991.98px) {
    .section-footer-4 .row {
        gap: 2rem;
    }
}

@media (max-width: 767.98px) {
    h1, .h1 {
        font-size: 1.75rem;
    }

    h2, .h2 {
        font-size: 1.5rem;
    }

    h3, .h3 {
        font-size: 1.25rem;
    }
}

/* =============================================
   프리로더 스타일
   ============================================= */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bs-body-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

/* =============================================
   스크롤 탑 버튼
   ============================================= */
.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-scroll-top .progress-square {
    fill: none;
    stroke: var(--bs-primary);
    stroke-width: 2;
    stroke-linecap: round;
    transform: rotate(-90deg);
}

/* =============================================
   유틸리티 클래스
   ============================================= */
.sec-padding {
    padding-top: 60px;
    padding-bottom: 60px;
}

@media (min-width: 992px) {
    .sec-padding {
        padding-top: 80px;
        padding-bottom: 80px;
    }
}

.border-top-300 {
    border-top: 1px solid var(--bs-border-color);
}

/* 그룹 소셜 아이콘 */
.group-social-icons {
    gap: 0.5rem;
}

.icon-shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bs-tertiary-bg);
    transition: all 0.3s ease;
}

.icon-shape:hover {
    background-color: var(--bs-primary);
    color: #fff;
}

.icon-46 {
    width: 46px;
    height: 46px;
}

/* 버튼 효과 */
.button-effect-1 {
    position: relative;
    transition: color 0.3s ease;
}

.button-effect-1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.button-effect-1:hover::after {
    width: 100%;
}

/* 호버 다크 */
.hover-dark:hover {
    color: var(--bs-dark) !important;
}

[data-bs-theme="dark"] .hover-dark:hover {
    color: var(--bs-light) !important;
}

/* =============================================
   카카오맵 스타일
   ============================================= */
.kakao-map-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .kakao-map-container {
        height: 300px;
    }
}

/* =============================================
   블로그 상세 - 포토 갤러리
   ============================================= */
.gallery-img {
    height: 220px;
    object-fit: cover;
}

@media (max-width: 767px) {
    .gallery-img {
        height: 160px;
    }
}

.gallery-item .gallery-overlay {
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* =============================================
   블로그 상세 - 시설/프로그램 카드
   ============================================= */
.facility-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

[data-bs-theme="dark"] .facility-card {
    background: #1f2937;
    border-color: #374151;
}

.facility-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    color: #fff;
}

.facility-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.facility-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
}

.facility-card-body {
    padding: 20px;
}

.facility-content {
    color: var(--bs-body-color);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 15px;
}

.facility-content:last-child {
    margin-bottom: 0;
}

.facility-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    margin-top: 12px;
    object-fit: cover;
}

.facility-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--bs-border-color);
}

.facility-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bs-tertiary-bg);
    border-radius: 10px;
}

.detail-label {
    font-size: 12px;
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: var(--bs-body-color);
    font-weight: 600;
}

@media (max-width: 767px) {
    .facility-card-header {
        padding: 14px 16px;
    }
    .facility-card-body {
        padding: 16px;
    }
    .facility-content {
        font-size: 14px;
    }
    .facility-details {
        grid-template-columns: 1fr;
    }
}
