/*
Theme Name: Prompt Digging
Theme URI: https://example.com/prompt-digging
Description: A minimalist, brutalist prompt library theme. Optimized for WP 6.x.
Version: 1.2.1
Author: yurikim
Text Domain: prompt-digging
*/

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

body {
    font-family: 'Orbit', sans-serif !important;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}



/* Fixed Header Section */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding-top: 0px;
    padding-bottom: 0px;
}

/* Search Bar Aesthetics - Solid 1px black border as requested */
.pd-search-container {
    border: 1px solid #000;
    display: flex;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #fff;
}

.pd-search-input {
    flex-grow: 1;
    border: 1px solid #000000;
    padding: 0rem 1.5rem;
    font-family: inherit;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
    letter-spacing: 0.05em;
	height: 24px;
}

.pd-search-button {
    background: #000;
    color: #fff;
    padding: 0 2.5rem;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Category Tabs (1px solid box-style buttons as requested) */
.pd-category-tab {
    border: 1px solid #000;
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    text-transform: lowercase;
    transition: all 0.2s ease;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.pd-category-tab:hover {
    background: #000;
    color: #fff;
}

.pd-category-tab.active {
    background: #000;
    color: #fff;
}






/* 
   Global Grid System - 3 Columns Horizontal on Desktop
*/
.prompt-grid, .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(1, 1fr) !important;
    gap: 0 !important;
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;

}


body.category-design-thinking .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(1, 1fr) !important; /* 1열 */
    gap: 20px !important;
    border-top: 0px solid #000;
    border-left: 0px solid #000;
}



.wp-block-categories {
	display : flex;
	flex-wrap: wrap;             /* 화면이 좁으면 줄바꿈 */
	gap: 10px;                   /* 항목 간 간격 */
}
.wp-block-categories li {
    display: inline-block;
    border: 1px dashed #000000; /* 검은색 점선 테두리 (두께 2px) */
    margin-bottom: 0 !important; /* 하단 마진 초기화 */
}


.wp-block-query {
    border: 0px solid #ffffff;  !important;
    box-shadow: none !important; /* 혹시 그림자가 있다면 함께 제거 */
}


:root :where(.is-layout-flow) > * {
    margin-block-start: 0px;
    /* margin-block-end: 0; */
}

button, input, optgroup, select, textarea {

    border: 1px solid #000;
	padding: 10px;
}



/* 두 h1을 감싸고 있는 부모 컨테이너 */
.wp-block-group.h1 { /* 워드프레스 기본 그룹 블록일 경우 */
    display: flex;
    flex-direction: row;     /* 가로 정렬 유지 */
    align-items: baseline;   /* 텍스트 하단 라인 맞춤 */
    flex-wrap: wrap;         /* 화면 좁을 때만 줄바꿈 */

}

/* 텍스트와 커서 h1 스타일 통합 */
h1.text-4xl, h1.cursor {
    display: inline-block !important; /* 블록 속성을 해제하여 옆으로 붙게 함 */
    margin-bottom: 0 !important;      /* 기존 mb-10이 있다면 제거해서 높이 맞춤 */
    vertical-align: bottom;

}

/* 커서 깜빡임 애니메이션 */
.cursor {
    margin-left: 5px;
    animation: blink 0.8s infinite;
}


@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}





@media (min-width: 768px) {
    .prompt-grid, .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
    }
	.wp-block-categories li {
        /* PC에서는 줄바꿈되어 보이도록 유지 */
        display: inline-block; 
        margin-bottom: 10px;
    	padding: 8px 24px;          /* 텍스트 주변 내부 여백 */
	}
.pb-8 {
    padding-bottom: 1rem;
}
}

@media (min-width: 1024px) {
    .prompt-grid, .wp-block-post-template {
        grid-template-columns: repeat(3, 1fr) !important;
    }
	

body.category-design-thinking .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(1, 1fr) !important; /* 1열 */
    gap: 20px !important;
}



.pb-8 {
    padding-bottom: 1rem;
}
}


@media (max-width: 767px) {
body .text-4xl {
    font-size: 2rem;
    line-height: 3rem;
}
    .wp-block-categories {
        display: flex;
        flex-wrap: nowrap !important; /* 줄바꿈 강제 금지 */
        overflow-x: auto;             /* 가로 스크롤 허용 */
        white-space: nowrap;          /* 텍스트 줄바꿈 방지 */
}
	.wp-block-categories li {
	padding: 8px 8px;      
        gap: 6px;                     /* 간격 좁힘 */
        padding-bottom: 10px !important; /* 스크롤바 공간 확보 */
        
        /* 스크롤바 숨기기 (선택사항 - 깔끔하게 보이고 싶을 때) */
        -ms-overflow-style: none;  /* IE, Edge */
        scrollbar-width: none;     /* Firefox */
    }
    
    .wp-block-categories::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    .wp-block-categories li {
        flex-shrink: 0; /* 공간이 부족해도 찌그러지지 않게 함 */
    }
.pb-8 {
    padding-bottom: 1rem;
}

}



.pb-8 {
    padding-bottom: 0.5rem;
    border: none;
}


.mt-12 {
	border:none;
}



/* Card Structure (General) */
.pd-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #fff;
    overflow: hidden;
    width: 100%;
}

.pd-card-image-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-bottom: 1px solid #000;
    background: #f8f8f8;
}

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

.pd-card:hover .pd-card-image-wrap img {
    transform: scale(1.03);
}

.pd-card-content {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #fff;
    flex-grow: 1;
}

.pd-card-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    word-break: break-all;
    opacity: 0.8;
}

/* Design Thinking View - Blog List Style (No thumbnail, no copy button) */
.design-thinking-view .pd-card {
    border: none;
    border-bottom: 1px solid #000;
    padding: 3rem 0;
    height: auto;
    display: block; /* Stack vertically */
}

.design-thinking-view .pd-card-image-wrap,
.design-thinking-view .copy-prompt-btn {
    display: none !important;
}

.design-thinking-view .pd-card-content {
    padding: 0;
}

.design-thinking-view .dt-title {
    font-size: 1.8rem;
    font-weight: 400;
    text-transform: lowercase;
    margin-bottom: 1rem;
    display: inline-block;
    text-decoration: none;
    color: inherit;
    letter-spacing: -0.02em;
}

.design-thinking-view .dt-title:hover {
    text-decoration: underline;
}

.design-thinking-view .pd-card-text {
    -webkit-line-clamp: 3;
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 0;
}

/* Utility Animations */
.fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #fff; }
::-webkit-scrollbar-thumb { background: #000; }