/*
 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: 3fr 1fr !important; /* 본문 75%, 사이드바 25% */
    column-gap: 20px !important; /* 여백 추가 */
  }

  /* 본문 wrapper */
  #primary.content-area {
    width: 100% !important; /* 가변 너비 */
    max-width: 900px !important; /* 최대 너비 */
    margin: 0 auto !important;
    box-sizing: border-box;
  }

  /* 사이드바 */
  #right-sidebar {
    width: 100% !important;
    max-width: 300px !important;
    padding-left: 20px !important;
    box-sizing: border-box;
  }

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

  /* 본문 내용: 최대 900px 고정, 가운데 정렬 */
  .entry-content {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }

  /* 내부 요소들 */
  .entry-content > * {
    max-width: 100% !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 !important; /* 패딩 포함 너비 계산 */
}

/* 검색 버튼 높이 및 글자 크기 정리 */
.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 !important; /* 너비 계산 방식 통일 */
  font-family: "Noto Sans KR", sans-serif !important; /* 한글 폰트 명시 */
}

/* 기본 상태 밑줄 제거 */
a {
  text-decoration: none !important;
}

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

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

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

.related-posts {
  border: 2px solid #e9e9e9 !important;
  border-radius: 20px !important;
  padding: 20px !important;
}

/* 모바일 전용 스타일 */
@media only screen and (max-width: 768px) {
  .custom-post-box {
    display: flex !important;
    flex-direction: column !important; /* 이미지, 제목, 요약 순서 변경 */
    gap: 15px !important;
  }

  .custom-thumb {
    width: 100% !important;
    margin-bottom: 15px !important;
  }
  
  /* 이미지 꽉 채우기 */
  .custom-thumb img {
    max-width: 100% !important;
    width: 100% !important;   /* 부모 너비 100% */
    height: auto !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
    object-fit: contain !important;
  }
}
