/**
 * 화동2571 공지사항 스타일
 */

/* 컨테이너 */
.hwadong-notice-archive,
.hwadong-notice-single {
    padding: 40px 0 80px;
    background-color: #fff;
    min-height: 60vh;
}

.hwadong-notice-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 섹션 */
.hwadong-notice-header {
    margin-bottom: 24px;
}

.hwadong-notice-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.hwadong-notice-desc {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* 검색 섹션 */
.hwadong-notice-search {
    margin-bottom: 20px;
}

.hwadong-search-box {
    position: relative;
    max-width: 400px;
}

.hwadong-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.hwadong-search-box input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hwadong-search-box input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.hwadong-search-box input::placeholder {
    color: #9ca3af;
}

/* 카테고리 필터 */
.hwadong-notice-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.hwadong-category-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background-color: #fff;
    text-decoration: none;
    transition: all 0.2s;
}

.hwadong-category-btn:hover {
    background-color: #f9fafb;
    border-color: #374151;
    color: #374151;
}

.hwadong-category-btn.active {
    background-color: #374151;
    border-color: #374151;
    color: #fff;
}

/* 글 수 및 정렬 */
.hwadong-notice-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: #6b7280;
}

.hwadong-notice-sort {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

.hwadong-notice-sort:hover {
    color: #d97706;
}

.hwadong-sort-icon {
    transition: transform 0.2s;
}

/* 공지사항 목록 */
.hwadong-notice-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 공지사항 아이템 */
.hwadong-notice-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #fff;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
    height: 140px;
}

.hwadong-notice-item:hover {
    border-color: #d97706;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hwadong-notice-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 24px 32px;
}

/* 썸네일 - 오른쪽 배치, 세로 100% 고정, padding 없음 */
.hwadong-notice-item-thumbnail {
    flex-shrink: 0;
    width: 240px;
    margin: 0;
    padding: 0;
    align-self: stretch;
}

.hwadong-notice-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 썸네일 없는 경우 */
.hwadong-notice-item.no-thumbnail .hwadong-notice-item-content {
    padding: 24px 32px;
}

/* 카테고리 + 고정 라벨 영역 */
.hwadong-notice-item-categories {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.hwadong-notice-category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(217, 119, 6, 0.15);
    color: #d97706;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

/* 고정 라벨 - 카테고리 옆에 배치 */
.hwadong-notice-sticky-label {
    display: inline-block;
    padding: 4px 8px;
    background-color: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

/* 제목 - 왼쪽 정렬, 더 큰 글씨 */
.hwadong-notice-item-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.4;
}

.hwadong-notice-item-title-text:hover {
    text-decoration: underline;
}

/* 요약 - 숨김 처리 */
.hwadong-notice-item-excerpt {
    display: none;
}

/* 날짜 */
.hwadong-notice-item-date {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

/* 빈 상태 */
.hwadong-notice-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* 페이지네이션 */
.hwadong-notice-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.hwadong-notice-pagination .page-numbers {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.hwadong-notice-pagination .page-numbers li {
    margin: 0;
}

.hwadong-notice-pagination .page-numbers a,
.hwadong-notice-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    margin-left: -1px;
    transition: all 0.2s;
}

.hwadong-notice-pagination .page-numbers li:first-child a,
.hwadong-notice-pagination .page-numbers li:first-child span {
    border-radius: 6px 0 0 6px;
    margin-left: 0;
}

.hwadong-notice-pagination .page-numbers li:last-child a,
.hwadong-notice-pagination .page-numbers li:last-child span {
    border-radius: 0 6px 6px 0;
}

.hwadong-notice-pagination .page-numbers a:hover {
    background-color: #f9fafb;
    color: #111827;
    z-index: 1;
}

.hwadong-notice-pagination .page-numbers .current {
    background-color: #d97706;
    border-color: #d97706;
    color: #fff;
    z-index: 1;
}

.hwadong-pagination-arrow {
    width: 10px;
    height: 10px;
    fill: none;
}

/* ==================== */
/* 상세 페이지 스타일 */
/* ==================== */

/* 브레드크럼 */
.hwadong-notice-breadcrumb {
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: #6b7280;
}

.hwadong-notice-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.hwadong-notice-breadcrumb a:hover {
    color: #d97706;
}

.hwadong-breadcrumb-separator {
    margin: 0 8px;
    color: #d1d5db;
}

.hwadong-breadcrumb-current {
    color: #111827;
}

/* 상세 헤더 */
.hwadong-notice-single-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.hwadong-notice-single-categories {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.hwadong-notice-single-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    line-height: 1.3;
}

.hwadong-notice-single-meta {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 상세 썸네일 - 숨김 처리 */
.hwadong-notice-single-thumbnail {
    display: none;
}

/* 상세 내용 */
.hwadong-notice-single-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 48px;
}

.hwadong-notice-single-content p {
    margin-bottom: 1.5em;
}

.hwadong-notice-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.hwadong-notice-single-content h2,
.hwadong-notice-single-content h3,
.hwadong-notice-single-content h4 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: #111827;
}

/* 이전/다음 글 네비게이션 */
.hwadong-notice-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.hwadong-notice-nav-link {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.2s;
}

.hwadong-notice-nav-link:hover {
    border-color: #d97706;
}

.hwadong-notice-nav-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.hwadong-notice-nav-next {
    text-align: right;
}

.hwadong-notice-nav-label {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 4px;
}

.hwadong-notice-nav-title {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 목록으로 버튼 */
.hwadong-notice-back {
    text-align: center;
}

.hwadong-notice-back-btn {
    display: inline-block;
    padding: 12px 32px;
    background-color: #374151;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.hwadong-notice-back-btn:hover {
    background-color: #1f2937;
    color: #fff;
}

/* ==================== */
/* 반응형 스타일 */
/* ==================== */

@media (max-width: 768px) {
    .hwadong-notice-title {
        font-size: 1.75rem;
    }

    .hwadong-notice-item {
        flex-direction: column-reverse;
        height: auto;
    }

    .hwadong-notice-item-thumbnail {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 비율 (9/16 = 0.5625) */
        position: relative;
        overflow: hidden;
    }

    .hwadong-notice-item-thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hwadong-notice-item-content {
        padding: 20px;
    }

    .hwadong-notice-item-title {
        font-size: 1.35rem;
    }

    .hwadong-notice-single-title {
        font-size: 1.5rem;
    }

    .hwadong-notice-navigation {
        grid-template-columns: 1fr;
    }

    .hwadong-notice-nav-next {
        text-align: left;
    }
}
