/*
 * ===================================================================
 * Global Stylesheet for sf-lecture-one Theme
 * ===================================================================
 *
 * 이 파일은 테마의 모든 페이지에 공통으로 적용되는 기본 스타일을 정의합니다.
 * 폰트, 색상, 기본 레이아웃, 공통 요소 등의 스타일이 포함됩니다.
 *
 * @file       assets/css/global.css
 * @package    sf-lecture-one
 * @version    1.2.0
 * @date       2024-05-24 12:00:00
 */


/* ==========================================================================
   1. 기본 & 타이포그래피 (Reset & Typography)
   ========================================================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

a {
    color: #0073aa;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}


/* ==========================================================================
   2. 일반 헤더 & 푸터 (Standard Header & Footer)
   - '강의' 관련 페이지를 제외한 일반 글/페이지에서 사용되는 헤더/푸터 스타일.
   ========================================================================== */
.sf-lt-one-site-header {
    background-color: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sf-lt-one-site-branding .site-title a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #222;
    text-decoration: none;
}
.sf-lt-one-main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
.sf-lt-one-site-footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #e5e5e5;
}


/* ==========================================================================
   3. 레이아웃 재정의 (Layout Overrides)
   - functions.php에서 추가하는 body 클래스를 사용하여 특정 페이지의 레이아웃을 변경.
   ========================================================================== */
/*
 * '강의/챕터 상세' 페이지 (body.lecture-full-width-layout)에서
 * 일반 헤더와 푸터를 숨겨서 몰입형 3단 레이아웃을 위한 공간을 확보합니다.
 */
body.lecture-full-width-layout .sf-lt-one-site-header,
body.lecture-full-width-layout #page > .sf-lt-one-site-footer {
    display: none;
}


/* ==========================================================================
   4. 코드 블록 및 인라인 코드 스타일 (Code Block & Inline Code)
   ========================================================================== */

/*
 * [핵심 변경] <pre> 태그로 감싸진 코드 블록의 스타일링은 이제
 * /assets/vendor/prism/prism.css 파일이 전담합니다.
 * 이 파일에서는 스타일 충돌을 방지하기 위해 관련 규칙을 모두 제거했습니다.
 */

/*
 * 본문 내의 인라인 코드(`<code>`) 스타일은 Prism.js의 영향을 받지 않으므로,
 * 기존 스타일을 그대로 유지하여 디자인 일관성을 확보합니다.
 * :not(pre) > code 선택자는 <pre> 태그의 자식이 아닌 <code> 태그만 선택합니다.
 */
:not(pre) > code {
    font-family: 'D2Coding', monospace; /* D2Coding 폰트 적용 */
    background-color: #f0f0f0;
    color: #c7254e; /* 붉은 계열 색상으로 강조 */
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}


/* ==========================================================================
   5. 접근성 클래스 (Accessibility Class)
   ========================================================================== */
/*
 * 워드프레스 기본 테마에서 사용하는 표준 클래스입니다.
 * 시각적으로는 숨기지만, 스크린 리더는 읽을 수 있도록 합니다.
 */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}


/* ==========================================================================
   6. 반응형 (공통 부분)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .sf-lt-one-site-header {
        flex-direction: column;
        gap: 1rem;
    }
    .sf-lt-one-main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}


/* ==========================================================================
   7. 댓글 (Comments) 스타일
   ========================================================================== */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
}

.comments-title,
.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

.comment-list .comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-list .children {
    list-style: none;
    margin-left: 2rem;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 0.75rem;
}

.comment-author .fn {
    font-weight: bold;
    font-style: normal;
}

.comment-meta {
    font-size: 0.85rem;
    color: #777;
    margin-left: auto;
}

.comment-content {
    padding-left: calc(32px + 0.75rem);
}

.reply {
    text-align: right;
    font-size: 0.9rem;
}

.comment-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.comment-form .form-submit {
    text-align: right;
    margin-bottom: 0;
}

.comment-form .submit {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comment-form .submit:hover {
    background-color: #005a87;
}


/* ==========================================================================
   8. 사이트 푸터 (Site Footer) 스타일
   ========================================================================== */
.sf-lt-one-site-footer {
    padding: 2rem;
    font-size: 0.9rem;
    color: #555;
    background-color: #fff;
    border-top: 1px solid #e5e5e5;
}

.sf-lt-one-footer-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.sf-lt-one-footer-links {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.sf-lt-one-footer-links a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.sf-lt-one-footer-links a:hover {
    text-decoration: underline;
    color: #0073aa;
}

.sf-lt-one-site-info {
    font-size: 0.85rem;
    color: #777;
}

.sf-lt-one-site-info a {
    color: #555;
    font-weight: 500;
}

@media screen and (max-width: 480px) {
    .sf-lt-one-footer-links .sep {
        display: none;
    }
    .sf-lt-one-footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }
}