/*
Theme Name: Blue Wind Fast Theme
Description: 블루윈드랩스 다중 도메인 관리에 최적화된 가볍고 빠른 수익형 테마 (자동 도메인별 메인 컬러 반영 변수 탑재)
Author: Blue Wind Labs
Version: 1.2
*/

/* ==========================================
   0. 도메인별 자동 테마 컬러 정의 (CSS 핵심 변수)
   ========================================== */
:root {
    --primary-color: #2563eb;       /* 기본 테마 블루 */
    --primary-hover: #1d4ed8;
    --bg-light: #f4f5f7;
    
    /* 수익화 박스는 고수익/클릭 유도를 위해 모든 사이트 공통 따뜻한 강조색 유지 */
    --ad-bg: #fff8f1;
    --ad-border: #fed7aa;
    --ad-title: #ea580c;
    --ad-link-text: #431407;
}

/* 1. bluewind100.com (사회복지학) -> 신뢰감 높은 딥 네이비 블루 */
body.site-bluewind100-com {
    --primary-color: #1e40af;
    --primary-hover: #1e3a8a;
}

/* 2. wp1.bluewind100.com (심리학) -> 마음을 차분하게 하는 바이올렛 퍼플 */
body.site-wp1-bluewind100-com {
    --primary-color: #6d28d9;
    --primary-hover: #5b21b6;
}

/* 3. wp.bluewind200.com (컴퓨터공학) -> 세련되고 모던한 다크 테크 그레이 */
body.site-wp-bluewind200-com {
    --primary-color: #0f172a;
    --primary-hover: #1e293b;
}

/* 4. wp1.bluewind200.com (의학/한의학) -> 청결하고 편안한 메디컬 티엘 그린 */
body.site-wp1-bluewind200-com {
    --primary-color: #0d9488;
    --primary-hover: #0f766e;
}

/* 5. finetree100.com (스마트 컨슈머 픽) -> 소비 욕구를 자극하는 세련된 앰버 오렌지 */
body.site-finetree100-com {
    --primary-color: #d97706;
    --primary-hover: #b45309;
}

/* 6. wp1.finetree100.com (픽셀 앤 코드) -> 감각적인 크리에이티브 인디고 블루 */
body.site-wp1-finetree100-com {
    --primary-color: #4338ca;
    --primary-hover: #3730a3;
}

/* 7. wp.finetree100.com (늘푸른 지식 정원) -> 자연스럽고 지적인 딥 포레스트 그린 */
body.site-wp-finetree100-com {
    --primary-color: #15803d;
    --primary-hover: #166534;
}

/* 8. wp.bluewind100.com (푸른나무 지식 창고) -> 청량하고 트렌디한 오션 스카이 블루 */
body.site-wp-bluewind100-com {
    --primary-color: #0369a1;
    --primary-hover: #075985;
}


/* ==========================================
   1. 기본 초기화 및 폰트 설정
   ========================================== */
body { 
    margin: 0; 
    padding: 0; 
    background-color: var(--bg-light); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    color: #334155; 
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }


/* ==========================================
   2. 헤더 영역 디자인 (메인 컬러 자동 연동)
   ========================================== */
