/* ===== Font Declarations ===== */
@font-face {
    font-family: 'Aboreto';
    font-weight: 400;
    font-style: normal;
    src: url('../fonts/Aboreto-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'MaruBuri';
    font-weight: 400;
    font-style: normal;
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10-21@1.0/MaruBuri-Regular.woff') format('woff2');
}
@font-face {
    font-family: 'MaruBuri';
    font-weight: 700;
    font-style: normal;
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10-21@1.0/MaruBuri-Regular.woff2') format('woff2');
}


/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-sans); }
html { scroll-behavior: smooth; }
body { background-color: var(--back-color-light); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Header ===== */
.site-header {
    background-color: var(--back-color-dark);
    padding: 1.3rem 5% 1.1rem;
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center; gap: 3rem;
    line-height: 1.15;
    border-bottom: 1px solid var(--accent-color-edge);
    backdrop-filter: blur(5px);
}
body.admin-bar .site-header {
    top: 32px;
}

/* ===== Logo ===== */
.logo, .logo a, .logo span { font-family: 'MaruBuri', serif !important; }
.logo { font-size: 1.6rem; font-weight: 700; color: var(--text-light); letter-spacing: 0.5px; white-space: nowrap; position: relative; top: -1px; }
.logo span:not(.logo-initial) { color: var(--accent-color); }
.logo-en, .logo-en a { font-family: 'Aboreto', serif !important; font-size: 1.3rem; letter-spacing: -0.03em; }
.logo-en .logo-initial { font-size: calc(1em + 2px); font-family: 'Aboreto', serif !important; color: inherit; }

/* ===== Navigation ===== */
nav { display: flex; align-items: center; }
nav ul { display: flex; gap: 2.5rem; flex-wrap: nowrap; align-items: center; margin: 0; padding: 0; }
nav ul li a { color: var(--text-light); font-size: 0.95rem; font-weight: 500; transition: var(--transition); position: relative; white-space: nowrap; }
nav ul li a:hover { color: var(--accent-color); }

nav ul li a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--accent-color); transition: var(--transition); }
nav ul li a:hover::after { width: 100%; }

/* ===== Language Dropdown ===== */
.lang-dropdown { position: relative; list-style: none; }
.lang-btn {
    color: var(--accent-color) !important;
    border: 1px solid var(--accent-color-edge);
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 0.9rem !important;
    cursor: pointer;
}
.lang-btn::after { display: none !important; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--back-color-dark);
    border: 1px solid var(--accent-color);
    margin-top: 10px;
    z-index: 1002;
    list-style: none;
    padding: 0;
    height: auto;
    max-height: none;
    overflow: visible;
}
.dropdown-content li a {
    padding: 8px 12px;
    display: block;
    color: var(--text-light) !important;
    font-size: 0.75rem !important;
    text-align: center;
}
.dropdown-content li a::after { display: none !important; }
.dropdown-content li a:hover { background-color: var(--accent-color); color: var(--primary-color) !important; }
.dropdown-content li a.lang-active { color: var(--accent-color) !important; }
.lang-dropdown:hover .dropdown-content { display: block; }
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

/* ===== Mobile Menu Buttons ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}
.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    transition: var(--transition);
}
.close-menu-btn {
    display: none;
    position: fixed;
    top: 1.2rem;
    right: 5%;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2000;
    transition: var(--transition);
}
.close-menu-btn:hover { color: var(--accent-color); }

/* ===== Single Post & Page ===== */
.single-container, .page-container {
    max-width: 900px; margin: 0 auto; padding: 6rem 5% 3rem;
}
.single-header, .page-header {
    margin-bottom: 2rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 1.5rem;
}
.single-header h1, .page-header h1 {
    font-family: var(--font-serif); font-size: 2rem; color: var(--primary-color); line-height: 1.4; word-break: keep-all;
}
.single-header time {
    display: block; margin-top: 1rem; color: var(--accent-color); font-size: 0.9rem; font-weight: 500;
}
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    color: var(--text-color-tertiary);
    font-size: 1rem;
}
.article-meta time {
    color: var(--text-color-tertiary);
    font-size: 1rem;
    font-weight: 400;
}
.entry-content {
    line-height: 1.9; color: var(--text-color-primary); font-size: 1.05rem; word-break: keep-all;
}
.entry-content ul:not(.chaon-dash-list) {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}
.entry-content ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}
.entry-content li {
    margin-bottom: 0.4rem;
}
.entry-content .chaon-dash-list {
    list-style: none;
}
.single-back {
    margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--edge-color); text-align: center;
}
.single-back a {
    display: inline-block; padding: 0.8rem 2rem; border: 1px solid var(--primary-color);
    color: var(--primary-color); font-weight: 600; transition: var(--transition);
}
.single-back a:hover {
    background-color: var(--primary-color); color: var(--text-light);
}

