/* ========================================
   산나들이 - 100대 명산 정보 사이트
   ======================================== */

:root {
    --forest-dark: #1a4a2e;
    --forest: #2d6a4f;
    --forest-light: #40916c;
    --forest-lighter: #52b788;
    --forest-pale: #b7e4c7;
    --forest-bg: #d8f3dc;
    --earth: #6b4226;
    --earth-light: #a67c52;
    --sky: #4a90d9;
    --warm: #f4a261;
    --bg-cream: #fafaf5;
}

* {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background-color: var(--bg-cream);
    color: #2d3436;
    line-height: 1.7;
}

/* ---- Navbar ---- */
.bg-forest {
    background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 100%) !important;
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-nav .nav-link.active {
    color: var(--forest-pale) !important;
    font-weight: 700;
}

.navbar .input-group {
    max-width: 250px;
}

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 50%, var(--forest-light) 100%);
    color: white;
    padding: 4rem 0 4.5rem;
    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 xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff10' d='M0,160L60,170.7C120,181,240,203,360,192C480,181,600,139,720,128C840,117,960,139,1080,154.7C1200,171,1320,181,1380,186.7L1440,192L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-section .lead {
    opacity: 0.9;
    font-size: 1.1rem;
}

.hero-search {
    max-width: 500px;
    margin: 0 auto;
}

.hero-search .form-control {
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 1.05rem;
    border-radius: 50px 0 0 50px;
}

.hero-search .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.8rem 1.5rem;
    background: var(--forest-lighter);
    border-color: var(--forest-lighter);
    color: white;
    font-weight: 600;
}

.hero-search .btn:hover {
    background: var(--forest-light);
    border-color: var(--forest-light);
}

/* ---- Section ---- */
.section-title {
    font-weight: 800;
    color: var(--forest-dark);
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--forest-lighter);
    margin-top: 8px;
    border-radius: 2px;
}

/* ---- Mountain Card ---- */
.mountain-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    height: 100%;
}

.mountain-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.mountain-card .card-header-img {
    height: 140px;
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.mountain-card .card-header-img .height-badge {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,0.4);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mountain-card .card-body {
    padding: 1.2rem;
}

.mountain-card .card-title {
    font-weight: 700;
    color: var(--forest-dark);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.mountain-card .card-title a {
    color: inherit;
    text-decoration: none;
}

.mountain-card .card-title a:hover {
    color: var(--forest-light);
}

.mountain-card .card-text {
    color: #636e72;
    font-size: 0.88rem;
    line-height: 1.6;
}

.mountain-card .badge-info {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ---- Badges ---- */
.badge-forest {
    background-color: var(--forest-pale);
    color: var(--forest-dark);
}

.badge-height {
    background-color: #ffeaa7;
    color: #6b4226;
}

.badge-difficulty {
    background-color: #dfe6e9;
    color: #2d3436;
}

/* ---- Region Badge ---- */
.region-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    background: white;
    border: 2px solid var(--forest-pale);
    color: var(--forest-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    margin: 0.3rem;
}

.region-badge:hover,
.region-badge.active {
    background: var(--forest);
    border-color: var(--forest);
    color: white;
}

/* ---- Detail Page ---- */
.detail-hero {
    background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 100%);
    color: white;
    padding: 3rem 0;
}

.detail-hero h1 {
    font-weight: 800;
    font-size: 2.2rem;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.info-card h3,
.info-card-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--forest-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--forest-bg);
}

.info-card h3 i,
.info-card-title i {
    color: var(--forest-lighter);
}

/* Course table styling */
.info-card table {
    width: 100%;
    border-collapse: collapse;
}

.info-card table th {
    background: var(--forest-bg);
    color: var(--forest-dark);
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--forest-pale);
}

.info-card table td {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
    line-height: 1.6;
}

.info-card table td.left {
    text-align: left;
}

/* ---- Map ---- */
#mountain-map {
    height: 350px;
    border-radius: 12px;
    z-index: 1;
}

/* ---- Stats Section ---- */
.stat-section {
    position: relative;
    z-index: 2;
    margin-top: -2.5rem;
    padding-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-card .stat-icon {
    font-size: 2rem;
    color: var(--forest-lighter);
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--forest-dark);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #636e72;
}

/* ---- Today Mountain ---- */
.today-highlight {
    background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    color: white;
}

.today-highlight h2 {
    font-weight: 800;
}

/* ---- Pagination ---- */
.mountain-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.mountain-nav a {
    flex: 1;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: var(--forest-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
}

.mountain-nav a:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.mountain-nav .nav-label {
    font-size: 0.75rem;
    color: #636e72;
}

.mountain-nav .nav-name {
    font-weight: 700;
    font-size: 1rem;
}

/* ---- Search ---- */
.search-highlight {
    background-color: #ffeaa7;
    padding: 0 2px;
    border-radius: 2px;
}

/* ---- Footer ---- */
.footer-link {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--forest-pale);
}

.footer-desc {
    color: #9ea7b0;
}

/* ---- Breadcrumb ---- */
.breadcrumb-custom {
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.breadcrumb-custom a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.breadcrumb-custom a:hover {
    color: white;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0 3.5rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-search .form-control {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
    }

    .stat-section {
        margin-top: -2rem;
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-card .stat-value {
        font-size: 1.2rem;
    }

    .stat-card .stat-label {
        font-size: 0.72rem;
    }

    .detail-hero h1 {
        font-size: 1.6rem;
    }

    .mountain-nav {
        flex-direction: column;
    }

    .info-card {
        padding: 1rem;
    }

    #mountain-map {
        height: 250px;
    }

    .navbar .input-group {
        max-width: 100%;
        margin-top: 0.5rem;
    }

    .today-highlight {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .mountain-card .card-header-img {
        height: 100px;
        font-size: 2rem;
    }
}

/* ---- Card Animation ---- */
/* 인라인 style 대신 클래스로만 opacity 제어 → 우선순위 충돌 없음 */
.mountain-card.card-hidden {
    opacity: 0;
    transform: translateY(15px);
}

.mountain-card.card-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---- Utility ---- */
.text-forest {
    color: var(--forest) !important;
}

.bg-forest-light {
    background-color: var(--forest-bg) !important;
}

.btn-forest {
    background-color: var(--forest);
    border-color: var(--forest);
    color: white;
}

.btn-forest:hover {
    background-color: var(--forest-dark);
    border-color: var(--forest-dark);
    color: white;
}

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

.btn-outline-forest:hover {
    background-color: var(--forest);
    color: white;
}
