/* ===== Section 05 : News — 윤회당 소식 + 공지/분양/고객문의 ===== */

/* --- 섹션 래퍼 --- */
.yhd-news {
    background: var(--yhd-white);
    position: relative;
    z-index: 10;
    padding: clamp(1.5rem, 2.5vw, 2.5rem) 0 clamp(4rem, 8vw, 8rem);
}

.yhd-news-inner {
    width: var(--yhd-content-width);
    max-width: var(--yhd-content-max);
    margin: 0 auto;
}

/* --- 상단: 윤회당 소식 --- */
.yhd-news-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--yhd-black-15);
    padding-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.yhd-news-title {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--yhd-black);
    margin: 0;
}

.yhd-news-subtitle {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-black-80);
    margin: clamp(0.25rem, 0.5vw, 0.375rem) 0 0;
}

.yhd-news-more {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-black-80);
    text-decoration: none;
    transition: color 0.2s;
}

.yhd-news-more:hover {
    color: var(--yhd-point);
}

/* --- 카드 가로 스크롤 --- */
.yhd-news-cards {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: clamp(1rem, 2vw, 2rem);
    padding-bottom: 0.25rem;
    cursor: grab;
}
.yhd-news-cards:active { cursor: grabbing; }
.yhd-news-cards::-webkit-scrollbar { display: none; }

/* --- 개별 카드 --- */
.yhd-news-card {
    display: flex;
    flex-direction: column;
    background: var(--yhd-black-04, rgba(0, 0, 0, 0.04));
    border-radius: clamp(0.5rem, 0.8vw, 0.75rem);
    overflow: hidden;
    transition: transform 0.3s;
    flex: 0 0 18rem;
}
.yhd-news-card:hover {
    transform: translateY(-2px);
}

.yhd-news-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.yhd-news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.yhd-news-card:hover .yhd-news-card-thumb img {
    transform: scale(1.05);
}

.yhd-news-card-cate {
    position: absolute;
    top: clamp(1rem, 1.5vw, 1.25rem);
    right: clamp(1rem, 1.5vw, 1.25rem);
    z-index: 2;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--yhd-point);
    background: var(--yhd-black-60, rgba(0, 0, 0, 0.6));
    padding: 0.65em 1.3em 0.55em;
    border-radius: 999px;
    line-height: 1.4;
}

.yhd-news-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(0.25rem, 0.5vw, 0.5rem);
    min-width: 0;
    padding: clamp(1.25rem, 2vw, 1.75rem);
}

.yhd-news-card-title {
    font-size: clamp(0.9375rem, 0.2vw + 0.85rem, 1.0625rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yhd-news-card-title a {
    display: block;
    color: var(--yhd-black);
    text-decoration: none;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yhd-news-card-title a:hover {
    color: var(--yhd-point);
}

.yhd-news-card-desc {
    font-size: clamp(0.8125rem, 0.3vw + 0.75rem, 1rem);
    line-height: 1.5;
    color: var(--yhd-black-80, rgba(0, 0, 0, 0.8));
    margin: 0;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.yhd-news-card-date {
    font-size: 0.875rem;
    color: var(--yhd-black-40, rgba(0, 0, 0, 0.4));
}

/* --- 하단: 공지사항 + SNS + 고객상담실 --- */
.yhd-news-bottom {
    display: grid;
    grid-template-columns: 3fr 6fr 3fr;
    gap: clamp(2.5rem, 5vw, 4rem);
    margin-top: clamp(2rem, 4vw, 4rem);
    align-items: stretch;
}

.yhd-news-bottom > div {
    display: flex;
    flex-direction: column;
}

/* --- 공지사항 --- */
.yhd-news-notice-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
}

.yhd-news-notice-title {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 700;
    color: var(--yhd-black);
    margin: 0;
}

.yhd-news-notice-more {
    font-size: clamp(0.875rem, 1vw, 0.9375rem);
    color: var(--yhd-black-80);
    text-decoration: none;
    transition: color 0.2s;
}

.yhd-news-notice-more:hover {
    color: var(--yhd-point);
}

.yhd-news-notice-list {
    display: flex;
    flex-direction: column;
}

.yhd-news-notice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--yhd-black-15);
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(0.375rem, 0.75vw, 0.625rem) clamp(0.5rem, 1vw, 0.75rem) 0;
    text-decoration: none;
    transition: background 0.2s;
    flex: 1;
}
.yhd-news-notice-row:first-child {
    border-top: 1px solid var(--yhd-black-30, rgba(0, 0, 0, 0.3));
}

.yhd-news-notice-row:hover {
    background: var(--yhd-black-15);
}

.yhd-news-notice-icon {
    width: clamp(1rem, 1.5vw, 1.25rem);
    height: clamp(1rem, 1.5vw, 1.25rem);
    flex-shrink: 0;
    margin-right: clamp(0.375rem, 0.75vw, 0.5rem);
}

.yhd-news-notice-cate {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-point);
    font-weight: 600;
    flex-shrink: 0;
    margin-right: clamp(0.375rem, 0.75vw, 0.5rem);
    white-space: nowrap;
}

