/* Pretendard 폰트 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* General Reset & Body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    word-break: keep-all;
}

a {
    text-decoration: none;
    color: #1a0dab;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: none;
    color: #1AB394;
}

ul, li {
    list-style: none;
}

/* Main Layout: Full-width */
.portal-skin {
    width: 100%;
    padding: 0 24px;
}

/* Header */
#dkHead {
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
}

.blog-title {
    font-size: 32px;
    font-weight: 800;
    color: #1AB394;
    text-decoration: none;
    letter-spacing: -1.5px;
}

.menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.menu-trigger:hover {
    background-color: #f1f3f5;
}
.menu-trigger svg {
    fill: #333;
}

/* Search Bar */
.search-container {
    margin-top: 25px;
    width: 100%;
}

.search-form {
    display: flex;
    width: 100%;
    border: 2px solid #1AB394;
    transition: box-shadow 0.2s ease;
}
.search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(26, 179, 148, 0.2);
}

.search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 15px 20px;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    min-width: 0; /* 검색창이 화면 밖으로 넘어가는 문제 해결 */
}

.search-button {
    width: 56px;
    border: none;
    background: #1AB394;
    cursor: pointer;
}
.search-button svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}


/* Offcanvas Side Menu */
.offcanvas-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: #fff;
    z-index: 1001;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
}
.offcanvas-menu.is-open {
    transform: translateX(0);
}

.menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: 300;
    color: #868e96;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.menu-close:hover {
    color: #212529;
}

.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.offcanvas-overlay.is-open {
    visibility: visible;
    opacity: 1;
}

/* Category list style inside Offcanvas */
.offcanvas-menu .menu-content {
    padding-top: 40px;
}
.offcanvas-menu .category_list > li > a {
    display: block;
    position: relative;
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 500;
    color: #343a40;
    border-radius: 6px;
}
.offcanvas-menu .category_list > li > a:hover {
    background-color: #f8f9fa;
}
.offcanvas-menu .category_list .on > a {
    color: #1AB394;
    font-weight: 700;
}
.offcanvas-menu .has-submenu > a::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #adb5bd;
    transition: transform 0.3s ease;
}
.offcanvas-menu .has-submenu.open > a::after {
    transform: translateY(-50%) rotate(180deg);
}

.offcanvas-menu .sub_category_list {
    background-color: #f8f9fa;
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
}
.offcanvas-menu .sub_category_list a {
    display: block;
    padding: 8px 10px;
    color: #495057;
    font-size: 15px;
    border-radius: 4px;
}
.offcanvas-menu .sub_category_list a:hover {
    background-color: #e9ecef;
}
.offcanvas-menu .sub_category_list .on a {
    color: #1AB394;
    font-weight: 600;
}


/* List Title */
.list-title-wrapper {
    margin: 40px 0 20px 0;
    color: #777;
    font-size: 14px;
}

/* Post List */
.title-list-item {
    width: 100%;
    margin: 0;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.title-list-item:hover {
    background-color: #f9f9f9;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.title-list-title {
    font-size: 19px;
    font-weight: 600;
    color: #333;
}
.title-list-title a {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 25px 15px;
}

/* Permalink */
.permalink-container {
    padding: 10px 0;
    width: 100%;
}
.permalink-header,
.permalink-tags,
.permalink-comments {
    width: 100%;
    margin: 0;
}
.permalink-header {
    margin-bottom: 30px;
}
.permalink-category a {
    color: #5f6368;
    font-size: 14px;
}
.permalink-title {
    font-size: 36px;
    font-weight: 800;
    margin: 10px 0;
    color: #222;
    line-height: 1.4;
}
.permalink-meta {
    font-size: 14px;
    color: #777;
}
.permalink-meta .author {
    font-weight: bold;
    margin-right: 10px;
}
.permalink-content {
    margin-top: 50px;
    margin-bottom: 50px;
}
.permalink-content p,
.permalink-content h1,
.permalink-content h2,
.permalink-content h3,
.permalink-content h4,
.permalink-content h5,
.permalink-content h6,
.permalink-content ul,
.permalink-content ol,
.permalink-content blockquote,
.permalink-content table {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}
.permalink-content p {
    font-size: 17px;
    line-height: 1.85;
}
.permalink-content figure,
.permalink-content img {
    max-width: 100%;
    height: auto;
    margin-top: 50px;
    margin-bottom: 50px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.permalink-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ebebeb;
    font-size: 14px;
    color: #5f6368;
}
.permalink-tags a {
    margin-left: 8px;
}
.permalink-comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ebebeb;
}

/* Pagination */
.pagination {
    width: 100%;
    margin: 40px 0;
    text-align: center;
    font-family: 'Pretendard', sans-serif;
}
.page-numbers {
    margin: 0 10px;
}
.page-number {
    color: #1a0dab;
    padding: 5px 10px;
    margin: 0 2px;
}
.page-number:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}
.page-number.selected {
    color: #202124;
    font-weight: bold;
    cursor: default;
}
.page-number.selected:hover {
    background-color: transparent;
}
.nav-button {
    color: #1a73e8;
    font-size: 14px;
}
.nav-button.disabled {
    color: #ccc;
    cursor: default;
    pointer-events: none;
}
.nav-button.disabled:hover {
    text-decoration: none;
}

/* Protected Post Form */
.protected_form { }

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.floating-buttons a,
.floating-buttons button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}
.floating-buttons a:hover,
.floating-buttons button:hover {
    transform: translateY(-3px);
}
.kakao-chat-btn {
    background-color: #FEE500;
}
.kakao-chat-btn:hover {
    background-color: #f7e000;
}
#scrollTopBtn {
    display: none;
    background-color: #1AB394;
    opacity: 0;
}
#scrollTopBtn:hover {
    background-color: #18a689;
}
#scrollTopBtn.show {
    display: flex;
    opacity: 1;
}

/* ========================================= */
/* ====== 반응형 (모바일) 디자인 ====== */
/* ========================================= */
@media (max-width: 768px) {

    /* 블로그 전체 좌우 여백을 줄여 공간 확보 */
    .portal-skin {
        padding: 0 16px;
    }

    /* 헤더 영역 상하 여백 조정 */
    #dkHead {
        padding: 25px 0 15px 0;
    }

    /* 블로그 제목 글자 크기 축소 */
    .blog-title {
        font-size: 28px;
        letter-spacing: -1px;
    }
    
    /* 제목과 메뉴 버튼이 있는 라인 여백 조정 */
    .header-container {
        padding-bottom: 12px;
    }

    /* 검색창 상단 여백 조정 */
    .search-container {
        margin-top: 20px;
    }

    /* 검색창 내부 글자 크기 축소 */
    .search-input {
        font-size: 16px;
        padding: 12px 18px;
    }
    
    /* 검색 버튼 너비 축소 */
    .search-button {
        width: 48px; 
    }

    /* 검색 아이콘 크기 축소 */
    .search-button svg {
        width: 22px;
        height: 22px;
    }

    /* 게시물 목록 아이템 상하 여백 축소 */
    .title-list-title a {
        padding: 20px 10px;
        font-size: 17px;
    }

    /* 본문 글자 크기 조정 */
    .permalink-title {
        font-size: 28px;
    }
    .permalink-content p {
        font-size: 16px;
    }
}