/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* 전체 컨테이너 너비 확장 */
@media (min-width: 1025px) {
  /* 전체 레이아웃 wrapper */
  .container.grid-container {
    max-width: 1260px !important;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  /* 본문 + 사이드바 2단 grid 레이아웃 */
  .generate-columns-container {
    display: grid !important;
    grid-template-columns: 1000px 260px !important;  /* 본문+사이드바 포함 총 1260px */
    column-gap: 0 !important;
    box-sizing: border-box;
  }

  /* 본문 wrapper */
  #primary.content-area {
    width: 1000px !important; /* 본문 전체 크기 (내용 + 여백) */
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  /* 아티클 내부 전체 */
  .inside-article {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  /* 본문 내용: 900px 고정, 가운데 정렬 */
  .entry-content {
    width: 900px !important;           /* 핵심: 본문 내용 폭 고정 */
    margin-left: 0px !important;      /* 좌우 여백 = (1000 - 900)/2 */
    margin-right: 0px !important;
    box-sizing: border-box;
  }

  /* 내부 요소들 */
  .entry-content > * {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* 사이드바 */
  #right-sidebar {
    width: 360px !important;
    box-sizing: border-box;
  }
}

/* 검색 입력창 높이 및 글자 크기 조정 */
.widget_search input[type="search"] {
  height: 32px !important;             /* 전체 입력창 높이 조절 */
  padding: 4px 8px !important;         /* 위아래/좌우 여백 */
  font-size: 15px !important;          /* 텍스트 크기 */
  line-height: 1.4 !important;         /* 줄 높이로 정렬 */
  box-sizing: border-box;              /* 패딩 포함 너비 계산 */
}

/* 검색 버튼(<button>) 높이 및 글자 크기 정리 */
.widget_search button {
  height: 32px !important;             /* 버튼 높이 입력창과 동일하게 */
  padding: 0 12px !important;          /* 좌우 여백만 설정 */
  font-size: 15px !important;          /* 글자 크기 동일하게 */
  line-height: 1.4 !important;         /* 줄 높이 */
  white-space: nowrap !important;      /* 버튼 안 텍스트 줄바꿈 방지 */
  box-sizing: border-box;              /* 너비 계산 방식 통일 */
  font-family: "Noto Sans KR", sans-serif; /* 한글 폰트 명시 */
}

/* 기본 상태에서는 밑줄 제거 */
a {
  text-decoration: none;
}

/* 마우스 오버 시 밑줄 표시 */
a:hover {
  text-decoration: underline;
}

/* ------------------------------
   헤딩(h2, h3 등) 크기 조정
------------------------------ */
h1 {
  font-size: 28px;
  line-height: 1.4;
  margin-bottom: 1em;
}
h2 {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 1em;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 0.8em;
}

/* ------------------------------
   <code> 태그에 코드 스타일 적용
------------------------------ */
code {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f4f4f4;
  padding: 2px 4px;
  font-size: 14px;
  color: #c7254e;
  border-radius: 4px;
}

.related-posts {
	border: 2px solid #e9e9e9;
	border-radius: 20px;
	padding: 20px;
}
/* =========================================================
   [홈 전용] 고정폭 레이아웃 해제 (히어로 커버 100% 폭 확보)
   - style.css에서 잡아둔 1260/1000/900 고정폭이 홈을 망가뜨리는 걸 차단
   ========================================================= */

@media (min-width: 1025px) {
  body.home .container.grid-container{
    max-width: 100% !important;
    width: 100% !important;
  }

  /* 홈에서 2단 그리드 강제 해제 */
  body.home .generate-columns-container{
    display: block !important; /* grid 해제 */
  }

  /* 홈에서 본문 폭 고정 해제 */
  body.home #primary.content-area{
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 홈에서 entry-content 900px 고정 해제 (핵심) */
  body.home .entry-content{
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 홈에서 커버/alignfull은 무조건 화면 끝까지 */
  body.home .wp-block-cover,
  body.home .wp-block-cover.alignfull{
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
  }
}

/* 홈 - 사진 카드 줄(가로 스크롤) */
.home .home-card-row{
  display:flex !important;
  gap:24px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x mandatory;
  padding: 24px 24px 40px !important;
}

/* 카드(각 이미지 블록) - 줄바꿈 방지 + 카드 폭 고정 */
.home .home-card-row > *{
  flex: 0 0 auto !important;
  scroll-snap-align:start;
}

/* 이미지 자체를 카드처럼 */
.home .home-card-row img{
  width: 420px;              /* 카드 폭 (원하면 360~520으로 조절) */
  height: 520px;             /* 카드 높이 */
  object-fit: cover;
  border-radius: 24px;
  display:block;
}

/* 모바일에서는 카드 조금 작게 */
@media (max-width: 768px){
  .home .home-card-row img{
    width: 280px;
    height: 360px;
  }
}
/* ✅ 홈에서는 글/블로그용 고정폭 레이아웃 해제 */
@media (min-width: 1025px){
  body.home .container.grid-container{
    max-width: 100% !important;
    width: 100% !important;
  }

  body.home .generate-columns-container{
    display: block !important;        /* 2단 grid 해제 */
    grid-template-columns: none !important;
  }

  body.home #primary.content-area{
    width: 100% !important;
  }

  body.home .entry-content{
    width: 100% !important;
    margin: 0 !important;
  }
}
