/* board-magazine.css - 매거진형 게시판 스타일 */

/* 목록 스타일 */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.magazine-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.magazine-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.magazine-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.magazine-thumbnail {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magazine-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.magazine-item:hover .magazine-thumbnail img {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 48px;
}

.magazine-info {
    padding: 20px;
    gap:30px;
    text-align: center !important;
    display: flex !important;
}

.magazine-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.magazine-meta {
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.meta-vol {
    font-weight: 600;
    font-size:15px;
    color: #666 !important;
}

.meta-date {
    color: #444 !important;
}

/* 상세보기 스타일 */
.cover-meta-overlay .meta-vol {
    font-weight: 600;
    font-size:22px;
    color: #fff !important;
}

.cover-meta-overlay .meta-date {
    font-size:18px;
    color: #fff !important;
}

.magazine-view {
    max-width: 1200px;
    margin: 0 auto;
}

.magazine-cover-section {
    margin-bottom: 40px;
}

.magazine-cover {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px !important;
}

.magazine-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.magazine-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.magazine-title {
    font-size: 22px !important;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.magazine-meta-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 16px;
    color: #333;
}

.magazine-meta-header .meta-vol {
    font-weight: 600;
    color: #fff;
}

/* 항목 스타일 */
.magazine-items {
    margin-bottom: 50px;
}

.magazine-item-entry {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 30px;
    background: #fff;
    border:#ddd solid 1px;
    border-radius: 12px;
}

.item-thumbnail {
    flex-shrink: 0;
    margin-top:30px;
    width: 280px;
    overflow: hidden;
    border-radius: 8px;
    margin-left: 20px !important;
}

.item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-thumbnail:hover img {
    transform: scale(1.05);
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
    letter-spacing: -1px;
    line-height: 1.4;
}

.item-title a {
    text-decoration: none;
}

.item-title a:hover {
    text-decoration: underline;
}

.item-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 관련글, 태그, 좋아요, SNS 공유 섹션 */
.related-posts-section,
.tags-section,
.like-dislike-section,
.sns-share-section {
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    margin-top: 20px;
}

.related-posts-section h3,
.tags-section h3,
.like-dislike-section h3,
.sns-share-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.related-post-item {
    background: white;
    padding: 0px 15px;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.related-post-item:hover {
    border-color: #2c5aa0;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.1);
}

.related-post-link {
    text-decoration: none;
    color: inherit;
}

.related-post-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.related-post-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
}

.tags-list {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    background: #ddd;
    color: #222;
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: #999;
    color: #fff;
    transform: translateY(-1px);
}

.like-dislike-section {
    text-align: center;
}

.like-dislike-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.like-btn, .dislike-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.like-btn:hover {
    border-color: #28a745;
    color: #28a745;
    background: #f8fff9;
}

.dislike-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff8f8;
}

.like-btn.active {
    border-color: #28a745;
    color: #28a745;
    background: #d4edda;
}

.dislike-btn.active {
    border-color: #dc3545;
    color: #dc3545;
    background: #f8d7da;
}

.sns-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sns-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sns-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sns-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-navigation {
    margin: 40px 0;
}

.post-nav-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.post-nav-item a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
}

.post-nav-item a:hover {
    color: #3498db;
}

.post-nav-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.post-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.post-action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline-primary {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline-primary:hover {
    background: #3498db;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 반응형 */
@media (max-width: 1024px) {
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .magazine-item-entry {
        flex-direction: column;
    }
    
    .item-thumbnail {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .magazine-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .magazine-cover {
        height: 250px;
    }
    
    .magazine-title {
        font-size: 24px;
    }
    
    .magazine-meta-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .magazine-item-entry {
        padding: 20px;
        gap: 20px;
    }
    
    .item-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .item-title {
        font-size: 20px;
    }
    
    .related-posts-section,
    .tags-section,
    .like-dislike-section,
    .sns-share-section {
        padding: 20px 15px;
    }
    
    .sns-share-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .sns-icons {
        gap: 6px;
    }
    
    .sns-icon {
        width: 36px;
        height: 36px;
    }
    
    .post-action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
    /* 모바일에서 항목 레이아웃: 썸네일 위, 내용 아래 (웹진형) */
    .magazine-items .magazine-item-entry {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .magazine-items .magazine-item-entry .item-thumbnail {
        width: 100% !important;
        max-width: 100% !important;
        margin-top:0px !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        order: -1; /* 썸네일을 위로 */
        height: auto !important;
    }
    
    .magazine-items .magazine-item-entry .item-content {
        width: 100% !important;
    }
    
    /* 타이틀 오버레이 모바일 최적화 */
    .magazine-cover-section .cover-title-overlay.mobile {
        font-size: clamp(34px, 4.5vw, 36px) !important;
        max-width: calc(100% - 30px);
        word-break: keep-all;
        z-index: 2;
    }
    
    .magazine-cover-section .cover-meta-overlay.mobile {
        font-size: 11px !important;
        z-index: 2;
    }
    
    /* 모바일 표지 이미지 높이 조정 */
    .magazine-cover-section .magazine-cover.mobile-only {
        height: auto !important;
        min-height: 250px;
    }
    
    .magazine-cover-section .magazine-cover.mobile-only img {
        width: 100%;
        height: auto;
        display: block;
    }
}