/* 메타비 홈페이지 커스텀 스타일 */

/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 포커스 아웃라인 제거 */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 네비게이션 링크 포커스 상태 */
nav a:focus {
    outline: none;
    background-color: transparent;
}

/* 로고 링크 포커스 상태 */
nav a img:focus {
    outline: none;
}

/* Google Form iframe 스타일 */
.google-form-container iframe {
    border: none;
    border-radius: 8px;
    background: white;
    min-height: 600px;
}

/* 반응형 iframe */
@media (max-width: 768px) {
    .google-form-container iframe {
        min-height: 500px;
    }
}

/* 포트폴리오 그리드 최대 3개 제한 */
#portfolio-container {
    max-width: 100%;
}

#portfolio-container > div:nth-child(n+4) {
    display: none;
}

/* 큰 화면에서도 3개 컬럼 유지 */
@media (min-width: 1280px) {
    #portfolio-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
}

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

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

@keyframes slide-in-right {
    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 {
    animation: fade-in 1s ease-out;
}

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

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

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

/* 네비게이션 스타일 */
nav {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #2563eb;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* 히어로 섹션 스타일 */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="300" cy="700" r="120" fill="url(%23a)"/><circle cx="700" cy="800" r="80" fill="url(%23a)"/></svg>') center/cover;
    opacity: 0.3;
}

/* 버튼 스타일 */
.btn-primary {
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* 카드 스타일 */
.card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

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

/* 아이콘 스타일 */
.icon-circle {
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.icon-circle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* 폼 스타일 */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-input:focus + label,
.form-input:not(:placeholder-shown) + label {
    transform: translateY(-28px) scale(0.8);
    color: #2563eb;
}

/* 섹션 구분선 */
.section-divider {
    position: relative;
    padding: 2rem 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

/* 스크롤 인디케이터 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(37, 99, 235, 0.2);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    width: 0%;
    transition: width 0.1s ease;
}

/* 포트폴리오 이미지 오버레이 */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.8), rgba(59, 130, 246, 0.8));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* 언론보도 카드 특별 스타일 */
.news-card {
    position: relative;
    overflow: hidden;
}

.news-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::after {
    transform: scaleX(1);
}

/* 푸터 스타일 */
footer {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.5rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .grid-responsive {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.25rem !important;
    }
    
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* 접근성 개선 */
.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;
}

/* 포커스 표시 개선 */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #374151 !important;
    }
    
    .text-gray-500 {
        color: #4b5563 !important;
    }
    
    .border-gray-300 {
        border-color: #6b7280 !important;
    }
}

/* 다크모드 선호도 지원 (기본값은 라이트모드 유지) */
@media (prefers-color-scheme: dark) {
    /* 필요시 다크모드 스타일 추가 */
}

/* 애니메이션 줄이기 선호도 지원 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-bounce {
        animation: none !important;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #1d4ed8, #2563eb);
}

/* 텍스트 선택 스타일 */
::selection {
    background-color: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
}

::-moz-selection {
    background-color: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
}