/*
Theme Name: Winit News Theme
Author: Winit
Description: A modular, SEO-optimized blog theme.
Version: 1.0
*/

/* NanumSquareNeo Font - Direct @font-face (font-weight 정상 작동) */
@font-face {
    font-family: 'NanumSquareNeo';
    font-style: normal;
    font-weight: 100;
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.woff2) format("woff2"),
         url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.woff) format("woff");
    font-display: swap;
}

@font-face {
    font-family: 'NanumSquareNeo';
    font-style: normal;
    font-weight: 300;
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.woff2) format("woff2"),
         url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.woff) format("woff");
    font-display: swap;
}

@font-face {
    font-family: 'NanumSquareNeo';
    font-style: normal;
    font-weight: 400;
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.woff2) format("woff2"),
         url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.woff) format("woff");
    font-display: swap;
}

@font-face {
    font-family: 'NanumSquareNeo';
    font-style: normal;
    font-weight: 500;
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.woff2) format("woff2"),
         url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.woff) format("woff");
    font-display: swap;
}

@font-face {
    font-family: 'NanumSquareNeo';
    font-style: normal;
    font-weight: 700;
    src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.woff2) format("woff2"),
         url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.woff) format("woff");
    font-display: swap;
}

/* Global Styles */
body {
    font-family: 'NanumSquareNeo', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #ffffff;
    /* Explicitly set white background */
}

/* Global Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
}

/* Single Post Layout (Content + Sidebar) */
.single-post-container {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    padding-top: 20px;
    padding-bottom: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 2. Center: Content */
.site-content {
    width: 840px;
    flex-shrink: 0;
}

/* 3. Right: Sidebar (Sticky) */
.widget-area {
    width: 330px;
    flex-shrink: 0;
    position: sticky;
    /* Make the whole sidebar sticky */
    top: 20px;
    /* Offset from top */
    align-self: flex-start;
    /* Required for sticky in flex container */
}

/* Tablet/Mobile Layout */
@media (max-width: 1024px) {
    .single-post-container {
        flex-direction: column;
        padding-left: 20px;
        padding-right: 20px;
    }

    .site-content {
        width: 100%;
        margin-bottom: 40px;
    }

    .widget-area {
        width: 100%;
        max-width: none;
    }
}

/* Page Header (Generic Pages) */
.winit-page-header {
    width: 100%;
    height: 200px;
    background-color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
}

.winit-page-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winit-page-title {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

/* 메인 페이지의 모든 모듈들 사이에 모바일용 두꺼운 회색 여백선(디바이더) 자동 생성 */
@media (max-width: 992px) {
    #primary>* {
        /* 아래쪽에 12px 두께의 회색 띠 생성 */
        border-bottom: 12px solid #f0f0f0;
        padding-bottom: 30px;
        margin-bottom: 30px;
    }

    /* 맨 마지막에 들어간 모듈은 밑에 선을 그을 필요가 없으니 제외 */
    #primary>*:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
}