/* ============================================
   홈페이지 스타일 (PC)
   ============================================ */

/* 레이아웃 */
.home-container {
    max-width: 1200px;
    margin: 0px auto 120px;
}

.home-board-container {
    width: 1200px;
    margin: 20px 0 0 0;
    padding: 0;
}

/* 공지 영역 */
.home-notice {
    position: relative;
    padding: 20px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 40px;
}

.home-notice-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0096ff 0%, #00c6ff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 150, 255, 0.25);
}

.home-notice-icon svg {
    width: 36px;
    height: 36px;
    color: #ffffff;
}

.home-notice-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: -0.5px;
}

.home-notice-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    letter-spacing: -0.2px;
}

.home-notice-desc br {
    display: block;
    content: "";
    margin-top: 8px;
}

.home-notice-link {
    color: #4caf50;
    text-decoration: underline;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.2s;
}

.home-notice-link:hover {
    color: #45a049;
    text-decoration: none;
}

/* 기능 카드 영역 */
.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.home-feature {
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.home-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.home-feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f9ff;
    border-radius: 12px;
    color: #0096ff;
}

.home-feature-icon svg {
    width: 24px;
    height: 24px;
}

.home-feature-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px;
}

.home-feature-desc {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* 사이드바 카카오톡 */
.home-kakao-sidebar {
    text-align: center;
    padding: 20px;
}

.home-kakao-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.home-kakao-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.5;
}

.home-kakao-qr {
    margin-bottom: 16px;
}

.home-kakao-qr img {
    width: 160px;
    height: 160px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px;
    background: var(--bg-primary);
}

.home-kakao-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fee500;
    color: #000000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(254, 229, 0, 0.3);
    width: 100%;
}

.home-kakao-link:hover {
    background: #fdd835;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
}

.home-kakao-link svg {
    width: 16px;
    height: 16px;
}

/* 사이드바 설문조사 결과 */
.home-poll-sidebar {
    margin-top: 0;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
}

.home-poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.home-poll-title-link {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.home-poll-title-link:hover {
    opacity: 0.8;
}

.home-poll-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.4;
    display: block;
}

.home-poll-title-link .home-poll-title {
    color: var(--text-link);
}

.home-poll-header .home-poll-status-badge {
    display: inline-block;
    flex-shrink: 0;
}

.home-poll-options {
    margin-bottom: 12px;
}

.home-poll-option {
    position: relative;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.home-poll-option:last-child {
    margin-bottom: 0;
}

.home-poll-option-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    z-index: 2;
}

.home-poll-option-label {
    color: var(--text-primary);
    flex: 1;
    margin-right: 8px;
    font-weight: 500;
}

.home-poll-option-percentage {
    font-weight: 600;
    color: #1976d2;
    white-space: nowrap;
}

.home-poll-gauge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.home-poll-gauge-fill {
    height: 100%;
    background: #bbdefb;
    transition: width 0.5s ease;
    opacity: 0.5;
}

.home-poll-votes {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.home-poll-status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.home-poll-status-badge.is-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.home-poll-status-badge.is-ended {
    background: #ffebee;
    color: #c62828;
}

/* 클로징 영역 */
.home-closing {
    margin-top: 32px;
    padding: 24px;
    text-align: center;
}

.home-closing-text {
    font-size: 16px;
    color: #475569;
    line-height: 1.8;
    margin: 0;
    font-weight: 500;
}

/* 인기글 헤더 */
.home-hot-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.home-hot-more {
    font-size: 14px;
    color: var(--text-link);
    text-decoration: none;
    font-weight: 500;
}

.home-hot-more:hover {
    text-decoration: underline;
}

.sidebar-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

/* 인기글 그룹 섹션 */
.hot-group-section {
    background: transparent;
    border: none;
    margin-bottom: 24px;
    margin-left: 20px;
}

.hot-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    background: transparent;
    border-bottom: none;
}

.hot-group-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.hot-group-count {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 인기글 카드 그리드 */
.hot-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0px;
    background: transparent;
}

.hot-card {
    display: block;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.hot-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hot-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.hot-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-code);
}

.hot-card-placeholder svg {
    width: 32px;
    height: 32px;
    color: var(--text-tertiary);
}

.hot-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.hot-card-content {
    padding: 12px;
}

.hot-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.hot-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.hot-card-meta span {
    white-space: nowrap;
}

.hot-card-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hot-card-author img {
    width: 16px;
    height: 16px;
}

.hot-card-author span {
    color: var(--text-primary);
    white-space: nowrap;
}

.hot-item-comment-cnt {
    font-size: 12px;
    color: var(--text-link);
    font-weight: 500;
    flex-shrink: 0;
}

.hot-item-bbs-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-link);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    white-space: nowrap;
    margin-right: 6px;
}

[data-theme="dark"] .hot-item-bbs-badge {
    background: var(--bg-tertiary);
    color: var(--text-link);
}

.hot-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
}

/* 인기글 리스트 읽은 글 스타일 */
.hot-list-item:visited .hot-item-title {
    color: var(--text-tertiary);
}

.m-hot-list-item:visited .m-hot-item-title,
.m-hot-text-item:visited .m-hot-text-title {
    color: var(--text-tertiary);
}

.hot-group-section .board-table {
    border-left: none;
    border-right: none;
}

/* ============================================
   홈페이지 반응형 (태블릿/모바일)
   ============================================ */
@media (max-width: 768px) {
    .home-container {
        margin: 40px auto 60px;
        padding: 0 16px;
    }

    .home-notice {
        padding: 32px 24px;
    }

    .home-notice-title {
        font-size: 20px;
    }

    .home-features {
        grid-template-columns: 1fr;
        margin-top: 32px;
    }

    .home-kakao-qr img {
        width: 140px;
        height: 140px;
    }

    .home-kakao-link {
        padding: 8px 16px;
    }

    .home-closing {
        margin-top: 24px;
        padding: 20px;
    }

    .home-closing-text {
        font-size: 14px;
    }

    .hot-card-grid {
        grid-template-columns: 1fr;
    }
}
