/* 추가 반응형 스타일 */

/* 모바일 최적화 */
@media (max-width: 640px) {
    .gradient-bg h2 {
        font-size: 2rem;
    }
    
    .gradient-bg p {
        font-size: 1rem;
    }
    
    #newsletter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-hover {
        margin: 0 0.5rem;
    }
    
    #newsletter-modal .bg-white {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    #newsletter-modal .p-6 {
        padding: 1rem;
    }
    
    .category-filter {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    /* 네비게이션 모바일 최적화 */
    nav h1 {
        font-size: 1rem;
    }
    
    nav p {
        font-size: 0.75rem;
    }
    
    /* 히어로 섹션 모바일 최적화 */
    .gradient-bg .bg-white\/20 {
        padding: 1rem;
    }
    
    /* 푸터 모바일 최적화 */
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 태블릿 최적화 */
@media (min-width: 641px) and (max-width: 1024px) {
    #newsletter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .gradient-bg h2 {
        font-size: 3rem;
    }
    
    #newsletter-modal .bg-white {
        margin: 2rem;
        max-height: calc(100vh - 4rem);
    }
}

/* 데스크톱 최적화 */
@media (min-width: 1025px) {
    #newsletter-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .card-hover:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    }
}

/* 접근성 향상 */
@media (prefers-reduced-motion: reduce) {
    .card-hover {
        transition: none;
    }
    
    .fade-in {
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .category-badge {
        border: 2px solid;
    }
    
    .bg-white {
        border: 1px solid #000;
    }
    
    .gradient-bg {
        background: #000;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    .bg-gray-50 {
        background-color: #1f2937;
    }
    
    .bg-white {
        background-color: #374151;
        border: 1px solid #4b5563;
    }
    
    .text-gray-900 {
        color: #f9fafb;
    }
    
    .text-gray-600 {
        color: #d1d5db;
    }
    
    .text-gray-500 {
        color: #9ca3af;
    }
    
    .border-gray-200 {
        border-color: #4b5563;
    }
    
    #newsletter-modal .bg-white {
        background-color: #374151;
        color: #f9fafb;
    }
    
    .bg-gray-100 {
        background-color: #4b5563;
    }
}

/* 인쇄용 스타일 */
@media print {
    nav, footer, #filter-menu, button {
        display: none !important;
    }
    
    .gradient-bg {
        background: white !important;
        color: black !important;
    }
    
    .card-hover {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    #newsletter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 키보드 내비게이션 향상 */
button:focus,
.card-hover:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* 로딩 애니메이션 최적화 */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* 스크롤바 커스터마이징 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 터치 디바이스 최적화 */
@media (pointer: coarse) {
    button,
    .card-hover {
        min-height: 44px;
    }
    
    .category-filter {
        padding: 0.75rem 1rem;
        margin: 0.25rem;
    }
}

/* 큰 화면 최적화 */
@media (min-width: 1400px) {
    .max-w-7xl {
        max-width: 90rem;
    }
    
    #newsletter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 애니메이션 개선 */
.stagger-animation {
    animation: staggerFadeIn 0.6s ease-out forwards;
}

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

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

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 포커스 인디케이터 개선 */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

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

/* 버튼 상태 스타일 */
.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}