/* BNI 성남 분당 판교 더 유니온 챕터 추가 스타일 */

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

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

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

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-30px);
    }
    70% {
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

/* 애니메이션 클래스 */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

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

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

.animate-pulse-custom {
    animation: pulse 2s infinite;
}

.animate-bounce-custom {
    animation: bounce 2s infinite;
}

/* 네비게이션 스크롤 효과 */
.nav-scrolled {
    background: rgba(30, 64, 175, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

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

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

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

/* 글래스 모피즘 효과 개선 */
.glass-card-enhanced {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 호버 효과 개선 */
.hover-glow:hover {
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* 그라디언트 버튼 */
.btn-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    background-size: 200% 200%;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background-position: right center;
    transform: scale(1.05);
}

/* 섹션 구분선 개선 */
.section-divider-enhanced {
    background: linear-gradient(90deg, transparent, #e2e8f0, #cbd5e1, #e2e8f0, transparent);
    height: 2px;
}

/* 인라인 확장 산업 생태계 카드 스타일 */
.industry-card-wrapper {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.industry-ecosystem-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.industry-ecosystem-card:hover {
    transform: scale(1.05) translateY(-8px) rotate(-1deg);
    z-index: 5;
}

/* 확장 영역 애니메이션 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
}

/* 확장 영역 스타일 */
.expansion-area {
    transition: all 0.4s ease;
}

/* 더보기 버튼 스타일 */
.expand-btn {
    position: relative;
    overflow: hidden;
}

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

.expand-btn:hover::before {
    left: 100%;
}

.expand-chevron {
    transition: transform 0.3s ease;
}

.expand-icon {
    transition: all 0.3s ease;
}

/* iOS Safari 최적화된 모달 스타일 */
#industryModal {
    backdrop-filter: blur(15px);
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

/* 모바일 모달 래퍼 */
.mobile-modal-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 모바일 모달 컨테이너 */
.mobile-modal-container {
    display: block;
    width: 100%;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

/* 데스크톱 모달 컨테이너 */
.desktop-modal-container {
    display: none;
}

/* 모바일 헤더 */
.mobile-header {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top, 20px));
    position: relative;
    color: white;
}

.mobile-close-btn {
    position: absolute;
    top: calc(0.75rem + env(safe-area-inset-top, 20px));
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-industry-icon {
    font-size: 3rem;
    line-height: 1;
}

.mobile-industry-info h1 {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.mobile-industry-info p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.mobile-count-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 모바일 전문분야 컨테이너 */
.mobile-specialists-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f8fafc;
    height: calc(100% - 140px);
}

.mobile-specialists-header {
    padding: 1.5rem 1rem 1rem 1rem;
    text-align: center;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-specialists-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.mobile-specialists-header p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

/* 모바일 전문분야 리스트 */
.mobile-specialists-list {
    padding: 1rem;
}

.mobile-specialist-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    min-height: 60px;
}

.mobile-specialist-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-specialist-number span {
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.mobile-specialist-content {
    flex: 1;
    min-width: 0;
}

.mobile-specialist-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.mobile-specialist-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.mobile-specialist-arrow {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* 모바일 액션 영역 */
.mobile-action-area {
    background: white;
    padding: 1.5rem 1rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 20px));
    border-top: 1px solid #e5e7eb;
}

.mobile-benefits {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.mobile-benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.mobile-benefit-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.mobile-benefit-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    line-height: 1.2;
}

.mobile-cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    width: 100%;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-bottom: 0.75rem;
}

.mobile-cta-note {
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

/* 데스크톱에서는 기존 디자인 표시 */
@media (min-width: 768px) {
    .mobile-modal-container {
        display: none;
    }
    
    .desktop-modal-container {
        display: block;
        animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    #industryModal {
        padding: 2rem;
        align-items: center;
        justify-content: center;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(100px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 모바일 모달 최적화 */
@media (max-width: 768px) {
    #industryModal {
        padding: 1rem;
    }
    
    #industryModal > div {
        max-height: 95vh;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 1rem;
    }
    
    /* 모바일에서 스크롤 개선 */
    #industryModal .space-y-2 > div {
        touch-action: manipulation;
    }
    
    /* 모바일 전문가 카드 스타일 */
    .mobile-specialist-card {
        transition: background-color 0.2s ease;
    }
    
    .mobile-specialist-card:active {
        background-color: rgba(0, 0, 0, 0.05);
    }
}

/* 태블릿 최적화 */
@media (min-width: 769px) and (max-width: 1024px) {
    #industryModal > div {
        max-width: 90vw;
        max-height: 85vh;
    }
}

/* 데스크톱 최적화 */
@media (min-width: 1025px) {
    #industryModal > div {
        max-width: 80vw;
        max-height: 80vh;
    }
}

/* 전문가 네트워크 카드 호버 효과 */
.specialist-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.specialist-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* 그라디언트 텍스트 애니메이션 */
.gradient-text-animated {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* 3D 카드 효과 */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

/* 반짝이는 효과 */
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* 부유하는 애니메이션 */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 펄스 효과 개선 */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    }
    to {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.8), 0 0 40px rgba(59, 130, 246, 0.4);
    }
}

/* FAQ 아코디언 개선 */
.faq-item {
    transition: all 0.3s ease;
}

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

/* 폼 스타일 개선 */
.form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* 통계 카드 애니메이션 */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* 로딩 스피너 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 성능 최적화 */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

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

/* 폰트 최적화 */
.font-display-swap {
    font-display: swap;
}

/* 접근성 개선 */
.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 #fbbf24;
    outline-offset: 2px;
}

/* 다크모드 지원 (미래 확장용) */
@media (prefers-color-scheme: dark) {
    .dark-mode-text {
        color: #f8fafc;
    }
    
    .dark-mode-bg {
        background-color: #1e293b;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid;
    }
}

/* 애니메이션 감소 설정 */
@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 print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .gradient-bg {
        background: white !important;
        color: black !important;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .hover-scale:hover {
        transform: none;
    }
    
    .touch-action-manipulation {
        touch-action: manipulation;
    }
}

/* 큰 화면 최적화 */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

/* 추가 유틸리티 클래스 */
.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.backdrop-blur-xs {
    backdrop-filter: blur(2px);
}

.backdrop-blur-xl {
    backdrop-filter: blur(24px);
}

/* 성능 향상을 위한 GPU 가속 */
.gpu-acceleration {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

/* 커스텀 체크박스 */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
}

.custom-checkbox:checked {
    background: #3b82f6;
}

.custom-checkbox:checked::before {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* 새로운 전문분야 카드 스타일 */
.specialist-card-new {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.specialist-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 모달 내 스크롤 컨테이너 */
.modal-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) transparent;
}

.modal-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.modal-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

.modal-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

.mobile-specialist-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.9));
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.mobile-specialist-item:hover {
    transform: translateX(4px);
    border-left-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 기존 스크롤 스타일 제거됨 - 새로운 모달에서는 modal-scroll-container 사용 */

/* 추가 반응형 유틸리티 */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full-width {
        width: 100%;
    }
    
    /* 모바일 터치 친화적 버튼 */
    .mobile-touch-target {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (min-width: 641px) {
    .desktop-hidden {
        display: none;
    }
}

/* 모바일 산업 생태계 카드 최적화 */
@media (max-width: 768px) {
    .industry-card-wrapper {
        margin-bottom: 1.5rem;
    }
    
    .industry-ecosystem-card:hover {
        transform: scale(1.02) translateY(-4px);
    }
    
    /* 모바일에서 확장 영역 최적화 */
    .expansion-area .grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* 모바일 전문분야 카드 */
    .expansion-area .bg-gradient-to-r {
        padding: 1rem;
        border-radius: 0.75rem;
    }
    
    /* 모바일 헤더 패딩 조정 */
    .expansion-area .p-6:first-child {
        padding: 1rem;
    }
    
    .expansion-area .p-6:last-child {
        padding: 1rem;
    }
    
    /* 모바일 액션 버튼 */
    .expansion-area a {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* 모바일에서 장소 링크 최적화 */
    .meeting-location-link {
        padding: 0.75rem 1rem;
    }
    
    .meeting-location-link h4 {
        font-size: 1rem;
    }
    
    .meeting-location-link p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    /* 모바일 멤버 카드 최적화 */
    .member-card {
        padding: 1rem;
    }
    
    .member-card h4 {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .member-card p {
        font-size: 0.8rem;
        line-height: 1.2;
    }
}

/* 모바일 모달 헤더 최적화 */
@media (max-width: 480px) {
    .modal-header-mobile h2 {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    .modal-header-mobile p {
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    /* 작은 화면에서 카드 간격 조정 */
    .industry-ecosystem-card {
        margin-bottom: 1.5rem;
    }
}