/* 커스텀 스타일 */

/* 스무스 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 기본 폰트 설정 */
body {
    font-family: 'Noto Sans KR', sans-serif;
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 애니메이션 적용 클래스 */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-pulse-slow {
    animation: pulse 2s ease-in-out infinite;
}

/* Intersection Observer용 초기 상태 */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* 호버 효과 개선 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 그라데이션 텍스트 */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* 폼 입력 필드 포커스 효과 */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 버튼 호버 효과 */
button,
.btn {
    transition: all 0.3s ease;
}

button:active,
.btn:active {
    transform: scale(0.98);
}

/* 모바일 메뉴 애니메이션 */
#mobileMenu {
    transition: all 0.3s ease;
}

#mobileMenu.show {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

/* 카드 호버 효과 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 백드롭 블러 효과 */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

/* 반응형 텍스트 크기 조정 */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* 섹션 간격 최적화 */
section {
    position: relative;
}

/* 플로팅 버튼 펄스 효과 */
.floating-btn {
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.floating-btn:hover {
    animation: none;
    box-shadow: 0 15px 35px rgba(30, 64, 175, 0.4);
}

/* 이미지 로딩 효과 */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 숫자 카운터 애니메이션 */
.counter {
    display: inline-block;
    transition: all 0.3s ease;
}

/* 선택 비활성화 (특정 UI 요소) */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 프린트 스타일 */
@media print {
    header,
    footer,
    .floating-btn,
    button {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    body {
        font-weight: 500;
    }

    button,
    .btn {
        border: 2px solid currentColor;
    }
}

/* 모션 감소 모드 지원 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 다크모드 지원 (옵션) */
@media (prefers-color-scheme: dark) {
    /* 추후 다크모드 필요시 추가 */
}

/* 툴팁 스타일 */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 8px;
}

.tooltip:hover::before {
    opacity: 1;
}

/* 링크 스타일 개선 */
a {
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 섹션 구분선 효과 */
.section-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        #e5e7eb 20%,
        #e5e7eb 80%,
        transparent 100%
    );
    margin: 4rem auto;
    max-width: 80%;
}

/* 글로우 효과 */
.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.7);
}

/* 배지 스타일 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    background: #dbeafe;
    color: #1e40af;
}

/* 그리드 아이템 스태거 애니메이션 */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }
.stagger-item:nth-child(9) { animation-delay: 0.9s; }

/* 반응형 컨테이너 최적화 */
@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* 리뷰 무한 스크롤 애니메이션 */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.review-scroll-container {
    overflow: hidden;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.review-scroll-wrapper {
    display: flex;
    width: fit-content;
    animation: scroll-left 40s linear infinite;
    pointer-events: none;
}

.review-card {
    flex: 0 0 auto;
    width: 350px;
    margin: 40px 12px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    pointer-events: none;
}

.review-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .review-card {
        width: 280px;
        padding: 20px;
    }
}

/* 리뷰 섹션 배경 이미지 */
.review-section-bg {
    position: relative;
    background-image: url('../../자료/123.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 80px !important;
    padding-bottom: 80px !important;
}

.review-section-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

/* 로딩 스크린 애니메이션 */
#loadingScreen {
    transition: opacity 0.5s ease;
}

#loadingScreen img {
    animation: logoFade 2s ease-in-out infinite;
}

@keyframes logoFade {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}
