/* --- 기본 설정 --- */
:root {
    --font-serif: 'Paperlogy', sans-serif;
    --font-sans: 'Paperlogy', sans-serif;
    --brand-dark: #0b1d5c;    /* 로고 딥 블루 */
    --brand-blue: #2962ff;    /* 로고 브라이트 블루 */
    --text-main: #212529;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --transition-base: all 0.3s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth; /* 핵심: 부드러운 이동 활성화 */
}
body {
	font-family: var(--font-sans); color: var(--text-main);
    line-height: 1.6;
    letter-spacing: -0.02em;
    overflow-x: hidden;
}


a { text-decoration: none; transition: var(--transition-base); }
.page-section { padding: 7rem 0; }

/* Section Headings */
.section-heading { margin-bottom: 4rem; }
.section-title { font-size: 2.5rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 1rem; letter-spacing: -1px; word-break: keep-all; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); font-weight: 400; }
.title-line { width: 60px; height: 4px; background-color: var(--brand-blue); border-radius: 2px; }

/* Buttons */
.btn-primary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    font-weight: 600;
    transition: var(--transition-base);
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 98, 255, 0.3);
}
.btn-xl { padding: 1rem 2.5rem; font-size: 1.1rem; border-radius: 3rem; }

/* Navigation */
#mainNav {
    background-color: transparent;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    transition: var(--transition-base);
}
#mainNav .navbar-brand { font-weight: 800; font-size: 1.5rem; color: #fff; letter-spacing: 1px; }
#mainNav .navbar-brand span { color: var(--brand-blue); }
#mainNav .nav-link { color: rgba(255, 255, 255, 0.8); font-weight: 500; padding: 0.5rem 1.5rem; }
#mainNav .nav-link:hover, #mainNav .nav-link.active { color: #fff; }

/* Navbar Scrolled State */
#mainNav.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}
#mainNav.navbar-scrolled .navbar-brand { color: var(--brand-dark); }
#mainNav.navbar-scrolled .nav-link { color: var(--text-main); }
#mainNav.navbar-scrolled .nav-link:hover, #mainNav.navbar-scrolled .nav-link.active { color: var(--brand-blue); }

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(to right, rgba(11, 29, 92, 0.9), rgba(11, 29, 92, 0.5)),
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1920&q=80') center center / cover;
    color: #fff;
}
.hero-badge { display: inline-block; padding: 0.4rem 1rem; background: rgba(255,255,255,0.1); border-radius: 2rem; font-size: 0.9rem; letter-spacing: 2px; }
.hero-title { font-size: 4.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; word-break: keep-all; }
.hero-desc { font-size: 1.25rem; font-weight: 300; opacity: 0.9; margin-bottom: 2.5rem; }
.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 2rem; color: #fff; animation: bounce 2s infinite; opacity: 0.7; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); } 40% { transform: translateY(-20px) translateX(-50%); } 60% { transform: translateY(-10px) translateX(-50%); } }

/* About Section */
.about-text { font-size: 1.1rem; margin-bottom: 1.5rem; word-break: keep-all; }
.image-wrapper { border-radius: 1rem; overflow: hidden; }
.image-wrapper img { transition: transform 0.5s ease; }
.image-wrapper:hover img { transform: scale(1.05); }

/* Solutions Section */
.bg-light-blue {
    background-color: #f9fbff; /* 더 밝고 깨끗한 배경 */
}

