/* News Popup Styles - Externalized for safety */
.modal-news-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    /* Ultra high z-index */
    display: flex;
    /* Changed from hidden to flex by JS, but this is base state */
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* State when active */
.modal-news-overlay.modal-news-active {
    opacity: 1;
    visibility: visible;
}

.modal-news-content {
    background: #111;
    width: 700px;
    height: 400px;
    max-width: 95%;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-news-overlay.modal-news-active .modal-news-content {
    transform: scale(1);
}

/* Fix for nested structure in index.php */
.modal-news-body {
    display: flex;
    width: 100%;
    height: 100%;
}

.modal-news-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: color 0.3s, transform 0.3s;
}

.modal-news-close:hover {
    color: #00d4ff;
    /* Fallback primary color */
    transform: scale(1.1);
}

.modal-news-img {
    flex: 1;
    max-width: 50%;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.modal-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-news-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    overflow-y: auto;
}

.modal-news-text h2 {
    color: #00d4ff;
    /* Fallback primary color */
    margin-bottom: 20px;
    font-size: 2rem;
    line-height: 1.2;
}

.modal-news-text div {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-news-action {
    padding: 12px 30px;
    background: #00d4ff;
    /* Fallback primary color */
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-news-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .modal-news-overlay {
        display: none !important;
    }
}