﻿/* 공통 기본 스타일 */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "맑은 고딕", sans-serif;
    font-size: 14px;
    color: #222;
}

a {
    color: inherit;
    text-decoration: none; /* 메뉴 텍스트 밑줄 제거 */
}

.container.body-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px 16px;
}

/* 헤더 / 메뉴 영역 ------------------------------------ */

.site-header {
    background-color: #ffffff;
    border-top: 6px solid #d0d0d0; /* 상단 두꺼운 회색 줄 */
    border-bottom: 2px solid #e0e0e0; /* 하단 얇은 회색 줄 */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px; /* 메뉴 위아래 여백 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
}

/* CI 영역 (좌측 고정) */
.nav-logo img {
    height: 60px; /* 필요에 따라 조정 */
    display: block;
    margin-left: 10px;
}

/* 햄버거 버튼 (기본: 데스크탑에서는 숨김) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    margin-left: auto;
    margin-right: 4px;
}

    .nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 4px 0;
        background-color: #333;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    /* 햄버거 애니메이션 (열렸을 때) */
    .nav-toggle.open span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

/* 상단 메뉴 (데스크탑) */
.nav-main {
    flex: 1 1 auto;
    margin-left: 40px;
}

.nav-level1 {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* CI 제외한 1단 메뉴 가운데 정렬 */
    gap: 32px;
}

.nav-item {
    position: relative;
}

/* 1단 메뉴 링크 */
.nav-link {
    position: relative;
    padding: 6px 4px;
    font-weight: 500;
    white-space: nowrap;
    font-size: 18px; /* ← 메뉴 폰트 */
}

    /* 1단 메뉴 밑줄 효과용 pseudo-element */
    .nav-link::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -4px;
        width: 80%; /* 전체 글자의 80% 정도 */
        height: 2px;
        background-color: #0052cc; /* 짙은 파랑색 */
        transform: translateX(-50%) scaleX(0);
        transform-origin: center;
        opacity: 0;
    }

    /* 밑줄 애니메이션 - 마우스 오버 시 (가운데에서 시작해서 양쪽으로) */
    .nav-link.underline-in::after {
        animation: underline-in 0.25s forwards;
    }

    /* 마우스 아웃 시 (양 끝에서 가운데로 사라지는 느낌) */
    .nav-link.underline-out::after {
        animation: underline-out 0.25s forwards;
    }

@keyframes underline-in {
    0% {
        opacity: 0;
        transform: translateX(-50%) scaleX(0);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }
}

@keyframes underline-out {
    0% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scaleX(0);
    }
}

/* 2단 메뉴(dropdown) ---------------------------------- */

.nav-item.has-sub > .nav-link::before {
    /* 필요 시 아이콘 등 추가 가능 (예: ▾) */
}

.nav-level2 {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%; /* 기존 top:100%; → 110% 로 내려서 밑줄과 간섭 제거 */
    left: 0;
    min-width: 170px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 10;
}

    /* 2단 메뉴 항목: 좌측 여백, 좌측 정렬 */
    .nav-level2 li a {
        display: block;
        padding: 6px 18px; /* 좌측 여백 */
        text-align: left;
        font-size: 13px;
        text-decoration: none;
        white-space: nowrap;
    }

        .nav-level2 li a:hover {
            background-color: #f5f7fa;
        }

/* 1단 메뉴 Over 시 2단 메뉴 Fade-in */
.nav-item.has-sub:hover > .nav-level2 {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 반응형 (모바일 / 작은 창) --------------------------- */

@media (max-width: 768px) {
    .nav-container {
        align-items: center;
    }

    .nav-main {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        border-bottom: 1px solid #e0e0e0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

        .nav-main.open {
            max-height: 400px; /* 메뉴 높이에 맞게 충분히 크게 */
        }

    .nav-level1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 8px 16px 12px 16px;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .nav-level2 {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 8px 12px; /* 2단 메뉴 좌측 여백 */
        transform: translateY(0);
    }

    .nav-item.has-sub > .nav-level2 {
        top: 115%; /* 기존 100% → 115% 정도로 내려줌 */
        /* 모바일에선 hover 대신 항상 열려 있게 둘 수도 있고
           필요 시 JS로 토글 로직 추가 가능 */
    }

    .nav-toggle {
        display: inline-block; /* 모바일에서 햄버거 버튼 표시 */
    }

    .nav-main,
    .nav-toggle {
        /* 햄버거는 맨 우측 */
        margin-left: auto;
    }
}

/* Index 본문용 이미지 리스트 --------------------------- */

.image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.image-item {
    flex: 1 1 calc(50% - 12px); /* 📌 큰 화면에서도 2개 고정 */
    box-sizing: border-box;
}

    .image-item img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 4px;
    }


.image-item1 {
    flex: 1 1 calc(100% - 12px); /* 📌 큰 화면에서도 1개 고정 */
    box-sizing: border-box;
}

    .image-item1 img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 4px;
    }


