@charset "UTF-8";
@import url(http://fonts.googleapis.com/earlyaccess/nanumgothic.css);
@import url("//cdn.rawgit.com/hiun/NanumSquare/master/nanumsquare.css");

/* ==========================================
   통합 레이아웃 스타일
   ========================================== */

body {
    font-family: 'NanumSquare', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

/* ==========================================
   Header 스타일
   ========================================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    color: black;
    height: 80px;
    border-bottom: 2px solid #ccc;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001; /* 로그인 모달보다 높게 설정 */
    transition: all 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

header.shrink {
    padding: 5px 0;
    height: 40px;
}

.header-container {
    display: flex;
    align-items: center;
    width: 100%;
    margin-left: 200px;
}

.logo img {
    height: 60px;
    transition: height 0.3s ease;
}

header.shrink .logo img {
    height: 35px;
}

/* ==========================================
   Navigation 스타일
   ========================================== */

.navbar1 {
    display: flex;
    gap: 40px;
    flex: 1;
    margin-left: 50px;
}

.navbar-toggle1 {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    top: 50%;
}

.navbar1 a {
    font-size: 18px;
    font-weight: bold;
    font-family: 'NanumSquare', sans-serif;
    color: #006699;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar1 a:hover {
    color: #555;
}

/* 드롭다운 메뉴 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* 인증 버튼 */
.auth-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.auth-button {
    background-color: gray;
    padding: 1px;
    border-radius: 5px;
    margin-left: 600px;
    align-items: center;
}

.button {
    font-size: 10px;
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    text-align: center;
    display: inline-block;
    transition: background-color 0.3s;
}

.auth-button .separator {
    margin: 0 10px;
    font-size: 18px;
    color: #c0c0c0;
}

.button:hover {
    background-color: blue;
}

/* ==========================================
   Main Content 영역
   ========================================== */

/* 전체 페이지 세션 */
#company1,
#company2,
#company3 {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 40px;
    height: 100vh;
    flex-direction: column;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
}

#company1 {
    background-image: url('../images/background.jpg');
}

#company2 {
    background-image: url('../images/background1.jpg');
}

/* 카테고리 (본문) 스타일 - ✅ 수정: Footer 침범 방지 */
.category {
    flex: 1;
    background-color: #fff;
    color: black;
    position: relative;
    margin-top: 80px; /* 헤더 높이만큼 여백 */
    padding-bottom: 100px; /* ✅ Footer 침범 방지 */
    min-height: calc(100vh - 80px); /* ✅ 최소 높이 보장 */
}

/* 박스 스타일 */
.box1, .box2, .box3 {
    position: relative;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #006699;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 40%;
    height: 80vh;
    text-align: center;
}

.box1 {
    margin-left: auto;
    margin-right: 10%;
}

.box2 {
    margin-left: 10%;
    margin-right: auto;
}

.box3 {
    /* 중앙 정렬 */
}

/* ==========================================
   Footer 스타일
   ========================================== */

footer {
    background-color: #333;
    color: white;
    padding: 20px;
    margin-top: auto; /* ✅ 자동으로 하단에 배치 */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    text-align: center;
    flex-wrap: wrap;
}

.footer-item {
    flex: 1;
    padding: 0 10px;
    margin-bottom: 10px;
}

.footer-item h3 {
    font-family: 'NanumSquare';
    margin-bottom: 5px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.1;
    color: inherit;
}

.footer-item p {
    font-size: 15px;
    line-height: 1.5;
}

/* ==========================================
   Scroll to Top 버튼
   ========================================== */

.scrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    background-color: black;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.5;
    width: 40px;
    z-index: 1000;
}

.scrollToTop:hover {
    background-color: #004d66;
}

/* ==========================================
   반응형 디자인
   ========================================== */

@media (max-width: 1200px) {
    .navbar1 {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 250px;
        background-color: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        transition: transform 0.3s ease;
        z-index: 1000;
        transform: translateX(100%);
        padding-top: 60px;
    }

    .navbar1.active {
        transform: translateX(0);
    }

    .dropdown {
        width: 100%;
    }

    .dropdown > a {
        padding: 15px 20px;
        display: block;
        border-bottom: 1px solid #eee;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        display: none;
        background-color: #f8f8f8;
    }

    .dropdown-content a {
        padding: 12px 30px;
        border-bottom: 1px solid #eee;
    }

    .navbar-toggle1 {
        display: block;
        font-size: 24px;
        background: none;
        color: black;
        border: none;
        position: fixed;
        top: 15px;
        right: 20px;
        z-index: 1001;
        cursor: pointer;
        padding: 10px;
    }

    .header-container {
        margin-left: 0;
        padding: 10px 20px;
    }

    header {
        padding: 10px;
        position: relative;
    }

    header .logo img {
        height: 50px;
    }

    .navbar1 a {
        font-size: 14px;
        color: #333;
        text-decoration: none;
    }

    .dropdown > a::after {
        content: '▼';
        margin-left: 5px;
        font-size: 12px;
    }

    .auth-buttons {
        justify-content: flex-end;
        display: flex;
        gap: 20px;
        width: 100%;
    }

    .auth-button {
        background-color: gray;
        padding: 1px;
        border-radius: 5px;
        margin-left: 10px;
        width: 100%;
        text-align: center;
    }

    .category {
        margin-top: 80px;
        flex: 1;
        width: 100%;
        background-color: #fff;
        color: black;
        position: relative;
    }
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}
