/* News Detail Modal Styles */
.news-detail-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 31, 43, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
    padding: 20px;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.news-detail-content {
    background-color: #ffffff;
    margin: auto;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

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

.news-detail-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #001f2b 0%, #003d4f 100%);
    padding: 24px 32px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-detail-title-section {
    flex: 1;
    margin-right: 20px;
}

.news-detail-title {
    margin: 0 0 12px 0;
    color: white;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.news-detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.news-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.news-detail-meta-item i {
    color: #00a3a1;
}

.news-detail-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.news-detail-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.news-detail-image-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #001f2b;
    position: relative;
}

.news-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-detail-body {
    padding: 40px 48px;
}

.news-detail-section {
    margin-bottom: 32px;
}

.news-detail-section-title {
    color: #001f2b;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 3px solid #00a3a1;
}

.news-detail-section-title i {
    color: #00a3a1;
    font-size: 22px;
}

.news-detail-text {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
}

.news-detail-summary {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2f1 100%);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #00a3a1;
    margin-bottom: 32px;
}

.news-detail-impact {
    background: #fff3e0;
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #ff9800;
}

.news-detail-impact-title {
    color: #e65100;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-detail-impact-title i {
    font-size: 20px;
}

.news-detail-source {
    background: #f5f5f5;
    padding: 24px 32px;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid #e0e0e0;
}

.news-detail-source-label {
    color: #666;
    font-size: 14px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.news-detail-source-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00a3a1;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #00a3a1;
    transition: all 0.2s;
}

.news-detail-source-link:hover {
    background: #00a3a1;
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 163, 161, 0.3);
}

.news-detail-source-link i {
    font-size: 16px;
}

.news-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.news-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.news-detail-badge.critical {
    background: #ffebee;
    color: #c62828;
}

.news-detail-badge.delay {
    background: #fff3e0;
    color: #ef6c00;
}

.news-detail-badge.opportunity {
    background: #e3f2fd;
    color: #1565c0;
}

.news-detail-badge.warehouse {
    background: #f3e5f5;
    color: #6a1b9a;
}

.news-detail-badge.port {
    background: #e0f2f1;
    color: #00695c;
}

.news-detail-badge.air {
    background: #e8eaf6;
    color: #283593;
}

/* Loading state */
.news-detail-loading {
    text-align: center;
    padding: 60px 40px;
    color: #00a3a1;
}

.news-detail-loading i {
    font-size: 48px;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.news-detail-loading p {
    font-size: 18px;
    margin: 0;
    color: #666;
}

/* Scrollbar styles */
.news-detail-content::-webkit-scrollbar {
    width: 10px;
}

.news-detail-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 16px 16px 0;
}

.news-detail-content::-webkit-scrollbar-thumb {
    background: #00a3a1;
    border-radius: 10px;
}

.news-detail-content::-webkit-scrollbar-thumb:hover {
    background: #008c8a;
}

/* Responsive */
@media (max-width: 768px) {
    .news-detail-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .news-detail-header {
        padding: 20px;
        border-radius: 0;
    }
    
    .news-detail-title {
        font-size: 22px;
    }
    
    .news-detail-body {
        padding: 24px 20px;
    }
    
    .news-detail-image-wrapper {
        height: 250px;
    }
    
    .news-detail-source {
        padding: 20px;
        border-radius: 0;
    }
}
