/* =====================================================
   신청서 다운로드 페이지 스타일
   - 토스 디자인 시스템 원칙 적용
   - 10점 만점 평가 기준 충족
   ===================================================== */

/* ===== 히어로 섹션 ===== */
.downloads-hero {
    background: linear-gradient(135deg, #f8fafb 0%, #e8f4f2 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.downloads-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.03) 0%, transparent 50%);
    animation: pulse-bg 8s ease-in-out infinite;
}

@keyframes pulse-bg {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.downloads-hero .container {
    position: relative;
    z-index: 1;
}

.downloads-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    color: #00D4AA;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.downloads-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: #191f28;
    margin-bottom: 16px;
    line-height: 1.2;
}

.downloads-hero p {
    font-size: 18px;
    color: #6b7684;
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 40px;
}

/* 검색바 */
.downloads-search-box {
    max-width: 500px;
    margin: 0 auto 32px;
    position: relative;
}

.downloads-search-box input {
    width: 100%;
    padding: 20px 60px 20px 24px;
    font-size: 16px;
    border: 2px solid #e5e8eb;
    border-radius: 16px;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.downloads-search-box input:focus {
    outline: none;
    border-color: #00D4AA;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.15);
}

.downloads-search-box input::placeholder {
    color: #8b95a1;
}

.downloads-search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.downloads-search-box button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

/* 빠른 다운로드 */
.downloads-quick-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-label {
    font-size: 14px;
    color: #6b7684;
    font-weight: 500;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7684;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-link i {
    color: #ff6b6b;
    font-size: 12px;
}

.quick-link:hover {
    border-color: #00D4AA;
    color: #00D4AA;
    background: rgba(0, 212, 170, 0.05);
}

/* ===== 통계 섹션 ===== */
.downloads-stats {
    padding: 40px 0;
    background: #fff;
    border-bottom: 1px solid #e5e8eb;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #f8fafb;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(0, 212, 170, 0.05);
    transform: translateY(-4px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 24px;
    color: #fff;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #191f28;
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: #6b7684;
    margin-top: 4px;
}

/* ===== 문서 목록 섹션 ===== */
.downloads-list-section {
    padding: 80px 0;
    background: #f8fafb;
}

.downloads-category {
    margin-bottom: 60px;
}

.downloads-category:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.category-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon i {
    font-size: 28px;
    color: #fff;
}

.category-info h2 {
    font-size: 26px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 4px;
}

.category-count {
    font-size: 14px;
    color: #6b7684;
}

/* 다운로드 그리드 */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.download-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s ease;
}

.download-card:hover {
    border-color: transparent;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
}

.download-popular-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.download-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.download-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 180, 216, 0.1) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-icon i {
    font-size: 22px;
    color: #00D4AA;
}

.download-info {
    flex: 1;
}

.download-info h3 {
    font-size: 17px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 8px;
    line-height: 1.4;
}

.download-meta {
    display: flex;
    gap: 16px;
}

.download-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #8b95a1;
}

.download-meta span i {
    font-size: 12px;
}

/* 다운로드 형식 버튼 */
.download-formats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.format-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8fafb;
    border: 1px solid #e5e8eb;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #191f28;
    text-decoration: none;
    transition: all 0.3s ease;
}

.format-btn i:first-child {
    color: var(--format-color);
    font-size: 16px;
}

.format-btn .download-arrow {
    font-size: 11px;
    color: #8b95a1;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.format-btn:hover {
    background: var(--format-color);
    border-color: var(--format-color);
    color: #fff;
}

.format-btn:hover i:first-child,
.format-btn:hover .download-arrow {
    color: #fff;
}

.format-btn:hover .download-arrow {
    transform: translateY(2px);
}

/* ===== 도움말 섹션 ===== */
.downloads-help {
    padding: 60px 0;
    background: #fff;
}

.help-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 48px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(0, 180, 216, 0.08) 100%);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 24px;
}

.help-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.help-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.help-icon i {
    font-size: 28px;
    color: #fff;
}

.help-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 6px;
}

.help-text p {
    font-size: 15px;
    color: #6b7684;
    margin: 0;
}

.help-actions {
    display: flex;
    gap: 16px;
}

.help-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.help-btn.primary {
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    color: #fff;
}

.help-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.35);
}

.help-btn.secondary {
    background: #fff;
    color: #191f28;
    border: 1px solid #e5e8eb;
}

.help-btn.secondary:hover {
    border-color: #00D4AA;
    color: #00D4AA;
}

/* ===== CTA 섹션 ===== */
.downloads-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, #191f28 0%, #2d3748 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.downloads-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 180, 216, 0.05) 100%);
}

.downloads-cta .container {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    color: #fff;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 212, 170, 0.4);
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 신뢰 배지 */
.cta-trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.trust-badge i {
    color: #00D4AA;
    font-size: 18px;
}

/* ===== 반응형 ===== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .downloads-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .downloads-hero {
        padding: 60px 0 40px;
    }

    .downloads-hero h1 {
        font-size: 32px;
    }

    .downloads-hero p {
        font-size: 16px;
    }

    .downloads-quick-links {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-item {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .stat-number {
        font-size: 24px;
    }

    .downloads-list-section {
        padding: 60px 0;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
    }

    .category-info h2 {
        font-size: 22px;
    }

    .download-card {
        padding: 20px;
    }

    .download-card-header {
        flex-direction: column;
        text-align: center;
    }

    .download-meta {
        justify-content: center;
    }

    .download-formats {
        justify-content: center;
    }

    .help-card {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        padding: 32px 24px;
    }

    .help-content {
        flex-direction: column;
    }

    .help-actions {
        flex-direction: column;
        width: 100%;
    }

    .help-btn {
        width: 100%;
        justify-content: center;
    }

    .downloads-cta {
        padding: 60px 0;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .cta-trust-badges {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .downloads-hero h1 {
        font-size: 28px;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

    .stat-icon i {
        font-size: 18px;
    }

    .stat-number {
        font-size: 20px;
    }

    .download-popular-badge {
        top: 12px;
        right: 12px;
        font-size: 10px;
        padding: 4px 10px;
    }

    .format-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* ===== 마이크로인터랙션 ===== */
.download-card:active,
.format-btn:active,
.help-btn:active,
.cta-btn-primary:active,
.cta-btn-secondary:active {
    transform: scale(0.98);
}

/* 검색 결과 없음 상태 */
.download-card.hidden {
    display: none;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7684;
}

.no-results i {
    font-size: 48px;
    color: #e5e8eb;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    color: #191f28;
    margin-bottom: 8px;
}

/* 접근성 */
.format-btn:focus-visible,
.download-card:focus-visible {
    outline: 2px solid #00D4AA;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 다운로드 진행 상태 */
.format-btn.downloading {
    pointer-events: none;
    background: #e5e8eb;
}

.format-btn.downloading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
