@charset "utf-8";
/*
 * Modern Clean Widget - Card Design with Theme Colors
 * 고유 네임스페이스: .mcw-container (Modern Clean Widget)
 * 다른 위젯과 절대 충돌하지 않습니다!
 */

/* ========================================
   테마 색상 변수
   ======================================== */
.mcw-container {
    --mcw-primary: #2563eb;
    --mcw-primary-light: rgba(37, 99, 235, 0.1);
    --mcw-primary-hover: #1d4ed8;
}

/* 테마별 색상 */
.mcw-container.mcw-theme-blue {
    --mcw-primary: #2563eb;
    --mcw-primary-light: rgba(37, 99, 235, 0.1);
    --mcw-primary-hover: #1d4ed8;
}

.mcw-container.mcw-theme-green {
    --mcw-primary: #10b981;
    --mcw-primary-light: rgba(16, 185, 129, 0.1);
    --mcw-primary-hover: #059669;
}

.mcw-container.mcw-theme-purple {
    --mcw-primary: #8b5cf6;
    --mcw-primary-light: rgba(139, 92, 246, 0.1);
    --mcw-primary-hover: #7c3aed;
}

.mcw-container.mcw-theme-orange {
    --mcw-primary: #f59e0b;
    --mcw-primary-light: rgba(245, 158, 11, 0.1);
    --mcw-primary-hover: #d97706;
}

.mcw-container.mcw-theme-pink {
    --mcw-primary: #ec4899;
    --mcw-primary-light: rgba(236, 72, 153, 0.1);
    --mcw-primary-hover: #db2777;
}

.mcw-container.mcw-theme-red {
    --mcw-primary: #ef4444;
    --mcw-primary-light: rgba(239, 68, 68, 0.1);
    --mcw-primary-hover: #dc2626;
}

.mcw-container.mcw-theme-indigo {
    --mcw-primary: #6366f1;
    --mcw-primary-light: rgba(99, 102, 241, 0.1);
    --mcw-primary-hover: #4f46e5;
}

.mcw-container.mcw-theme-teal {
    --mcw-primary: #14b8a6;
    --mcw-primary-light: rgba(20, 184, 166, 0.1);
    --mcw-primary-hover: #0d9488;
}

/* ========================================
   기본 설정 및 리셋 (격리됨)
   ======================================== */
.mcw-container {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
}

.mcw-container * {
    box-sizing: border-box;
}

.mcw-container a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mcw-container a:hover {
    opacity: 0.8;
}

.mcw-container img {
    border: 0;
    max-width: 100%;
    height: auto;
}

/* ========================================
   탭 네비게이션 - 상단형
   ======================================== */
.mcw-container .mcw-tab-top {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0;
    list-style: none;
    border-bottom: 2px solid #e8e8e8;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mcw-container .mcw-tab-top li {
    flex-shrink: 0;
    position: relative;
}

.mcw-container .mcw-tab-top li a {
    display: block;
    padding: 12px 20px;
    font-weight: 500;
    color: #666;
    background: transparent;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

.mcw-container .mcw-tab-top li.active a {
    color: var(--mcw-primary);
    background: var(--mcw-primary-light);
}

.mcw-container .mcw-tab-top li.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--mcw-primary);
}

/* ========================================
   탭 네비게이션 - 좌측형
   ======================================== */
