/* common.css - 공통 스타일 */

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
	font-family: Pretendard, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
	scroll-behavior: smooth;
    scroll-snap-type: y proximity; /* 'mandatory'에서 'proximity'로 변경하여 더 부드러운 스크롤 허용 */
}

body {
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, li {
    list-style: none;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center {
    text-align: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 색상 변수 */
:root {
    --primary-color: #1A2A50; /* 네이비 블루 */
    --secondary-color: #4682B4; /* 라이트 블루 */
    --accent-color: #7CE7C3; /* 골드 */
    --text-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* 헤더 & 네비게이션 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(26, 42, 80, 0.6); /* 더 투명한 네이비 블루 */
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#header.scrolled {
    background-color: rgba(26, 42, 80, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between; /* center에서 space-between으로 변경 */
  align-items: center;
  padding: 15px 20px; /* 좌우 패딩 추가 */
  height: 70px; /* 헤더 높이 고정 */
  box-sizing: border-box; /* 패딩을 높이에 포함 */
}

/* 헤더 로고 정렬 수정 */
#header .logo {
    display: flex;
    align-items: center;
    padding-left: 0; /* 왼쪽 패딩 제거 */
    margin-left: 0; /* 왼쪽 마진 제거 */
}

/* 로고 컨테이너 스타일 수정 */
.logo {
    display: flex;
    align-items: center;
    height: 100%; /* 컨테이너 높이 채우기 */
    overflow: visible; /* 이미지가 컨테이너를 벗어날 수 있도록 설정 */
    position: relative; /* 포지셔닝 컨텍스트 설정 */
}

/* 배경 이미지로 처리한 경우 */
#header .logo a {
    display: block;
    width: 150px; /* 로고 너비 */
    height: 45px; /* 로고 높이 */
    background-image: url('../images/new-logo3.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center; /* 왼쪽 정렬 */
    text-indent: -9999px;
    overflow: hidden;
}

/* 로고 이미지 크기 조정 */
.logo img {
    max-height: 45px; /* 원하는 로고 크기로 조정 (헤더보다 크게 설정 가능) */
    width: auto;
    object-fit: contain;
    position: relative; /* 필요시 z-index 활용을 위해 */
    z-index: 10;
}

logo a:focus {
    outline: none;
}

.main-nav {
  margin-left: auto; /* 네비게이션을 오른쪽으로 밀어냄 */
}

.main-nav ul {
  display: flex;
  gap: 40px;
  margin: 0; /* 마진 초기화 */
  padding: 0; /* 패딩 초기화 */
  list-style: none; /* 리스트 스타일 제거 */
}

.main-nav li {
    position: relative;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500; /* 글자 두께 추가 */
  letter-spacing: 0.5px; /* 자간 추가 */
}

.main-nav a:hover {
    color: var(--accent-color);
}

.main-nav a.active {
    color: var(--accent-color);
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 사이드 네비게이션 */
.side-nav {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 900;
    width: auto;
    pointer-events: auto;
}

.side-nav ul {
    background-color: rgba(20, 30, 50, 0.7); /* 어두운 배경으로 변경 */
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 15px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.side-nav li {
    margin: 10px 0;
}

.side-nav a {
    display: block;
    padding: 8px 15px;
    color: white; /* 텍스트 색상을 흰색으로 변경 */
    font-size: 14px;
    font-weight: 600; /* 글자 두께 증가 */
    transition: all 0.3s ease;
    border-radius: 15px;
    letter-spacing: 0.5px; /* 자간 약간 늘림 */
    text-align: center;
}

.side-nav a:hover {
    background-color: rgba(var(--accent-color-rgb), 0.6); /* 호버 색상 강화 */
    color: white;
    transform: translateX(-3px);
}

.side-nav a.active {
    background-color: var(--accent-color); /* 강조색으로 활성 메뉴 표시 */
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(var(--accent-color-rgb), 0.5);
}

/* 섹션 공통 스타일 */
.section {
    min-height: 100vh;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
}

/* 섹션 컨테이너에 대한 수정 */
.section .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    display: flex; /* 추가 */
    flex-direction: column; /* 추가 */
    align-items: center; /* 추가 */
    justify-content: center; /* 추가 */
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title .small-title {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
}

.section-title .big-title {
    font-size: 42px;
    color: var(--dark-color);
    font-weight: 800;
    margin: 10px 0;
}

.section-title .title-divider {
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 20px auto;
}

.section-content {
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

/* 배경 오버레이 */
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

/* 스크롤 버튼 */
.scroll-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

.scroll-btn a {
    display: block;
    color: white;
    font-size: 30px;
    transition: all 0.3s ease;
}

.scroll-btn a:hover {
    color: var(--accent-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* 푸터 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0 20px;
}

.footer-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 40px;
    justify-content: center;
}

.footer-left {
    flex: 0 0 200px;
    display: flex;
    justify-content: flex-end; /* 로고 오른쪽 정렬 */
}

.footer-logo {
    width: 240px;
    height: auto;
}

.footer-right {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px; /* 최대 너비 제한 */
}

.footer-info {
    font-size: 14px;
    line-height: 1.5;
}

.footer-info p {
    margin: 0;
    margin-bottom: 6px;
}

.footer-emblems {
    display: flex;
    gap: 15px;
}

.emblem-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.copyright {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
    margin-top: 30px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-left {
       flex: 0;
    }
    
    .footer-right {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-info {
        margin-bottom: 20px;
    }

       /* 모바일에서만 적용되는 정보 분리 스타일 */
       .footer-info .mobile-break {
        display: block;
    }
    
}

/* 데스크탑에서는 모바일 전용 줄바꿈 숨김 */
@media (min-width: 769px) {
    .footer-info .mobile-break {
        display: none;
    }
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: rgba(124, 231, 195, 0.8); /* 기존 accent-color에 투명도 추가 */
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 인트로 컨텐츠 중앙 정렬 */
.intro-content {
    max-width: 800px;
    padding: 0 20px;
    text-align: center;
    margin: 0 auto; /* 추가 */
}

/* 스크롤 문제 해결을 위한 CSS 추가 */
.normal-scroll {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    scroll-snap-align: none !important;
}

/* 회사 개요 섹션의 스크롤 관련 다양한 브라우저 지원 */
@supports (scroll-snap-align: none) {
    .normal-scroll {
        scroll-snap-align: none;
    }
}

@supports not (scroll-snap-align: none) {
    .normal-scroll {
        scroll-snap-stop: normal;
        scroll-snap-type: none;
    }
}

/* 메인 페이지 스타일 */
.main-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('../images/gpt/g18.png') no-repeat center center/cover;
}

.main-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.main-content h1 {
    font-size: 60px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.main-content p {
    font-size: 24px;
    margin-bottom: 40px;
    line-height: 1.5;
}

.main-content .highlight, .highlight {
    color: var(--accent-color);
}

.main-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 반응형 디자인 공통 부분 */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .section-title .big-title {
        font-size: 36px;
    }
    
    .side-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 60px; /* 모바일에서의 헤더 높이 */
    }
    
    .logo img {
        max-height: 45px; /* 모바일에서의 로고 크기 */
    }
    .section {
        padding: 80px 0;
    }
    
    .intro-content h1, .main-content h1 {
        font-size: 36px;
    }
    
    .intro-content p, .main-content p {
        font-size: 18px;
    }
    
    .section-title .big-title {
        font-size: 30px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .main-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 60px 0;
    }
    
    .intro-content h1, .main-content h1 {
        font-size: 30px;
    }
    
    .intro-content p, .main-content p {
        font-size: 16px;
    }
    
    .section-title .big-title {
        font-size: 26px;
    }
}

/* 모바일 메뉴 스타일 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 1100;
    transition: all 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu .logo {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 로고를 왼쪽 정렬 */
    width: auto; /* 고정 너비 대신 내용에 맞게 조정 */
    margin-right: auto; /* 오른쪽 여백을 자동으로 설정하여 왼쪽 정렬 */
}

/* 로고 이미지 또는 배경 이미지 스타일 */
.mobile-menu .logo a {
    display: block;
    width: 120px; /* 로고 너비 */
    height: 40px; /* 로고 높이 */
    background-image: url('../images/new-logo3.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center; /* 왼쪽 정렬 */
    text-indent: -9999px;
    overflow: hidden;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-header .logo img {
    height: 28px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    padding: 20px;
}

.mobile-nav ul {
    display: block;
}

.mobile-nav li {
    margin-bottom: 15px;
}

.mobile-nav a {
    color: white;
    font-size: 18px;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a:hover {
    color: var(--accent-color);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

/* TOP 버튼 스타일 */
.top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.top-btn:hover {
    background-color: #6AD7B3;
    transform: translateY(-5px);
}

/* 네비게이션 겹침 문제 수정을 위한 CSS */

/* 헤더 높이 변수 선언 (재사용성을 위해) */
:root {
    --header-height: 20px; /* 헤더의 실제 높이에 맞게 조정 */
  }
  
  /* 모든 섹션에 상단 패딩 추가 */
  .section {
    scroll-margin-top: var(--header-height);
    padding-top: calc(var(--header-height) + 30px); /* 헤더 높이 + 추가 여백 */
  }
  
  /* 섹션 내부 타이틀 컨테이너 상단 여백 조정 */
  .section-title {
    padding-top: 20px;
  }
  
  /* 특히 문제가 되는 philosophy 섹션 조정 */
  #philosophy {
    padding-top: calc(var(--header-height) + 50px); /* 더 넉넉한 여백 */
  }
  
  /* 모바일 환경에서 추가 여백 확보 */
  @media (max-width: 768px) {
    :root {
      --header-height: 60px; /* 모바일에서 헤더 높이가 다를 경우 조정 */
    }
    
    .section {
      padding-top: calc(var(--header-height) + 40px);
    }
    
    /* 각 섹션별 상단 여백 미세 조정 */
    #intro {
      padding-top: calc(var(--header-height) + 10px);
    }
    
    #company-overview, #philosophy, #talent {
      padding-top: calc(var(--header-height) + 50px);
    }
    
    /* 섹션 타이틀 여백 조정 */
    .section-title {
      margin-top: 10px;
    }
  }
  
  /* 스크롤 시 섹션 이동을 부드럽게 처리 */
  html {
    scroll-behavior: smooth;
  }
  
  /* 앵커 링크 대상 요소의 위치 조정 */
  :target {
    scroll-margin-top: var(--header-height);
  }