/* /resources/static/css/main.css */

/* ========================================
   1. 전역 변수 및 기본 스타일
   ======================================== */
:root {
    --primary-color: #76c498;
    --bg-color:     #f5f5f5;
    --text-color:   #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'NanumSquareNeo', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   2. 사이트 헤더 (모든 페이지 공통)
   ======================================== */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    padding: 10px 20px;
}

.site-header .logo img {
    height: 40px;
}

.site-header .nav-menu a {
    color: #fff;
    margin-left: 20px;
    font-weight: 500;
}

/* ========================================
   3. 메인 페이지 전용 스타일 (Hero 섹션)
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    background: url('/img/background2.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    /* 수정: 배경이 밝으므로 어두운 텍스트 색상으로 변경 */
    color: var(--text-color);
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn-start {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-start:hover {
    opacity: 0.9;
}


/* ========================================
   4. 기타 공통 컴포넌트
   ======================================== */

/* 기본 버튼 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    margin-right: 0.5rem;
    border: none;
    transition: opacity 0.2s, transform 0.2s ease;
}

.btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* 주요 버튼 (상세보기, 목록가기 등) */
.btn-primary, .btn-detail, .btn-back, .btn-view-map {
    background: var(--primary-color);
    color: #fff;
}

/* 삭제 버튼 */
.btn-delete {
    background: #e74c3c;
    color: #fff;
}

/* 페이지 섹션 제목 */
.section-title {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 4px;
    margin-top: 40px;
    margin-bottom: 1.5rem;
}

/* float 해제 유틸 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}


/* ========================================
   5. 우측 하단 고정 스크롤 버튼
   ======================================== */
.scroll-btn {
    position: fixed;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 999;
}

.scroll-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.scroll-top {
    bottom: 6.5rem;
}

.scroll-bottom {
    bottom: 2rem;
}


/* ========================================
   6. 인쇄(PDF 저장) 전용 스타일
   ======================================== */
@media print {
    /* 버튼 및 UI 요소 숨기기 */
    .btn, .btn-delete, .btn-back, .scroll-btn, #btnPrintPrint, .back-button {
        display: none !important;
    }

    /* 헤더, 푸터 등 레이아웃 숨기기 */
    header, footer, .sidebar, .site-header {
        display: none !important;
    }

    /* 본문 영역만 인쇄되도록 조정 */
    body {
        margin: 0;
        padding: 0;
    }

    .record-detail {
        margin: 0;
        padding: 0;
        width: 100%;
    }
}

/* ========================================
   5. 우측 하단 고정 스크롤 버튼 (기존 코드)
   ======================================== */
.scroll-btn {
    position: fixed;
    right: 1rem;
    /* ... (나머지 스타일) ... */
}
.scroll-top {
    bottom: 6.5rem;
}
.scroll-bottom {
    bottom: 2rem;
}

/* ▼▼▼▼▼ 랭킹 버튼 위치 추가 (스크롤 버튼과 겹치지 않게) ▼▼▼▼▼ */
.ranking-btn {
    bottom: 2rem; /* 화면 맨 아래에서 2rem 위 */
    right: 1rem; /* 오른쪽 끝에서 1rem만 떨어지게 조정 */
}
/* ▲▲▲▲▲ 랭킹 버튼 위치 추가 끝 ▲▲▲▲▲ */