/**
 * Haber Modal Stilleri
 */

/* Modal Overlay */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.news-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

/* Modal İçeriği */
.news-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease-out;
    z-index: 10000;
}

/* Modal Header */
.news-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 32px 16px;
    border-bottom: 1px solid #e5e7eb;
    gap: 20px;
}

.news-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.news-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.news-modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.news-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Modal Body */
.news-modal-body {
    padding: 0 32px 32px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Loading Durumu */
.news-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.news-modal-loading p {
    margin: 0;
    font-size: 16px;
}

/* Haber Meta Bilgiler */
.news-modal-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-top: 16px;
    flex-wrap: wrap;
}

.news-modal-date {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.news-modal-category {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Haber Resmi */
.news-modal-image {
    margin: 0 -32px 24px;
    overflow: hidden;
}

.news-modal-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Haber İçeriği */
.news-modal-text {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.news-modal-text p {
    margin: 0 0 16px 0;
}

.news-modal-text p:last-child {
    margin-bottom: 0;
}

.news-modal-text br {
    line-height: 2;
}

/* Hata Mesajları */
.error-message {
    text-align: center;
    color: #dc2626;
    font-weight: 500;
    padding: 40px 20px;
    background-color: #fef2f2;
    border-radius: 8px;
    margin: 20px 0;
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .news-modal {
        padding: 10px;
    }

    .news-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }

    .news-modal-header {
        padding: 16px 20px 12px;
    }

    .news-modal-title {
        font-size: 20px;
    }

    .news-modal-body {
        padding: 0 20px 20px;
        max-height: calc(95vh - 100px);
    }

    .news-modal-image {
        margin: 0 -20px 20px;
    }

    .news-modal-image img {
        height: 200px;
    }

    .news-modal-text {
        font-size: 15px;
    }

    .news-modal-close {
        padding: 4px;
    }

    .news-modal-close svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .news-modal {
        padding: 5px;
    }

    .news-modal-content {
        border-radius: 8px;
    }

    .news-modal-header {
        padding: 12px 16px 8px;
    }

    .news-modal-title {
        font-size: 18px;
    }

    .news-modal-body {
        padding: 0 16px 16px;
    }

    .news-modal-image {
        margin: 0 -16px 16px;
    }

    .news-modal-image img {
        height: 160px;
    }

    .news-modal-text {
        font-size: 14px;
        line-height: 1.6;
    }

    .news-modal-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Kategori renkleri */
.news-modal-category[data-category="Yeni Teknoloji"] {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
}

.news-modal-category[data-category="Uluslararası Başarı"] {
    background: linear-gradient(135deg, #059669, #047857);
}

.news-modal-category[data-category="Sağlık Turizmi"] {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.news-modal-category[data-category="Bilimsel Araştırma"] {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.news-modal-category[data-category="Tıbbi Başarı"] {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.news-modal-category[data-category="Teknoloji"] {
    background: linear-gradient(135deg, #0891b2, #0e7490);
}

/* Scroll bar styling */
.news-modal-body::-webkit-scrollbar {
    width: 6px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.news-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}