.yhd-news-notice-subject {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-black);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: clamp(0.5rem, 1vw, 1rem);
}

.yhd-news-notice-date {
    font-size: clamp(0.875rem, 1vw, 0.9375rem);
    color: var(--yhd-black-80);
    flex-shrink: 0;
}

.yhd-news-notice-empty {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-black-80);
    padding: clamp(0.5rem, 1vw, 0.75rem) 0;
}

/* --- 고객 상담실 카드 --- */
.yhd-news-contact {
    background: var(--yhd-review-bg);
    border-radius: clamp(0.75rem, 1.5vw, 1.25rem);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    gap: clamp(1rem, 1.5vw, 1.25rem);
    box-sizing: border-box;
}

.yhd-news-contact-title {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 700;
    color: var(--yhd-black);
    margin: 0;
}

.yhd-news-contact-body {
    display: flex;
    gap: clamp(0.75rem, 1.5vw, 1rem);
    flex: 1;
}

/* 좌측: 연락처 정보 */
.yhd-news-contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    justify-content: space-between;
}

/* 그룹 라운드 박스 */
.yhd-news-contact-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.25rem, 0.5vw, 0.375rem);
    background: var(--yhd-contact-group);
    border-radius: clamp(0.5rem, 1vw, 0.75rem);
    padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    flex: 1;
}

.yhd-news-contact-group .yhd-news-contact-label {
    color: var(--yhd-white-60);
}

.yhd-news-contact-group .yhd-news-contact-tel {
    color: var(--yhd-white);
}

.yhd-news-contact-group .yhd-news-contact-tel:hover {
    color: var(--yhd-point);
}

.yhd-news-contact-group .yhd-news-contact-tel--primary {
    color: var(--yhd-point);
}

.yhd-news-contact-group .yhd-news-contact-value {
    color: var(--yhd-white-70);
}

/* 상담 상태 표시 */
.yhd-news-contact-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    position: relative;
}

.yhd-news-contact-status-dot {
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--yhd-status-open);
    flex-shrink: 0;
}

.yhd-news-contact-status-ripple {
    position: absolute;
    top: 50%;
    left: 0.25rem;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: 1.5px solid var(--yhd-status-open-60);
    opacity: 0;
    pointer-events: none;
}

.yhd-news-contact-status-text {
    font-size: clamp(0.8125rem, 0.9vw, 0.875rem);
    font-weight: 500;
    color: var(--yhd-status-open);
}

.yhd-news-contact-status.is-closed .yhd-news-contact-status-dot {
    background: var(--yhd-status-closed);
}

.yhd-news-contact-status.is-closed .yhd-news-contact-status-ripple {
    border-color: var(--yhd-status-closed-60);
}

.yhd-news-contact-status.is-closed .yhd-news-contact-status-text {
    color: var(--yhd-status-closed);
}

.yhd-news-contact-row {
    display: flex;
    align-items: baseline;
    gap: clamp(0.5rem, 1vw, 0.75rem);
}

.yhd-news-contact-label {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-black-50);
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 4.5em;
}

.yhd-news-contact-tel {
    font-size: clamp(0.9375rem, 1.2vw, 1.125rem);
    font-weight: 700;
    color: var(--yhd-black);
    text-decoration: none;
    transition: color 0.2s;
}

.yhd-news-contact-tel:hover {
    color: var(--yhd-point);
}

.yhd-news-contact-tel--primary {
    color: var(--yhd-point);
}

.yhd-news-contact-tel--primary:hover {
    color: var(--yhd-point-hover);
}

.yhd-news-contact-value {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-black-80);
    font-weight: 500;
    white-space: nowrap;
}

/* 우측: 카카오톡 상담 블록 */
.yhd-news-kakao-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.375rem, 0.75vw, 0.5rem);
    background: var(--yhd-sns-kakao);
    color: var(--yhd-sns-kakao-text);
    border-radius: clamp(0.5rem, 1vw, 0.75rem);
    padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1rem, 1.5vw, 1.25rem);
    text-decoration: none;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.yhd-news-kakao-block:hover {
    opacity: 0.85;
}

.yhd-news-kakao-block-icon {
    width: clamp(1.5rem, 2vw, 2rem);
    height: auto;
}

.yhd-news-kakao-block-title {
    font-size: clamp(0.9375rem, 1.2vw, 1.125rem);
    font-weight: 700;
    white-space: nowrap;
}

.yhd-news-kakao-block-desc {
    font-size: clamp(0.875rem, 1vw, 0.9375rem);
    color: var(--yhd-black-80);
    white-space: nowrap;
}

/* --- SNS 피드 (인스타 감성) --- */
.yhd-news-sns-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
}

.yhd-news-sns-title {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 700;
    color: var(--yhd-black);
    margin: 0;
}

.yhd-news-sns-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1rem);
    flex: 1;
}

.yhd-news-sns-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.yhd-news-sns-item:hover .yhd-news-sns-thumb img {
    transform: scale(1.05);
}

