/* 공지사항 페이지 스타일 */

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: #fff;
    color: #191f28;
    /* -webkit-font-smoothing: antialiased; */
}

/* 페이지 헤더 */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e8eb;
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 100;
}

.back-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #191f28;
    margin-right: 8px;
}

.page-header__title {
    font-size: 18px;
    font-weight: 600;
    color: #191f28;
}

/* 페이지 컨텐츠 */
.page-content {
    padding-top: 56px;
    padding-bottom: 72px;
    min-height: 100vh;
    max-width: 640px;
    margin: 0 auto;
}

/* 공지사항 목록 */
.notice-list {
    background: #fff; 
    overflow: hidden;
    border-top: 2px solid #aaa;
    border-bottom: 2px solid #aaa;
}

.notice-item {
    border-bottom: 1px solid #dddfe3;
    transition: background 0.2s ease;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item.active .notice-item__toggle svg {
    transform: rotate(180deg);
}

.notice-item__toggle svg {
    width:25px;
    height:25px;
    stroke:#bbb;
}

.notice-item__header {
    padding: 30px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-item__header:active {
    /* background: #f9fafb; */
}

.notice-item__title {
    font-size: 20px;
    font-weight: 600;
    color: #191f28;
    line-height: 1.5;
    padding-right: 32px;
}

.notice-item__meta {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #8b95a1;
}

.notice-item__date::before {
    content: '';
}

.notice-item__views::before {
    content: '·';
    margin-right: 12px;
}

.notice-item__toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #8b95a1;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* 공지사항 내용 */
.notice-item__content {
    display: none;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

.notice-item.active .notice-item__content {
    display: block;
    opacity: 1;
}

.notice-item__body {
    padding: 30px;
    border-top:1px solid #eee;
    background:#fbfbfb;
}

.notice-detail__content {
    font-size: 15px;
    line-height: 1.6;
    color: #4e5968;
    white-space: pre-wrap;
}

.loading-content {
    text-align: center;
    padding: 20px;
    color: #8b95a1;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #f04452;
    font-size: 14px;
}

/* 페이지네이션 */
.pagination {
    padding: 24px 16px;
}

.pagination__list {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.pagination__btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e8eb;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4e5968;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination__btn:hover {
    border-color: #3182F6;
    color: #3182F6;
}

.pagination__btn.active {
    background: #3182F6;
    border-color: #3182F6;
    color: #fff;
}

/* 로딩 스피너 */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f4f5f7;
    border-top-color: #3182F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 빈 상태 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    color: #8b95a1;
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 15px;
}

/* =========================================
   히어로 영역
   ========================================= */
.notice-hero {
    position: relative;
    overflow: hidden;
    height:fit-content;
    max-width: 1440px;
    margin: 0 auto;
    border-radius: 20px;
    padding: 0 20px;
}


.notice-hero figure {
    border-radius:20px;
    min-height:220px;
    max-width:1400px;
    background: url(https://d1hcalb01xyt9n.cloudfront.net/static/images/bg-notice.png);
    background-position:center;
    background-size:cover;

}


.notice-hero__inner {
    max-width: 1440px;
    padding: 0 40px;
    margin: 50px auto 30px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notice-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 28px;
    text-transform: uppercase;
    color: #333;
    font-weight: 700;
    margin-bottom: 12px;
}

.notice-hero__title {
    font-size: 20px;
    font-weight: 400;
    color: #888;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.notice-hero__subtitle {
    font-size: 20px;
    color: #888;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* 모바일/앱에서 히어로 숨김 */
body:not(.lb-platform-web) .notice-hero,
body:not(.lb-platform-web) .notice-hero__inner {
    display: none;
}

/* =========================================
   PC(웹) 레이아웃 조정
   ========================================= */

/* 기존 모바일 헤더 웹에서 숨김 */
body.lb-platform-web .page-header { 
    display: none !important; 
}

/* 히어로: PC에서 표시 */
body.lb-platform-web .notice-hero {
    display: block;
}

/* PC에서 컨텐츠 영역 넓히기 */
body.lb-platform-web .page-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 40px 60px;
}

/* 태블릿 이하에서 PC 컨텐츠 패딩 축소 */
@media (max-width: 1024px) {
    body.lb-platform-web .page-content {
        padding: 24px 24px 60px;
    }
}

@media (max-width: 480px) {
    body.lb-platform-web .page-content {
        padding: 16px 14px 60px;
    }
}



/* =========================================
   반응형: ~1024px (태블릿)
   ========================================= */
@media (min-width: 1024px) {
    body {
        background: #fff;
        padding-bottom: 0;
    }
}

@media (max-width: 1024px) {
    .page-content {
        max-width: 100%;
    }

    .notice-hero__label {
        font-size: 24px;
    }

    .notice-hero__title,
    .notice-hero__subtitle {
        font-size: 18px;
    }

    .notice-hero__inner {
        padding: 0 24px;
        margin: 36px auto 24px;
    }

    .notice-hero {
        padding: 0 16px;
    }

    .notice-hero figure {
        min-height: 180px;
    }

    .notice-item__title {
        font-size:18px;
    }

}

/* =========================================
   반응형: ~768px (모바일 대형)
   ========================================= */
@media (max-width: 768px) {
    .notice-item__header {
        padding: 24px 20px;
    }

    .ql-viewer p {font-size:14px;}

    .notice-item__title {
        font-size: 16px;
    }

    .notice-item__body {
        padding: 24px 20px;
    }

    .notice-detail__content {
        font-size: 15px;
    }

    .notice-hero__label {
        font-size: 32px;
    }

    .notice-hero__title,
    .notice-hero__subtitle {
        font-size: 16px;
    }

    .notice-hero__inner {
        margin: 28px auto 20px;
    }

    .notice-hero figure {
        background-position:right;
        min-height: 160px;
    }
}

/* =========================================
   반응형: ~480px (모바일 소형)
   ========================================= */
@media (max-width: 480px) {
    .notice-item__header {
        padding: 15px 14px;
        gap: 4px;
    }

    .notice-item__title {
        font-size: 16px;
        padding-right: 28px;
    }

    .notice-item__meta {
        font-size: 14px;
    }

    .notice-item__body {
        padding: 15px 14px;
    }

    .notice-detail__content {
        font-size: 14px;
    }

    .notice-item__toggle {
        right: 10px;
    }

    .notice-item__toggle svg {
        width: 22px;
        height: 22px;
    }

    .pagination__btn {
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 14px;
    }

    .empty-state p {
        font-size: 15px;
    }

    .notice-hero__label {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .notice-hero__title,
    .notice-hero__subtitle {
        font-size: 14px;
    }

    .notice-hero__inner {
        padding: 0 16px;
        margin: 24px auto 16px;
    }

    .notice-hero figure {
        min-height: 120px;
        border-radius: 14px;
    }

    .notice-hero {
        border-radius: 14px;
        padding: 0 14px;
    }
}
