/* V0.2.27 — 취미미술 상세 2페이지: 최외곽 #content 자체를 1180px로 고정 */
body.yj-lh100-hobby-detail-page{
  --yj-lh100-wrap:1180px;
  margin:0!important;
  background:#fff!important;
  color:var(--yj-lh100-text)!important;
  font-family:-apple-system,BlinkMacSystemFont,"Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic","Segoe UI",sans-serif!important;
  overflow-x:hidden!important;
}

/* Astra/테마의 별도 상단 헤더는 감추고 평생교육 공통 헤더만 사용한다. */
body.yj-lh100-hobby-detail-page #masthead,
body.yj-lh100-hobby-detail-page .site-header:not(.yj-lh100-header),
body.yj-lh100-hobby-detail-page header.site-header:not(.yj-lh100-header),
body.yj-lh100-hobby-detail-page .ast-primary-header-bar,
body.yj-lh100-hobby-detail-page .ast-mobile-header-wrap,
body.yj-lh100-hobby-detail-page .yj-lh100-legacy-detail-head-hidden{
  display:none!important;
}

body.yj-lh100-hobby-detail-page .yj-lh100-detail-header-shell{
  width:100%;
  margin:0;
  padding:0;
  background:#fff;
}

/* 테마 바깥 껍데기는 전체 폭으로 두되 실제 과정 콘텐츠는 정확히 1180px 안에 둔다. */
body.yj-lh100-hobby-detail-page #page,
body.yj-lh100-hobby-detail-page .site,
/* V0.2.27 핵심 수정:
 * 이전판은 #content 자체를 100%로 남겨두어 100vw 히어로/배경이 브라우저 끝까지 보일 수 있었다.
 * 이제 실제 과정 콘텐츠의 최외곽 컨테이너 #content/.site-content 자체를 1180px로 중앙 고정하고
 * overflow:hidden으로 내부의 100vw/negative-margin full-bleed도 시각적으로 1180px 밖에 나오지 못하게 한다.
 */
body.yj-lh100-hobby-detail-page #content,
body.yj-lh100-hobby-detail-page #content.site-content,
body.yj-lh100-hobby-detail-page .site-content{
  width:min(var(--yj-lh100-wrap),calc(100% - 32px))!important;
  max-width:var(--yj-lh100-wrap)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:28px 0 44px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

/* 1차 안전선: Astra 컨테이너가 있으면 1180px. */
body.yj-lh100-hobby-detail-page #content>.ast-container,
body.yj-lh100-hobby-detail-page #content.site-content>.ast-container,
body.yj-lh100-hobby-detail-page .site-content>.ast-container{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}

/* 2차 안전선: Astra 구조가 달라도 primary/main 자체를 직접 1180px로 고정. */
body.yj-lh100-hobby-detail-page #primary.content-area,
body.yj-lh100-hobby-detail-page #primary{
  float:none!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

/* #primary 안의 main은 다시 폭을 줄이지 않고 부모 1180px를 그대로 사용. */
body.yj-lh100-hobby-detail-page #primary main.site-main{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

/* #primary가 없는 특수 템플릿도 대응. */
body.yj-lh100-hobby-detail-page .site-content>main.site-main,
body.yj-lh100-hobby-detail-page .site-content>.ast-container>main.site-main{
  width:min(var(--yj-lh100-wrap),calc(100% - 32px))!important;
  max-width:var(--yj-lh100-wrap)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

body.yj-lh100-hobby-detail-page article.page,
body.yj-lh100-hobby-detail-page .entry-content{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

/* 핵심: 기존 상세페이지의 100vw/full-bleed 섹션도 이미지·배경색·띠 전체를 1180px 안으로 회수. */
body.yj-lh100-hobby-detail-page .entry-content>*{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  left:0!important;
  right:auto!important;
}

/* V0.2.26 JS가 실제 화면에서 1180px 밖으로 튀어나온 블록만 표시하여 추가 고정한다. */
body.yj-lh100-hobby-detail-page .yj-lh100-force-contained{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  left:0!important;
  right:auto!important;
}

/* Astra가 자동 출력하는 페이지 제목/메타는 기존 과정 본문 제목과 중복되지 않게 숨긴다. */
body.yj-lh100-hobby-detail-page .entry-header:not(.yj-lh100-header),
body.yj-lh100-hobby-detail-page .entry-meta{
  display:none!important;
}

/* Elementor/블록 편집기의 강제 전체폭도 1180px 바깥으로 나가지 못하게 한다. */
body.yj-lh100-hobby-detail-page .elementor,
body.yj-lh100-hobby-detail-page .elementor-page,
body.yj-lh100-hobby-detail-page .elementor-section-wrap,
body.yj-lh100-hobby-detail-page .wp-block-group.alignfull,
body.yj-lh100-hobby-detail-page .alignfull{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}
body.yj-lh100-hobby-detail-page .elementor-section.elementor-section-stretched{
  left:0!important;
  right:auto!important;
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
}
body.yj-lh100-hobby-detail-page .elementor-container{
  width:100%!important;
  max-width:100%!important;
}

/* 배경 이미지/실제 img/video/iframe도 부모 1180px를 넘어가지 않는다. */
body.yj-lh100-hobby-detail-page .entry-content img,
body.yj-lh100-hobby-detail-page .entry-content picture,
body.yj-lh100-hobby-detail-page .entry-content video,
body.yj-lh100-hobby-detail-page .entry-content iframe,
body.yj-lh100-hobby-detail-page .entry-content canvas,
body.yj-lh100-hobby-detail-page .entry-content svg{
  max-width:100%!important;
  box-sizing:border-box!important;
}

@media(max-width:720px){
  body.yj-lh100-hobby-detail-page #content,
  body.yj-lh100-hobby-detail-page #content.site-content,
  body.yj-lh100-hobby-detail-page .site-content{
    width:calc(100% - 22px)!important;
    padding-top:22px!important;
    padding-bottom:34px!important;
  }
  body.yj-lh100-hobby-detail-page #content>.ast-container,
  body.yj-lh100-hobby-detail-page #content.site-content>.ast-container,
  body.yj-lh100-hobby-detail-page .site-content>.ast-container,
  body.yj-lh100-hobby-detail-page #primary.content-area,
  body.yj-lh100-hobby-detail-page #primary,
  body.yj-lh100-hobby-detail-page .site-content>main.site-main,
  body.yj-lh100-hobby-detail-page .site-content>.ast-container>main.site-main{
    width:100%!important;
  }
  body.yj-lh100-hobby-detail-page #primary main.site-main{
    width:100%!important;
  }
}
