/* koreacts 공통 헤더 / 전체자료 메뉴 (sian_sub_ok.html 기준) */

.koreacts-site-header { background: #ffffff; }
.koreacts-site-header .sound_only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.koreacts-site-header #skip_to_container a {
    position: absolute;
    top: -40px;
    left: 0;
    background: #16344d;
    color: #fff;
    padding: 8px 12px;
    z-index: 10000;
}
.koreacts-site-header #skip_to_container a:focus {
    top: 0;
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}
.header-top .auth-links a:hover { color: #b8924c; text-decoration: underline; }

.header-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-shrink: 0;
}

.header-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.header-lang-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    padding: 0;
}

.header-lang-btn:hover,
.header-lang-btn:focus {
    color: #16344d;
    text-decoration: underline;
}

.header-lang-btn.is-active {
    color: #16344d;
    font-weight: 800;
    text-decoration: none;
}

.header-lang-sep {
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1;
}

.koreacts-google-translate-host {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body > .skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

body {
    top: 0 !important;
    position: static !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

.logo-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    background: #fff;
}
.logo-area { display: flex; align-items: center; gap: 16px; }
.logo-link { display: flex; align-items: center; gap: 16px; color: inherit; }
.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff7a7a 0%, #ffd95a 35%, #72d67c 68%, #5aa7ff 100%);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 3px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
}
.logo-icon::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 11px;
    width: 24px;
    height: 18px;
    background: #fff;
    border-radius: 4px;
}
.logo-text { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.logo-main { font-size: 36px; font-weight: 900; letter-spacing: -1.5px; color: #0f172a; line-height: 1; }
.logo-sub { font-size: 32px; font-weight: 700; color: #b8924c; font-family: 'Georgia', '궁서', serif; line-height: 1; }

.navy-integration-bar {
    position: relative;
    z-index: 200;
    background: linear-gradient(to bottom, #224a68 0%, #16344d 100%);
    padding: 11px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 3px solid #b8924c;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 8px rgba(0,0,0,0.06);
    overflow: visible;
}
.navy-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    overflow: visible;
}
.bar-notice-area { display: flex; align-items: center; gap: 12px; min-width: 0; }
.notice-badge {
    background: linear-gradient(to bottom, #2d5f82 0%, #1e435e 100%);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}
.notice-text {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notice-text:hover { color: #d8ba7a; text-decoration: underline; }

.header-bible-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 95;
}

.header-bible-tools .koreacts-bible-modal,
.header-bible-tools #quickBiblePanel.koreacts-bible-modal {
    position: absolute;
    top: calc(100% + 11px);
    right: 0;
    left: auto;
    transform: none;
    width: 330px;
    max-width: min(380px, calc(100vw - 32px));
    margin: 0;
    z-index: 210;
}

.header-bible-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s;
}

.header-bible-btn:hover,
.header-bible-btn:focus {
    background: #b8924c;
    border-color: #b8924c;
    color: #ffffff;
}

.header-bible-icon {
    font-size: 16px;
    line-height: 1;
}

.site-total-search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 6px;
    padding: 3px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
}
.search-select {
    border: none;
    outline: none;
    padding: 0 16px;
    height: 36px;
    font-size: 14.5px;
    color: #1e293b;
    font-weight: 700;
    border-right: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
}
.site-total-search-form input[type="text"] {
    border: none;
    outline: none;
    padding: 0 16px;
    font-size: 14.5px;
    color: #0f172a;
    flex: 1;
    width: 100%;
    background: #ffffff;
}
.site-total-search-form input[type="text"]::placeholder { color: #94a3b8; }
.search-submit-btn {
    background: #b8924c;
    color: #ffffff;
    border: none;
    outline: none;
    padding: 0 22px;
    height: 36px;
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.search-submit-btn:hover { background: #16344d; }

/* MEGA DIRECTORY NAV */
.sophisticated-nav {
    background: #ffffff;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
}
.total-menu-control {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.total-menu-title-wrap { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.total-menu-kicker {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f8f1e3;
    color: #9a7334;
    font-size: 12px;
    font-weight: 800;
}
.total-menu-title-wrap strong { color: #0f172a; font-size: 16px; font-weight: 900; }
.total-menu-title-wrap span:last-child { color: #64748b; font-size: 13px; }
.total-menu-toggle {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.total-menu-toggle:hover { border-color: #b8924c; color: #9a7334; background: #fffdf7; }

.nav-directory-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px 22px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
}
.directory-column { border-right: none; padding-right: 0; min-width: 0; }
.directory-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-bottom: 6px;
}
.directory-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #b8924c;
}
.directory-title a { color: inherit; }
.directory-title a:hover { color: #b8924c; }

.directory-list { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; }
.directory-list li a {
    font-size: 14.8px;
    color: #475569;
    font-weight: 500;
    display: block;
    padding: 1px 0;
    letter-spacing: -0.4px;
    line-height: 1.55;
}
.directory-list li a:hover { color: #b8924c; transform: translateX(3px); font-weight: 600; }
.directory-empty { font-size: 14px; color: #64748b; line-height: 1.6; }
.directory-empty a { color: #b8924c; text-decoration: underline; }

.sophisticated-nav.is-collapsed .nav-directory-grid { display: none !important; }
.sophisticated-nav.is-collapsed .total-menu-control { padding-bottom: 15px; }

/* 본문 래퍼 */
#wrapper.koreacts-wrapper {
    width: 100%;
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
}
#wrapper.koreacts-wrapper #container_wr {
    width: 100%;
    max-width: 1200px;
}
html,
body,
#wrapper {
    max-width: 100%;
    overflow-x: hidden;
}
.koreacts-main {
    max-width: 1200px;
    margin: 32px auto 80px;
    padding: 0 20px;
}

/* 반응형: 작은 화면 구간 (max-width: 768px) */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        padding: 10px 16px;
    }

    .header-top > div:first-child {
        width: 100%;
        font-size: 12px;
        line-height: 1.45;
    }

    .header-top-actions {
        gap: 10px;
    }

    .header-lang-btn {
        font-size: 12px;
    }

    .logo-section {
        justify-content: center;
        padding: 20px 16px 22px;
    }

    .logo-area {
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    .logo-link {
        justify-content: center;
        align-items: center;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border-radius: 11px;
    }

    .logo-icon::before {
        left: 9px;
        top: 10px;
        width: 22px;
        height: 17px;
    }

    .logo-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        min-width: 0;
    }

    .logo-main {
        font-size: clamp(23px, 6.1vw, 28px);
        line-height: 1.08;
        letter-spacing: -1.4px;
        max-width: calc(100vw - 92px);
        white-space: normal;
        word-break: keep-all;
    }

    .logo-sub {
        font-size: clamp(23px, 6vw, 27px);
        line-height: 1.05;
        letter-spacing: -0.8px;
    }

    .navy-integration-bar {
        padding: 10px 0;
    }

    .navy-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0 6px;
        max-width: 100%;
    }

    .bar-notice-area {
        gap: 10px;
    }

    .notice-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .notice-text {
        font-size: 14px;
    }

    .header-bible-tools {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
    }

    .header-bible-tools .koreacts-bible-modal,
    .header-bible-tools #quickBiblePanel.koreacts-bible-modal {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: calc(100vw - 32px);
        max-width: 380px;
    }

    .header-bible-btn {
        height: 38px;
        padding: 0 12px;
        font-size: 12.5px;
    }

    .header-bible-icon {
        font-size: 15px;
    }

    .site-total-search-form {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr) 58px;
        width: 100%;
        max-width: none;
        padding: 3px;
        gap: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .search-select,
    .site-total-search-form input[type="text"],
    .search-submit-btn {
        min-width: 0;
        height: 36px;
        font-size: 13px;
        box-sizing: border-box;
    }

    .search-select {
        width: 100%;
        padding: 0 8px;
    }

    .site-total-search-form input[type="text"] {
        width: 100%;
        padding: 0 9px;
    }

    .search-submit-btn {
        width: 100%;
        padding: 0;
        display: block;
        text-align: center;
    }

    .sophisticated-nav {
        width: 100%;
        overflow: hidden;
    }

    .total-menu-control {
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 15px 6px 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .total-menu-title-wrap {
        display: flex;
        align-items: baseline;
        gap: 8px;
        flex: 1 1 auto;
        flex-wrap: wrap;
    }

    .total-menu-title-wrap strong {
        font-size: 16px;
        line-height: 1.25;
        white-space: nowrap;
    }

    .total-menu-title-wrap span:last-child {
        font-size: 12.5px;
        line-height: 1.3;
    }

    .total-menu-toggle {
        flex: 0 0 auto;
        padding: 0 13px;
    }

    .nav-directory-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px 12px;
        padding: 16px 6px 22px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .directory-title {
        font-size: 14px;
        line-height: 1.25;
        margin-bottom: 8px;
        padding-bottom: 5px;
        letter-spacing: -0.5px;
        word-break: keep-all;
    }

    .directory-list {
        gap: 2px;
    }

    .directory-list li a {
        font-size: 12.5px;
        line-height: 1.45;
        letter-spacing: -0.6px;
        word-break: keep-all;
    }

    .koreacts-main {
        padding: 0 6px;
        margin-top: 20px;
    }

    #ft,
    #ft_wr {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* 반응형: 아주 좁은 화면 (max-width: 420px) */
@media (max-width: 420px) {
    .nav-directory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 10px;
    }

    .directory-title {
        font-size: 13px;
    }

    .directory-list li a {
        font-size: 12px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .nav-directory-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}
