@charset "utf-8";
/* ============================================================
   1. COMMON (공통 기본 스타일)
   ============================================================ */
:root {
    --primary: #993333;
    --border: #eeeeee;
    --card-border: #dddddd;
    --text-tag: #444444; 
    --text-date: #777777; 
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans KR', sans-serif; background: #fff; color: #222; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; cursor: pointer; }

/* 100% 폭 레이아웃 */
.header-inner, .content-wrapper { width: 100%; padding: 0 4%; }

/* Header & Nav */
#header { border-bottom: 1px solid var(--border); padding-top: 25px; background: #fff; position: relative; z-index: 2500; }
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.logo a { color: var(--primary); font-size: 30px; font-weight: 900; letter-spacing: -1.5px; }

#gnb-pc { padding-bottom: 12px; }
#gnb-pc ul { display: flex; gap: 25px; list-style: none; flex-wrap: wrap; }
#gnb-pc a { font-size: 14px; font-weight: 700; color: #555; transition: 0.2s; }
#gnb-pc a:hover { color: var(--primary); }

.header-right { display: flex; align-items: center; gap: 25px; }
.search-form { display: flex; border-bottom: 2px solid #333; padding: 2px; }
.search-form input { border: none; padding: 6px; outline: none; width: 160px; font-size: 14px; background: transparent; }
.search-form button { background: none; border: none; font-weight: bold; color: var(--primary); cursor: pointer; }

/* 2. [FIX] PERFECT 3-LINE MENU BUTTON */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; width: 44px; height: 44px; position: relative; z-index: 2600; align-items: center; justify-content: center; }
.hamburger-box { width: 28px; height: 20px; position: relative; display: block; }
.hamburger-inner { top: 50%; transform: translateY(-50%); width: 28px; height: 2px; background-color: #333; position: absolute; transition: 0.3s; }
.hamburger-inner::before { content: ""; top: -8px; left: 0; width: 28px; height: 2px; background-color: #333; position: absolute; transition: 0.3s; }
.hamburger-inner::after { content: ""; bottom: -8px; left: 0; width: 28px; height: 2px; background-color: #333; position: absolute; transition: 0.3s; }

/* 햄버거 애니메이션 (X) */
.menu-toggle.active .hamburger-inner { transform: rotate(45deg); }
.menu-toggle.active .hamburger-inner::before { opacity: 0; top: 0; }
.menu-toggle.active .hamburger-inner::after { transform: rotate(-90deg); bottom: 0; }

/* 3. SLIM OVERLAY & SEARCH */
#mobile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff; z-index: 2000; opacity: 0; visibility: hidden; transition: 0.3s; }
#mobile-overlay.active { opacity: 1; visibility: visible; }
.overlay-scroll-box { height: 100%; overflow-y: auto; padding: 120px 8% 60px; }
.overlay-search-slim { border-bottom: 1px solid #ddd; margin-bottom: 30px; display: flex; align-items: center; }
.overlay-search-slim input { flex: 1; border: none; padding: 12px 0; font-size: 16px; outline: none; }
.overlay-search-slim button { background: none; border: none; font-size: 18px; cursor: pointer; padding-left: 10px; }
#gnb-mobile li { border-bottom: 1px solid #f2f2f2; list-style: none; }
#gnb-mobile a { display: block; padding: 18px 0; font-size: 18px; font-weight: 700; text-align: left; }

/* 4. LIST PAGE (인덱스 그리드) */
.content-wrapper { margin-top: 30px; }
.post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5%; }
.card { background: #fff; border: 1px solid var(--card-border); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: 0.3s; }
.card-image-wrap { width: 100%; height: 250px; overflow: hidden; padding:10px; }
.card-image { width: 100%; height: 100%; background-size: cover; background-position: center; }
.card-content { padding: 18px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.card-excerpt { font-size: 14px; color: #333; line-height: 1.5; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.card-tag { font-size: 13px; color: var(--text-tag); font-weight: 700; text-decoration: none; }
.card-date { font-size: 13px; color: var(--text-date); font-family: Arial, sans-serif; font-weight: 500; }

/* 5. BOX PAGINATION (독립 박스형) */
.pagination-wrap { width: 100%; margin: 50px 0 70px; padding-top: 25px; border-top: 1px solid #f2f2f2; clear: both; }
.pagination { display: flex; justify-content: center; gap: 8px; align-items: center; }
.pagination a { min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #666; border: 1px solid #e1e1e1; background: #fff; border-radius: 4px; transition: 0.2s; }
.pagination a.active { background: #f4f4f4; color: var(--primary); border-color: var(--primary); font-weight: 800; }
.pagination .arrow { padding: 0 15px; width: auto; font-size: 11px; font-weight: 900; }

/* 6. [NEW] VIEW PAGE (상세 보기 전용) */
.view-container { max-width: 900px; margin: 40px auto 100px; }
.view-header { margin-bottom: 40px; }
.view-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.view-title { font-size: 32px; font-weight: 900; line-height: 1.3; letter-spacing: -1.2px; }
.view-featured-image { margin-bottom: 40px; }
.view-featured-image img { width: 100%; height: auto; border-radius: 2px; }
.view-content { font-size: 17px; line-height: 1.8; color: #333; }
.view-content p { margin-bottom: 25px; }
.view-content h3 { font-size: 24px; font-weight: 700; margin: 40px 0 20px; border-left: 5px solid var(--primary); padding-left: 15px; }
.view-content img { max-width: 100%; height: auto; margin: 30px 0; display: block; }
.view-footer { margin-top: 60px; text-align: center; border-top: 1px solid #eee; padding-top: 40px; }
.btn-back { display: inline-block; padding: 12px 30px; background: #333; color: #fff; font-size: 14px; font-weight: 700; border-radius: 4px; }

/* 7. RESPONSIVE LOGIC */
@media (max-width: 1440px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) {
    #gnb-pc, .search-pc { display: none; }
    .menu-toggle { display: flex; } /* [확정] 여기서만 확실히 노출 */
    .post-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .view-title { font-size: 26px; }
}
@media (max-width: 640px) {
    .post-grid { grid-template-columns: 1fr; }
    .header-inner, .content-wrapper { padding: 0 6%; }
    .view-title { font-size: 22px; }
}