/*
 * 삼천사 메인 디자인의 그누보드 결합 보정용 CSS
 * 실제 디자인 CSS는 원본 공개 URL을 main.head.sub.php에서 불러옵니다.
 * 이 파일은 그누보드와 충돌하는 부분과 정적 달력 데모만 보정합니다.
 */
html{scroll-behavior:smooth}
#hd_login_msg{display:none!important}

.demo-calendar{background:#fff;border-radius:16px;padding:28px 32px 22px;box-sizing:border-box;min-height:318px;color:#222;font-family:"Pretendard","Noto Sans KR",sans-serif}
.demo-calendar-head{display:flex;align-items:center;justify-content:center;gap:24px;margin-bottom:18px}
.demo-calendar-head strong{font-size:18px;font-weight:700}
.demo-calendar-head button{border:0;background:transparent;font-size:22px;color:#aaa;cursor:pointer;padding:0 8px}
.demo-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);text-align:center}
.demo-week{font-size:12px;font-weight:600;margin-bottom:9px;color:#333}
.demo-days{row-gap:7px;font-size:12px;color:#444}
.demo-days span{height:27px;display:flex;align-items:center;justify-content:center}
.demo-days .today{width:27px;margin:auto;border-radius:50%;background:#a65f59;color:#fff;font-weight:700}
.demo-calendar-note{margin-top:16px;background:#f9f5f3;border-radius:8px;min-height:46px;display:flex;align-items:center;gap:12px;padding:0 15px;font-size:12px}
.demo-calendar-note b{color:#a55d55;font-size:14px}
@media(max-width:768px){.demo-calendar{padding:20px 16px}.demo-calendar-note{align-items:flex-start;flex-direction:column;gap:3px;padding:10px 12px}}

/* 관리자 배너관리 연동: 링크가 있는 메인 배너도 기존 이미지 레이아웃 유지 */
.main-visual .item .img > a {
    display: block;
    width: 100%;
    height: 100%;
}
.main-visual .item .img > a > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
 * 일반 그누보드 게시판 페이지
 * - 메인과 동일한 삼천사 header/footer 사용
 * - 기본 그누보드 header/aside/footer는 head.php/tail.php에서 출력하지 않음
 * - 가운데에는 선택한 게시판 스킨만 표시
 * ========================================================= */
body#sub #container.samcheonsa-board-page{
    width:100%!important;
    max-width:none!important;
    min-height:520px;
    margin:0!important;
    padding:0!important;
    float:none!important;
    background:#fff;
    box-sizing:border-box;
}
body#sub #container.samcheonsa-board-page .gnuboard-sub-content{
    width:100%;
    max-width:1240px;
    min-height:520px;
    margin:0 auto;
    padding:80px 20px 110px;
    box-sizing:border-box;
}
body#sub #container.samcheonsa-board-page .gram-board{
    width:100%!important;
    max-width:none!important;
    margin:0;
}
/* 기본 테마에서 게시판 주변에 넣는 타이틀/aside 계열이 혹시 남더라도 노출하지 않음 */
body#sub .samcheonsa-board-page #container_title,
body#sub .samcheonsa-board-page #aside,
body#sub .samcheonsa-board-page .sct_wrap,
body#sub .samcheonsa-board-page + #aside{display:none!important;}

@media (max-width:1024px){
    body#sub #container.samcheonsa-board-page .gnuboard-sub-content{padding:60px 20px 90px;}
}
@media (max-width:768px){
    body#sub #container.samcheonsa-board-page{min-height:400px;}
    body#sub #container.samcheonsa-board-page .gnuboard-sub-content{min-height:400px;padding:38px 16px 70px;}
}


/* =========================================================
 * 게시판 전용 레이아웃 강제 정상화 v2
 * 원본 삼천사 서브페이지 CSS는 sub-visual/path-wrap 존재를 전제로 하므로,
 * 그 영역을 생략하는 그누보드 게시판에서는 header/container/footer를
 * 일반 문서 흐름으로 되돌려 서로 겹치거나 좌우로 배치되지 않게 합니다.
 * ========================================================= */
body#sub .samcheonsa-board-wrapper{
    display:block!important;
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:100vh!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    float:none!important;
    clear:both!important;
}

body#sub .samcheonsa-board-wrapper > #header{
    display:block!important;
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    z-index:100!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:96px!important;
    margin:0!important;
    padding:0!important;
    float:none!important;
    clear:both!important;
    transform:none!important;
    background:#fff!important;
    box-sizing:border-box!important;
}
body#sub .samcheonsa-board-wrapper > #header .contain{
    position:relative!important;
    width:calc(100% - 40px)!important;
    max-width:1240px!important;
    min-height:96px!important;
    margin:0 auto!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    float:none!important;
    clear:both!important;
    box-sizing:border-box!important;
}
body#sub .samcheonsa-board-wrapper > #header .sitelogo{
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    flex:0 0 auto!important;
    margin:0!important;
    float:none!important;
    transform:none!important;
}
body#sub .samcheonsa-board-wrapper > #header #gnb{
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    width:auto!important;
    margin:0 0 0 auto!important;
    float:none!important;
    transform:none!important;
}
body#sub .samcheonsa-board-wrapper > #header + .mobile-navigation,
body#sub .samcheonsa-board-wrapper > #header ~ .mobile-overlay{
    float:none!important;
}

