/* ============================================================
   1. 글로벌 설정 & 폰트 (Pretendard 적용)
============================================================ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

body, button, input, select, textarea, h1, h2, h3, h4, h5, h6 {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
    word-break: keep-all;
}

/* ============================================================
   2. 헤더 & 상단 네비게이션 (슬림 디자인)
============================================================ */
.custom-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo a {
    font-size: 22px;
    font-weight: 800;
    color: #1E3A8A;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.site-nav a {
    margin-left: 20px;
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}
.site-nav a:hover { color: #EA580C; }

/* 모바일 헤더 슬림화 최적화 */
@media (max-width: 768px) {
    .site-header { padding: 8px 0 !important; }
    .header-container { flex-direction: row; padding: 0 15px; justify-content: space-between; }
    .site-nav { margin-top: 0; }
    .site-nav a { margin-left: 10px; font-size: 13px; }
    .site-logo a { font-size: 18px; }
    .main-title { font-size: 18px !important; }
}

/* ============================================================
   3. 메인 페이지 (히어로 & 카테고리)
============================================================ */
.custom-home-hero {
    background-color: #f9fafb;
    padding: 50px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
}
.custom-home-hero h1 { font-size: 30px; color: #1e3a8a; margin-bottom: 15px; font-weight: 800; }
.custom-home-hero p { color: #4b5563; font-size: 16px; margin-bottom: 25px; }
.hero-search input { 
    width: 300px; max-width: 70%; padding: 12px; 
    border: 1px solid #ddd; border-radius: 4px 0 0 4px;
    outline: none;
}
.hero-search button {
    padding: 12px 20px; background: #EA580C; color: #fff;
    border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: bold;
}

/* 카테고리 네비게이션 */
.home-category-nav { margin: -35px auto 40px; max-width: 900px; padding: 0 20px; position: relative; z-index: 10; }
.category-grid { 
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; 
    background: #fff; padding: 15px; border-radius: 12px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.06); 
}
.cat-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; padding: 10px; transition: 0.2s; }
.cat-item:hover { transform: translateY(-3px); }
.cat-icon { font-size: 24px; margin-bottom: 5px; }
.cat-name { font-size: 13px; font-weight: 700; color: #374151; }

@media (max-width: 768px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .custom-home-hero h1 { font-size: 22px; }
}

/* ============================================================
   4. 메인 포스트 그리드 (카드 디자인)
============================================================ */
.home-grid-container { margin-top: 30px; }
.section-title { font-size: 20px; margin-bottom: 20px; border-left: 4px solid #ea580c; padding-left: 12px; font-weight: 800; color: #111827; }
.custom-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.info-card { background: #fff; padding: 22px; border: 1px solid #f1f1f1; border-radius: 10px; transition: 0.3s; }
.info-card:hover { border-color: #1e3a8a; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.card-tag { display: inline-block; background: #eef2ff; color: #4338ca; font-size: 11px; padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; font-weight: 700; }
.info-card h3 { font-size: 17px; margin-bottom: 8px; color: #111; font-weight: 700; line-height: 1.4; }
.info-card p { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 15px; }
.more-link { font-size: 12px; color: #ea580c; font-weight: 800; text-decoration: none; }

@media (max-width: 768px) {
    .custom-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   5. 우측 사이드바 (검색창 & 제휴 배너)
============================================================ */
.custom-sidebar { padding-left: 25px; }
.sidebar-search { margin-bottom: 25px; display: flex; width: 100%; }
.sidebar-search input { width: 75%; padding: 10px; border: 1px solid #d1d5db; border-radius: 4px 0 0 4px; font-size: 14px; }
.sidebar-search button { width: 25%; padding: 10px; background-color: #1f2937; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; }

/* 제휴 배너 (세로로 길게 최적화) */
.sticky-banner { position: -webkit-sticky; position: sticky; top: 20px; }
.banner-content {
    background-color: #1E3A8A;
    padding: 60px 20px !important; /* 세로 볼륨 확장 */
    text-align: center;
    border-radius: 12px;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 420px; /* 세로 길이 확보 */
    transition: 0.3s;
}
.banner-content:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.15); }
.banner-content h3 { color: #ffffff !important; font-size: 19px !important; margin: 0 0 15px 0 !important; font-weight: 800 !important; line-height: 1.3 !important; }
.banner-content p { font-size: 14px; margin-bottom: 25px; color: #e5e7eb; line-height: 1.6; word-break: keep-all; }
.banner-content .btn { 
    display: block; 
    background-color: #EA580C; 
    color: white !important; 
    padding: 14px 10px; 
    border-radius: 6px; 
    font-weight: 800; 
    text-decoration: none;
    font-size: 15px;
}

@media (max-width: 768px) {
    .custom-sidebar { padding-left: 0; margin-top: 40px; }
    .banner-content { min-height: auto; padding: 40px 20px !important; }
}

/* ============================================================
   6. 푸터 최적화 (슬림 & 중앙 정렬)
============================================================ */
/* 기본 푸터 바 제거 및 커스텀 푸터 압축 */
.site-footer {
    padding: 25px 0 !important;
    background-color: #111827 !important;
    color: #9ca3af;
    margin-top: 50px;
}
.custom-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* 가로 중앙 */
    text-align: center;
    width: 100%;
}
.custom-footer-content p { 
    margin: 4px 0 !important; 
    font-size: 13px; 
    line-height: 1.4; 
    color: #9ca3af; 
}
/* 저작권 표시 라인 */
.custom-footer-content .copyright {
    margin-top: 12px !important;
    font-size: 11px;
    color: #4b5563;
}
/* 하단 링크 숨기기 */
.footer-bar { display: none !important; }