.solution-card-new {
    background: #ffffff;
    border-radius: 20px;
    /* 테두리를 아주 연하게 주어 구분감만 부여 */
    border: 1px solid #edf0f5;
    padding: 3rem;
    height: 100%;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

/* [심플 호버 로직] 색 채우기 대신 테두리와 그림자만 활용 */
.solution-card-new:hover {
    transform: translateY(-10px); /* 가볍게 부상 */
    border-color: var(--brand-blue); /* 테두리만 브랜드 컬러로 */
    background: #ffffff; /* 배경은 흰색 유지 */
    /* 그림자를 아주 부드럽고 넓게 확산 */
    box-shadow: 0 15px 45px rgba(41, 98, 255, 0.08);
}

/* 아이콘 박스 - 평소에는 연한 회색/블루 톤 */
.icon-box-new {
    width: 70px;
    height: 70px;
    background-color: #f1f4f9;
    border-radius: 12px; /* 원형보다 세련된 스퀘어 라운드 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #a0aec0; /* 평소엔 무채색 톤 */
    transition: all 0.3s ease;
}

/* 호버 시 아이콘만 브랜드 컬러로 강조 */
.solution-card-new:hover .icon-box-new {
    background-color: rgba(41, 98, 255, 0.1);
    color: var(--brand-blue);
    transform: scale(1.1);
}

/* 타이포그래피 - 심플 가독성 강조 */
.card-title-new {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.card-subtitle-new {
    font-size: 0.85rem;
    color: var(--brand-blue); /* 서브타이틀에 포인트 컬러 */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.card-text-new {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    word-break: keep-all;
}

/* 태그 스타일 - 연한 톤으로 변경 */
.tag {
    font-size: 0.8rem;
    color: #718096;
    background-color: #f7fafc;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #edf2f7;
    font-weight: 500;
    transition: all 0.3s ease;
}

.solution-card-new:hover .tag {
    color: var(--brand-blue);
    border-color: rgba(41, 98, 255, 0.2);
    background-color: rgba(41, 98, 255, 0.03);
}

/* Services Section */
/* 1. 개별 서비스 박스 기본 스타일 */
.service-box {
    padding: 40px;
    border-radius: 20px; /* 조금 더 둥글게 */
    background: #ffffff;
    border: 1px solid #f0f0f0; /* 아주 연한 테두리로 경계 구분 */
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* 부드러운 애니메이션 속도 */
    height: 100%;
    position: relative;
    overflow: hidden; /* 오버 시 배경 효과용 */
}

/* 2. [핵심] 마우스 오버(Hover) 시 역동적 효과 */
.service-box:hover {
    transform: translateY(-15px) scale(1.02); /* 위로 떠오르며 살짝 커짐 */
    border-color: #2962ff; /* 하이브릭스 블루 테두리 */
    box-shadow: 0 20px 40px rgba(41, 98, 255, 0.1); /* 푸르스름하고 넓은 그림자 */
}

/* 3. 아이콘 컨테이너 스타일 개편 */
.service-icon-new {
    width: 110px; /* 약간 더 크게 */
    height: 110px;
    background-color: #f4f7ff; /* 아주 연한 블루 배경 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 35px auto;
    position: relative;
    font-size: 3rem;
    color: #2962ff; /* 메인 아이콘 브랜드 블루 */
    transition: all 0.3s ease;
    z-index: 2;
}

/* 4. [핵심] 오버 시 아이콘 박스 색상 반전 */
.service-box:hover .service-icon-new {
    background-color: #2962ff; /* 배경이 파란색으로 */
    color: #ffffff; /* 아이콘은 흰색으로 */
    transform: rotateY(180deg); /* Y축으로 한바퀴 회전 (선택 사항, 역동성 증가) */
}

/* 5. 우측 하단 서브 아이콘 박스 스타일 */
.sub-icon-box {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 38px;
    height: 38px;
    background: #ffffff; /* 흰색 배경 유지 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #2962ff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 3;
}

/* 오버 시 서브 아이콘 효과 */
.service-box:hover .sub-icon-box {
    background-color: #ffffff;
    color: #2962ff;
    transform: scale(1.1) rotate(-180deg); /* 반대로 회전하여 정면 유지 */
}

/* 6. 컨설팅 아이콘 특화 (노란색 전구 포인트 유지) */
.consult-icon {
    color: #ffc107;
}
.service-box:hover .consult-icon {
    background-color: #ffc107; /* 전구 오버 시 노란색 배경 */
    color: #ffffff;
}

/* 7. 제목 및 본문 텍스트 스타일 */
.service-box h3 {
    font-size: 1.6rem;
    font-weight: 800; /* 더 굵게 */
    color: #0b1d5c; /* 하이브릭스 다크 블루 */
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.service-box p {
    color: #555555;
    font-size: 0.98rem;
    line-height: 1.8;
    margin-bottom: 0;
    word-break: keep-all; /* 한글 단어 잘림 방지 */
}

/* Contact Section */
.contact-section { background-color: var(--brand-dark); }
.contact-card { border-radius: 1.5rem; overflow: hidden; border: none; }
.contact-info { background: var(--brand-blue); color: #fff; }
.info-item { display: flex; align-items: center; font-size: 1.1rem; }
.info-item i { font-size: 1.5rem; margin-right: 1rem; }
.contact-form .form-control { border: 1px solid #dee2e6; padding: 0.8rem 1rem; border-radius: 0.5rem; background-color: #f8f9fa; }
.contact-form .form-control:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 0.25rem rgba(41, 98, 255, 0.25); background-color: #fff; }

/* Footer */
.footer { /* background-color: #040b24; */padding: 3rem 0; color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-logo { font-size: 1.5rem; font-weight: 800; color: #fff; }
.footer-logo span { color: var(--brand-blue); }

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .hero-title { font-size: 3rem; }
    #mainNav .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap; /* 메뉴가 펼쳐질 때는 아래로 내려가야 하므로 wrap 설정 */
    }

    /* 로고 크기가 너무 커서 밀어내는 경우 방지 */
    .navbar-brand {
        margin-right: 0;
        max-width: 70%; /* 로고가 버튼을 밀어내지 않도록 최대폭 제한 */
    }

    /* 펼쳐지는 메뉴 영역을 전체 너비로 설정 */
    .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        align-items: center;
    }
}

/* Navigation Active 상태 강조 */
#mainNav .nav-link.active {
    color: var(--brand-blue) !important;
    font-weight: 700;
    position: relative;
}

/* 데스크탑에서 활성화된 메뉴 하단에 언더라인 표시 (선택 사항) */
@media (min-width: 992px) {
    #mainNav .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 1.5rem;
        right: 1.5rem;
        height: 2px;
        background-color: var(--brand-blue);
    }
}

/* 모바일 메뉴 열렸을 때 배경색 보정 */
@media (max-width: 991.98px) {
    #navbarResponsive {
        background-color: #fff; /* 모바일 메뉴 배경색 */
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    #navbarResponsive .nav-link {
        color: var(--text-main) !important;
        padding: 12px 20px;
    }
    #navbarResponsive .nav-link.active {
        background-color: rgba(41, 98, 255, 0.05);
        border-radius: 5px;
    }
}