/**
 * 주식회사 옌 (YEN Corp) 웹사이트
 * 인사이트 페이지 스타일
 * 
 * @version 3.1.0
 * @author YEN Corp Development Team
 */

/* ===== 인사이트 페이지 공통 스타일 ===== */
/* 참고: 페이지 헤더 스타일은 page-header.css에 정의되어 있습니다. */

/* ===== 필터 및 검색 섹션 ===== */
#insights-filter {
    padding: 20px 0;
    background-color: #ffffff;
    margin-top: 20px;
}

.category-filter {
    margin-bottom: 0;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-tabs li {
    margin-right: 10px;
    margin-bottom: 10px;
}

.filter-tabs li a {
    display: block;
    padding: 8px 15px;
    background-color: #f9fafc;
    border-radius: 4px;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e9e0ea;
}

.filter-tabs li.active a {
    background-color: #854E7A;
    color: white;
    border-color: #854E7A;
}

.filter-tabs li a:hover {
    background-color: #F9BF53;
    color: #333;
    border-color: #F9BF53;
}

.search-form {
    border-radius: 4px;
    overflow: hidden;
}

.search-form .form-control {
    height: 40px;
    border: 1px solid #e9e0ea;
    border-radius: 4px;
    padding: 0 15px;
}

.search-form .btn {
    padding: 8px 15px;
    background-color: #854E7A;
    color: white;
    border: none;
    border-radius: 4px;
    margin-left: 10px;
}

.search-form .btn:hover {
    background-color: #77313D;
}

/* ===== 인사이트 그리드 ===== */
#insights-grid {
    padding: 40px 0;
    background-color: #ffffff;
}

.insight-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    height: 100%;
    min-width: 300px;
    max-width: 350px;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.insight-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.insight-card-img {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.insight-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* 중앙 정렬 */
    transition: transform 0.3s ease;
}

.insight-card:hover .insight-card-img img {
    transform: scale(1.05);
}

.card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.card-category {
    display: inline-block;
    background-color: #854E7A;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 10px;
}

.card-date {
    display: inline-block;
    color: #666;
    font-size: 0.75rem;
    font-weight: 400;
}

.insight-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.insight-card-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.insight-card-title a {
    color: #333;
    transition: color 0.3s ease;
}

.insight-card-title a:hover {
    color: #854E7A;
}

.insight-card-text {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
    font-size: 0.9rem;
}

.insight-card-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.85rem;
    margin-top: auto;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 15px;
}

