/* Pretendard 폰트 불러오기 (사이트에 이미 적용되어 있다면 이 줄은 삭제) */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* 위젯 전체 스타일 */
.cleanh-search-widget {
    --cleanh-primary-color: #1A3A5F; /* 짙은 네이비 */
    --cleanh-secondary-color: #6c757d; /* 연한 텍스트 회색 */
    --cleanh-light-bg: #f8f9fa; /* 연한 배경 회색 */
    --cleanh-border-color: #e9ecef;

    font-family: 'Pretendard', sans-serif;
    background-color: var(--cleanh-light-bg);
    padding: 80px 20px;
}

.cleanh-search-widget .search-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* 섹션 제목 */
.cleanh-search-widget .section-headline {
    font-size: 36px;
    font-weight: 700;
    color: var(--cleanh-primary-color);
    line-height: 1.4;
    margin-bottom: 15px;
}

.cleanh-search-widget .section-subtitle {
    font-size: 18px;
    color: var(--cleanh-secondary-color);
    margin-bottom: 50px;
}

/* 검색 폼 스타일 */
.cleanh-search-widget .search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto 50px auto;
    border: 2px solid var(--cleanh-primary-color);
    border-radius: 50px;
    overflow: hidden;
    background-color: #fff;
}
.cleanh-search-widget .search-input {
    flex-grow: 1;
    border: none;
    padding: 18px 25px;
    font-size: 16px;
    outline: none;
    color: #333;
    border-radius: 50px 0 0 50px; /* 왼쪽 모서리 둥글게 */
}
.cleanh-search-widget .search-button {
    background-color: var(--cleanh-primary-color);
    color: white;
    border: none;
    padding: 0 30px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.cleanh-search-widget .search-button:hover {
    background-color: #0d2a4c;
}

/* 검색 결과 영역 */
.cleanh-search-widget .results-wrapper {
    text-align: left;
}

.cleanh-search-widget .result-card {
    background-color: #ffffff;
    border: 1px solid var(--cleanh-border-color);
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px; /* 카드 내 요소 간격 추가 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cleanh-search-widget .result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.cleanh-search-widget .apartment-info {
    flex-grow: 1; /* 남는 공간 차지 */
}

.cleanh-search-widget .apartment-info .name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px; /* 이름과 주소 사이 간격 */
}

/* --- ▼ [수정됨] 주소, 세대수, 준공년도 스타일 ▼ --- */
.cleanh-search-widget .apartment-info .address {
    font-size: 15px;
    color: var(--cleanh-secondary-color);
    margin-bottom: 8px; /* 주소와 하단 정보 사이 간격 */
}

.cleanh-search-widget .sub-info {
    font-size: 14px;
    color: #555;
}
.cleanh-search-widget .sub-info span {
    display: block; /* 세로로 나열되도록 변경 */
    margin-top: 4px; /* 위아래 간격 추가 */
}

.cleanh-search-widget .sub-info .sedae-info strong,
.cleanh-search-widget .sub-info .year-info strong {
    font-weight: 600;
    color: #333;
}
/* --- ▲ [수정됨] 스타일 끝 ▲ --- */


/* --- ▼ [수정됨] '동의서/보양'을 작은 개별 버블로 변경 ▼ --- */
.cleanh-search-widget .construction-status {
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    gap: 10px; /* 버블 사이의 간격 */
    align-items: center;
}

.cleanh-search-widget .construction-status .status-item {
    background-color: rgba(26, 58, 95, 0.1);
    color: var(--cleanh-primary-color);
    font-weight: 600;
    padding: 8px 15px; /* 크기를 작게 조절 */
    border-radius: 50px;
    font-size: 14px; /* 폰트 크기 작게 조절 */
}

.cleanh-search-widget .construction-status .status-item strong {
    font-weight: 800; /* 횟수 강조 */
    margin-left: 3px;
}
/* --- ▲ [수정됨] 스타일 끝 ▲ --- */


.cleanh-search-widget .no-results,
.cleanh-search-widget .apm-loading,
.cleanh-search-widget .apm-error {
    text-align: center;
    padding: 40px;
    color: var(--cleanh-secondary-color);
    font-size: 18px;
    background-color: #fff;
    border: 1px dashed var(--cleanh-border-color);
    border-radius: 10px;
}

/* 페이지네이션 스타일 */
.apm-pagination {
    margin-top: 40px;
    text-align: center;
}
.apm-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 4px;
    border: 1px solid var(--cleanh-border-color);
    border-radius: 5px;
    color: var(--cleanh-secondary-color);
    text-decoration: none;
    background-color: #fff;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.apm-pagination a.page-numbers:hover {
    background-color: var(--cleanh-primary-color);
    color: #fff;
    border-color: var(--cleanh-primary-color);
}
.apm-pagination .page-numbers.current {
    background-color: var(--cleanh-primary-color);
    color: #fff;
    border-color: var(--cleanh-primary-color);
    cursor: default;
}
.apm-pagination .page-numbers.dots {
    border: none;
    background: none;
    padding: 8px 0;
}


/* 모바일 반응형 */
@media (max-width: 768px) {
    .cleanh-search-widget {
        padding: 50px 15px;
    }
    .cleanh-search-widget .section-headline {
        font-size: 28px;
    }
    .cleanh-search-widget .section-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    .cleanh-search-widget .result-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .cleanh-search-widget .construction-status { /* 모바일에서 버블 정렬 */
        margin-top: 5px;
    }
    .cleanh-search-widget .construction-status .status-item {
        font-size: 13px; /* 모바일에서 폰트 더 작게 */
        padding: 6px 12px;
    }
    .cleanh-search-widget .search-input {
        padding: 15px 20px;
    }
    .cleanh-search-widget .search-button {
        padding: 0 25px;
    }
}