/* WordPress 호환 모바일 친화적 CSS 스타일 */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(to bottom, #ffffff, #f8faff);
    margin: 0;
    padding: 0;
}

.nav-link {
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Mobile-first responsive design */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .hover\:scale-105:hover {
        transform: scale(1.02);
    }
    
    .hover\:shadow-xl:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

/* Improved focus states for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 구형 Tailwind CSS 호환을 위한 커스텀 유틸리티 클래스 */
.w-128 { width: 32rem; }
.h-128 { height: 32rem; }
.w-96 { width: 24rem; }
.h-96 { height: 24rem; }
.w-80 { width: 20rem; }
.h-80 { height: 20rem; }
.w-64 { width: 16rem; }
.h-64 { height: 16rem; }
.w-56 { width: 14rem; }
.h-56 { height: 14rem; }
.w-48 { width: 12rem; }
.h-48 { height: 12rem; }

.from-opacity-50 { --tw-gradient-from-opacity: 0.5; }
.to-opacity-50 { --tw-gradient-to-opacity: 0.5; }
.from-opacity-10 { --tw-gradient-from-opacity: 0.1; }
.to-opacity-10 { --tw-gradient-to-opacity: 0.1; }

.-right-1\/10 { right: -10%; }
.-left-1\/10 { left: -10%; }
.-bottom-1\/5 { bottom: -20%; }

/* 배경 패턴 및 애니메이션 */
.circuit-board {
    background-image: 
        linear-gradient(to right, rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 20% 35%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 45%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 75%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    background-size: 30px 30px, 30px 30px, 100% 100%, 100% 100%, 100% 100%;
    background-position: center center;
}

/* Floating animations - disabled on mobile for performance */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}

@keyframes float-fast {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -10px) rotate(90deg); }
    50% { transform: translate(-10px, -20px) rotate(180deg); }
    75% { transform: translate(-20px, 10px) rotate(270deg); }
}

.animate-float-slow { animation: float-slow 20s ease-in-out infinite; }
.animate-float-medium { animation: float-medium 15s ease-in-out infinite; }
.animate-float-fast { animation: float-fast 10s ease-in-out infinite; }

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* 카테고리 버튼 스타일 */
.category-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    color: #6b7280;
    border: 1px solid #e5e7eb;
    min-height: 44px; /* Minimum touch target size */
}

.category-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.category-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.category-btn.active:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 회사 카드 스타일 */
.company-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    transform: scale(1);
    padding: 1.5rem;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    display: block;
    text-decoration: none;
    min-height: 120px;
}

.company-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(1.05);
}

.company-card img {
    max-height: 2rem;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(1);
}

.company-card:hover img {
    filter: brightness(1.1);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    backdrop-filter: blur(4px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .category-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .floating-orb {
        display: none;
    }
    
    h1 {
        font-size: 1.875rem !important;
        line-height: 1.2 !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .company-card {
        padding: 1rem;
        min-height: 100px;
    }
    
    .company-card img {
        max-height: 1.5rem;
    }
}

@media (min-width: 640px) {
    .company-card {
        padding: 2rem;
        min-height: 140px;
    }
    
    .company-card img {
        max-height: 3rem;
    }
}

/* Improved mobile typography */
@media (max-width: 640px) {
    .text-3xl { font-size: 1.875rem; }
    .text-4xl { font-size: 2.25rem; }
    .text-5xl { font-size: 3rem; }
    .text-6xl { font-size: 3.75rem; }
    .text-7xl { font-size: 4.5rem; }
}

/* Better mobile spacing */
@media (max-width: 640px) {
    .py-20 { padding-top: 3rem; padding-bottom: 3rem; }
    .py-16 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .py-12 { padding-top: 2rem; padding-bottom: 2rem; }
    .mb-16 { margin-bottom: 2rem; }
    .mb-12 { margin-bottom: 1.5rem; }
    .mb-8 { margin-bottom: 1rem; }
}

/* Optimized animations for mobile */
@media (max-width: 768px) {
    .transform {
        transform: none;
    }
    
    .hover\:scale-105:hover {
        transform: none;
    }
}

/* 접근성: 모션 감소 설정 */
@media (prefers-reduced-motion: reduce) {
    .circuit-lines,
    .neural-glow,
    .data-stream,
    .animate-slide-up,
    .animate-float-slow,
    .animate-float-medium,
    .animate-float-fast,
    .animate-fade-in,
    .animate-gradient {
        animation: none;
    }
    
    .transition-all,
    .transition-colors,
    .transition-transform {
        transition: none;
    }
}

/* Mobile-specific optimizations */
@media (max-width: 1024px) {
    .floating-orb {
        display: none;
    }
}

/* Improved text readability on mobile */
@media (max-width: 640px) {
    h1 {
        line-height: 1.2;
    }
    
    p {
        line-height: 1.6;
    }
}

/* Better button spacing on mobile */
@media (max-width: 640px) {
    .grid > * {
        min-height: 44px; /* Minimum touch target size */
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading optimization for images */
img {
    max-width: 100%;
    height: auto;
}

/* Safe area insets for mobile devices */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* WordPress 테마와의 호환성을 위한 추가 스타일 */
.wp-block-group {
    margin: 0;
}

.entry-content {
    margin: 0;
}

/* WordPress 기본 스타일 재정의 */
.site-main {
    margin: 0;
    padding: 0;
}

.content-area {
    width: 100%;
    margin: 0;
}

/* WordPress 관리자 바와의 충돌 방지 */
body.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar header {
        top: 46px;
    }
}

/* Mobile navigation improvements */
.mobile-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Improved mobile hero section */
@media (max-width: 640px) {
    .min-h-screen {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
    }
}

/* Better mobile contact section */
@media (max-width: 640px) {
    .contact-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .contact-card .flex {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    * {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Improved mobile grid layout */
@media (max-width: 640px) {
    .grid {
        gap: 1rem;
    }
}

@media (min-width: 640px) and (max-width: 1024px) {
    .grid {
        gap: 1.5rem;
    }
}