@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;700&display=swap');

:root {
    --header-height: 80px;
    --main-green: #1b6331;
}

/* =====================================
   HEADER BASE
===================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    color: #fff;
    transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

/* 스크롤 시 (일반 페이지) */
.site-header.scrolled {
    background: #fff;
    color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* 로고 전환 */
.logo img {
    height: clamp(2rem, 2.5vw, 2.8rem);
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
}

.site-header.scrolled .logo img {
    content: url("/img/logo-black.png");
}

/* 링크 기본값 */
.site-header a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s ease;
    font-family: 'Jost', sans-serif;
}

/* =====================================
   NAVBAR
===================================== */
.navbar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    max-width: 1920px;
    margin: 0 auto;
    transition: 0.3s ease;
}

.logo img {
    height: clamp(1rem, 2vw, 2rem);
    width: auto;
}

/* 중앙 메뉴 */
.nav-links {
    display: flex;
    list-style: none;
    gap: clamp(2rem, 3vw, 4rem);
}

.nav-links li {
    position: relative;
}

.nav-links a {
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.nav-links a:hover {
    transform: translateY(-2px);
}

/* =====================================
   DROPDOWN
===================================== */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 0.5rem;
    transform: translateX(-50%);
    background: #fff;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 0.5rem 0;
    z-index: 99;
}

.nav-links li:hover .dropdown {
    display: flex;
    flex-direction: column;
}

.dropdown a {
    color: #000;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.dropdown a:hover {
    color: var(--main-green);
    background: rgba(0, 0, 0, 0.05);
}

/* =====================================
   햄버거 버튼
===================================== */
.right-menu-icon {
    display: flex;
    align-items: center;
}

#menu-icon {
    display: none;
}

.right-menu-icon label {
    display: block;
    width: 28px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 99999;
    color: #fff;
}

.site-header.scrolled .right-menu-icon label,
.site-header.menu-open .right-menu-icon label {
    color: #111;
}

.right-menu-icon label span {
    background-color: currentColor;
}

/* 햄버거 애니메이션 */
.right-menu-icon label span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    border-radius: 30px;
    background-color: currentColor;
    transition: all 0.35s;
}
.right-menu-icon label span:nth-child(1) { top: 0; }
.right-menu-icon label span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.right-menu-icon label span:nth-child(3) { bottom: 0; }

#menu-icon:checked + label span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
#menu-icon:checked + label span:nth-child(2) {
    opacity: 0;
}
#menu-icon:checked + label span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* =====================================
   SIDE MENU (FULLSCREEN)
===================================== */
.side_menu {
    position: fixed;
    inset: 0;
    background: #fff;
    color: #111;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 120px 6% 60px;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.6s ease;
    z-index: 9998;
    font-family: 'Jost', sans-serif;
    visibility: hidden;
    pointer-events: none;
}

.side_menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 로고 */
.side_menu .menu-logo {
    position: absolute;
    top: 40px;
    left: 6%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #111;
}

/* 메뉴 콘텐츠 */
.side_menu_content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.side_menu.open .side_menu_content {
    opacity: 1;
    transform: translateY(0);
}

.side_menu * {
    color: #111 !important;
}

.side_menu_a_container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.side_menu.open .side_menu_a_container {
    opacity: 1;
    transform: translateY(0);
}
.side_menu.open .side_menu_a_container:nth-child(1) { transition-delay: 0.1s; }
.side_menu.open .side_menu_a_container:nth-child(2) { transition-delay: 0.2s; }
.side_menu.open .side_menu_a_container:nth-child(3) { transition-delay: 0.3s; }
.side_menu.open .side_menu_a_container:nth-child(4) { transition-delay: 0.4s; }
.side_menu.open .side_menu_a_container:nth-child(5) { transition-delay: 0.5s; }

.side_menu_top_a {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.8rem;
    display: block;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    transition: 0.3s ease;
}

.side_menu_btm_a_container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.6rem;
}
.side_menu_btm_a {
    font-size: 0.92rem;
    color: rgba(0, 0, 0, 0.65);
    transition: 0.25s ease;
}
.side_menu_btm_a:hover {
    color: var(--main-green);
}
.side_menu_top_a:hover {
    color: var(--main-green);
}

/* =====================================
   밝은 섹션용 반전 (main-page only)
===================================== */
.site-header.bright-header {
    background: rgba(255, 255, 255, 0.98);
    color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.site-header.bright-header a {
    color: #111 !important;
}
.site-header.bright-header .logo img {
    content: url("/img/logo-black.png");
}
.site-header.bright-header .right-menu-icon label {
    color: #111;
}

/* =====================================
   반응형 : 1200px 이하
===================================== */
@media (max-width: 1200px) {
    .navbar {
        height: 70px;
    }

    .logo img {
        height: 35px;
    }

    .right-menu-icon label {
        width: 28px;
        height: 20px;
        display: flex;
        align-items: center;
    }

    .nav-links {
        display: none;
    }

    .right-menu-icon {
        display: block;
    }

    .side_menu {
        justify-content: center;
        align-items: center;
        padding: 100px 4%;
    }

    .side_menu_content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .side_menu_top_a {
        position: relative;
        font-size: 1.2rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0.6rem 1rem;
        border-bottom: 2px solid #eee;
        text-align: center;
        transition: all 0.3s ease;
    }

    .side_menu_btm_a_container {
        max-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem 1.2rem;
        margin-top: 0;
        opacity: 0;
        transition:
                max-height 0.5s ease,
                opacity 0.4s ease,
                margin-top 0.4s ease;
    }

    .side_menu_a_container.active .side_menu_btm_a_container {
        max-height: 200px;
        opacity: 1;
        margin-top: 0.8rem;
    }

    .side_menu_btm_a {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .side_menu_a_container.active .side_menu_btm_a {
        opacity: 1;
        transform: translateY(0);
    }

    .side_menu_top_a::after {
        content: "▾";
        font-size: 0.8rem;
        margin-left: 0.5rem;
        transition: transform 0.3s ease;
    }

    .side_menu_a_container.active .side_menu_top_a::after {
        transform: rotate(180deg);
    }

    .side_menu_btm_a:hover {
        color: var(--main-green);
    }

    /* 로고 가운데 */
    .side_menu .logo {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }
}

/* =====================================
   800px 이하 : 폰트/패딩 비례 축소
===================================== */
@media (max-width: 800px) {

    .navbar {
        height: 65px;
    }

    .logo img {
        height: 35px;
    }

    .side_menu_top_a {
        font-size: 1.1rem;
        padding: 0.5rem 0.8rem;
    }

    .side_menu_btm_a {
        font-size: 0.9rem;
    }
}

/* =====================================
   600px 이하 : 더 간결한 정렬
===================================== */
@media (max-width: 600px) {
    .navbar {
        height: 60px;
    }

    .logo img {
        height: 30px;
    }

    .side_menu_content {
        gap: 1.2rem;
    }

    .side_menu_top_a {
        font-size: 1rem;
        border-bottom: 1px solid #ddd;
    }

    .side_menu_btm_a_container {
        gap: 0.5rem 0.8rem;
    }
}



/* =====================================
   애니메이션 정의
===================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}
