/* ㈜유니엠코 홈페이지 커스텀 스타일 */

/* 기본 설정 */
* {
    scroll-behavior: smooth;
}

/* 커스텀 애니메이션 */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 유틸리티 클래스 */
.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.bg-gradient-animated {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* 네비게이션 효과 */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:not(.bg-blue-600):hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #2563eb;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.nav-link:not(.bg-blue-600)::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #2563eb;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* 스크롤시 네비게이션 배경 변화 */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 버튼 호버 효과 */
.btn-hover-scale {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hover-scale:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

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

/* 그라디언트 텍스트 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 섹션 구분선 */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

/* 로딩 애니메이션 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 헤더 텍스트 강조 */
.hero-title {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 카운터 애니메이션 */
.counter {
    font-variant-numeric: tabular-nums;
}

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

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

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

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

/* 접근성 개선 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 포커스 링 개선 */
.focus-visible:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-text-sm {
        font-size: 0.875rem;
    }
}

/* 다크모드 대응 (선택사항) */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* 인쇄 스타일 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gradient-to-br,
    .bg-gradient-to-r {
        background: #f3f4f6 !important;
        color: black !important;
    }
}

/* 고성능 애니메이션을 위한 GPU 가속 */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* 그리드 레이아웃 개선 */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* 플렉스박스 유틸리티 */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 이미지 최적화 */
.responsive-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* 그림자 효과 개선 */
.shadow-smooth {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-smooth-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 텍스트 선택 스타일 */
::selection {
    background-color: #dbeafe;
    color: #1e40af;
}

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

a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* 폼 요소 스타일 개선 */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #2563eb;
    border-color: transparent;
}

/* 테이블 반응형 */
.table-responsive {
    overflow-x: auto;
}

.table-responsive table {
    min-width: 600px;
}

/* 패럴랙스 효과 */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 모션 감소 설정 고려 */
@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;
    }
}

/* 컨테이너 쿼리 지원 (미래 대비) */
@supports (contain: layout) {
    .container-query {
        contain: layout style;
    }
}

/* 로딩 상태 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 에러 상태 */
.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* 성공 상태 */
.success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* 경고 상태 */
.warning {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

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

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
}

.tooltip::after {
    opacity: 0;
}

/* 브레드크럼 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-separator::before {
    content: '/';
    color: #6b7280;
    margin: 0 0.5rem;
}

/* 배지 스타일 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 스켈레톤 로딩 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 비율 유지 컨테이너 */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* 텍스트 자르기 */
.truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}