/* Sticky Footer Layout - CSS Grid 기반 */

/* html과 body 기본 설정 */
html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 전체 레이아웃 컨테이너 - Grid 사용 */
body.layout-container {
    display: grid !important;
    grid-template-rows: auto 1fr auto !important;
    grid-template-areas: 
        "header"
        "main" 
        "footer" !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 헤더 영역 */
.layout-header {
    grid-area: header !important;
}

/* 메인 컨텐츠 영역 */
.layout-main {
    grid-area: main !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 푸터 영역 */
.layout-footer {
    grid-area: footer !important;
}

/* Grid 미지원 브라우저용 fallback (IE11 등) */
@supports not (display: grid) {
    body.layout-container {
        display: flex !important;
        flex-direction: column !important;
        min-height: 100vh !important;
    }
    
    .layout-header {
        flex: 0 0 auto !important;
    }
    
    .layout-main {
        flex: 1 1 auto !important;
    }
    
    .layout-footer {
        flex: 0 0 auto !important;
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    body.layout-container {
        min-height: 100vh !important;
        grid-template-rows: auto 1fr auto !important;
    }
}

/* 추가 안전장치 */
body.layout-container {
    width: 100% !important;
    overflow-x: hidden !important;
}

/* Bulma와의 충돌 방지 */
body.layout-container * {
    box-sizing: border-box;
} 