.my-site-header { 
    background: var(--primary-color); 
    padding: 25px 0; 
    text-align: center; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); 
    transition: background 0.3s ease;
}
.my-site-header h1 { margin: 0; font-size: 1.6rem; font-weight: bold; }
.my-site-header a { color: #ffffff; text-decoration: none; }


/* ==========================================
   3. 전체 레이아웃 구조
   ========================================== */
.my-home-wrapper { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.my-home-container { display: flex; gap: 30px; align-items: flex-start; }
.my-main-content { flex: 1; min-width: 0; }

/* 우측 사이드바 고정 스크롤 */
.my-sidebar-content { 
    width: 300px; 
    flex-shrink: 0; 
    position: -webkit-sticky; 
    position: sticky; 
    top: 30px; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* ==========================================
   4. 좌측 메인 글 리스트 디자인
   ========================================== */
.my-post-card { 
    display: flex; 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    padding: 20px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); 
    gap: 20px; 
    align-items: center; 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.my-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.my-post-thumb { width: 180px; height: 120px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: #f1f5f9; }
.my-post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.my-post-info { flex: 1; position: relative; }

/* 카테고리 뱃지 디자인 (미분류 자동 숨김) */
.my-cat-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    background: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.my-post-title { font-size: 1.15rem; margin: 0 0 8px; font-weight: bold; color: #1e293b; line-height: 1.4; }
.my-post-title:hover { color: var(--primary-color); }
.my-post-excerpt { font-size: 0.9rem; color: #64748b; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* ==========================================
   5. 우측 사이드바 각 위젯 디자인
   ========================================== */
/* 사이드바 기본 박스 */
.my-widget-box, .my-custom-links-box { 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

/* 위젯 제목 */
.my-widget-title, .my-custom-links-title { 
    font-size: 1rem; 
    color: var(--primary-color); 
    margin: 0 0 15px; 
    font-weight: bold; 
    padding-bottom: 10px; 
    border-bottom: 1px solid #e2e8f0; 
}

/* 위젯 1: 도메인 맞춤 정보 링크 */
.my-custom-links-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.my-custom-links-list li { border-bottom: 1px dashed #f1f5f9; }
.my-custom-links-list li:last-child { border-bottom: none; }
.my-custom-links-list a { display: block; font-size: 0.88rem; color: #475569; padding: 10px 6px; border-radius: 4px; }
.my-custom-links-list a:hover { background: #f8fafc; color: var(--primary-color); padding-left: 12px; }

/* 위젯 2: 수익화 추천 상품 박스 */
.my-ad-box { 
    background: var(--ad-bg); 
    padding: 18px 20px; 
    border-radius: 8px; 
    border: 1px solid var(--ad-border); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.03); 
}
.my-ad-title { font-size: 1rem; color: var(--ad-title); margin: 0 0 12px; font-weight: bold; padding-bottom: 8px; border-bottom: 1px solid var(--ad-border); }
.my-ad-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.my-ad-list a { 
    display: block; 
    font-size: 0.85rem; 
    color: var(--ad-link-text); 
    background: #fff; 
    padding: 10px 12px; 
    border-radius: 6px; 
    border: 1px solid var(--ad-border); 
    font-weight: bold; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    overflow: hidden; 
}
.my-ad-list a:hover { 
    background: var(--ad-title); 
    color: #fff; 
    border-color: var(--ad-title);
    padding-left: 16px; 
}

/* 위젯 3: 최신글 */
.my-recent-list { list-style: none; padding: 0; margin: 0; }
.my-recent-item { display: flex; gap: 12px; margin-bottom: 15px; align-items: center; }
.my-recent-item:last-child { margin-bottom: 0; }
.my-recent-item img { width: 50px; height: 50px; border-radius: 4px; object-fit: cover; background: #f1f5f9; flex-shrink: 0; }
.my-recent-title { font-size: 0.85rem; color: #475569; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.my-recent-title:hover { color: var(--primary-color); }


/* ==========================================
   6. 메인 화면 페이지네이션
   ========================================== */
.my-pagination { padding: 30px 0; text-align: center; }
.my-pagination .page-numbers { display: inline-block; padding: 8px 14px; margin: 0 4px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #334155; font-size: 0.9rem; }
.my-pagination .current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); font-weight: bold; }
.my-pagination .page-numbers:hover:not(.current) { border-color: var(--primary-color); color: var(--primary-color); }


/* ==========================================
   7. 상세 본문 페이지 디자인
   ========================================= */
.single-content-box { background: #fff; padding: 40px; border-radius: 8px; border: 1px solid #e2e8f0; line-height: 1.8; font-size: 1.05rem; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.single-title { font-size: 2rem; margin-top: 0; color: #1e293b; border-bottom: 1px solid #e2e8f0; padding-bottom: 20px; margin-bottom: 30px; }
.single-content-box img { max-width: 100%; height: auto; border-radius: 8px; }


/* ==========================================
   8. 모바일 반응형 처리
   ========================================== */
@media (max-width: 768px) {
    .my-home-wrapper { margin: 20px auto; padding: 0 15px; }
    .my-home-container { flex-direction: column; gap: 20px; }
    .my-sidebar-content { width: 100%; position: static; gap: 20px; }
    .my-post-card { flex-direction: column; padding: 15px; gap: 15px; align-items: flex-start; }
    .my-post-thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
    .single-content-box { padding: 25px 20px; }
    .single-title { font-size: 1.5rem; padding-bottom: 15px; margin-bottom: 20px; }
}