.mcw-container .mcw-tab-left {
    min-width: 160px;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.mcw-container .mcw-tab-left li {
    border-bottom: 1px solid #e8e8e8;
}

.mcw-container .mcw-tab-left li:last-child {
    border-bottom: none;
}

.mcw-container .mcw-tab-left li a {
    display: block;
    padding: 14px 18px;
    color: #666;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mcw-container .mcw-tab-left li.active a,
.mcw-container .mcw-tab-left li a:hover {
    color: var(--mcw-primary);
    background: #fff;
    border-left: 3px solid var(--mcw-primary);
}

/* ========================================
   탭 컨텐츠 영역
   ======================================== */
.mcw-container .mcw-divider {
    margin: 0;
}

.mcw-container .mcw-divider dt {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.mcw-container .mcw-divider dd {
    display: none;
    margin: 0;
    animation: mcwFadeIn 0.3s ease;
}

.mcw-container .mcw-divider dd.open {
    display: block;
}

@keyframes mcwFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   레이아웃 헬퍼
   ======================================== */
.mcw-container .mcw-flex-row {
    display: flex;
    gap: 20px;
}

.mcw-container .mcw-flex-left {
    flex-shrink: 0;
}

.mcw-container .mcw-flex-right {
    flex: 1;
    min-width: 0;
}

/* ========================================
   리스트 스타일 - 카드형 디자인
   ======================================== */
.mcw-container .mcw-list {
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.mcw-container .mcw-list li {
    position: relative;
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.mcw-container .mcw-list li:last-child {
    border-bottom: none;
}

.mcw-container .mcw-list li:hover {
    background: var(--mcw-primary-light);
    transform: translateX(8px);
    border-left: 3px solid var(--mcw-primary);
    padding-left: 15px;
}

/* 게시판/카테고리 라벨 */
.mcw-container .mcw-board,
.mcw-container .mcw-category {
    display: inline-block;
    margin-right: 8px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mcw-primary);
    background: var(--mcw-primary-light);
    border-radius: 6px;
    vertical-align: middle;
}

/* 제목 */
.mcw-container .mcw-title {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.mcw-container .mcw-title:hover {
    color: var(--mcw-primary);
}

/* 댓글/트랙백 카운트 */
.mcw-container .mcw-reply,
.mcw-container .mcw-trackback {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    vertical-align: middle;
}

.mcw-container .mcw-reply a {
    color: var(--mcw-primary);
}

.mcw-container .mcw-trackback a {
    color: #7c3aed;
}

/* 아이콘 */
.mcw-container .mcw-icon {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}

/* 작성자 */
.mcw-container .mcw-author {
    color: #666;
    font-size: 13px;
}

/* 날짜/시간 */
.mcw-container .mcw-date {
    color: #999;
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.mcw-container .mcw-hour {
    color: #bbb;
    font-size: 11px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* ========================================
   테이블 스타일 - 카드형 디자인
   ======================================== */
.mcw-container .mcw-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.mcw-container .mcw-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.mcw-container .mcw-table tr:last-child td {
    border-bottom: none;
}

.mcw-container .mcw-table tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.mcw-container .mcw-table tr:hover {
    background: var(--mcw-primary-light);
    transform: translateX(8px);
}

.mcw-container .mcw-table tr:hover td:first-child {
    border-left: 3px solid var(--mcw-primary);
    padding-left: 15px;
}

.mcw-container .mcw-table td.mcw-title {
    width: 100%;
}

.mcw-container .mcw-table td.mcw-time {
    white-space: nowrap;
    text-align: right;
    padding-right: 18px;
}

/* ========================================
   갤러리 그리드 - 카드형 디자인
   ======================================== */
.mcw-container .mcw-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mcw-container .mcw-gallery li {
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.mcw-container .mcw-gallery li:hover {
    transform: translateX(8px);
    border-color: var(--mcw-primary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 썸네일 */
.mcw-container .mcw-thumb {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 비율 */
    background: #f5f5f5;
    overflow: hidden;
}

.mcw-container .mcw-thumb img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mcw-container .mcw-gallery li:hover .mcw-thumb img {
    transform: translate(-50%, -50%) scale(1.05);
}

.mcw-container .mcw-thumb .mcw-img-none {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 13px;
}

/* 썸네일 위 레이블 */
.mcw-container .mcw-thumb .mcw-board,
.mcw-container .mcw-thumb .mcw-category {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--mcw-primary);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    z-index: 1;
}

/* 갤러리 정보 영역 */
.mcw-container .mcw-gallery-info {
    padding: 14px;
}

.mcw-container .mcw-gallery .mcw-title {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mcw-container .mcw-gallery .mcw-author,
.mcw-container .mcw-gallery .mcw-date {
    display: block;
    font-size: 12px;
    color: #999;
}

/* ========================================
   이미지+제목+내용 스타일 - 매거진형
   ======================================== */
.mcw-container .mcw-zine {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mcw-container .mcw-zine li {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.mcw-container .mcw-zine li:last-child {
    margin-bottom: 0;
}

.mcw-container .mcw-zine li:hover {
    transform: translateX(8px);
    border-color: var(--mcw-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 썸네일 영역 */
.mcw-container .mcw-zine-thumb {
    flex-shrink: 0;
    width: 160px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.mcw-container .mcw-zine-thumb .mcw-thumb {
    padding-top: 0;
    height: 100%;
}

/* 컨텐츠 영역 */
.mcw-container .mcw-zine-content {
    flex: 1;
    min-width: 0;
}

.mcw-container .mcw-zine-title {
    margin-bottom: 10px;
}

.mcw-container .mcw-zine-title .mcw-title {
    font-size: 16px;
    font-weight: 600;
}

.mcw-container .mcw-zine-text {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mcw-container .mcw-zine-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ========================================
   페이지네이션
   ======================================== */
.mcw-container .mcw-navigator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 0;
    list-style: none;
}

.mcw-container .mcw-navigator button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mcw-container .mcw-navigator button:hover {
    border-color: var(--mcw-primary);
    color: var(--mcw-primary);
    background: var(--mcw-primary-light);
}

.mcw-container .mcw-navigator button span {
    display: block;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* 화살표 아이콘 */
.mcw-container .mcw-navigator button.mcw-prev::before {
    content: '←';
    font-size: 16px;
}

.mcw-container .mcw-navigator button.mcw-next::before {
    content: '→';
    font-size: 16px;
}

/* ========================================
   반응형 디자인
   ======================================== */
@media (max-width: 768px) {
    /* 탭 좌측형을 상단형으로 */
    .mcw-container .mcw-flex-row {
        flex-direction: column;
    }
    
    .mcw-container .mcw-tab-left {
        display: flex;
        min-width: 100%;
        background: transparent;
    }
    
    .mcw-container .mcw-tab-left li {
        flex: 1;
        border-bottom: none;
        border-right: 1px solid #e8e8e8;
    }
    
    .mcw-container .mcw-tab-left li:last-child {
        border-right: none;
    }
    
    /* 갤러리 그리드 조정 */
    .mcw-container .mcw-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    /* 매거진 레이아웃 조정 */
    .mcw-container .mcw-zine li {
        flex-direction: column;
    }
    
    .mcw-container .mcw-zine-thumb {
        width: 100%;
        height: 200px;
    }
    
    /* 테이블 글자 크기 축소 */
    .mcw-container .mcw-table {
        font-size: 13px;
    }
    
    .mcw-container .mcw-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .mcw-container {
        font-size: 13px;
    }
    
    .mcw-container .mcw-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mcw-container .mcw-list li {
        padding: 12px 0;
    }
}

/* ========================================
   다크모드 지원 (선택사항)
   ======================================== */
.mcw-container.mcw-dark {
    color: #e0e0e0;
}

.mcw-container.mcw-dark .mcw-list li,
.mcw-container.mcw-dark .mcw-table tr {
    border-color: #333;
}

.mcw-container.mcw-dark .mcw-list li:hover,
.mcw-container.mcw-dark .mcw-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mcw-container.mcw-dark .mcw-title {
    color: #fff;
}

.mcw-container.mcw-dark .mcw-author,
.mcw-container.mcw-dark .mcw-date {
    color: #999;
}

.mcw-container.mcw-dark .mcw-gallery li,
.mcw-container.mcw-dark .mcw-table {
    background: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ========================================
   인쇄 스타일
   ======================================== */
@media print {
    .mcw-container .mcw-navigator,
    .mcw-container .mcw-tab-top,
    .mcw-container .mcw-tab-left {
        display: none;
    }
    
    .mcw-container .mcw-divider dd {
        display: block !important;
    }
}

/* ========================================
   접근성 개선
   ======================================== */
.mcw-container a:focus,
.mcw-container button:focus {
    outline: 2px solid var(--mcw-primary);
    outline-offset: 2px;
}

.mcw-container .mcw-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