/* ===== Block Patterns: 차온 스타일 ===== */
.chaon-subtitle {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--primary-color);
    margin: 3rem 0 1.2rem;
    border-left: 5px solid var(--accent-color);
    padding-left: 1rem;
}

/* 강조 박스 */
.chaon-highlight-box {
    background-color: var(--accent-color-box-back);
    border-left: 4px solid var(--accent-color);
    padding: 1.2rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 4px 4px 0;
}
.chaon-highlight-box p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.8;
}

/* 회색 박스 */
.chaon-gray-box {
    background-color: var(--back-color-light);
    padding: 2rem;
    border-radius: 4px;
    margin: 2rem 0;
    font-size: 1.1rem;
    color: var(--text-color-primary);
    line-height: 1.8;
}

/* 금색 박스 */
.chaon-gold-box {
    background-color: var(--accent-color-box-back);
    border: 1px solid var(--accent-color-edge);
    padding: 2rem;
    border-radius: 4px;
    margin: 2rem 0;
}
.chaon-gold-box-content,
.chaon-gold-box p,
.chaon-gold-box li {
    font-size: 1rem;
    color: var(--accent-color-dark);
    line-height: 1.8;
}

.chaon-gray-box p,
.chaon-gray-box li {
    font-size: 1.1rem;
    color: var(--text-color-primary);
    line-height: 1.8;
}

/* 섹션 태그 */
p.chaon-section-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--primary-color);
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

/* 대시 목록 */
.chaon-dash-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}
.chaon-dash-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.8;
}
.chaon-dash-list li::before {
    content: '-';
    position: absolute;
    left: 0;
}

/* 이미지 설명 */
.chaon-img-box {
    margin: 2rem 0;
}
.chaon-img-box img {
    width: 100%;
    height: auto;
    display: block;
}
.chaon-img-caption {
    font-size: 0.88rem;
    color: var(--text-color-tertiary);
    margin-top: 0.6rem !important;
    line-height: 1.6;
}

/* 회색 구분선 타이틀 */
.chaon-divider-title {
    font-family: var(--font-serif);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--edge-color);
    padding-bottom: 0.5rem;
}

/* ===== 뉴스레터 A4 레이아웃 ===== */
.single-header--newsletter {
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 2.5rem;
    margin-bottom: 3rem;
}
.newsletter-vol {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.single-header--newsletter h1 {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    line-height: 1.3;
    word-break: keep-all;
}
.single-header--newsletter .article-meta,
.newsletter-date {
    margin-top: 1rem;
    color: var(--text-color-tertiary);
    font-size: 1rem;
}

body:has(.single-newsletter) {
    background-color: var(--back-color-light);
}
.single-newsletter {
    background: var(--back-color-white);
    padding: 5rem;
    box-shadow: 0 10px 50px var(--shadow-light);
    margin-top: 8.5rem;
    margin-bottom: 4rem;
}

/* ===== Sub-page Hero ===== */
.sub-hero {
    background-color: var(--back-color-dark);
    background-size: cover;
    background-position: center;
    height: 525px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 60px;
}
body.admin-bar .sub-hero {
    padding-top: 92px;
}
.sub-hero-inner {
    padding: 0 5%;
    max-width: 800px;
}
.sub-hero h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    word-break: keep-all;
}
.sub-hero p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.7;
    word-break: keep-all;
}
.sub-page-container {
    max-width: 1000px;
    margin: -3rem auto 5rem;
    padding: 5rem 5%;
    background: var(--back-color-white);
    border-radius: 4px;
    box-shadow: 0 5px 20px var(--shadow-light);
    position: relative;
    z-index: 10;
}

