/* === 전통사찰 안내 - 메인 스타일시트 === */

:root {
    --temple-brown: #5C3317;
    --temple-dark: #3E2110;
    --temple-gold: #C5943A;
    --temple-light: #FAF3E8;
    --temple-bg: #F8F5F0;
    --temple-green: #2E6B3A;
    --temple-red: #B33030;
    --temple-gray: #6c757d;
}

/* === 기본 === */
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--temple-bg);
    color: #333;
    line-height: 1.7;
}

a { color: var(--temple-brown); transition: color .2s; }
a:hover { color: var(--temple-dark); }

/* === 네비게이션 === */
.bg-temple {
    background: linear-gradient(135deg, var(--temple-dark) 0%, var(--temple-brown) 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.navbar-brand { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.navbar-brand i { color: var(--temple-gold); }

.navbar .nav-link {
    font-weight: 500;
    padding: .5rem 1rem !important;
    border-radius: 8px;
    transition: all .2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: rgba(255,255,255,.12);
}
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
    border-radius: 12px;
    padding: .5rem;
}
.navbar .dropdown-item {
    border-radius: 8px;
    padding: .5rem .75rem;
}
.navbar .dropdown-item:hover { background: var(--temple-light); }

/* === 히어로 섹션 === */
.hero-section {
    background: linear-gradient(135deg, var(--temple-dark) 0%, var(--temple-brown) 50%, var(--temple-gold) 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section .container { position: relative; z-index: 1; }
.hero-section h1 { font-weight: 700; font-size: 2.5rem; letter-spacing: -0.03em; }
.hero-section .lead { opacity: .9; font-size: 1.15rem; }

@media (max-width: 768px) {
    .hero-section { padding: 50px 0; }
    .hero-section h1 { font-size: 1.75rem; }
}

/* === 검색 바 === */
.search-bar {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    max-width: 650px;
    margin: 0 auto;
}
.search-bar .form-control {
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1.05rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.search-bar .btn-search {
    background: var(--temple-gold);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    transition: all .2s;
}
.search-bar .btn-search:hover {
    background: #B38530;
    transform: translateY(-1px);
}

/* === 카드 === */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: all .3s;
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,.1);
    transform: translateY(-2px);
}
.card-temple {
    border-left: 4px solid var(--temple-gold);
}
.card-temple .card-title a {
    text-decoration: none;
    color: var(--temple-dark);
    font-weight: 600;
}
.card-temple .card-title a:hover { color: var(--temple-gold); }

/* === 배지 === */
.badge-active { background: var(--temple-green); }
.badge-inactive { background: var(--temple-red); }
.badge-region {
    background: var(--temple-light);
    color: var(--temple-brown);
    font-weight: 500;
}

/* === 지역 그리드 === */
.region-card {
    text-align: center;
    padding: 24px 16px;
    border-radius: 16px;
    background: #fff;
    transition: all .3s;
    text-decoration: none;
    color: var(--temple-dark);
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.region-card:hover {
    background: var(--temple-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    color: var(--temple-dark);
}
.region-card i {
    font-size: 2rem;
    color: var(--temple-gold);
    margin-bottom: 12px;
    display: block;
}
.region-card .region-name { font-weight: 600; font-size: 1rem; }
.region-card .region-count { color: var(--temple-gray); font-size: .85rem; }

/* === 통계 === */
.stat-card {
    text-align: center;
    padding: 28px 16px;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--temple-brown);
}
.stat-card .stat-label {
    font-size: .9rem;
    color: var(--temple-gray);
    margin-top: 4px;
}

/* === 페이지네이션 === */
.pagination .page-link {
    border-radius: 10px;
    margin: 0 3px;
    color: var(--temple-brown);
    border: 1px solid #dee2e6;
    padding: .5rem .85rem;
}
.pagination .page-item.active .page-link {
    background: var(--temple-brown);
    border-color: var(--temple-brown);
    color: #fff;
}
.pagination .page-link:hover {
    background: var(--temple-light);
    color: var(--temple-dark);
}

/* === 상세 페이지 === */
.detail-header {
    background: linear-gradient(135deg, var(--temple-dark), var(--temple-brown));
    color: #fff;
    padding: 48px 0;
    border-radius: 0 0 24px 24px;
}
.detail-info-table th {
    background: var(--temple-light);
    color: var(--temple-brown);
    font-weight: 600;
    width: 140px;
    white-space: nowrap;
}
.detail-info-table td { background: #fff; }

.history-box {
    background: var(--temple-light);
    border-radius: 16px;
    padding: 24px;
    line-height: 2;
    white-space: pre-line;
    border-left: 4px solid var(--temple-gold);
}

/* === 지도 === */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
}
#map { height: 500px; width: 100%; }
@media (max-width: 768px) {
    #map { height: 350px; }
}

/* === 빈 상태 === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--temple-gray);
}
.empty-state i { font-size: 4rem; margin-bottom: 16px; opacity: .4; }

/* === 브레드크럼 === */
.breadcrumb-section {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.breadcrumb { margin-bottom: 0; font-size: .9rem; }
.breadcrumb-item a { color: var(--temple-gray); text-decoration: none; }
.breadcrumb-item.active { color: var(--temple-brown); font-weight: 500; }

/* === 풋터 === */
footer h5, footer h6 { font-weight: 600; }
footer a:hover { color: var(--temple-gold) !important; }

/* === 페이지 컨텐츠 === */
.page-content { min-height: calc(100vh - 350px); padding: 40px 0; }

/* === 반응형 === */
@media (max-width: 576px) {
    .page-content { padding: 24px 0; }
    .stat-card .stat-number { font-size: 1.5rem; }
    .detail-header { padding: 32px 0; border-radius: 0; }
    .card { border-radius: 12px; }
}

/* === 스크롤바 === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--temple-brown); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--temple-dark); }

/* === 로딩 === */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(92,51,23,.15);
    border-radius: 50%;
    border-top-color: var(--temple-brown);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === 공유/길찾기 버튼 === */
.detail-header .btn-group .btn {
    font-size: .8rem;
    padding: .35rem .65rem;
}
.detail-header .btn-warning {
    background: #FEE500;
    color: #3C1E1E;
    border-color: #FEE500;
}
.detail-header .btn-warning:hover {
    background: #EDDA00;
    color: #3C1E1E;
}
.detail-header .btn-success {
    background: #03C75A;
    border-color: #03C75A;
}
.detail-header .btn-success:hover {
    background: #02B550;
}
.detail-header .btn-outline-light {
    border-color: rgba(255,255,255,.4);
}
.detail-header .btn-outline-light:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.6);
}

/* === 지역 지도 === */
#regionMap { border-radius: 0 0 16px 16px; }

/* === FAQ 아코디언 === */
.faq-accordion .accordion-button:not(.collapsed) {
    background: var(--temple-light);
    color: var(--temple-brown);
}
.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 .2rem rgba(92,51,23,.15);
}
