@charset "UTF-8";

/* ==========================================================================
   1. 기본 설정 (Base & Reset)
   ========================================================================== */
body, html {
    margin: 0; padding: 0;
    font-family: 'Pretendard', -apple-system, sans-serif;
    overflow-x: hidden; scroll-behavior: smooth; color: #333;
}

/* 배경색 유틸리티 클래스 (페이지마다 다른 배경색 제어) */
.bg-white { background: #fff; }     /* 서브페이지용 */
.bg-light { background: #fdfdfd; }  /* 메인페이지용 */

/* ==========================================================================
   2. 네비게이션 바 (Navigation & Menu)
   ========================================================================== */
nav { display: flex; justify-content: space-between; align-items: center; padding: 0 50px; height: 90px; background: rgba(255,255,255,0.98); position: fixed; top: 0; left: 0; right: 0; z-index: 2000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.logo { display: flex; align-items: center; text-decoration: none; cursor: pointer; height: 100%; }
.logo img { height: 50px; margin-right: 12px; display: block; }
.logo span { font-size: 22px; font-weight: 800; color: #2c3e50; white-space: nowrap; }

.menu { display: flex; list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; margin-left: 30px; height: 90px; display: flex; align-items: center; }
.menu > li > a { text-decoration: none; font-size: 16px; font-weight: 600; color: #333; transition: 0.3s; }
.menu > li:hover > a { color: #253568; }

/* 드롭다운 서브메뉴 */
.submenu { display: none; position: absolute; top: 90px; left: 50%; transform: translateX(-50%); background: white; min-width: 170px; list-style: none; padding: 10px 0; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-radius: 0 0 8px 8px; border-top: 2px solid #253568; }
.submenu li a { display: block; padding: 12px 20px; text-decoration: none; color: #555; font-size: 14px; text-align: center; transition: 0.2s; }
.submenu li a:hover { background: #f8f9fa; color: #253568; }
.menu > li:hover .submenu { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ==========================================================================
   3. 헤더 영역 (메인 Hero & 서브 Sub-header)
   * 배경 이미지는 개별 HTML에서 설정합니다.
   ========================================================================== */
/* 메인페이지 전용 헤더 */
.hero { height: 60vh; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: white; text-align: center; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 10px; font-weight: 700; letter-spacing: -1px; }
.hero-content p { font-size: 1.4rem; font-weight: 300; letter-spacing: 2px; }

/* 서브페이지 전용 헤더 */
.sub-header { background-size: cover; background-position: center; padding: 220px 0 120px; text-align: center; color: white; }
.sub-header h1 { font-size: 42px; font-weight: 700; margin: 0; letter-spacing: -1px; }

/* ==========================================================================
   4. 공통 팝업 모달 (Modal)
   ========================================================================== */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 3000; align-items: center; justify-content: center; }
.modal-content { background: white; width: 90%; border-radius: 15px;
                 max-height: 90vh; /* 화면 전체 높이의 90%까지만 커지도록 제한 제한 (vh = viewport height) */
                 overflow-y: auto; /* 내용이 제한 높이를 넘어가면 세로 스크롤바 생성 */} /* 공통 속성만 남김 */

/* 모달 사이즈 확장 클래스 */
.modal-lg { max-width: 600px; padding: 40px; } /* 게시판 글쓰기 등 넓은 폼 */
.modal-sm { max-width: 400px; padding: 30px; } /* 사진 등록 등 좁은 폼 */

.modal-content h4 { margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px;}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, sans-serif;
    font-size: 15px;
}
.form-group textarea { height: 200px; resize: none; }
.form-group input::placeholder,
.form-group textarea::placeholder {
    font-family: 'Pretendard', -apple-system, sans-serif;
    color: #999;
    font-size: 15px;
}

.modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 30px; }
.btn-cancel { background: #eee; color: #666; padding: 12px 25px; border-radius: 5px; border: none; cursor: pointer; }
.btn-submit { background: #253568; color: white; padding: 12px 25px; border-radius: 5px; border: none; cursor: pointer; }

/* ==========================================================================
   5. 푸터 (Footer)
   ========================================================================== */
footer { background: #222; color: #999; padding: 60px 50px; font-size: 14px; line-height: 1.8; border-top: 1px solid #333; text-align: left; }
.footer-info b { color: #fff; font-size: 16px; margin-bottom: 10px; display: inline-block; }
/* 관리자로그인 링크 영역 추가 */
.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333; /* 푸터 내부 구분선 */
    display: flex;
    justify-content: space-between; /* 카피라이트와 로그인 버튼을 양끝으로 */
    align-items: center;
}
.admin-link-area {
    text-align: right;
}
.admin-login-link {
    font-size: 11px;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.admin-login-link:hover {
    color: #777;
    text-decoration: underline;
}

/* ==========================================================================
   6. 공통 모바일 반응형 (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
    nav { padding: 10px 20px; height: auto; flex-direction: column; position: fixed; }
    .logo { height: 50px; }
    .menu { margin-top: 5px; flex-wrap: wrap; justify-content: center; padding-bottom: 15px; }
    .menu > li { margin: 0 5px; height: 35px; }
    .menu > li > a { font-size: 14px; }

    .hero-content h1 { font-size: 1.8rem; word-break: keep-all; }
    .sub-header {
        padding: 200px 20px 40px !important; /* 위아래 고정 여백을 확 줄여줍니다 */
        background-size: cover;    /* 이미지가 영역에 맞게 꽉 차도록 */
        background-position: center; /* 이미지의 중심이 보이도록 */
        min-height: 100px;        /* 최소 높이를 보장하여 이미지가 너무 납작해지지 않게 함 */
    }
    .sub-header h1 {
        font-size: 24px;         /* 글자 크기도 모바일에 맞게 조절 */
        word-break: keep-all;    /* 단어가 중간에 끊기지 않게 설정 */
    }

    .board-table td:last-child {
        font-size: 13px;
        width: 90px !important;
        padding-left: 5px;
        padding-right: 5px;
        white-space: nowrap; /* 날짜가 두 줄로 꺾이지 않게 고정 */
    }
    .board-table td.title {
        text-align: left;
        padding-left: 10px;
    }

    .modal-lg, .modal-sm { padding: 30px 20px; } /* 모바일에서는 패딩 통일 */
    footer { padding: 40px 20px; }

    .submenu {
        top: 35px !important; /* 데스크탑의 90px 높이를 모바일 메뉴 높이(35px)로 바짝 끌어올립니다 */
        min-width: 120px;     /* 모바일 화면에 맞게 박스 너비도 살짝 다이어트 */
    }

    .submenu li a {
        padding: 10px;        /* 글씨 주변 여백도 모바일에 맞게 조절 */
        font-size: 13px;
    }
}