/* =============================================
   TANHUH PROJECT FILTER — v1.3
   ============================================= */

.tanhuh-filter-wrap {
    max-width: 1320px;
    margin: 0 auto 20px;
    padding: 0px;
    font-family: 'Outfit', 'DM Sans', sans-serif;
}

/* 검색창 */
.tanhuh-filter-wrap .tf-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tanhuh-filter-wrap .tf-search-input {
    width: 0;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 0;
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 0;
    color: #1C2233;
    background: #ffffff;
    outline: none;
    transition: width 0.35s ease, border-color 0.25s ease, padding 0.35s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
}

.tanhuh-filter-wrap .tf-search-input.is-open {
    width: 220px;
    border-color: #1C2233;
    padding: 0 40px 0 14px;
}

.tanhuh-filter-wrap .tf-search-input::placeholder {
    color: #6B7280;
}

.tanhuh-filter-wrap .tf-search-input:focus {
    border-color: #ED1C24;
}

.tanhuh-filter-wrap .tf-search-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    cursor: pointer;
    background: none;
    border: 1px solid #E8E8E6;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    transition: color 0.25s ease, border-color 0.25s ease;
    box-sizing: border-box;
    position: relative;
}

.tanhuh-filter-wrap .tf-search-icon:hover {
    color: #1C2233;
    border-color: #1C2233;
}

.tanhuh-filter-wrap .tf-search-icon.is-open {
    color: #ED1C24;
    border-color: #ED1C24;
    position: absolute;
    right: 0;
    border-left: none;
}
/* 전체 한 줄 래퍼 */
.tanhuh-filter-wrap .tf-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* select 행 */
.tanhuh-filter-wrap .tf-select-row {
    display: flex;
    gap: 12px;
    margin-top: 0;
    align-items: center;
    flex: 1;
}

.tanhuh-filter-wrap .tf-select-wrap {
    position: relative;
    flex: 1;
}

.tanhuh-filter-wrap .tf-select {
    width: 100%;
    height: 40px;
    border: 1px solid #E8E8E6;
    border-radius: 0;
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1C2233;
    background: #ffffff;
    padding: 0 32px 0 14px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.25s ease, color 0.25s ease;
    box-sizing: border-box;
}

.tanhuh-filter-wrap .tf-select:hover {
    border-color: #1C2233;
}

.tanhuh-filter-wrap .tf-select:focus {
    border-color: #ED1C24;
    color: #ED1C24;
}

/* 선택값 있을 때 강조 */
.tanhuh-filter-wrap .tf-select.is-active {
    border-color: #1C2233;
    color: #ED1C24;
    font-weight: 600;
}


.tanhuh-filter-wrap .tf-tag-select {
    width: 100%;
    height: 40px;
    border: 1px solid #E8E8E6;
    border-radius: 0;
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1C2233;
    background: #ffffff;
    padding: 0 32px 0 14px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.25s ease, color 0.25s ease;
    box-sizing: border-box;
}

.tanhuh-filter-wrap .tf-tag-select:hover {
    border-color: #1C2233;
}

.tanhuh-filter-wrap .tf-tag-select:focus {
    border-color: #ED1C24;
    color: #ED1C24;
}

/* 선택값 있을 때 강조 */
.tanhuh-filter-wrap .tf-tag-select.is-active {
    border-color: #1C2233;
    color: #ED1C24;
    font-weight: 600;
}


/* 화살표 */
.tanhuh-filter-wrap .tf-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #6B7280;
    pointer-events: none;
    transition: border-color 0.25s ease;
}

.tanhuh-filter-wrap .tf-select-wrap:hover .tf-select-arrow,
.tanhuh-filter-wrap .tf-select-wrap:hover .tf-tag-select ~ .tf-select-arrow {
    border-top-color: #1C2233;
}

/* 반응형 */
@media (max-width: 768px) {
    .tanhuh-filter-wrap {
        margin-bottom: 20px;
    }

    .tanhuh-filter-wrap .tf-select-row {
        flex-direction: row;
        gap: 6px;
    }

    .tanhuh-filter-wrap .tf-select-wrap {
        flex: 1;
        min-width: 0;
    }

    .tanhuh-filter-wrap .tf-select {
        font-size: 10px;
        letter-spacing: 0.06em;
        padding: 0 22px 0 8px;
    }

	.tanhuh-filter-wrap .tf-tag-select {
        font-size: 10px;
        letter-spacing: 0.06em;
        padding: 0 22px 0 8px;
    }


    .tanhuh-filter-wrap .tf-select-arrow {
        right: 8px;
    }

   /* 검색창 열릴 때 — 오버레이 + 중앙 배치 */
/* 오버레이 — 입력창 뒤 전체 어둡게 */
.tanhuh-filter-wrap .tf-search-wrap.is-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9997;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* 입력창은 오버레이 위로 */
.tanhuh-filter-wrap .tf-search-input.is-open {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    height: 52px;
    z-index: 9999;
    padding: 0 52px 0 20px;
    border: none;
    border-bottom: 2px solid #ED1C24;
    background: #ffffff;
    font-size: 15px;
}

/* 아이콘도 오버레이 위로 */
/* 오버레이 — 입력창 뒤 전체 어둡게 */
.tanhuh-filter-wrap .tf-search-wrap.is-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9997;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* 입력창은 오버레이 위로 */
.tanhuh-filter-wrap .tf-search-input.is-open {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    height: 52px;
    z-index: 9999;
    padding: 0 52px 0 20px;
    border: none;
    border-bottom: 2px solid #ED1C24;
    background: #ffffff;
    font-size: 15px;
}

/* 아이콘도 오버레이 위로 */
.tanhuh-filter-wrap .tf-search-icon.is-open {
    position: fixed;
    top: 40%;
    right: 20px;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    z-index: 9999;
    background: #ffffff;
    border: none;
    border-left: 1px solid #E8E8E6;
    color: #ED1C24;
}
}
@media (max-width: 480px) {
    .tanhuh-filter-wrap {
        padding: 0 10px;
    }
}

/* =============================================
   TANHUH PROJECT CARD
   ============================================= */

#tanhuh-project-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 32px;
    margin-top: 20px;
}

#tanhuh-project-grid.tf-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tanhuh-project-card .tf-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tanhuh-project-card .tf-card-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #E8E8E6;
}

.tanhuh-project-card .tf-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.tanhuh-project-card:hover .tf-card-img-wrap img {
    transform: scale(1.04);
}

.tanhuh-project-card .tf-card-no-img {
    width: 100%;
    height: 100%;
    background: #E8E8E6;
}

.tanhuh-project-card .tf-card-body {
    padding: 14px 0 0;
}

.tanhuh-project-card .tf-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.tanhuh-project-card .tf-card-cat {
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #ED1C24;
}

.tanhuh-project-card .tf-card-meta {
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 300;
    color: #6B7280;
    letter-spacing: 0.04em;
}

.tanhuh-project-card .tf-card-title-ko {
    font-family: 'Noto Serif KR', serif;
    font-size: 16px;
    font-weight: 400;
    color: #1A1919;
    margin: 0 0 4px;
    line-height: 1.5;
}

.tanhuh-project-card .tf-card-title-en {
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: #6B7280;
    margin: 0;
    line-height: 1.4;
}

.tanhuh-project-card:hover .tf-card-title-ko {
    color: #ED1C24;
    transition: color 0.25s ease;
}

.tf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 14px;
    color: #6B7280;
    padding: 60px 0;
    letter-spacing: 0.06em;
}

/* 반응형 */
@media (max-width: 1024px) {
    #tanhuh-project-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    #tanhuh-project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}


