/* D8 Custom Blog Styles */

/* Blog Archive Grid Layout */
.wp-block-query-loop,
.wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 각 포스트 카드 스타일 */
.wp-block-post {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex !important;
    flex-direction: column;
}

.wp-block-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

/* 썸네일 스타일 */
.wp-block-post-featured-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin: 0 !important;
}

.wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.05);
}

/* 컨텐츠 영역 */
.wp-block-post-title,
.wp-block-post-excerpt,
.wp-block-post-date,
.wp-block-post-terms {
    padding: 0 1.5rem;
}

.wp-block-post-title {
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}

.wp-block-post-title a {
    color: #2d3748 !important;
    text-decoration: none !important;
}

.wp-block-post-title a:hover {
    color: #667eea !important;
}

.wp-block-post-excerpt {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem !important;
}

.wp-block-post-date,
.wp-block-post-terms {
    font-size: 0.875rem;
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.wp-block-post-terms a {
    color: #667eea;
    text-decoration: none;
    background: #f0f4ff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

/* 페이지네이션 */
.wp-block-query-pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem !important;
    grid-column: 1 / -1;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 600;
    transition: all 0.2s;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination .page-numbers:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.wp-block-query-pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 아카이브 헤더 스타일 */
.wp-block-query-title,
.archive-title,
.page-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin-bottom: 2rem !important;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Blog Post Content Styles */
.entry-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    line-height: 1.8;
    color: #2d3748;
}

.entry-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 2.5rem 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #667eea;
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 2rem 0 1rem 0;
    padding-left: 0.75rem;
    border-left: 4px solid #667eea;
}

.entry-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4a5568;
    margin: 1.5rem 0 0.75rem 0;
}

.entry-content p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.entry-content ul li {
    list-style-type: none;
    position: relative;
    padding-left: 1.5rem;
}

.entry-content ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.entry-content strong {
    color: #2d3748;
    font-weight: 600;
}

.entry-content blockquote {
    border-left: 4px solid #667eea;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f7fafc;
    font-style: italic;
    color: #4a5568;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.entry-content table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.entry-content table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.entry-content table tr:hover {
    background: #f7fafc;
}

.entry-content [style*="background: #f0f9ff"],
.entry-content [style*="background: #fffbeb"],
.entry-content [style*="background: #c6f6d5"],
.entry-content [style*="background: #fff5f5"],
.entry-content [style*="background: #fef3c7"],
.entry-content [style*="background: #d1fae5"] {
    padding: 1.5rem !important;
    border-radius: 8px !important;
    margin: 1.5rem 0 !important;
}

.entry-content a[style*="padding"] {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.entry-content a[style*="padding"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* 반응형 - 태블릿 */
@media (max-width: 1024px) {
    .wp-block-query-loop,
    .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* 반응형 - 모바일 */
@media (max-width: 640px) {
    .wp-block-query-loop,
    .wp-block-post-template {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .wp-block-post-featured-image {
        height: 180px;
    }

    .entry-content h2 {
        font-size: 1.5rem;
    }

    .entry-content h3 {
        font-size: 1.25rem;
    }

    .entry-content table {
        font-size: 0.9rem;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 0.5rem;
    }
}
