@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR&family=Noto+Sans+KR:wght@100..900&display=swap');

/* ==========================================================================
   1. 전역 설정 및 변수
   ========================================================================== */
:root {
    --primary-color: #2ECC71;
    --text-color: #333;
    --text-light-gray: #888;
    --background-gray: #eee;
    --border-color: #ddd;
    --font-main: "IBM Plex Sans KR", sans-serif;
    --breakpoint-desktop: 768px;
    --breakpoint-mobile-small: 600px;
}

html {
    font-size: 100%;
    line-height: 1.8;
    overflow-y: scroll;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    margin: 0;
}

ol,
ul {
    margin: 0;
    padding: 0;
}

ul {
    list-style-type: none;

}

li {
    display: list-item;
    text-align: match-parent;
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

a {
    color: var(--text-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* ==========================================================================
   2. 레이아웃 및 기본 컴포넌트
   ========================================================================== */
.wrapper {
    max-width: 75rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.space-between-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   3. 메인 네비게이션 (모바일 우선)
   ========================================================================== */
.nav-bg {
    background-color: var(--primary-color);
    color: white;
    position: sticky;
    /* [추가] 스크롤 시 상단 고정 (선택 사항) */
    top: 0;
    z-index: 1000;
}

/* [수정] Flexbox 속성 변경으로 로고를 왼쪽에 배치 */
.main-nav-wrapper {
    display: flex;
    justify-content: space-between;
    /* 로고와 메뉴를 양쪽 끝으로 */
    align-items: center;
    /* 수직 중앙 정렬 */
    height: 80px;
    /* [추가] 네비게이션 바 높이 지정 */
}

/* [추가] 로고 스타일을 네비게이션 섹션으로 이동 및 정리 */
.logo-main {
    flex-shrink: 0;
    /* 로고가 좁은 화면에서 찌그러지지 않도록 함 */
}

.custom-logo {
    height: 60px;
    /* 로고 높이 */
    width: auto;
    /* 너비는 비율에 맞게 자동 조절 */
}


.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-menu-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: white;
    margin: 4px 0;
    transition: all 0.2s;
}

.menu-main-nav-container {
    display: none;
    position: absolute;
    top: 80px;
    /* [수정] 네비게이션 바 높이와 동일하게 설정 */
    left: 0;
    width: 100%;
    background-color: #3a3a3a;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.menu-main-nav-container.is-open {
    display: block;
}

.menu-main-nav-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.menu-main-nav-container a {
    display: block;
    padding: 0.8em 0.5em;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-main-nav-container a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.menu-main-nav-container .sub-menu {
    background-color: rgba(0, 0, 0, 0.2);
}

.menu-main-nav-container .sub-menu a {
    padding-left: 2.4em;
}

.menu-main-nav-container>ul>li.menu-item-has-children>a:after {
    content: " ▼";
    font-size: 0.6em;
    margin-left: 0.5em;
}


/* ==========================================================================
   (이하 나머지 코드는 이전과 동일)
   ...
   ========================================================================== */

/* ==========================================================================
   4. 콘텐츠 스타일 (도서, 리스트, 페이지네이션 등)
   ========================================================================== */
.book-cover-container {
    display: block;
    margin: 0 auto 1.5rem auto;
}

.subtitle {
    display: block;
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 0;
}

.main-thumb-area {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
}

.main-thumb-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.main-title {
    margin: 5px 0;
}

.basic-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.basic-list-item {
    border-bottom: 1px solid #e0e0e0;
}

.basic-list-item:last-child {
    border-bottom: none;
}

.basic-list-link {
    display: block;
    padding: 5px;
    transition: background-color 0.2s ease;
}

.basic-list-link:hover {
    background-color: #f5f5f5;
}

.list-item-container {
    display: flex;
    align-items: flex-start;
    gap: 25px;
}

.list-thumb-area {
    flex-shrink: 0;
    width: 180px;
    height: 135px;
    overflow: hidden;
}

.list-thumb-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.list-thumb-area .no-thumbnail {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
}

.list-content-area {
    flex-grow: 1;
}

.list-item-date {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #c00;
    font-weight: 500;
}

.basic-list-title {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.basic-list-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}

.basic-list-excerpt p {
    margin: 0;
}

.page-numbers {
    display: inline-block;
    padding: 0 10px;
    line-height: 33px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.page-numbers.current,
a.page-numbers:hover {
    background-color: var(--background-gray);
    color: var(--text-color);
    text-decoration: none;
}

/* ==========================================================================
   5. 이미지 및 미디어
   ========================================================================== */
.list-thumb-area {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.list-thumb-area .list-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.basic-list-link.has-thumb-right {
    flex-direction: row-reverse;
}

.alignnone,
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.wp-caption img {
    width: 100%;
}

.wp-caption-text {
    border: 1px solid var(--border-color);
    margin-top: 0;
    padding: 0.5rem;
    color: var(--text-light-gray);
}

.size-post-thumbnail,
.size-book-cover {
    width: 150px;
    height: auto;
}

/* ==========================================================================
   6. 메인 슬라이더 (Swiper) - 이미지 및 슬라이더 크기 고정 버전
   ========================================================================== */
.swiper-container {
    position: relative;
    overflow: hidden;
}

.swiper-slide {
    color: white;
    height: 520px;
}

.swiper-slide a,
.swiper-slide a:hover {
    text-decoration: none;
    color: inherit;
}

.main-slide-1 {
    background-color: #264653;
}

.main-slide-2 {
    background-color: #2a9d8f;
}

.main-slide-3 {
    background-color: #e9c46a;
    color: black;
}

.main-slide-4 {
    background-color: #f4a261;
    color: white;
}

.main-slide-5 {
    background-color: #e76f51;
}

.swiper-slide:nth-child(n+6) {
    background-color: #333;
}

.main-slide-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    max-width: 90%;
    height: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    word-break: keep-all;
}

.main-slide-cover {
    width: 400px;
    height: 300px;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.main-slide-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-slide-content {
    width: 100%;
}

.main-slide-content h1 {
    font-weight: normal;
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.main-slide-meta {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.main-slide-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.5;
}

.main-slide-description * {
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: white;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    opacity: 1;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.6);
}

.swiper-button-prev {
    left: 15px;
}

.swiper-button-next {
    right: 15px;
}

.swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: auto;
}

.swiper-pagination-bullet {
    background-color: white;
    opacity: 0.5;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.swiper-pagination-bullet-active {
    background-color: white;
    opacity: 1;
}

/* ==========================================================================
   7. 유틸리티 및 기타
   ========================================================================== */
.layout-2-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.text-center {
    text-align: center;
}

.padding {
    padding: 1.5rem;
}

.margin-bottom {
    margin-bottom: 1.5rem;
}

.margin-bottom-none {
    margin-bottom: 0;
}

.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-item:not(:last-child):after {
    content: '|';
    padding-left: .5em;
    padding-right: .5em;
    color: #888;
    font-size: 0.8em;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.nav-previous,
.nav-next,
.nav-list {
    flex: 1;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-list {
    text-align: center;
}

.button-list {
    display: inline-block;
    background-color: #555;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.button-list:hover {
    background-color: #333;
    color: #fff;
    text-decoration: none;
}

.post-navigation a {
    text-decoration: none;
    font-weight: 500;
    color: #444;
    transition: color 0.2s;
}

.post-navigation a:hover {
    color: #000;
    text-decoration: underline;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* ==========================================================================
   Author Box (필자 소개) - 이메일 및 최신 글 목록 버전
   ========================================================================== */

.author-box {
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-avatar .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.author-info {
    width: 100%;
}

.author-name {
    margin: 0 0 5px 0;
    /* 이름과 이메일 사이 간격 줄임 */
    font-size: 1.25rem;
    font-weight: 600;
}

/* --- [추가] 필자 이메일 스타일 --- */
.author-email {
    margin: 0 0 15px 0;
    /* 이메일과 목록 제목 사이 간격 */
    font-size: 0.9rem;
    color: #777;
    /* 이름보다 옅은 색상 */
    word-break: break-all;
    /* 긴 이메일 주소가 깨지지 않도록 */
}

.author-email a {
    color: inherit;
    /* 부모 .author-email의 색상을 상속 */
    text-decoration: none;
}

.author-email a:hover {
    text-decoration: underline;
}

/* --- 이메일 스타일 끝 --- */


.latest-posts-title {
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.author-latest-posts {
    list-style: none;
    padding-left: 0;
    margin: 0 0 20px 0;
}

.author-latest-posts li {
    padding: 6px 0;
    font-size: 0.9rem;
}

.author-latest-posts li:not(:last-child) {
    border-bottom: 1px dotted #ccc;
}

.author-latest-posts a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.author-latest-posts a:hover {
    color: var(--primary-color, #2ECC71);
    text-decoration: underline;
}

.author-posts-link {
    font-weight: 600;
    color: var(--primary-color, #2ECC71);
    text-decoration: none;
    transition: opacity 0.2s;
}

.author-posts-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 댓글 Comments Area ------------------------- */
.comments-area {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-list .children {
    list-style: none;
    margin-left: 40px;
    padding-top: 20px;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author .avatar {
    margin-right: 15px;
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: bold;
    font-style: normal;
}

.comment-meta {
    font-size: 13px;
    color: #888;
}

.comment-content {
    margin-left: 75px;
    /* 아바타 크기(60px) + 여백(15px) */
}

.reply .comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    padding: 5px 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
}

.reply .comment-reply-link:hover {
    background-color: #e9e9e9;
}

/* Comment Form ------------------------- */
.comment-form label {
    display: block;
    margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    /* 패딩이 너비에 포함되도록 설정 */
}

.comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
}

.comment-form .comment-form-cookies-consent input {
    width: auto;
    margin-right: 10px;
}

.comment-form .form-submit .submit {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}

.comment-form .form-submit .submit:hover {
    background-color: #005f8c;
}


/* ==========================================================================
   8. 반응형 스타일
   ========================================================================== */
@media (max-width: 768px) {
    .basic-list-excerpt {
        display: none;
    }

    .search-form {
        /*display: none;*/
    }
}

@media (min-width: 768px) {

    /* 데스크톱 네비게이션 */
    .mobile-menu-toggle {
        display: none;
    }

    .menu-main-nav-container {
        display: block;
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
    }

    .menu-main-nav-container>ul {
        flex-direction: row;
    }

    .menu-main-nav-container a {
        border-bottom: none;
    }

    .menu-main-nav-container .menu-item {
        position: relative;
    }

    .menu-main-nav-container .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background-color: white;
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.2s ease-out;
        z-index: 100;
    }

    .menu-main-nav-container .sub-menu a {
        color: var(--text-color);
        white-space: nowrap;
        display: block;
    }

    .menu-main-nav-container .sub-menu a:hover {
        background-color: var(--background-gray);
    }

    .menu-main-nav-container .menu-item:hover>.sub-menu {
        transform: scaleY(1);
    }

    /* 2단 그리드 레이아웃 */
    .layout-2-column {
        grid-template-columns: 1fr 1fr;
    }

    /* 메인 슬라이더 레이아웃 */
    .swiper-slide {
        height: 420px;
    }

    .main-slide-content-wrapper {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        max-width: 960px;
        text-align: left;
    }

    .main-slide-cover {
        width: 440px;
        height: 360px;
        margin-bottom: 0;
        margin-right: 3rem;
    }

    .main-slide-content {
        flex: 1;
        max-width: 500px;
        min-width: 0;
    }

    .main-slide-content h1 {
        font-size: 2.0rem;
    }

    .main-slide-description {
        -webkit-line-clamp: 3;
    }

    .swiper-button-prev {
        left: 30px;
    }

    .swiper-button-next {
        right: 30px;
    }

    .author-box {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 25px;
    }

    .author-avatar .avatar {
        margin-right: 25px;
        margin-bottom: 0;
        width: 90px;
        height: 90px;
    }
}