/* marketing-style.css */

:root {
    --color-bg: #151515;
    --color-surface: #222;
    --color-header: #333;
    --color-border: #616161;
    --color-text-primary: #ffffff;
    /*--color-text-secondary: #ccc;*/
    --color-accent: #b50000;
    --color-accent-hover: #c62828;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 기본 폰트 및 레이아웃 설정 */
body {
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    background-color: var(--color-bg);
}

/* 메인 컨테이너 */
.marketing-container, .marketing-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 0px 20px 0px 20px; */
}

/* 페이지 상단 헤더 */
.intro-header {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 140px;
    color:#fff;
}

.intro-header h1 {
    font-size: 3rem;
    font-weight: 700;
}

/* 섹션 공통 스타일 */
.recommended-post-section, .past-posts-section {
    margin-bottom: 60px;
}

.recommended-post-section h2, .past-posts-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    color:#fff;
}

/* 추천 포스트 롤링 배너 */
.recommended-post-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.recommended-post-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.recommended-post-card {
    flex: 0 0 100%; /* 각 슬라이드가 컨테이너 너비를 100% 차지 */
    display: flex;
    background-color: var(--card-bg-color, #e0e0e0);
    color: var(--card-text-color, #111);
    border-radius: 12px;
    overflow: hidden;
    padding: 40px;
    gap: 40px;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10;
}

.slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.slider-arrow.prev {
    left: 15px;
}

.slider-arrow.next {
    right: 15px;
}
/* 추천 포스트 롤링 배너 끝 */


.recommended-post-card .post-content {
    flex: 1 1 46%; /* flex-grow:1, flex-shrink:1, flex-basis: 46% */
}

.recommended-post-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 35px;
}

.recommended-post-card p {
    font-size: 1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.recommended-post-card a {
    color: #111; /* 텍스트 색상과 동일하게 */
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #111; /* 테두리 색상 */
    padding: 10px 20px;
    border-radius: 50px;
    transition: background-color 0.3s, color 0.3s;
}

.recommended-post-card a:hover {
    background-color: #111;
    color: #e0e0e0;
}

.recommended-post-card .post-image {
    flex: 1 1 54%; /* flex-grow:1, flex-shrink:1, flex-basis: 54% */
}

.recommended-post-card .post-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.recommended-post-card .more-button {
    display: inline-block; /* 패딩 적용을 위해 추가 */
    color: var(--card-text-color, #111);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--card-text-color, #111);
    padding: 10px 20px;
    border-radius: 50px;
    transition: background-color 0.3s, color 0.3s;
}

.recommended-post-card:hover .more-button {
    background-color: var(--card-text-color, #111);
    color: var(--card-bg-color, #e0e0e0);
}


/* 지난 포스트 섹션 헤더 */
.past-posts-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*margin-bottom: 20px;*/
}



/* 기존 아코디언 토글 버튼 숨기기 */
.accordion-toggle {
    display: none;
}


.accordion-content {
    display: flex; /* 버튼들을 가로로 나열 */
    gap: 10px; /* 버튼 사이의 간격 */
}


.accordion-content .filter-btn {
    padding: 8px 20px; /* 버튼 패딩 */
    font-family: inherit;
    font-size: 1rem;
    color: #fff;
    border: none;
    background-color: #333; /* 버튼 배경색 */
    border-radius: 8px;
    cursor: pointer;
}

.accordion-content .filter-btn:hover {
    background-color: #b50000; /* 호버 시 배경색 */
    transition: background-color 0.2s, color 0.2s;
}

.accordion-content .filter-btn.active {
    background-color: #b50000; /* 활성화 시 배경색 */
    color: #fff;
    font-weight: 500;
}



/* 게시물 그리드 */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* 게시물 카드 */
.post-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    /*box-shadow: 0 4px 12px rgba(0,0,0,0.08);*/
    /*transition: transform 0.3s, box-shadow 0.3s;*/
}


.post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card .card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card .card-content {
    padding: 20px;
}

.post-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    min-height: 44px; 
}

.category-tags-container {
    display: flex;
    flex-wrap: wrap; /* 태그가 많으면 다음 줄로 넘어가도록 */
    gap: 6px; /* 태그 사이의 좌우 간격 */
}

.category-tag {
    font-size: 0.8rem;
    color: #666;
    background-color: #f2f2f2; /* 태그 배경색 추가 */
    padding: 2px 4px; /* 태그 내부 여백 */
    border-radius: 3px; /* 태그 모서리를 둥글게 */
}

/* --- 페이지네이션 --- */
.marketing-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.75rem;
}

.marketing-pagination button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    border: none;
    background-color: transparent;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s;
}
.marketing-pagination a{text-decoration : none;}
.marketing-pagination a button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
}

.marketing-pagination button:hover {
    color: var(--color-accent);
}

.marketing-pagination button.active {
    background-color: var(--color-accent);
    color: #ffffff;
    font-weight: 700;
    border-radius: 0.25rem;
}

.marketing-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* 반응형 디자인 */
@media (max-width: 992px) {
    .recommended-post-card {
        flex-direction: column;
        padding: 30px;
    }
    .recommended-post-card .post-image {
        max-width: 100%;
        margin-top: 20px;
    }
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .marketing-container{
    margin-left: 20px;
    margin-right: 20px;
    padding: 0px;
    }
    .intro-header{
        margin-top:80px;
    }
    .intro-header h1 {
        font-size: 2.3rem;
        margin-top:100px;
    }
    .recommended-post-section h2, .past-posts-section h2 {font-size: 1.5rem; padding-bottom: 0px;}
    .past-posts-section .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons-container{
        margin:0 auto;
        margin-bottom:20px;
    }
    
    .accordion-content {
        flex-wrap: wrap;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
}


/* --- 상세 페이지 스타일 --- */

.marketing-detail-container {
    background-color: #151515;
    padding: 40px;
}

.post-detail-header {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #777;
    color:#fff;
}

.post-detail-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.post-detail-header .post-meta {
    font-size: 1rem;
    color: #777;
}

.post-detail-image {
    margin-bottom: 40px;
}

.post-detail-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.post-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    color:#fff;
}

.post-detail-content p {
    margin-bottom: 1.5em;
}

.back-to-list {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    margin-bottom: 20px;
    /*border-top: 1px solid #eee;*/
}

.back-to-list a {
    display: inline-block;
    background-color: #b50000;
    color: #fff;
    padding: 12px 30px;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.2s;
}

.back-to-list a:hover {
    background-color: #c62828;
}

.post-not-found {
    text-align: center;
    padding: 80px 20px;
}

.post-not-found h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.post-not-found p {
    color: #666;
    margin-bottom: 30px;
}

.post-not-found a {
    display: inline-block;
    background-color: #b50000;
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.board-link-indicator {
    font-size: 0.8rem;
    color: #b50000; /* 브랜드 컬러 */
    font-weight: 600;
    margin-left: 5px;
}