/* ============================================================
   자동 스킨 스타일 (스크린샷 재현)
   차일드 테마 폴더에 myskin.css 로 저장
   ============================================================ */

/* ------------------------------------------------------------
   1. 본문 제목 스타일
   h2: 검은 바 + 왼쪽 굵은 세로 악센트 (스크린샷의 큰 제목)
   h3: 흰 바탕 + 검은 테두리 박스 (스크린샷의 "3. 신청 방법" 스타일)
   ------------------------------------------------------------ */
.entry-content h2 {
    position: relative;
    background: #34405a;
    color: #fff;
    font-size: 1.25em;
    font-weight: 700;
    padding: 12px 18px;
    margin: 2.2em 0 1em 14px;
    line-height: 1.4;
}
.entry-content h2::before {
    content: "";
    position: absolute;
    left: -14px;
    top: -5px;
    bottom: -5px;
    width: 8px;
    background: #34405a;
}

.entry-content h3 {
    position: relative;
    background: none;
    color: #111;
    border: none;
    border-bottom: 2px solid #555;
    font-size: 1.1em;
    font-weight: 700;
    padding: 10px 16px;
    margin: 1.8em 0 0.9em 14px;
    line-height: 1.4;
}
.entry-content h3::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 10%;
    height: 90%;
    width: 6px;
    background: #34405a;
}

/* 본문 리스트 · ※ 주석 가독성 */
.entry-content ul,
.entry-content ol {
    line-height: 1.9;
}

/* ------------------------------------------------------------
   2. 자동 목차 박스
   ------------------------------------------------------------ */
.myskin-toc {
    border: 1px solid #d8e2f0;
    border-left: 4px solid #3b6fd4;
    background: #f8fafd;
    border-radius: 6px;
    padding: 18px 22px;
    margin: 1.5em 0 2.5em;
}
.myskin-toc-title {
    font-weight: 700;
    font-size: 1.05em;
    margin: 0 0 10px;
    color: #1a1a1a;
}
.myskin-toc ol {
    margin: 0;
    padding-left: 1.4em;
    line-height: 2;
}
.myskin-toc a {
    color: #2b56b5;
    text-decoration: none;
}
.myskin-toc a:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------
   3. 함께 보면 좋은 글 박스 (✅ 제목 + 👉 링크 목록)
   ------------------------------------------------------------ */
.myskin-related {
    border: 1px solid #d8e2f0;
    border-left: 4px solid #3b6fd4;
    background: #fbfcfe;
    border-radius: 6px;
    padding: 18px 22px;
    margin: 3em 0 1.5em;
}
.myskin-related-title {
    font-weight: 700;
    font-size: 1.05em;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.myskin-related ul {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 2.1;
}
.myskin-related li {
    margin: 0;
}
.myskin-related a {
    color: #2b56b5;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.myskin-related a:hover {
    color: #163a8a;
}

/* ------------------------------------------------------------
   4. 다음 글 다크 배너
   ------------------------------------------------------------ */
.myskin-ad-banner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: #2b2f36;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95em;
    padding: 20px 22px;
    border-radius: 8px;
    margin: 1.5em 0 3em;
    transition: background 0.2s;
}
.myskin-ad-banner:hover {
    background: #3a4049;
}
.myskin-ad-arrow {
    font-size: 1.3em;
    line-height: 1;
}

/* ------------------------------------------------------------
   5. 인기있는 글 모음 (섹션 제목 + 3열 썸네일 카드)
   ------------------------------------------------------------ */
.myskin-popular {
    margin: 2.5em 0 2em;
}
.myskin-popular-title {
    display: inline-block;
    background: #111;
    color: #fff;
    font-weight: 800;
    font-size: 1.1em;
    padding: 10px 20px;
    border-radius: 4px;
    margin: 0 0 20px;
}
.myskin-popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.myskin-card {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 12;
    text-decoration: none !important;
    background: #eef1f5;
}
.myskin-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
}
.myskin-card:hover img {
    transform: scale(1.04);
}
.myskin-card-noimg {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8ecf2, #d5dbe4);
}
.myskin-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font-size: 0.82em;
    line-height: 1.45;
    padding: 8px 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 모바일: 카드 1열 */
@media (max-width: 640px) {
    .myskin-popular-grid {
        grid-template-columns: 1fr;
    }
    .myskin-card {
        aspect-ratio: 16 / 9;
    }
}

/* ------------------------------------------------------------
   6. 버튼 (알약형, 전체 폭)
   숏코드 또는 버튼 블록의 "추가 CSS 클래스"로 사용
   ------------------------------------------------------------ */
.myskin-btn {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 14px auto;
    padding: 15px 20px;
    text-align: center;
    color: #fff !important;
    font-weight: 700;
    font-size: 1em;
    border-radius: 999px;
    text-decoration: none !important;
    transition: filter 0.15s, transform 0.1s;
}
.myskin-btn:hover {
    filter: brightness(1.08);
}
.myskin-btn:active {
    transform: scale(0.99);
}
.myskin-btn-green { background: #22b573; }
.myskin-btn-blue  { background: #3452c8; }
.myskin-btn-teal  { background: #14a3a8; }

/* 버튼 '블록'에서 추가 CSS 클래스로 적용했을 때 대응
   (클래스가 바깥 div에 붙고 실제 글자는 안쪽 a.wp-block-button__link에 있음) */
.myskin-btn.wp-block-button > .wp-block-button__link {
    background: transparent !important;
    color: #fff !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
