/* ============================================================
   KPFGH SKIN CSS
   국회국제보건의료포럼 그누보드5 스킨
   ============================================================ */

/* ── CSS 변수 ─────────────────────────────────────────────── */
:root {
    --primary:        #0A2D6E;   /* 의회 네이비 */
    --primary-dark:   #071e4d;   /* 호버용 진한 네이비 */
    --primary-light:  #e8edf7;   /* 연한 배경 */
    --accent:         #00417b;   /* 골드 포인트 */
    --accent-hover:   #00417b;
    --text:           #1e2535;
    --text-muted:     #5a6478;
    --border:         #dde2ed;
    --white:          #ffffff;
    --bg-light:       #f5f7fb;
    --header-h:       110px;      /* 헤더 높이 */
    --header-h2:       80px;      /* 헤더 높이 */
    --trans:          0.22s ease;
}

/* ── 리셋 & 기본 ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* 초기화 */
html {font-size: 10px;line-height: 1.6; overflow-y:scroll;scroll-behavior: smooth;}
@media (max-width: 1780px) {
	html {font-size: 9.6px;}
}
@media (max-width: 1340px) {
	html {font-size: 9.5px;}
}
@media (max-width: 1280px) {
	html {font-size: 9.4px;	}
}
@media (max-width: 1080px) {
	html {font-size: 9.2px;	}
}
@media (max-width: 840px) {
	html {font-size: 9px;}
}
@media (max-width: 600px) {
	html {font-size: 8.8px;}
}

body {font-size:1.6rem;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
button { font-family: inherit; }

/* main이 푸터를 밀어내게 */
#content { flex: 1; }

/* ── Skip Navigation ─────────────────────────────────────── */
.skip-nav {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 0 0 6px 6px;
    font-size: 14px;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-nav:focus { top: 0; }

/* ============================================================
   HEADER
   ============================================================ */
#site-header-top {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

#site-header-bottom {
    position: sticky;
    top: 111px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner-top {
    display: flex;
    align-items: center;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2%;
    height: var(--header-h);
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.header-inner-bottom {
    display: flex;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2%;
    height: var(--header-h2);
}

/* ── 로고 ─────────────────────────────────────────────────── */
.header-logo {
    flex-shrink: 0;
    margin-right: 48px;
}
.header-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-logo img {
    height: 50px;
    width: auto;
}
.logo-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-text-main {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.04em;
}
.logo-text-sub {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* ============================================================
   PC GNB (데스크탑 네비게이션)
   ============================================================ */
#gnb {
    flex: 1;
    overflow: visible;
}
.gnb-list {
    display: flex;
    align-items: stretch;
    height: var(--header-h2);
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: nowrap;
}

/* ── GNB 1단 메뉴 항목 ──────────────────────────────────── */
.gnb-item {
    position: relative;
    display: flex;
    align-items: center;
}
.gnb-link {
    display: flex;
    align-items: center;
    height: 100%;
    /*padding: 0 69px;*/
    font-size: 2rem;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.01em;
    white-space: nowrap;
    position: relative;
    transition: color var(--trans);
}
.gnb-link:hover {color: var(--primary)}

/* ── GNB 2단 드롭다운 ───────────────────────────────────── */
.sub-menu-wrap {
    position: absolute;
    top: calc(100% + 1px); /* 헤더 border-bottom 바로 아래 */
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    min-width: 210px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0s 0.18s;
    pointer-events: none;
    z-index: 100;
}
/* 마우스가 GNB 항목에 올라갔을 때 드롭다운 표시 */
.gnb-item:hover .sub-menu-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0s 0s;
    pointer-events: auto;
}

/* 드롭다운 삼각형 (선택적으로 사용) */
.sub-menu-wrap::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-bottom-color: var(--primary);
    border-top: none;
}

.sub-menu li a {
    display: block;
    padding: 15px 20px;
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--bg-light);
    transition:
        background var(--trans),
        color var(--trans),
        padding-left var(--trans);
    white-space: nowrap;
}
.sub-menu li:last-child a { border-bottom: none; }
.sub-menu li a:hover {
    background: var(--bg-light);
    color: var(--accent);
    padding-left: 26px;
}

/* ============================================================
   HEADER RIGHT (언어 + 햄버거)
   ============================================================ */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.header-right i {font-size: 2rem;}

/* 언어 전환 */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lang-btn {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    padding: 4px 2px;
    transition: color var(--trans);
}
.lang-btn:hover,
.lang-btn.active {
    color: var(--primary);
    font-weight: 700;
}
.lang-divider {
    color: var(--border);
    font-size: 12px;
    user-select: none;
}

