/* 리셋 CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 메인 레이아웃 */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* 컨테이너 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 메인 콘텐츠 영역 */
.content-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.blog-title a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.blog-title a:hover {
    opacity: 0.8;
}

.blog-description {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 네비게이션 */
.navigation {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    flex: 1;
    max-width: 200px;
}

.nav-menu a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: #333;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background-color: #667eea;
    color: white;
}

/* 검색창 */
.search-section {
    margin-bottom: 40px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.search-form:focus-within {
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.search-input {
    flex: 1;
    padding: 18px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333;
    background: transparent;
}

.search-input::placeholder {
    color: #999;
    font-weight: 300;
}

.search-button {
    padding: 18px 30px;
    background: #667eea;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: #5a6fd8;
}

/* s_search 태그 스타일 */
.s_search {
    display: flex !important;
    gap: 10px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
    transition: box-shadow 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.s_search:focus-within {
    box-shadow: 0 6px 25px rgba(0,0,0,0.12) !important;
}

.s_search input[type="text"] {
    flex: 1 !important;
    padding: 18px 20px !important;
    border: none !important;
    outline: none !important;
    font-size: 1rem !important;
    color: #333 !important;
    background: transparent !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.s_search input[type="text"]::placeholder {
    color: #999 !important;
    font-weight: 300 !important;
}

.s_search button[type="submit"] {
    padding: 18px 30px !important;
    background: #667eea !important;
    color: white !important;
    border: none !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    white-space: nowrap !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.s_search button[type="submit"]:hover {
    background: #5a6fd8 !important;
}

/* 추가 스타일 - 티스토리 기본 스타일 덮어쓰기 */
.s_search fieldset {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 10px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
}

.s_search fieldset:focus-within {
    box-shadow: 0 6px 25px rgba(0,0,0,0.12) !important;
}

/* 포스트 그리드 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* 포스트 카드 */
.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

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

.post-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

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

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

.post-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-title {
    font-size: 1.6rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

.post-card .post-title a:hover {
    color: #667eea;
}

.post-card .post-meta {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #666;
}

/* 목록+내용 설정에서 게시글 내용 제한 */
.post-card .post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.8em;
}

/* 게시글 내용 제한 */
.post-card .excerpt-text {
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    max-height: 6.4em !important;
    line-height: 1.6 !important;
    color: #666 !important;
    margin-bottom: 15px !important;
    word-break: break-word !important;
    text-overflow: ellipsis !important;
}

/* 티스토리 자동 렌더링된 내용 완전히 숨기기 */
.post-card .entry-content,
.post-card .entry-content *,
.post-card .post-content > *:not(.excerpt-text),
.post-card .hidden-content,
.post-card .entry,
.post-card .entry *,
.post-card .post-excerpt > *:not(.excerpt-text),
.post-card .excerpt-text > *:not(:first-child),
.post-card .post-content,
.post-card .post-content *,
.post-card .entry,
.post-card .entry *,
.post-card .content,
.post-card .content *,
.post-card .body,
.post-card .body * {
    display: none !important;
}

/* 게시글 내용이 길 때 말줄임표 추가 */
.post-card .excerpt-text::after {
    content: '...' !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    background: white !important;
    padding-left: 4px !important;
}

/* 추가 안전장치 - 티스토리 자동 렌더링 방지 */
.post-card > *:not(.post-card-image):not(.post-card-content) {
    display: none !important;
}

/* 검색 결과에서 게시물 본문 숨기기 */
.post-card .excerpt-text p,
.post-card .excerpt-text div,
.post-card .excerpt-text span,
.post-card .excerpt-text br {
    display: none !important;
}

.post-card .excerpt-text {
    content: attr(data-summary) !important;
}

/* 포스트 스타일 */
.post {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.post-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

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

.post-title a:hover {
    color: #667eea;
}

/* 카테고리 스타일 */
.post-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
    display: inline-block;
}

/* 메타 정보 스타일 개선 */
.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #666;
    flex-wrap: wrap;
}

/* 태그 반복 방지 - 제거됨 (모든 게시물에 동일한 태그가 표시되는 문제 해결) */

/* 태그 스타일 - 강화된 버전 */
.post-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 15px !important;
}

.post-tags .tag,
.post-tags a.tag,
.post-detail .post-tags .tag,
.post-detail .post-tags a.tag,
.s_tag_label .tag,
.s_tag_label a.tag {
    background: #f0f0f0 !important;
    color: #666 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    max-width: 500px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    margin: 2px !important;
}

.post-tags .tag:hover,
.post-tags a.tag:hover,
.post-detail .post-tags .tag:hover,
.post-detail .post-tags a.tag:hover,
.s_tag_label .tag:hover,
.s_tag_label a.tag:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
}

/* 태그가 없을 때 태그 섹션 숨기기 */
.post-tags:empty {
    display: none !important;
}

/* 태그가 없는 경우 태그 섹션 숨기기 */
.post-tags:not(:has(.tag)) {
    display: none !important;
}

/* 태그 개수 제한 (최대 3개) */
.post-tags .tag:nth-child(n+4) {
    display: none !important;
}

/* 태그가 3개 이상일 때 말줄임표 */
.post-tags:has(.tag:nth-child(4))::after {
    content: '...' !important;
    color: #999 !important;
    font-size: 0.8rem !important;
    margin-left: 4px !important;
}

/* 티스토리 기본 태그 스타일 덮어쓰기 */
.s_tag_label,
.s_tag_label *,
.s_tag_label a,
.s_tag_label span {
    display: inline-block !important;
    background: #f0f0f0 !important;
    color: #666 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    margin: 2px !important;
    transition: all 0.3s ease !important;
}

.s_tag_label:hover,
.s_tag_label *:hover,
.s_tag_label a:hover,
.s_tag_label span:hover {
    background: #667eea !important;
    color: white !important;
}

/* 포스트 상세 페이지 스타일 */
.post-detail {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.post-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.post-detail .post-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.post-detail .post-meta {
    margin-bottom: 15px;
}

.post-detail .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.post-detail .post-content h1,
.post-detail .post-content h2,
.post-detail .post-content h3,
.post-detail .post-content h4,
.post-detail .post-content h5,
.post-detail .post-content h6 {
    margin: 30px 0 15px 0;
    color: #333;
}

.post-detail .post-content p {
    margin-bottom: 20px;
}

.post-detail .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-detail .post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.post-detail .post-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.post-detail .post-content pre {
    background: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

/* 소셜 공유 */
.social-share {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.social-share h3 {
    margin-bottom: 20px;
    color: #333;
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-buttons .share-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-buttons .share-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* 이전/다음 포스트 네비게이션 */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.prev-post,
.next-post {
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.prev-post:hover,
.next-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: #333;
}

/* 관련 포스트 */
.related-posts {
    margin: 40px 0;
}

.related-posts h3 {
    margin-bottom: 20px;
    color: #333;
}

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

.related-post {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.related-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.related-post h4 {
    margin-bottom: 10px;
}

.related-post h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post h4 a:hover {
    color: #667eea;
}

.related-excerpt {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.related-date {
    color: #999;
    font-size: 0.8rem;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.page-number {
    font-weight: bold;
    color: #667eea;
}

/* 푸터 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        gap: 20px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 0;
    }
    
    .search-input {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    .search-button {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .post,
    .post-detail {
        padding: 20px;
    }
    
    .post-detail .post-title {
        font-size: 2rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .post-card-content {
        padding: 25px;
    }
    
    .post-card .post-title {
        font-size: 1.4rem;
    }
    
    .post-card {
        min-height: 450px;
    }
    
    .post-card-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        gap: 15px;
    }
    
    .post-card-image {
        height: 180px;
    }
    
    .post-card-content {
        padding: 20px;
    }
    
    .post-card {
        min-height: 400px;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .post, .post-detail {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .navigation {
        background: #2d2d2d;
    }
    
    .nav-menu a {
        color: #e0e0e0;
    }
    
    .post-title a {
        color: #e0e0e0;
    }
    
    .tag {
        background: #404040;
        color: #e0e0e0;
    }
    
    .social-share {
        background: #404040;
    }
    
    .prev-post,
    .next-post,
    .related-post {
        background: #2d2d2d;
        color: #e0e0e0;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post,
.post-detail {
    animation: fadeIn 0.6s ease-out;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
} 

/* 검색 결과 스타일 */
.s_search .search-results {
    margin-bottom: 40px;
}

.s_search .search-results-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.s_search .search-results .posts-grid {
    margin-top: 20px;
}

/* 검색 결과가 없을 때 */
.s_search .search-results .posts-grid:empty::after {
    content: "검색 결과가 없습니다.";
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 검색 결과 하이라이트 */
.s_search .search-results .post-title a {
    position: relative;
}

.s_search .search-results .post-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.s_search .search-results .post-title a:hover::after {
    width: 100%;
}

/* 검색 결과 카드 강조 */
.s_search .search-results .post-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.s_search .search-results .post-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

/* 검색 결과 메타 정보 강조 */
.s_search .search-results .post-meta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
}

/* 검색 결과 요약 텍스트 강조 */
.s_search .search-results .excerpt-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 10px;
}

/* 검색 결과 페이지네이션 */
.s_search .search-results .pagination {
    margin-top: 40px;
    justify-content: center;
}

.s_search .search-results .pagination a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 500;
}

.s_search .search-results .pagination a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 반응형 검색 결과 */
@media (max-width: 768px) {
    .s_search .search-results-title {
        font-size: 1.5rem;
        padding: 15px;
    }
    
    .s_search .search-results .post-card {
        margin-bottom: 20px;
    }
    
    .s_search .search-results .excerpt-text {
        padding: 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .s_search .search-results-title {
        font-size: 1.3rem;
        padding: 12px;
    }
    
    .s_search .search-results .post-meta {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* 검색 결과 페이지에서 본문 숨기기 */
.s_list .entry,
.s_list .entry *,
.s_list .post,
.s_list .post *,
.s_list .content,
.s_list .content *,
.s_list .body,
.s_list .body *,
.s_list .article,
.s_list .article *,
.s_list .text,
.s_list .text * {
    display: none !important;
}

/* 검색 결과에서 그리드만 표시 */
.s_list .posts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    margin-bottom: 40px !important;
}

/* 추가: 검색 결과 페이지에서 본문 완전 숨기기 */
.s_list > *:not(.search-section):not(.posts-grid):not(.pagination) {
    display: none !important;
}

.s_list .search-section + *:not(.posts-grid):not(.pagination) {
    display: none !important;
}

/* 티스토리 자동 렌더링 방지 */
.s_list .entry-content,
.s_list .entry-content *,
.s_list .post-content,
.s_list .post-content *,
.s_list .content-area > *:not(.search-section):not(.posts-grid):not(.pagination) {
    display: none !important;
}

/* 검색 결과에서 본문 텍스트 숨기기 */
.s_list .entry,
.s_list .entry *,
.s_list .post,
.s_list .post *,
.s_list .content,
.s_list .content *,
.s_list .body,
.s_list .body *,
.s_list .article,
.s_list .article *,
.s_list .text,
.s_list .text *,
.s_list .description,
.s_list .description *,
.s_list .excerpt,
.s_list .excerpt *,
.s_list .summary,
.s_list .summary * {
    display: none !important;
}

@media (max-width: 1024px) {
    .s_list .posts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .s_list .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
} 

/* 검색 시 일반 게시물 목록 완전 숨기기 */
.s_search ~ .s_list,
.s_search + .s_list,
.s_search ~ .s_list *,
.s_search + .s_list * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* 검색 시 일반 목록의 모든 하위 요소 숨기기 */
.s_search ~ .s_list .posts-grid,
.s_search + .s_list .posts-grid,
.s_search ~ .s_list .pagination,
.s_search + .s_list .pagination {
    display: none !important;
}

/* 검색 결과가 있을 때 일반 목록 숨기기 */
.search-results:not(:empty) ~ .s_list,
.search-results:not(:empty) + .s_list {
    display: none !important;
}

/* 검색 시 일반 목록 내부의 검색 결과 숨기기 */
.s_list .s_search {
    display: none !important;
}

/* 일반 목록에서 검색 결과가 있을 때 전체 숨기기 */
.s_list:has(.s_search) {
    display: none !important;
}

/* 검색 결과 페이지에서 본문 숨기기 */ 

/* 검색 결과 카테고리 스타일 */
.s_search .search-results .post-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 500;
    transform: scale(1.05);
} 

/* 태그 영역의 모든 링크에 스타일 강제 적용 */
.post-tags a,
.s_tag_label a,
.s_tag_label_rep a {
    background: #f0f0f0 !important;
    color: #666 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    margin: 2px !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    border: none !important;
}

.post-tags a:hover,
.s_tag_label a:hover,
.s_tag_label_rep a:hover {
    background: #667eea !important;
    color: #fff !important;
}

.post-tags a.tag:empty {
  display: none !important;
}

.post-tags a.tags {
  white-space: nowrap;
}
.post-tags a.tags:empty,
.post-tags a.tags:not([href]):not([href*='//']):not([href^='/']):not([href^='#']) {
  display: none !important;
}

.container_postbtn {
    display: none;
}
.another_category {
    display: none;
}