/* ========================================
   GeneratePress 커스텀 메인페이지 스타일
   파일명: custom-style.css
   가로폭: 750px로 최적화
======================================== */

/* Google 폰트 import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;800&display=swap');

/* 전체 폰트 설정 */
body, html {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* 전체 컨테이너 스타일 - 750px로 조정 */
.site-main {
    max-width: 750px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fafafa;
}

/* 페이지 헤더 */
.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 20px 0;
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-family: 'Noto Sans KR', sans-serif;
}

.page-subtitle {
    font-size: 18px;
    color: #7f8c8d;
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
}

/* 포스트 목록 컨테이너 */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 개별 포스트 아이템 */
.post-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 12px 12px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-item:hover::before {
    opacity: 1;
}

/* 포스트 콘텐츠 영역 */
.post-content {
    flex: 1;
    min-width: 0;
}

/* 포스트 메타 정보 */
.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
    font-family: 'Noto Sans KR', sans-serif;
}

.post-date {
    font-weight: 500;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.post-category {
    background: #e3f2fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* 포스트 제목 */
.post-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #2c3e50;
    font-family: 'Noto Sans KR', sans-serif;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.post-title a:hover {
    color: #3498db;
}

/* 포스트 요약 */
.post-excerpt {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
}

/* 더보기 버튼 */
.read-more {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
    border: none;
    cursor: pointer;
}

.read-more:hover {
    background: #2980b9;
    transform: translateY(-2px);
    color: white !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* 포스트 썸네일 */
.post-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* 썸네일이 없는 경우 기본 배경 */
.post-thumbnail:empty::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.1;
}

/* 페이지네이션 스타일 */
.pagination-wrapper {
    margin-top: 60px;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 5px;
    background: #f8f9fa;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
    border: 1px solid #e9ecef;
}

.page-numbers:hover,
.page-numbers.current {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    border-color: #3498db;
}

.page-numbers.prev,
.page-numbers.next {
    font-weight: 600;
}

/* 게시글이 없는 경우 */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    color: #7f8c8d;
    font-family: 'Noto Sans KR', sans-serif;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.no-posts h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 700;
}

/* 로딩 애니메이션 */
.post-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.post-item:nth-child(1) { animation-delay: 0.1s; }
.post-item:nth-child(2) { animation-delay: 0.2s; }
.post-item:nth-child(3) { animation-delay: 0.3s; }
.post-item:nth-child(4) { animation-delay: 0.4s; }
.post-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   반응형 디자인 - 태블릿
======================================== */
@media (max-width: 768px) {
    .site-main {
        padding: 15px 10px !important;
        background: #fafafa !important;
    }
    
    .page-header {
        margin-bottom: 30px !important;
        text-align: center !important;
    }
    
    .page-title {
        font-size: 28px !important;
        margin-bottom: 10px !important;
    }
    
    .page-subtitle {
        font-size: 16px !important;
    }
    
    .post-item {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 20px !important;
        margin: 0 !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
    }
    
    .post-thumbnail {
        width: 100% !important;
        height: 180px !important;
        order: -1 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    .post-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .post-content {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .post-title {
        font-size: 22px !important;
        line-height: 1.4 !important;
        margin-bottom: 12px !important;
        font-weight: 700 !important;
    }
    
    .post-excerpt {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
        -webkit-line-clamp: 4 !important;
        color: #333333 !important;
    }
    
    .post-meta {
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
        font-size: 13px !important;
    }
    
    .post-date {
        font-size: 12px !important;
        padding: 4px 10px !important;
    }
    
    .post-category {
        font-size: 12px !important;
        padding: 4px 10px !important;
    }
    
    .read-more {
        padding: 10px 18px !important;
        font-size: 14px !important;
        border-radius: 20px !important;
        display: inline-block !important;
        margin-top: 5px !important;
    }
    
    .posts-container {
        gap: 12px !important;
    }
    
    .pagination-wrapper {
        margin-top: 40px !important;
    }
    
    .page-numbers {
        padding: 10px 14px !important;
        margin: 0 3px !important;
        font-size: 15px !important;
    }
}

/* ========================================
   반응형 디자인 - 모바일
======================================== */
@media (max-width: 480px) {
    body, html {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    .site-main {
        padding: 12px 10px !important;
        background: #fafafa !important;
    }
    
    .page-header {
        margin-bottom: 25px !important;
        padding: 15px 0 !important;
    }
    
    .page-title {
        font-size: 26px !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
        font-weight: 800 !important;
    }
    
    .page-subtitle {
        font-size: 16px !important;
        color: #7f8c8d !important;
        line-height: 1.4 !important;
    }
    
    .post-item {
        padding: 18px !important;
        margin: 0 !important;
        border-radius: 12px !important;
        gap: 15px !important;
        background: #ffffff !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    }
    
    .post-thumbnail {
        height: 180px !important;
        border-radius: 8px !important;
    }
    
    .post-title {
        font-size: 20px !important;
        line-height: 1.4 !important;
        margin-bottom: 12px !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
    }
    
    .post-excerpt {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
        -webkit-line-clamp: 4 !important;
        color: #444444 !important;
    }
    
    .post-meta {
        gap: 8px !important;
        margin-bottom: 12px !important;
        font-size: 13px !important;
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .post-date {
        font-size: 12px !important;
        padding: 3px 8px !important;
        border-radius: 12px !important;
    }
    
    .post-category {
        font-size: 12px !important;
        padding: 3px 8px !important;
        border-radius: 12px !important;
    }
    
    .read-more {
        padding: 8px 16px !important;
        font-size: 14px !important;
        border-radius: 18px !important;
        font-weight: 600 !important;
    }
    
    .posts-container {
        gap: 12px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .pagination-wrapper {
        margin-top: 35px !important;
        padding: 0 10px !important;
    }
    
    .page-numbers {
        padding: 8px 12px !important;
        margin: 0 3px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }
    
    .no-posts {
        padding: 40px 20px !important;
        margin: 20px 0 !important;
        border-radius: 12px !important;
    }
    
    .no-posts h2 {
        font-size: 22px !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }
}

/* ========================================
   초소형 모바일
======================================== */
@media (max-width: 320px) {
    .site-main {
        padding: 10px 8px !important;
    }
    
    .page-title {
        font-size: 24px !important;
        line-height: 1.2 !important;
    }
    
    .post-item {
        padding: 15px !important;
        border-radius: 10px !important;
    }
    
    .post-title {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }
    
    .post-excerpt {
        font-size: 14px !important;
        line-height: 1.5 !important;
        -webkit-line-clamp: 3 !important;
    }
    
    .post-thumbnail {
        height: 150px !important;
    }
    
    .posts-container {
        gap: 10px !important;
    }
}

/* ========================================
   라이트모드 강제 설정
======================================== */
body, html {
    background: #fafafa !important;
    color: #333333 !important;
    color-scheme: light !important;
}

.site-main {
    background: #fafafa !important;
}

/* 모든 포스트 관련 요소 라이트모드 강제 설정 */
.post-item,
.post-item * {
    background: #ffffff !important;
    color: #333333 !important;
}

.post-title,
.post-title a {
    color: #2c3e50 !important;
}

.post-title a:hover {
    color: #3498db !important;
}

.post-excerpt {
    color: #555555 !important;
}

.post-meta,
.post-meta * {
    color: #888888 !important;
}

.post-date {
    color: #7f8c8d !important;
    background: #f8f9fa !important;
}

.post-category {
    color: #1976d2 !important;
    background: #e3f2fd !important;
}

.page-title {
    color: #2c3e50 !important;
}

.page-subtitle {
    color: #7f8c8d !important;
}

.no-posts {
    background: #ffffff !important;
    color: #7f8c8d !important;
}

.no-posts h2 {
    color: #2c3e50 !important;
}

/* 더보기 버튼 배경 고정 */
.read-more {
    background: #3498db !important;
    color: #ffffff !important;
}

.read-more:hover {
    background: #2980b9 !important;
    color: #ffffff !important;
}

/* 접근성 개선 */
.post-item:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.read-more:focus {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}

/* 스크롤바 커스터마이징 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}