/*
Theme Name: Bulo365 Custom
Description: Bulo365 전용 커스텀 테마
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ========================================
   WordPress 관리자 도구바 완전 제거
======================================== */

/* WordPress 관리자 도구바 강제 숨김 */
#wpadminbar,
.admin-bar,
#wp-admin-bar-root-default,
#wp-admin-bar-top-secondary {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* body 상단 여백 제거 (관리자 도구바로 인한) */
body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* HTML 상단 여백 제거 */
html {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html.wp-toolbar {
    padding-top: 0 !important;
}

/* ========================================
   헤더 최적화 (최소 영역 사용)
======================================== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 8px 0; /* 기존보다 대폭 축소 */
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* 기존 20px → 15px로 축소 */
    display: flex;
    justify-content: center; /* 중앙 정렬로 변경 */
    align-items: center;
    height: auto; /* 고정 높이 제거 */
}

.site-logo {
    font-size: 20px; /* 기존 28px → 20px로 축소 */
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: -0.5px;
    padding: 4px 0; /* 최소 패딩 */
    line-height: 1.2; /* 줄간격 최소화 */
    transition: all 0.3s ease;
}

.site-logo:hover {
    color: #3498db;
    text-decoration: none;
    transform: scale(1.02);
}

/* ========================================
   메인 컨테이너 최적화
======================================== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px; /* 기존 40px → 20px로 축소 */
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.post-count {
    color: #6c757d;
    font-size: 16px;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

/* 포스트 그리드 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    margin-top: 0; /* 상단 여백 제거 */
    padding-top: 10px; /* 최소 패딩만 유지 */
}

/* 포스트 카드 */
.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.post-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

/* 포스트 콘텐츠 */
.post-content {
    padding: 25px;
}

.post-category {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #3498db;
}

.post-excerpt {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #adb5bd;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
}

/* 더보기 버튼 */
.load-more-container {
    text-align: center;
    margin-top: 50px;
}

.load-more-btn {
    background: #3498db;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* ========================================
   개별 글 페이지 스타일
======================================== */
.single-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px; /* 기존 40px → 20px로 축소 */
    background: #fff;
    min-height: calc(100vh - 36px); /* 헤더 높이 변경에 맞춤 */
}

.single-post {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

/* 글 헤더 */
.post-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f1f3f4;
}

.post-category-single {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title-single {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 20px;
    word-break: keep-all;
}

.post-meta-single {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #6c757d;
    font-size: 14px;
    flex-wrap: wrap;
}

/* 대표 이미지 */
.post-featured-image {
    margin-bottom: 40px;
    text-align: center;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 글 내용 스타일링 */
.post-content-single {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.post-content-single h1,
.post-content-single h2,
.post-content-single h3,
.post-content-single h4,
.post-content-single h5,
.post-content-single h6 {
    color: #2c3e50;
    margin: 30px 0 20px 0;
    font-weight: 600;
}

.post-content-single h2 {
    font-size: 24px;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.post-content-single h3 {
    font-size: 20px;
}

.post-content-single p {
    margin-bottom: 20px;
    word-break: keep-all;
}

.post-content-single ul,
.post-content-single ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content-single li {
    margin-bottom: 8px;
}

.post-content-single blockquote {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    margin: 30px 0;
    padding: 20px 25px;
    font-style: italic;
    color: #555;
}

.post-content-single img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.post-content-single table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.post-content-single th,
.post-content-single td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.post-content-single th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

/* 페이징 스타일 */
.pagination-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-numbers:hover {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
    text-decoration: none;
}

.page-numbers.current {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

.page-numbers.prev,
.page-numbers.next {
    font-weight: 600;
    padding: 8px 15px;
}

/* 광고 컨테이너 스타일 */
.ad-container {
    margin: 30px 0;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ad-container h4 {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-item {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
}

/* 태그 */
.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

.post-tags a {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    margin: 0 5px 5px 0;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: #3498db;
    color: #fff;
}

/* 글 네비게이션 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
}

.post-navigation a {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 45%;
}

.post-navigation a:hover {
    background: #3498db;
    color: #fff;
    transform: translateY(-2px);
}

.nav-previous a {
    text-align: left;
}

.nav-next a {
    text-align: right;
}

/* 관련 글 */
.related-posts {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.related-posts h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.related-post-item:hover {
    transform: translateY(-3px);
}

.related-post-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-post-item h4 {
    padding: 15px;
    font-size: 14px;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
}

.related-post-item a {
    text-decoration: none;
    color: inherit;
}

/* 홈으로 버튼 */
.back-to-home {
    text-align: center;
    margin-bottom: 40px;
}

.home-btn {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

/* ========================================
   반응형 디자인 (모바일 최적화)
======================================== */

/* 모바일에서 관리자 도구바 완전 제거 */
@media screen and (max-width: 782px) {
    #wpadminbar {
        display: none !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    body {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .site-header {
        top: 0 !important;
        padding: 6px 0; /* 모바일에서 더욱 축소 */
    }
    
    .site-logo {
        font-size: 18px; /* 모바일에서 더 작게 */
        padding: 2px 0;
    }
    
    .header-container {
        padding: 0 10px; /* 좌우 패딩 최소화 */
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-container {
        padding: 15px 15px; /* 모바일에서 더욱 축소 */
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .single-container {
        padding: 15px 15px; /* 모바일에서 더욱 축소 */
    }
    
    .single-post {
        padding: 25px 20px;
    }
    
    .post-title-single {
        font-size: 24px;
    }
    
    .post-meta-single {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .post-navigation a {
        max-width: 100%;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* 초소형 화면에서 더욱 최적화 */
@media (max-width: 480px) {
    .site-header {
        padding: 4px 0; /* 초소형 화면에서 더욱 축소 */
    }
    
    .header-container {
        padding: 0 10px; /* 좌우 패딩 최소화 */
    }
    
    .site-logo {
        font-size: 16px; /* 더 작게 */
        padding: 1px 0;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .post-title {
        font-size: 16px;
    }
    
    .main-container {
        padding: 10px 10px; /* 최소 패딩 */
    }
    
    .single-container {
        padding: 10px 10px; /* 최소 패딩 */
    }
}





/* 파일 맨 아래에 추가 */
#dynamic-header-title {
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 300px !important;
}

@media (max-width: 768px) {
    #dynamic-header-title {
        max-width: 200px !important;
        font-size: 16px !important;
    }
}


