/* 기본 스타일 */
:root {
    --primary-navy: #1a2a3a;    /* 더 진한 네이비 */
    --secondary-navy: #2c3e50;  /* 더 진한 보조 네이비 */
    --accent-orange: #e74c3c;   /* 선명한 레드 오렌지 */
    --light-orange: #ff7675;    /* 부드러운 코랄 */
    --white: #FFFFFF;
    --light-gray: #F5F6FA;
    --text-dark: #1a1a1a;       /* 더 진한 텍스트 색상 */
    --text-gray: #4a4a4a;       /* 더 진한 회색 텍스트 */
    --kakao-color: #FEE500;
    --accent-blue: #3498db;      /* 선명한 블루 오렌지 */
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-gray);
    margin: 0;
    padding: 0;
    font-size: 16px;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 섹션 공통 */
section {
    padding: 80px 0;
}

/* 섹션 타이틀 */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.section-title .subtitle {
    font-size: 1.1rem;
    color: var(--light-text);
}

/* 그리드 시스템 */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 버튼 스타일 */
.button {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.button-primary {
    background: var(--primary-color);
    color: #fff;
}

.button-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.button-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.button-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 페이지 타이틀 공통 */
.page-title {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 120px 0;
    color: #fff;
    text-align: center;
    position: relative;
    margin-top: 80px;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26,58,109,0.8), rgba(42,82,152,0.8));
}

.page-title .container {
    position: relative;
    z-index: 1;
}

.page-title h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-title p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

/* 이미지 스타일 */
img {
    max-width: 100%;
    height: auto;
}

/* 로딩 애니메이션 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-navy);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-orange);
    animation: spin 1s ease-in-out infinite;
}

/* 로딩 스피너 개선 */
.loading-spinner {
    border-top-color: var(--accent-orange);
    filter: drop-shadow(0 0 10px rgba(231, 76, 60, 0.5));
}

@keyframes spin {
    to {
        transform: rotate(360deg) scale(1.1);
    }
}



/* 스크롤 프로그레스 바 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--accent-orange);
    width: 0;
    transition: width 0.1s ease;
}

/* 애니메이션 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}



/* 이미지 최적화 */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* 이미지 로딩 플레이스홀더 */
.image-placeholder {
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

/* 이미지 페이드인 애니메이션 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-image.loaded {
        opacity: 1;
}

/* 반응형 스타일 */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .page-title {
        padding: 80px 0;
    }

    .page-title h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .page-title h1 {
        font-size: 1.8rem;
    }

    .page-title p {
        font-size: 1rem;
    }
}
