/*
 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
*/

/* ==============================
   PC 레이아웃 안정화
============================== */
@media (min-width: 1025px) {

  /* 전체 컨테이너 */
  .container.grid-container {
    max-width: 1360px; /* 1000 + 360 맞춤 */
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  /* 본문 + 사이드바 */
  .generate-columns-container {
    display: grid;
    grid-template-columns: 1000px 360px; /* 숫자 충돌 제거 */
    column-gap: 0;
    box-sizing: border-box;
  }

  /* 본문 wrapper */
  #primary.content-area {
    width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

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

  /* 본문 내용 (고정 width 제거 → max-width로 변경) */
  .entry-content {
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
  }

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

  /* 사이드바 */
  #right-sidebar {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ==============================
   테이블 깨짐 방지 (추가)
============================== */

.entry-content {
  overflow-x: auto;
}

.entry-content table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  word-break: keep-all;
  white-space: normal;
}

/* ==============================
   검색창 스타일
============================== */

.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;
}

.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;
}

/* ==============================
   헤딩 스타일
============================== */

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 {
  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;
}
.site-main {
  flex: 3 !important;
}

.widget-area {
  flex: 1 !important;
}

/* ==============================
   모바일 홈 포스트 목록 수정
============================== */
@media (max-width: 768px) {
  .custom-post-box {
    flex-direction: column !important;
  }

  .custom-thumb {
    width: 100% !important;
  }

  .custom-thumb img {
    width: 100% !important;
    height: auto !important;
  }
}

body {
  background-color: #f8f9ff !important;
}

.wp-post-image {
  border-radius: 12px;
}

.wp-post-image {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-post-box {
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 30px;
}

.custom-summary a[href*="더 읽기"],
.excerpt a:last-child {
  display: inline-block;
  margin-top: 10px;
  color: #2563eb;
  font-weight: 600;
}

.custom-thumb img {
  transition: transform 0.3s ease;
}

.custom-thumb img:hover {
  transform: scale(1.03);
}


/* 구글 애드센스 광고 항상 표시 */
ins.adsbygoogle {
    display: block !important;
    visibility: visible !important;
	width: auto !important;      /* 원래 광고 크기 유지 */
    height: auto !important;
    min-height: 50px !important; /* 필요 최소 높이 */
    max-width: 336px !important; /* PC 기준 최대 폭 예시 */
    margin: 0 auto;              /* 가운데 정렬 */
}
