@charset "utf-8";
@import url('https://fonts.googleapis.com/css?family=Nanum+Gothic:400,700|Nanum+Myeongjo');
@import url(https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@1.0/nanumsquare.css);
@viewport { width: device-width; }
* {
    margin: 0;
    padding: 0;
    font-family: 'NanumSquareNeoLight', sans-serif;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 전체 레이아웃 */
#wrap {
    width: 100%;
    min-height: 100vh; /* 최소 높이를 뷰포트 높이로 설정 */
    display: flex;
    flex-direction: column;
}

/* 상단 이미지 */
.top_img {
    height: 550px;
    background: url(../img/main_news.jpg) no-repeat center/cover;
    margin-top: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top_text {
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* 콘텐츠 박스 */
.contents_box {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 오른쪽 콘텐츠 영역 */
.right_box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.section_title {
    width: 100%;
    max-width: 1200px;
    margin-top: 80px;
    text-align: center;
}

.section_title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section_title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, #2786e7, #3399ff);
    border-radius: 2px;
}

.section_title span {
    display: block;
    font-size: 1.125rem;
    color: #999;
    margin-top: 10px;
}

.editor_box {
    width: 100%;
    margin-top: 50px;
    margin-bottom: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.editor_box form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.title_area {
    width: 100%;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    color: #333;
    background: #fff;
    transition: border-color 0.3s ease;
}
.title_area:focus {
    border-color: #2786e7;
    outline: none;
}

.title_area::placeholder {
    color: #999;
}
/* 작성자, 비밀번호, 연락처 입력 필드 */
.necessary_fields {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.necessary_area {
    flex: 1;
    min-width: 200px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    color: #333;
    background: #fff;
    transition: border-color 0.3s ease;
}

.necessary_area:focus {
    border-color: #2786e7;
    outline: none;
}

.necessary_area::placeholder {
    color: #999;
}
/* Summernote 에디터 스타일 */
#summernote {
    width: 100%;
    min-height: 300px;
}

.summernote .note-editor {
    border: 1px solid #ddd;
    border-radius: 5px;
}

.summernote .note-toolbar {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

/* 파일 업로드 */
.file_upload_wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file_upload_btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2786e7;
    color: #fff;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
}

.file_upload_btn:hover {
    background: #1a6bb8;
}

.file_name {
    font-size: 14px;
    color: #666;
}

/* 제출 버튼 */
.submit_btn {
    width: 150px;
    height: 45px;
    background: #2786e7;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    align-self: flex-end;
}

.submit_btn:hover {
    background: #1a6bb8;
}

/* 반응형 디자인 */
@media screen and (max-width: 1500px) {
    .right_box {
        max-width: 900px;
    }
}

@media screen and (max-width: 1300px) {
    .contents_box {
        max-width: 1000px;
    }

    .right_box {
        max-width: 700px;
    }
}

@media screen and (max-width: 1100px) {
    .contents_box {
        flex-direction: column;
        align-items: center;
    }

    .right_box {
        max-width: 90%;
        padding: 0 15px;
    }

    .necessary_area {
        min-width: 180px;
    }
}

@media screen and (max-width: 768px) {
    #wrap {
        min-height: 100vh;
    }

    .top_img {
        height: 200px;
    }

    .top_text {
        font-size: 2.5rem;
    }

    .contents_box {
        flex-direction: column;
    }

    .right_box {
        max-width: 100%;
        padding: 0 10px;
    }

    .editor_box {
        padding: 20px;
    }

    .title_area {
        max-width: 100%;
    }

    .necessary_fields {
        flex-direction: column;
        gap: 15px;
    }

    .necessary_area {
        min-width: 100%;
    }

    .submit_btn {
        width: 120px;
        height: 40px;
        font-size: 14px;
    }

    #summernote {
        min-height: 250px;
    }

    .file_upload_btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .file_name {
        font-size: 13px;
    }
}