/* 공통 스타일 정의 */

/* 전체 페이지에 적용될 기본 스타일 */
:root {
    /* 메인 컬러 정의 */
    --primary-color: #007bff;     /* 메인 파란색 */
    --secondary-color: #6c757d;    /* 포인트 회색 */
    --text-color: #333;            /* 기본 텍스트 색상 */
    --light-color: #f8f9fa;        /* 배경색으로 사용될 밝은 회색 */
    --dark-color: #343a40;         /* 어두운 회색 */
    --header-height: 81px;         /* 네비게이션 높이 */
}

/* 기본 폰트 및 색상 설정 */
html {
    box-sizing: border-box;
    -ms-overflow-style: scrollbar;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    overflow-x: hidden;
    width: 100vw;
}

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    overflow-x: hidden;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
}

/* 초기 로딩 상태 */
body.loading {
    overflow: hidden;
}

*, *::before, *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

/* 헤더 스타일 */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transform: translateY(0);
}

.header.hide {
    transform: translateY(-100%);
}

/* 스크롤시 헤더 스타일 */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 로고 스타일 */
.logo {
    max-height: 50px;
    width: auto;
}

/* 네비게이션 메뉴 스타일 */
.navbar {
    padding: 15px 0;
}

.navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    position: relative;
    transition: color 0.3s ease;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* 모바일 메뉴 스타일 */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        border-radius: 0 0 10px 10px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.7rem 1rem;
        min-height: auto;
    }

    .navbar-nav .nav-link::after {
        bottom: -2px;
    }
}

/* 버튼 스타일 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 섹션 타이틀 스타일 */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--text-color);
}

/* 푸터 스타일 */
.footer {
    background-color: #f8f9fa;
    padding: 25px 0;
    margin-top: 20px;
}

.footer-logo {
    height: 35px;
    width: auto;
}

.footer h5 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.footer ul li {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.footer .social-links a {
    font-size: 1.4rem;
    margin-right: 1.5rem;
}

.footer .social-links a:last-child {
    margin-right: 0;
}

.footer-bottom {
    margin-top: 10px;
    padding: 10px 0;
}

.footer-bottom small {
    font-size: 0.85rem;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
}

/* 유틸리티 클래스 */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

/* 애니메이션 효과 */
.fade-in {
    opacity: 0;
    transition: opacity 0.3s ease-in;
    transform: translateY(20px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 컨테이너 기본 스타일 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    box-sizing: border-box;
}

/* 설문 스타일 */
.section {
    display: none;
}

.section.active {
    display: block;
}

.progress {
    height: 25px;
}

/* 메인 컨텐츠 영역 공통 스타일 */
main:not(.main-page), .package-list, .about-page {
    padding-top: calc(var(--header-height) + 30px);  /* 네비게이션 높이 + 추가 여백 */
}

.main-visual {
    padding-top: calc(var(--header-height) + 30px);  /* 메인 비주얼 영역 여백 증가 */
}

@media (max-width: 991px) {
    :root {
        --header-height: 71px;  /* 모바일에서는 패딩이 좀 더 작음 */
    }
}

.navbar-nav .dropdown-toggle::after {
    border: none !important;
    margin: 0 !important;
    vertical-align: initial !important;
}

.navbar-nav .nav-link:focus,
.navbar-nav .dropdown-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* 미디어 쿼리 밖에서는 .dropdown-menu에 display, opacity, pointer-events 등 강제 스타일을 적용하지 않음 */
@media (min-width: 992px) {
  .navbar-nav .dropdown {
    position: relative;
  }
  .navbar-nav .dropdown-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-20px);
    min-width: 90px;
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: block;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(2px);
  }
  .navbar-nav .dropdown:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .navbar-nav .dropdown-menu .dropdown-item {
    text-align: center;
    padding: 4px 10px;
    font-size: 0.92rem;
    line-height: 1.4;
    border-radius: 6px;
    transition: background 0.2s;
  }
  .navbar-nav .dropdown-menu .dropdown-item:hover {
    background: #f3f6fa;
    color: var(--primary-color);
  }
}

.navbar-nav .dropdown-menu .dropdown-item {
  text-align: center;
} 