.views {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.insight-card-meta i {
    margin-right: 5px;
}

.read-more {
    display: inline-block;
    color: #854E7A;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-left: auto;
}

.read-more:hover {
    color: #F9BF53;
}

.thumb-up {
    display: flex;
    align-items: center;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-right: 20px;
}

.thumb-up:hover {
    color: #854E7A;
}

.thumb-up i {
    margin-right: 5px;
}

/* ===== 페이지네이션 ===== */
.pagination-container {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: block;
    padding: 8px 16px;
    background-color: white;
    color: #666;
    border: 1px solid #e9e0ea;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-item.active .page-link {
    background-color: #854E7A;
    color: white;
    border-color: #854E7A;
}

.page-link:hover {
    background-color: #F9BF53;
    color: #333;
    border-color: #F9BF53;
}

/* ===== 사이드바 ===== */
.sidebar {
    margin-bottom: 40px;
}

.sidebar-widget {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9e0ea;
    position: relative;
    font-weight: 600;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #854E7A;
}

.recent-posts,
.popular-posts,
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li,
.popular-posts li,
.category-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts li:last-child,
.popular-posts li:last-child,
.category-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts a,
.popular-posts a,
.category-list a {
    display: flex;
    color: #333;
    transition: color 0.3s ease;
}

.recent-posts a:hover,
.popular-posts a:hover,
.category-list a:hover {
    color: #854E7A;
}

.recent-posts .post-img {
    width: 80px;
    height: 60px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-posts .post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-posts .post-info,
.popular-posts .post-info {
    flex: 1;
}

.recent-posts h4,
.popular-posts h4 {
    font-size: 0.9rem;
    margin: 0 0 5px;
    line-height: 1.4;
    font-weight: 500;
}

.post-date,
.post-views {
    color: #999;
    font-size: 0.8rem;
}

.post-views i {
    color: #F9BF53;
    margin-right: 3px;
}

/* 그리드 레이아웃 클래스 */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

@media screen and (min-width: 1200px) {
    .grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .insight-card-img {
        height: 220px;
    }
    .insight-card {
        max-width: none;
    }
}

@media (max-width: 991px) {
    .insight-card-img {
        height: 220px;
    }
    
    .sidebar {
        margin-top: 40px;
    }

    .insight-card {
        max-width: none;
    }
}

@media (max-width: 767px) {
    .insights-page .page-title {
        font-size: 2.5rem;
    }
    
    .insights-page .page-subtitle {
        font-size: 1rem;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .insight-card-img {
        height: 200px;
    }
    
    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .filter-tabs li {
        flex-shrink: 0;
    }

    .insight-card {
        max-width: none;
        min-width: none;
    }
}

/* ===== 인사이트 상세 페이지 스타일 ===== */
.insight-detail-page {
    background-color: #ffffff;
}

/* 인사이트 헤더 */
.insight-header {
    padding: 60px 0;
    background-color: #f9fafc;
    border-bottom: 1px solid #e9e0ea;
}

.insight-header .category a {
    color: #854E7A;
    font-weight: 500;
    text-decoration: none;
}

.insight-header .category a:hover {
    color: #77313D;
    text-decoration: underline;
}

.insight-header .date {
    color: #666;
}

.insight-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.2;
}

.author {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #666;
}

.author-name {
    font-weight: 500;
    color: #333;
}

.social-actions {
    margin-top: 30px;
}

.like-btn, .share-btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.like-btn:hover {
    background-color: #854E7A;
    color: white;
    border-color: #854E7A;
}

.share-btn:hover {
    background-color: #666;
    color: white;
    border-color: #666;
}

/* 콘텐츠 영역 */
.insight-content {
    padding: 50px 0;
}

.featured-image {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: #333;
}

.content h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: #333;
}

.content p {
    margin-bottom: 20px;
}

.content blockquote {
    background-color: #f9fafc;
    border-left: 4px solid #854E7A;
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #666;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 30px 0;
}

.content ul, .content ol {
    margin: 20px 0;
    padding-left: 20px;
}

.content li {
    margin-bottom: 10px;
}

.tags {
    margin: 30px 0;
}

.tags .badge {
    font-weight: 500;
    background-color: #f0f0f0;
    color: #666;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tags .badge:hover {
    background-color: #854E7A;
    color: white;
}

.share-buttons {
    margin-top: 40px;
    padding: 25px;
    background-color: #f9fafc;
    border-radius: 10px;
    border: 1px solid #e9e0ea;
}

/* 소셜 미디어 공유 버튼 스타일 */
.share-btn-facebook {
    background-color: #3b5998;
    color: white;
    border: none;
}

.share-btn-facebook:hover {
    background-color: #2d4373;
    color: white;
}

.share-btn-twitter {
    background-color: #1da1f2;
    color: white;
    border: none;
}

.share-btn-twitter:hover {
    background-color: #0c85d0;
    color: white;
}

.share-btn-linkedin {
    background-color: #0077b5;
    color: white;
    border: none;
}

.share-btn-linkedin:hover {
    background-color: #005582;
    color: white;
}

.share-btn-copy {
    background-color: #F9BF53;
    color: #333;
    border: none;
    font-weight: 500;
}

.share-btn-copy:hover {
    background-color: #F5D823;
    color: #333;
}

.share-buttons h5 {
    margin-bottom: 20px;
    font-weight: 600;
}

.author-bio {
    margin-top: 40px;
    padding: 25px;
    background-color: #f9fafc;
    border-radius: 10px;
    border: 1px solid #e9e0ea;
    display: flex;
    align-items: center;
}

.author-image {
    margin-right: 20px;
}

.author-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.author-info p {
    color: #666;
    margin-bottom: 0;
    line-height: 1.5;
}

/* 관련 글 섹션 */
.related-posts {
    padding: 50px 0;
    background-color: #f9fafc;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
    text-align: center;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #F9BF53;
    margin: 15px auto 0;
}

.related-posts .card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-posts .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.related-posts .card-img-top {
    height: 180px;
    object-fit: cover;
    position: relative;
    overflow: hidden;
}

.related-posts .card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-posts .card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.related-posts .card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-posts .card-title a:hover {
    color: #854E7A;
}

.related-posts .card-text {
    color: #666;
    font-size: 0.9rem;
}

/* 최신 글 및 인기 글 섹션 */
.more-posts {
    padding: 50px 0;
}

.more-posts .section-title {
    font-size: 1.5rem;
    text-align: left;
    margin-bottom: 25px;
}

.more-posts .section-title:after {
    margin: 10px 0 0;
}

.more-posts .list-group-item {
    padding: 15px;
    border-color: #e9e0ea;
    transition: all 0.3s ease;
}

.more-posts .list-group-item:hover {
    background-color: #f9fafc;
}

.more-posts .list-group-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.more-posts h6 {
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #333;
}

.more-posts small {
    font-size: 0.8rem;
}

.more-posts .text-primary {
    color: #854E7A !important;
}

/* CTA 섹션 */
.cta-section {
    padding: 60px 0;
    background-color: #854E7A;
    position: relative;
}

.cta-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../images/pattern.png);
    background-size: cover;
    opacity: 0.05;
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 25px;
    opacity: 0.9;
}

.cta-section .btn {
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 반응형 스타일 */
@media (max-width: 991px) {
    .insight-title {
        font-size: 2rem;
    }
    
    .content {
        font-size: 1rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .share-buttons .d-flex {
        flex-wrap: wrap;
    }
    
    .share-buttons .btn {
        margin-bottom: 10px;
    }
}

@media (max-width: 767px) {
    .insight-header {
        padding: 40px 0;
    }
    
    .insight-title {
        font-size: 1.8rem;
    }
    
    .social-actions {
        flex-direction: column;
    }
    
    .social-actions .btn {
        margin-bottom: 10px;
    }
    
    .related-posts .card-img-top {
        height: 160px;
    }
    
    .cta-section h2 {
        font-size: 1.6rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
}