@charset "utf-8";
@import url("fonts.css");

:root {
    --accent: #000;
    --muted: #6b7280;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.06);
    --max-width: 1280px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Pretendard", sans-serif;
    color: #111;
    margin: 0px;
}

a {
    color: #000;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Pretendard", sans-serif;
}

.hero {
    min-height: 860px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: fixed;
    height: 70px;
    z-index: 50;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

header.active {
    background: #fff !important;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-link::after {
    content: "▼";
    float: right;
    transition: 0.3s;
    font-size: 7px;
    position: relative;
    top: 6px;
    margin-left: 10px;
}

.nav-link {
    color: #fff;
}

header.active .nav-link {
    color: #333 !important;
    transition: color 0.25s ease;
}

header.active nav a {
    color: #333 !important;
    transition: color 0.25s ease;
}

header.active .logo {
    background-image: url(../img/logo.png) !important;
}

.fix_container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 80px;
    height: 25px;
    margin-bottom: 5px;
    background-image: url(../img/footer-logo.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    padding: 8px 6px;
    cursor: pointer;
}

nav a:hover,
.nav-link:hover {
    color: #fff;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: inline-block;
    animation: ok 3s 1;
    font-weight: bold;
    font-size: 14px;
}

.btn.primary {
    background: #000;
    color: #fff;
    border-color: transparent;
}

.btn.secondary {
    background: #fff;
    color: #111;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* FULL-WIDTH MEGA MENU */
.mega {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px) saturate(120%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: none;
    padding: 32px 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    z-index: 40;
}

.mega-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.mega h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--accent);
}

.mega p {
    margin: 0 0 10px 0;
    color: var(--accent);
    font-size: 14px;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: transparent;
    font-size: 13px;
    color: #374151;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 30;
}

/* 서브메뉴 박스 hover 시 파스텔톤 블루 */
.mega-grid > div {
    background: transparent;
    padding: 18px;
    border-radius: 12px;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.mega-grid > div:hover {
    background: rgba(220, 235, 255, 0.65);
    /* 파스텔 블루 */
    /*transform: translateY(-2px);*/
}

/* Hover 시 제목 컬러 블루 */
.mega-grid > div:hover h4 {
    color: #3b82f6;
    /* 블루 */
}

@media (max-width: 900px) {
    .mega-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    nav {
        display: none;
    }
}

@media (max-width: 560px) {
    .mega-grid {
        grid-template-columns: 1fr;
    }

    .headline {
        font-size: 30px;
    }
}

/* ============= 모바일 메뉴 반응형 ============= */
@media (max-width: 900px) {

    /* PC 메뉴 숨김 */
    .hero {
        display: inline;
    }

    nav,
    .actions {
        display: none !important;
    }

    header {
        padding: 15px;
        height: 50px;
        background-color: #333;
    }

    .logo {
        width: 65px;
        background-size: contain;
    }

    /* 햄버거 버튼 생성 */
    header .mobile-btn {
        display: block;
        width: 28px;
        height: 22px;
        cursor: pointer;
        position: relative;
    }

    header .mobile-btn span {
        position: absolute;
        left: 0;
        width: 28px;
        height: 3px;
        background: #fff;
        transition: 0.3s;
        border-radius: 4px;
    }

    header.active .mobile-btn span {
        background: #111;
    }

    /* 스크롤 내려 흰배경일 때 대비 */

    header .mobile-btn span:nth-child(1) {
        top: 0;
    }

    header .mobile-btn span:nth-child(2) {
        top: 9px;
    }

    header .mobile-btn span:nth-child(3) {
        bottom: 0;
    }

    /* 🔥 mega 메뉴가 모바일에서는 사이드바처럼 */
    .mega {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        display: block;
        overflow-y: auto;
        padding: 80px 24px;
        transition: right 0.35s ease;
        box-shadow: -3px 0 20px rgba(0, 0, 0, 0.15);
    }

    .mega.open {
        right: 0;
    }

    /* 데스크탑 4열 -> 모바일 단일열 */
    .mega-grid {
        grid-template-columns: 1fr !important;
    }

    /* overlay 활성화 */
    .overlay.show {
        display: block;
        backdrop-filter: blur(2px);
    }
}

/* 모바일 메뉴 버튼 default 숨김 */
.mobile-btn {
    display: none;
    cursor: pointer;
}

.mobile-btn span {
    width: 26px;
    height: 3px;
    background: #fff;
    display: block;
    margin: 5px 0;
    border-radius: 4px;
}

/* 모바일 슬라이드메뉴 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300%;
    width: 260px;
    height: 100vh;
    background: #fff;
    padding: 60px 24px;
    transition: 0.35s;
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* ✨ 애니메이션 효과 핵심 */
    transform: translateX(100%);
    opacity: 0;
    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
    z-index: 9999;
}

.mobile-menu a {
    font-size: 16px;
    padding: 5px 0;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}

.mobile-menu .full {
    width: 100%;
    height: 50px;
}

.mobile-menu.open {
    right: 0;
    transform: translateX(0);
    opacity: 1;
}

.m-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 150;
}

/* ------ 모바일 전환 ------ */
@media (max-width: 900px) {

    nav,
    .actions {
        display: none;
    }

    .mobile-btn {
        display: block;
    }

    .mega {
        display: none !important;
    }

    /* PC mega 제거 */

    .mobile-menu.open {
        right: 0;
    }

    .overlay.show {
        display: block;
    }
}

/* 🔥 모바일 드롭다운 기본 숨김 */
.m-sub {
    display: none;
    flex-direction: column;
    padding-left: 10px;
    margin-top: 8px;
    list-style: none;
}

.m-sub li {
    padding: 6px 0;
    font-size: 16px;
}

.m-sub li a {
    padding: 8px 0;
    font-size: 16px;
}

/* 펼쳐졌을 때 */
.has-sub.open .m-sub {
    display: flex;
}

.has-sub.open .m-link::after {
    transform: rotate(180deg);
}

.m-link {
    display: block;
    font-size: 16px;
    padding: 10px 0;
}

.m-link::after {
    content: "▼";
    float: right;
    transition: 0.3s;
    font-size: 10px;
    position: relative;
    top: 4px;
}

.mobile-menu .has-sub.active .m-sub {
    display: block;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/

footer {
    padding: 70px 80px 40px;
    background: #1f1f1f;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 60px;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-left {
    width: 50%;
    line-height: 1.5;
    color: #d0d0d0;
    font-size: 14px;
}

.footer-left .logo {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.footer-right {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.footer-col h4 {
    color: #bbb;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li {
    font-size: 14px;
    margin-bottom: 9px;
    cursor: pointer;
    transition: 0.2s;
    color: #d0d0d0;
}

.footer-col ul li:hover {
    color: #fff;
}

.footer-col ul li a {
    color: #d0d0d0;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-line {
    width: 100%;
    height: 1px;
    background: #333;
    margin: 50px 0 25px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 14px;
    color: #aaa;
    gap: 20px;
}

.footer-links a {
    margin-right: 18px;
    color: #aaa;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

@media (max-width: 640px) {
    .footer-wrap {
        flex-direction: column;
    }

    .footer-left {
        width: 100%;
    }

    .footer-right {
        gap: 40px;
    }

    footer {
        padding: 60px 30px;
    }
}