/* ── 햄버거 버튼 ─────────────────────────────────────────── */
.hamburger {
    display: none;          /* 모바일에서만 보임 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background var(--trans);
}
.hamburger:hover { background: var(--primary-light); }
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
/* 활성 상태(X 형태) */
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   MOBILE MENU (드로어)
   ============================================================ */

/* 오버레이 */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 20, 50, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

/* 드로어 패널 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 90vw);
    height: 100%;
    background: var(--white);
    z-index: 1200;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.mobile-menu.open {
    transform: translateX(0);
}

/* 드로어 헤더 */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    background: var(--primary);
    flex-shrink: 0;
}
.mobile-logo {
    font-size: 17px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.06em;
    filter: brightness(0) invert(1);
    width: 200px;
}
.mobile-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--trans), color var(--trans);
}
.mobile-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

/* 드로어 언어 전환 */
.mobile-lang {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.mobile-lang-btn {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 20px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all var(--trans);
}
.mobile-lang-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    font-weight: 500;
}

/* 드로어 1단 메뉴 */
.mobile-nav-list {
    flex: 1;
    overflow-y: auto;
}
.mobile-nav-item {
    border-bottom: 1px solid var(--border);
}
/* 서브메뉴 없는 링크 */
.mobile-nav-link {
    display: block;
    padding: 17px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
    transition: background var(--trans), color var(--trans);
}
.mobile-nav-link:hover {
    background: var(--primary-light);
    color: var(--accent);
}

/* 서브메뉴 있는 토글 버튼 */
.mobile-nav-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 17px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background var(--trans), color var(--trans);
}
.mobile-nav-btn:hover {
    background: var(--primary-light);
    color: var(--accent);
}
.mobile-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}
.mobile-nav-item.open .mobile-arrow {
    transform: rotate(180deg);
}

/* 드로어 2단 서브메뉴 (아코디언) */
.mobile-sub-list {
    display: none;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}
.mobile-nav-item.open .mobile-sub-list {
    display: block;
}
.mobile-sub-list li a {
    display: block;
    padding: 13px 20px 13px 34px;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: color var(--trans), background var(--trans);
    position: relative;
}
.mobile-sub-list li a::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 1px;
    background: var(--border);
}
.mobile-sub-list li:last-child a { border-bottom: none; }
.mobile-sub-list li a:hover {
    color: var(--accent);
    background: rgba(184, 150, 46, 0.06);
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
    background: var(--white);
    color: rgba(0, 0, 0, 0.8);
    border-top: 1px solid #dfe5ef;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 2% 36px;
}

/* 상단: 로고 + SNS */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}

/* 하단: 링크 + 주소 + 저작권 */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    margin-bottom: 18px;
}
.footer-links li {
    display: flex;
    align-items: center;
}
.footer-links li + li::before {
    content: '|';
    padding: 0 12px;
    color: rgba(0, 0, 0, 0.2);
    font-size: 11px;
}
.footer-links a {
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.7);
    transition: color var(--trans);
}
.footer-links a:hover { color: var(--accent); }

/* 주소 정보 */
.footer-address {
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.8);
    line-height: 1.9;
    margin-bottom: 10px;
    word-break: keep-all;
}
.addr-item {
    display: inline-block;
    margin-right: 10px;
}
.addr-item + .addr-item::before {
    content: '|';
    margin-right: 12px;
    color: rgba(0, 0, 0, 0.3);
}
.addr-label {
    color: rgba(0, 0, 0, 0.5);
    margin-right: 6px;
    font-size: 1.5rem;
}
.footer-address a {
    color: inherit;
    transition: color var(--trans);
}
.footer-address a:hover { color: var(--accent); }

/* 저작권 */
.footer-copy {
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* 1100px 이하: GNB 여백 축소 */
@media (max-width: 1100px) {
    .header-inner-top { padding: 0 2%; }
    .header-logo  { margin-right: 24px; }
    .gnb-link     { font-size: 1.8rem; }
}

/* 768px 이하: 모바일 전환 */
@media (max-width: 768px) {
    :root {
    --header-h:       60px;      /* 헤더 높이 */
    --header-h2:       0px;      /* 헤더 높이 */
    }    

    #site-header-bottom {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--white);
        border-bottom: none;
    }

    /* GNB 숨기고 햄버거 표시 */
    #gnb       { display: none; }
    .hamburger { display: flex; }

    /* 로고를 왼쪽으로, 헤더 오른쪽에는 햄버거만 */
    .header-logo { margin-right: auto; }
    .header-logo img { height: 38px; }
    .lang-switch { display: none; } /* 모바일에서 PC 언어 전환 숨김 */
    .header-inner { padding: 0 16px; }

    /* 푸터 */
    .footer-inner  { padding: 36px 2% 28px; }
    .footer-top    { flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-bottom { }

    /* 주소 모바일: 세로 정렬 */
    .addr-item        { display: block; margin-right: 0; }
    .addr-item + .addr-item::before { display: none; }

    /* 푸터 링크 모바일 */
    .footer-links     { flex-direction: column; gap: 10px; }
    .footer-links li + li::before { display: none; }
}

@media (max-width: 480px) {
    .logo-text-sub { display: none; }
}