/* ===== Button: 이메일 링크 스타일 ===== */
.wp-block-button.is-style-email-link {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.wp-block-button.is-style-email-link .wp-block-button__link {
    background: transparent !important;
    border: 2px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 0 !important;
    transition: var(--transition);
    text-decoration: none;
}
.wp-block-button.is-style-email-link .wp-block-button__link:hover {
    background: var(--accent-color) !important;
    color: var(--primary-color) !important;
}

/* ===== Article Category Label ===== */
.article-category-label {
    display: block;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ===== Newsletter Disclaimer ===== */
.newsletter-disclaimer {
    margin-top: 4rem;
}
.newsletter-hr {
    border: 0;
    height: 2px;
    background-color: var(--primary-color);
    margin: 0 0 1.5rem 0;
}
.newsletter-disclaimer-text {
    font-size: 0.85rem;
    color: var(--text-color-tertiary);
    line-height: 1.6;
    word-break: keep-all;
}

/* ===== Floating Button ===== */
.floating-btns {
    position: fixed;
    top: 30%;
    right: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    width: 76px;
    border-radius: 0;
    background-color: transparent;
    overflow: hidden;
}
.floating-btn {
    width: 100%;
    height: 81px;
    background-color: var(--back-color-dark);
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}
.floating-btn:hover {
    color: var(--accent-color);
}
.floating-btn:hover .floating-btn-text { color: var(--accent-color); }
.floating-divider { display: none; }
.floating-btn-text {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: var(--text-light);
    pointer-events: none;
}

/* + 토글 버튼 */
.floating-toggle .floating-btn-text { font-size: 1.6rem; font-weight: 300; line-height: 1; }
.floating-toggle { height: 57px; }
.floating-toggle,
.floating-toggle:hover { background-color: var(--accent-color); }
.floating-toggle:hover,
.floating-toggle:hover .floating-btn-text { color: var(--text-light); }

/* 숨김(extra) 항목 — hover 시 슬라이드 다운 */
.floating-btn.is-extra,
.floating-divider.is-extra {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.32s ease, opacity 0.22s ease, transform 0.32s ease;
    pointer-events: none;
}
.floating-btns.is-open .floating-btn.is-extra {
    max-height: 81px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.floating-btns.is-open .floating-divider.is-extra {
    max-height: 1px;
    opacity: 1;
    transform: translateY(0);
}
.floating-btn.is-extra,
.floating-btn.is-extra:hover { background-color: transparent; }
.floating-btn-img { width: 32px; height: 32px; object-fit: contain; pointer-events: none; }
/* 데스크톱: is-extra는 이미지만 표시 */
.floating-btn.is-extra .floating-btn-text { display: none; }
/* is-not-contract: 기본 숨김, 영문 계약서 페이지에서만 노출 (contract.css에서 오버라이드) */
.floating-btn.is-not-contract { display: none; }

@media (max-width: 1000px) {
    .floating-btns {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        transform: none;
        flex-direction: row;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    .floating-btn {
        flex: 1;
        height: 50px;
    }
    .floating-divider {
        width: 1px;
        height: auto;
        margin: 10px 0;
    }
    .floating-btn-text {
        font-size: 0.82rem;
        line-height: 1.3;
    }
    /* 모바일: 토글 숨기고 extra 항목 항상 노출 */
    .floating-toggle,
    .toggle-divider { display: none; }
    .floating-btn.is-extra,
    .floating-divider.is-extra {
        max-height: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        overflow: visible;
        transition: none;
    }
    .floating-btn.is-extra,
    .floating-btn.is-extra:hover { background-color: var(--back-color-dark); }
    /* 모바일: is-extra는 이미지 숨기고 텍스트 표시 */
    .floating-btn.is-extra .floating-btn-img { display: none; }
    .floating-btn.is-extra .floating-btn-text { display: inline; }
    .floating-btn-img { width: 24px; height: 24px; }
}

/* ===== Footer Base ===== */
footer {
    background-color: var(--primary-color);
    color: var(--text-blue);
    font-size: 0.9rem;
   }

/* ===== Mobile Responsive (Header/Nav) ===== */
@media (max-width: 1000px) {
    .mobile-menu-btn { display: flex; }
    .close-menu-btn.active { display: block; }

    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--back-color-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 1000;
    }

    nav ul.active { display: flex; }
    nav ul li a { font-size: 1.4rem; }

    .mobile-menu-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