.yhd-news-sns-item:hover .yhd-news-sns-subject {
    color: var(--yhd-point);
}

/* 인스타 그라디언트 프레임 — 꽉 차는 카드형 */
.yhd-news-sns-thumb-wrap {
    position: relative;
    width: 100%;
    height: clamp(8rem, 10vw, 11rem);
    border-radius: clamp(0.75rem, 1.5vw, 1.25rem);
    padding: 3px;
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-sizing: border-box;
}

.yhd-news-sns-thumb {
    width: 100%;
    height: 100%;
    border-radius: calc(clamp(0.75rem, 1.5vw, 1.25rem) - 3px);
    overflow: hidden;
}

.yhd-news-sns-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.yhd-news-sns-badge {
    position: absolute;
    top: clamp(0.5rem, 1vw, 0.75rem);
    left: clamp(0.5rem, 1vw, 0.75rem);
    font-size: clamp(0.75rem, 0.9vw, 0.875rem);
    font-weight: 600;
    color: var(--yhd-white);
    background: linear-gradient(135deg, #f09433, #dc2743);
    padding: 0.2em 0.7em;
    border-radius: 999px;
    line-height: 1.4;
    z-index: 1;
}

.yhd-news-sns-icon {
    position: absolute;
    bottom: clamp(0.75rem, 1.5vw, 1.25rem);
    right: clamp(0.75rem, 1.5vw, 1.25rem);
    width: clamp(1.5rem, 2vw, 2rem);
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.yhd-news-sns-body {
    display: flex;
    flex-direction: column;
    gap: clamp(0.2rem, 0.4vw, 0.3rem);
    padding-top: clamp(0.625rem, 1vw, 0.875rem);
    min-width: 0;
    flex: 1;
}

.yhd-news-sns-subject {
    font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
    color: var(--yhd-black);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.yhd-news-sns-desc {
    font-size: clamp(0.875rem, 1vw, 1rem);
    font-weight: 500;
    color: var(--yhd-black-50);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.yhd-news-sns-empty {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--yhd-black-80);
    padding: clamp(0.5rem, 1vw, 0.75rem) 0;
}

/* ===== 반응형 ===== */

/* --- ~1400px: 하단 3컬럼 스택 --- */
@media (max-width: 1400px) {
    /* 하단 3컬럼 → 세로 스택 */
    .yhd-news-bottom {
        grid-template-columns: 1fr;
        gap: clamp(1.5rem, 3vw, 2.5rem);
    }

    /* SNS 이미지 높이 조정 */
    .yhd-news-sns-thumb-wrap {
        height: clamp(10rem, 20vw, 16rem);
    }

    /* 공지사항 row flex: 1 해제 (스택 시 불필요) */
    .yhd-news-notice-row {
        flex: unset;
    }

    /* 그룹 박스 flex: 1 해제 */
    .yhd-news-contact-group {
        flex: unset;
    }
}

/* --- ~1440px: 카드 축소 시작 --- */
@media (max-width: 1440px) {
    .yhd-news-card {
        flex: 0 0 16rem;
    }
}
@media (max-width: 768px) {
    .yhd-news-card {
        flex: 0 0 14rem;
    }
    .yhd-news-card-cate {
        font-size: 0.6875rem;
        padding: 0.5em 1em 0.4em;
        top: 0.5rem;
        right: 0.5rem;
    }
}
@media (max-width: 480px) {
    .yhd-news-card {
        flex: 0 0 12rem;
    }
}

/* --- ~768px: 태블릿 세로 / 큰 모바일 --- */
@media (max-width: 768px) {

    /* 고객상담실 body 세로 배치 */
    .yhd-news-contact-body {
        flex-direction: column;
    }

    /* 카카오톡 블록 가로 + 줄바꿈 허용 */
    .yhd-news-kakao-block {
        flex-direction: row;
        padding: clamp(0.75rem, 2vw, 1rem) clamp(1.25rem, 3vw, 1.5rem);
    }

    .yhd-news-kakao-block-title {
        white-space: normal;
    }

    .yhd-news-kakao-block-desc {
        white-space: normal;
    }

    /* 상담시간 줄바꿈 허용 */
    .yhd-news-contact-value {
        white-space: normal;
    }

    /* 공지사항 날짜 숨기기 */
    .yhd-news-notice-date {
        display: none;
    }

    /* 공지사항 아이콘 숨기기 */
    .yhd-news-notice-icon {
        display: none;
    }
}

/* --- ~480px: 모바일 --- */
@media (max-width: 480px) {
    /* SNS 2열 → 1열 */
    .yhd-news-sns-list {
        grid-template-columns: 1fr;
    }

    /* SNS 이미지 높이 */
    .yhd-news-sns-thumb-wrap {
        height: clamp(12rem, 50vw, 16rem);
    }

    /* 카카오톡 블록 세로 복귀 */
    .yhd-news-kakao-block {
        flex-direction: column;
        align-items: center;
    }

    /* 고객상담실 그룹 내 라벨 min-width 해제 */
    .yhd-news-contact-label {
        min-width: unset;
    }
}

