/* 보배드림 스타일 적용 */
body {
    background-color: #f8f9fa;
    font-family: 'Noto Sans KR', sans-serif;
}

.navbar-brand {
    font-weight: bold;
    color: #2c3e50 !important;
}

.card {
    transition: transform 0.2s;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.list-group-item {
    border-left: none;
    border-right: none;
    padding: 12px 16px;
}

.list-group-item:first-child {
    border-top: none;
}

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

/* 차분한 청색 계열로 변경 */
.btn-primary {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
}

.btn-primary:hover {
    background-color: #1e3f6b;
    border-color: #1e3f6b;
}

.bg-primary {
    background-color: #2c5aa0 !important;
}

.text-primary {
    color: #2c5aa0 !important;
}

.btn-outline-primary {
    color: #2c5aa0;
    border-color: #2c5aa0;
}

.btn-outline-primary:hover {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
}

.btn-outline-primary.active {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
}

.ad-banner-left, .ad-banner-right {
    position: sticky;
    top: 20px;
}

.badge {
    font-size: 0.75em;
}

/* 푸터 스타일 개선 */
.footer {
    background-color: #343a40;
    color: #ffffff;
    padding: 40px 0;
    margin-top: 50px;
}

.footer h5, .footer h6 {
    color: #ffffff;
    font-weight: 600;
}

.footer p, .footer li {
    color: #adb5bd;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer .text-muted {
    color: #6c757d !important;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .ad-banner-left, .ad-banner-right {
        display: none !important;
    }
}

/* 검색창 스타일 */
.input-group .form-control {
    border-radius: 20px 0 0 20px;
}

.input-group .btn {
    border-radius: 0 20px 20px 0;
}

/* 탭 버튼 스타일 */
.btn-group .btn {
    border-radius: 4px;
    margin-right: 2px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 네비게이션 바 스타일 */
.navbar-dark {
    background-color: #1a1a1a !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
}

/* 상단 헤더 스타일 */
.bg-primary {
    background-color: #2c5aa0 !important;
}

/* 카드 헤더 색상 */
.card-header.bg-primary {
    background-color: #2c5aa0 !important;
}

.card-header.bg-success {
    background-color: #28a745 !important;
}

/* 배지 색상 */
.badge.bg-primary {
    background-color: #2c5aa0 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

/* 링크 색상 */
a {
    color: #2c5aa0;
}

a:hover {
    color: #1e3f6b;
}

/* 텍스트 색상 */
.text-primary {
    color: #2c5aa0 !important;
}

/* 버튼 그룹 스타일 */
.btn-group .btn-outline-primary {
    color: #2c5aa0;
    border-color: #2c5aa0;
}

.btn-group .btn-outline-primary:hover,
.btn-group .btn-outline-primary.active {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
    color: #ffffff;
}

/* ===== 홈페이지 전용 스타일 ===== */

/* 반응형 뉴스 제목 스타일 */
.news-title-responsive {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 뉴스 아이템 컨테이너 */
.news-item-container {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

/* 이미지 영역 */
.news-image-area {
    flex-shrink: 0;
    min-width: 80px;
    margin-right: 12px;
}

/* 제목 영역 - 이미지 옆 공간에 맞춤 */
.news-title-area {
    flex: 1;
    min-width: 0; /* flexbox에서 텍스트 오버플로우를 위해 필요 */
}

/* 화면 크기별 제목 영역 최대 폭 조절 */
@media (min-width: 1200px) {
    .news-title-area {
        max-width: calc(100% - 92px); /* 80px 이미지 + 12px 마진 */
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .news-title-area {
        max-width: calc(100% - 92px);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .news-title-area {
        max-width: calc(100% - 92px);
    }
}

@media (max-width: 767px) {
    .news-title-area {
        max-width: calc(100% - 92px);
    }
}

/* 뉴스 아이템 호버 효과 */
.list-group-item:hover .news-title-responsive {
    color: #007bff !important;
}

/* 뉴스 섹션 카드 높이 조절 */
.news-section .card {
    height: auto;
    min-height: 300px;
}

/* 메인화면 뉴스 이미지 스타일링 */
.main-news-image {
    width: 80px;
    height: 60px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.main-news-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.main-news-image:hover img {
    transform: scale(1.1);
}

/* ===== 커뮤니티 베스트 전용 스타일 (뉴스와 동일) ===== */

/* 반응형 베스트 제목 스타일 */
.best-title-responsive {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 베스트 아이템 컨테이너 */
.best-item-container {
    display: flex !important;
    align-items: flex-start !important;
    width: 100%;
    flex-direction: row !important;
}

/* 베스트 이미지 영역 */
.best-image-area {
    flex-shrink: 0;
    min-width: 80px;
    margin-right: 12px;
}

/* 베스트 제목 영역 - 이미지 옆 공간에 맞춤 */
.best-title-area {
    flex: 1;
    min-width: 0; /* flexbox에서 텍스트 오버플로우를 위해 필요 */
}

/* 화면 크기별 제목 영역 최대 폭 조절 */
@media (min-width: 1200px) {
    .best-title-area {
        max-width: calc(100% - 92px); /* 80px 이미지 + 12px 마진 */
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .best-title-area {
        max-width: calc(100% - 92px);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .best-title-area {
        max-width: calc(100% - 92px);
    }
}

@media (max-width: 767px) {
    /* 모바일에서도 가로 배치 유지 */
    .best-item-container {
        flex-direction: row !important;
        align-items: flex-start !important;
    }
    
    .best-image-area {
        flex-shrink: 0;
        min-width: 60px;
        margin-right: 8px;
    }
    
    .best-title-area {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 68px);
    }
    
    /* 모바일에서 베스트 아이템 정보 표시 개선 */
    .best-title-area small {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    /* 모바일에서 아이콘 크기 조정 */
    .best-title-area .fas {
        font-size: 0.7rem;
    }
    
    /* 모바일에서 프로필 이미지 크기 조정 */
    .best-title-area img {
        width: 12px !important;
        height: 12px !important;
    }
    
    /* 모바일에서 이미지 크기 조정 */
    .main-best-image {
        width: 60px !important;
        height: 45px !important;
    }
}

/* 베스트 아이템 호버 효과 */
.list-group-item:hover .best-title-responsive {
    color: #007bff !important;
}

/* 베스트 섹션 카드 높이 조절 */
.best-posts .card {
    height: auto;
    min-height: 300px;
}

/* 메인화면 베스트 이미지 스타일링 */
.main-best-image {
    width: 80px;
    height: 60px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.main-best-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.main-best-image:hover img {
    transform: scale(1.1);
}





