/**
 * Detail Modal - Service/Partner/Resource/Management Detail Popup
 * 서비스, 제휴, 자료실, 경영정보 상세 팝업 스타일
 */

/* ========================================
   MODAL OVERLAY
======================================== */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    padding: 2rem;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   MODAL CONTAINER
======================================== */
.detail-modal-container {
    background: white;
    border-radius: var(--radius-3xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   MODAL HEADER
======================================== */
.detail-modal-header {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.detail-modal-header-content {
    flex: 1;
}

.detail-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Theme Colors */
.modal-icon-blue {
    background: linear-gradient(135deg, #0EA5E9 0%, #3B82F6 100%);
}

.modal-icon-gray {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.modal-icon-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.modal-icon-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
}

.modal-icon-pink {
    background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
}

.detail-modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.detail-modal-category {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Category Theme Colors */
.category-blue {
    background: linear-gradient(135deg, #0EA5E9 0%, #3B82F6 100%);
}

.category-gray {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.category-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.category-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
}

.category-pink {
    background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
}

.detail-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
    transform: rotate(90deg);
}

/* ========================================
   MODAL BODY
======================================== */
.detail-modal-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex: 1;
}

.detail-modal-section {
    margin-bottom: 2rem;
}

.detail-modal-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section-title i {
    color: var(--primary);
    font-size: 1.125rem;
}

.detail-section-content {
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.8;
}

.detail-section-content p {
    margin-bottom: 1rem;
}

.detail-section-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   BADGES & TAGS
======================================== */
.detail-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.detail-badge {
    padding: 0.5rem 1rem;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, 0.2);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
}

.detail-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.detail-tag {
    padding: 0.375rem 0.875rem;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.813rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

/* ========================================
   INFO LIST
======================================== */
.detail-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.detail-info-item:last-child {
    border-bottom: none;
}

.detail-info-label {
    font-weight: 700;
    color: var(--gray-900);
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-info-label i {
    color: var(--primary);
    font-size: 1rem;
}

.detail-info-value {
    flex: 1;
    color: var(--gray-700);
    line-height: 1.6;
}

/* ========================================
   HIGHLIGHT BOX
======================================== */
.detail-highlight {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0EA5E9;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.detail-highlight-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-highlight-title i {
    color: #0EA5E9;
}

.detail-highlight-content {
    color: #075985;
    line-height: 1.7;
}

/* ========================================
   MODAL FOOTER
======================================== */
.detail-modal-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.detail-modal-footer .btn {
    min-width: 140px;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 768px) {
    .detail-modal {
        padding: 1rem;
    }
    
    .detail-modal-container {
        border-radius: var(--radius-2xl);
        max-height: 95vh;
    }
    
    .detail-modal-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-modal-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .detail-modal-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .detail-modal-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .detail-modal-body {
        padding: 1.5rem;
    }
    
    .detail-section-title {
        font-size: 1.125rem;
    }
    
    .detail-section-content {
        font-size: 0.938rem;
    }
    
    .detail-info-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.875rem 0;
    }
    
    .detail-info-label {
        min-width: auto;
    }
    
    .detail-modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }
    
    .detail-modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .detail-modal {
        padding: 0.5rem;
    }
    
    .detail-modal-header {
        padding: 1.25rem;
    }
    
    .detail-modal-body {
        padding: 1.25rem;
    }
    
    .detail-modal-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .detail-modal-title {
        font-size: 1.25rem;
    }
    
    .detail-highlight {
        padding: 1.25rem;
    }
}

/* ========================================
   SCROLLBAR STYLING
======================================== */
.detail-modal-body::-webkit-scrollbar {
    width: 8px;
}

.detail-modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.detail-modal-body::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.detail-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}
