﻿/* reset */
*,div,ul,li,p,ol,label,input,textarea,span { margin: 0; padding: 0; box-sizing: border-box; }
li { list-style: none; }
a { display: block; text-decoration: none; font-size: 20px; color: #333; }
img { max-width: 100%; vertical-align: top; }
button { cursor: pointer; font-family: inherit; }
body { font-family: 'Malgun Gothic', sans-serif; }

.inner { max-width: 100%; width: 1400px; margin: 0 auto; padding: 0 20px; }
h2 { font-size: 32px; text-align: center; margin-bottom: 40px; color: #1B6B5A; word-break: keep-all; }

/* header */
#header { width: 100%; height: 80px; position: fixed; top: 0; left: 0; background: transparent; z-index: 10; transition: .3s; }
#header .inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
#header .inner h1 { display: flex; padding-top: 10px; }
#header .inner h1 a { display: flex; align-items: center; flex-shrink: 0; }
#header .inner h1 img { width: 56px; height: 56px; object-fit: cover; object-position: left; filter: brightness(0) invert(1); transition: .3s; }
#header .inner h1 span { color: #fff; padding-left: 10px; font-weight: bold; white-space: nowrap; transition: .3s; }
#header .inner .nav { display: flex; }
#header .inner .nav ul { display: flex; }
#header .inner .nav ul li { position: relative; width: 160px; text-align: center;  }
#header .inner .nav ul li a { color: #fff; line-height: 80px; white-space: nowrap; font-weight: bold; }
#header .inner .nav ul li .submenu { display: block; position: absolute; top: 80px; left: 0; width: 100%; height: 0; opacity: 0; overflow: hidden; transition: .25s; z-index: 20; }
#header .inner .nav ul li:hover .submenu { background: #1B6B5A; }
#header .inner .nav ul li:hover .submenu a {  color: #fff; }
#header .inner .nav ul li:hover .submenu a:hover { background: rgba(255, 255, 255, .15);  color: #fff; }
#header .inner .nav.open ul li .submenu { height: 160px; padding: 16px 0; opacity: 1;  }
#header .inner .nav ul li .submenu li { }
#header .inner .nav ul li .submenu li a { line-height: 40px; font-size: 16px;  }
#header .inner .nav .nav-bg { position: absolute; top: 80px; left: 0; width: 100%; height: 0; background: #fff; box-shadow: 0 12px 24px rgba(0,0,0,.12); transition: .25s; z-index: 19; }
#header .inner .nav.open .nav-bg { height: 160px; }
#header .inner .util { display: flex; align-items: center; flex-shrink: 0; }
#header .inner .util a { margin-left: 10px; font-size: 16px; font-weight: bold; white-space: nowrap; color: #fff;  padding: 6px 16px; transition: .3s; border: 1px solid #fff; border-radius: 20px;  }
#header .inner .btn-menu { display: none;  width: 30px; height: 22px; background: none; border: 0; flex-direction: column; justify-content: space-between; }
#header .inner .btn-menu span { display: block; height: 3px; background: #fff; transition: .3s; }

#header.scroll,
#header.on { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3s); }
#header.scroll .inner h1 img,
#header.on .inner h1 img { filter: none; }
#header.scroll .inner h1 span,
#header.on .inner h1 span,
#header.scroll .inner .nav ul li > a,
#header.on .inner .nav ul li > a { color: #333; }
#header.scroll .inner .util a,
#header.on .inner .util a { background: #1B6B5A; color: #fff;}
#header.scroll .inner .nav ul li:hover > a,
#header.on .inner .nav ul li:hover > a { color: #c9a227; }
#header.on .btn-menu:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
#header.on .btn-menu:nth-child(2) { opacity: 0; }
#header.on .btn-menu:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* visual */
#visual .carousel-item { height: 700px; position: relative; }
#visual .carousel-item img { width: 100%; height: 700px; object-fit: cover; }
#visual .carousel-item::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
#visual .carousel-item .text { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 1400px; max-width: 90%; z-index: 1; }
#visual .carousel-item .text .type { font-size: 42px; font-weight: bold; color: #fff; min-height: 60px; text-shadow: 0 4px 16px rgba(0,0,0,.4); word-break: keep-all; }
#visual .carousel-item .text .sub { font-size: 18px; color: #fff; margin-top: 10px; word-break: keep-all; opacity: 0; transform: translateY(10px); transition: .8s .3s; }
#visual .carousel-item.active .text .sub { opacity: 1; transform: none; }
@keyframes blink { 50% { opacity: 0; } }
#sub-visual img { width: 100%; height: 280px; object-fit: cover; }

/* intro */
#intro { padding: 80px 0; }
#intro .inner .wrap { display: flex; align-items: center; gap: 40px; animation: up 1s; }
#intro .inner .wrap img { width: 50%; border-radius: 12px; }
#intro .inner .wrap .txt { width: 50%; }
#intro .inner .wrap .txt h3 { font-size: 24px; margin-bottom: 16px; color: #1B6B5A; }
#intro .inner .wrap .txt p { font-size: 16px; line-height: 1.8; word-break: keep-all; }
@keyframes up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* books */
#books .item { margin-bottom: 30px; }
#books .cover { position: relative; overflow: hidden; background: #eee; }
#books .cover img { width: 100%; height: auto; display: block; }
#books .over { position: absolute; inset: 0; background: rgba(0,0,0,.7); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 20px; opacity: 0; transform: translateY(20px); transition: .3s; }
#books .cover:hover .over { opacity: 1; transform: none; }
#books .over p { font-weight: bold; font-size: 20px; }
#books .over span { display: block; font-size: 14px; margin-top: 4px; }
#books .over .desc { font-size: 14px; line-height: 1.5; margin-top: 10px; }
/* tab */
#tab { padding: 80px 0; }
#tab .inner .tab-btns { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; }
#tab .inner .tab-btns button { min-width: 160px; height: 48px; border: 1px solid #1B6B5A; background: #fff; color: #1B6B5A; font-size: 16px; font-weight: bold; }
#tab .inner .tab-btns button.on { background: #1B6B5A; color: #fff; }
#tab .inner .tab-cont { display: none; }
#tab .inner .tab-cont.on { display: block; }
#tab .inner .tab-cont ul li { background: #f5f5f5; padding: 18px 24px; margin-bottom: 10px; border-left: 4px solid #1B6B5A; transition: .3s; }
#tab .inner .tab-cont ul li:hover { transform: scale(1.02); }
#tab .inner .tab-cont ul li span { float: right; font-size: 14px; color: #888; }

/* write / book / modal */
#write, #book { padding: 80px 0; }
#write .inner form { width: 640px; max-width: 100%; margin: 0 auto; }
#write .inner form .btn { width: 100%; }
#loginModal .modal-dialog, #joinModal .modal-dialog { max-width: 400px; }
.modal-title { font-weight: bold; color: #1B6B5A; }
.form-label { color: #1B6B5A; font-weight: bold; }
.btn-primary { background: #1B6B5A; border-color: #1B6B5A; }
.btn-primary:hover, .btn-primary:focus { background: #155a4b; border-color: #155a4b; }
#book .table thead th { background: #1B6B5A; color: #fff; border-color: #1B6B5A; }
#book .book-thumb { width: 70px; height: 90px; object-fit: cover; cursor: pointer; }
#book .sort-title { color: #fff; font-size: inherit; font-weight: bold; }
#book .sort-title:hover { color: #C9A227; }

/* footer */
#footer { background: #2a2a2a; padding: 40px 0 0; }
#footer .inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#footer h1 { flex-shrink: 0; }
#footer h1 a { display: flex; align-items: center; }
#footer h1 img { width: 56px; height: 56px; object-fit: contain; filter: grayscale(1); }
#footer h1 span { padding-left: 10px; font-size: 16px; color: #fff; }
#footer .info { flex: 1; min-width: 0; }
#footer .info p { font-size: 14px; line-height: 1.8; color: #ccc; word-break: keep-all; }
#footer .sns { display: flex; gap: 10px; flex-shrink: 0; }
#footer .sns a { width: 36px; }
#footer .sns img { width: 36px; height: 36px; object-fit: contain; filter: grayscale(1) brightness(1.4); }
#footer .copy { border-top: 1px solid #555; text-align: center; padding: 16px; color: #999; font-size: 14px; margin-top: 30px; }

@media (max-width: 1024px) {
    #header .inner { position: relative; }
    #header .inner .nav,
    #header .inner .util { display: none;}
    #header .inner .btn-menu { display: flex; position: absolute; top: 20px; right: 20px; }
    
    #header.on { height: auto; }
    #header.on .inner { height: auto; flex-wrap: wrap; }
    #header.on .inner .nav, 
    #header.on .inner .util { display: flex; width: 100%; flex-direction: column; }
    #header.on .inner .nav ul { flex-direction: column; width: 100%; }
    #header.on .inner .nav ul li { width: 100%; text-align: left; }
    #header.on .inner .nav ul li a { line-height: 48px; padding: 0 20px; color: #333; border-bottom: 1px solid #eee; }
    #header.on .inner .nav ul li:hover > a { color: #1B6B5A; }
    #header.on .inner .nav ul li .submenu { display: none; position: static; height: auto; padding: 0; overflow: visible; opacity: 1; transition: none; background: #F7F3EB; }
    #header.on .inner .nav.open ul li .submenu { height: auto; padding: 0; }
    #header.on .inner .nav ul li:hover .submenu { background: #F7F3EB; }
    #header.on .inner .nav ul li:hover .submenu li a { color: #333; }
    #header.on .inner .nav ul li .submenu li a { padding-left: 32px; }
    #header.on .inner .nav ul li .submenu li a:hover { background: #1B6B5A; color: #fff; }
    #header.on .inner .nav .nav-bg { display: none; }
    #header.on .inner .util { flex-direction: row; justify-content: flex-start; padding: 16px 20px; }
    #header.on .inner .util a { margin-left: 0; margin-right: 8px; }    
    
    #header.scroll .inner .btn-menu span { background: #333; }

    #visual .carousel-item .text .type { font-size: 28px; }
    #intro .inner .wrap { flex-direction: column; }
    #intro .inner .wrap img, #intro .inner .wrap .txt { width: 100%; }
    #books .item img { height: 220px; }
    #footer .inner { flex-direction: column; text-align: center; gap: 16px; }
    #footer h1 a { justify-content: center; }
    #footer .sns { justify-content: center; }
}
@media (max-width: 480px) {
    #visual .carousel-item, #visual .carousel-item img { height: 280px; }
    #visual .carousel-item .text .type { font-size: 20px; min-height: 32px; }
    #intro, #books, #tab, #write, #book { padding: 40px 0; }
    h2 { font-size: 24px; }
    #tab .inner .tab-btns button { min-width: 0; flex: 1; }
    #sub-visual img { height: 160px; }
}