.image-caption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

/* 화면이 작아질수록 이미지 1열/2열로 줄이기 */
@media (max-width: 992px) {
    .image-item {
        flex: 1 1 calc(50% - 16px);
    }
}

/* 화면이 작아질수록 1열로 변경 */
@media (max-width: 600px) {
    .image-item {
        flex: 1 1 100%;
    }
}

/* ============================
   Footer (검은색 배경)
============================ */
.site-footer {
    background-color: #111; /* 검은색 배경 */
    color: #ccc; /* 밝은 회색 글자 */
    padding: 40px 16px;
    margin-top: 60px;
    font-size: 13px;
}

    .site-footer .footer-inner {
        max-width: 1200px;
        margin: 0 auto;
        text-align: center;
        line-height: 1.6;
    }

    .site-footer p {
        margin: 6px 0;
    }

/* 모바일 대응 */
@media (max-width: 600px) {
    .site-footer {
        padding: 30px 12px;
    }

        .site-footer p {
            font-size: 12px;
        }
}

/* 모바일 메뉴 뒤로 가려지는 증상 */
@media (max-width:768px) {
    .site-header {
        position: relative;
        z-index: 9999 !important;
    }

    .nav-main {
        position: absolute;
        z-index: 9999 !important;
    }
}

/* 📱 모바일에서 2단 메뉴 항상 보이도록 */
@media (max-width: 768px) {

    /* 모바일 메뉴 열릴 때 메뉴 전체가 위로 올라오도록 z-index 확보 */
    .nav-main.open {
        position: absolute;
        width: 100%;
        z-index: 9999;
        background: #fff;
    }

    /* 2단 메뉴 기본값 재설정 — 항상 표시 */
    .nav-item.has-sub > .nav-level2 {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        transform: none !important;
        height: auto !important;
        max-height: none !important;
        padding-left: 20px;
        box-shadow: none;
        border: none;
        background: #fff;
    }

    /* 모바일용 2단 메뉴 글자 스타일 */
    .nav-level2 li a {
        padding: 10px 0;
        font-size: 15px;
        color: #333;
        display: block;
    }
}


.main-title {
    margin-left: 110px;
    color: #1b2a5a; /*color: #e7ecff;*/
}


/* CEO 인사말, 회사 연혁 등 내용 Box Text */
/**/
.hero-section {
    position: relative;
    width: 100%;
    min-height: auto; /* 기존 100vh → auto 로 변경 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    color: #ffffff;
    /*
        background: linear-gradient(rgba(5, 10, 40, 0.75), rgba(5, 10, 40, 0.85)), url('/images/bg-responsibility-trust-growth.jpg') center center / cover no-repeat;
        */
    box-sizing: border-box;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 20px 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: #1b2a5a; /*color: #e7ecff;*/
    letter-spacing: 0.06em;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 28px;
    color: #1b2a5a;
}

.highlight-word {
    font-size: 1.2em;
    font-weight: 800;
    color: #1b2a5a; /* 짙은 남색 계열 */
    background: linear-gradient(to bottom, #ffffff, #d9e2ff);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin: 0 2px;
}

.highlight-word1 {
    font-size: 1.0em;
    font-weight: 500;
    color: #000000; /* 검정 계열 */
    background: linear-gradient(to bottom, #ffffff, #d9e2ff);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin: 0 2px;
}

.ceo-message-card {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 0px 26px;
    color: #1e2440;
    line-height: 1.8;
    font-size: 1rem;
}

    .ceo-message-card p {
        margin-bottom: 14px;
    }

.ceo-sign {
    margin-top: 18px;
    text-align: right;
    font-weight: 600;
    color: #1b2a5a;
}

    .ceo-sign small {
        display: block;
        font-weight: 400;
        color: #4a5275;
    }

@media (max-width: 768px) {
    .hero-content {
        padding: 28px 22px;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

.section-divider {
    height: 2px;
    background-color: rgba(204, 204, 204, 0.75);
    margin: 20px 0 30px 0;
    border-radius: 2px;
}

.hero-year {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1b2a5a;
}

.hero-year1 {
    font-size: 1.0rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #e1e6ff;
}

.hero-card {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 15px 30px;
    margin-bottom: 15px;
    color: #1e2440;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.hero-card1 {
    background-color: #4a5275;
    border-radius: 16px;
    padding: 15px 25px;
    color: #1e2440;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.hero-card ul li {
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-content {
        padding: 28px 22px;
    }

    .hero-title {
        font-size: 1.9rem;
    }
}

/*  데스크탑에서 hover 시 살짝 아래로 띄우기 */
@media (min-width: 769px) {
    .nav-item.has-sub:hover > .nav-level2 {
        opacity: 1;
        visibility: visible;
        transform: translateY(12px); /* 기존 0 → 8px 정도로 변경 */
    }
}