body#sub .samcheonsa-board-wrapper > #container.samcheonsa-board-page{
    display:block!important;
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    z-index:1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    min-height:520px!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    float:none!important;
    clear:both!important;
    transform:none!important;
    overflow:visible!important;
    background:#fff!important;
    box-sizing:border-box!important;
}
body#sub .samcheonsa-board-wrapper > #container.samcheonsa-board-page > .gnuboard-sub-content{
    display:block!important;
    position:relative!important;
    width:calc(100% - 40px)!important;
    max-width:1200px!important;
    min-width:0!important;
    height:auto!important;
    min-height:520px!important;
    margin:0 auto!important;
    padding:72px 0 100px!important;
    float:none!important;
    clear:both!important;
    box-sizing:border-box!important;
}
body#sub .samcheonsa-board-wrapper > #container.samcheonsa-board-page .gram-board{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    float:none!important;
    clear:both!important;
    box-sizing:border-box!important;
}

body#sub .samcheonsa-board-wrapper > #footer{
    display:block!important;
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    z-index:1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    float:none!important;
    clear:both!important;
    transform:none!important;
    box-sizing:border-box!important;
}
body#sub .samcheonsa-board-wrapper > #footer .contain{
    width:calc(100% - 40px)!important;
    max-width:1240px!important;
    margin:0 auto!important;
    float:none!important;
    clear:both!important;
    box-sizing:border-box!important;
}
body#sub .samcheonsa-board-wrapper > .quick{
    position:fixed!important;
    float:none!important;
}

@media (max-width:1024px){
    body#sub .samcheonsa-board-wrapper > #header{min-height:78px!important;}
    body#sub .samcheonsa-board-wrapper > #header .contain{min-height:78px!important;}
    body#sub .samcheonsa-board-wrapper > #container.samcheonsa-board-page > .gnuboard-sub-content{
        width:calc(100% - 32px)!important;
        padding:52px 0 80px!important;
    }
}
@media (max-width:768px){
    body#sub .samcheonsa-board-wrapper > #header{min-height:66px!important;}
    body#sub .samcheonsa-board-wrapper > #header .contain{
        width:calc(100% - 28px)!important;
        min-height:66px!important;
    }
    body#sub .samcheonsa-board-wrapper > #container.samcheonsa-board-page{
        min-height:400px!important;
    }
    body#sub .samcheonsa-board-wrapper > #container.samcheonsa-board-page > .gnuboard-sub-content{
        width:calc(100% - 28px)!important;
        min-height:400px!important;
        padding:36px 0 64px!important;
    }
    body#sub .samcheonsa-board-wrapper > #footer .contain{
        width:calc(100% - 28px)!important;
    }
}

/* =========================================================
 * 게시판 헤더 초기 표시 보정 v3
 * 원본 삼천사 헤더는 비주얼 이미지 위에서는 흰색 로고/메뉴를 사용하고
 * hover 시 흰 배경 + 진한 로고/메뉴로 전환됩니다.
 * 게시판은 서브 비주얼을 사용하지 않으므로 처음부터 hover 상태처럼 표시합니다.
 * ========================================================= */
body#sub .samcheonsa-board-wrapper > #header{
    background:#fff!important;
}

body#sub .samcheonsa-board-wrapper > #header .sitelogo a{
    display:block!important;
    width:218px!important;
    height:72px!important;
    background-image:url("https://www.3004.or.kr/images/common/logo.png")!important;
    background-repeat:no-repeat!important;
    background-position:left center!important;
    background-size:contain!important;
    color:transparent!important;
    font-size:0!important;
    line-height:0!important;
    text-indent:-9999px!important;
    overflow:hidden!important;
    opacity:1!important;
    visibility:visible!important;
}

body#sub .samcheonsa-board-wrapper > #header #gnb,
body#sub .samcheonsa-board-wrapper > #header #gnb > ul,
body#sub .samcheonsa-board-wrapper > #header #gnb > ul > li,
body#sub .samcheonsa-board-wrapper > #header #gnb > ul > li > a{
    opacity:1!important;
    visibility:visible!important;
}

body#sub .samcheonsa-board-wrapper > #header #gnb > ul > li > a{
    color:#222!important;
}

body#sub .samcheonsa-board-wrapper > #header #gnb > ul > li:hover > a,
body#sub .samcheonsa-board-wrapper > #header #gnb > ul > li.active > a,
body#sub .samcheonsa-board-wrapper > #header #gnb > ul > li.on > a{
    color:#9b4d44!important;
}

@media (max-width:1024px){
    body#sub .samcheonsa-board-wrapper > #header .sitelogo a{
        width:178px!important;
        height:58px!important;
    }
}

@media (max-width:768px){
    body#sub .samcheonsa-board-wrapper > #header .sitelogo a{
        width:150px!important;
        height:50px!important;
    }
}
