/* Optimized News Slider Styles */
.news-slider {
    z-index: 2;
    width: 100%;
    margin-top: 0;
    position: relative;
    overflow: visible;
}

@media screen and (max-width: 576px) {
    .news-slider {
        margin-top: 0;
    }
}

.news-slider__item {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    height: auto;
    padding: 0 10px;
}

.news-slider .swiper-wrapper {
    align-items: center;
    padding: 0 15px;
}

/* Optimized News Card - Reduced expensive properties */
.news-card {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 100%);
    border-radius: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    cursor: pointer;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Removed backdrop-filter for better performance */
    transform: translateZ(0); /* Force GPU acceleration */
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.news-card:hover {
    transform: translateY(-4px) scale(1.01) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.news-card:hover::before {
    opacity: 1;
}

.news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
    transform: translateZ(0); /* Force GPU acceleration */
}

.news-card:hover .news-card-image {
    transform: scale(1.02) translateZ(0);
}

.news-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.news-card-date {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    display: inline-block;
    color: #94a3b8;
    font-weight: 400;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-date::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
    transition: width 0.2s ease;
}

html[dir="rtl"] .news-card-date::after {
    left: auto;
    right: 0;
    background: linear-gradient(270deg, #3b82f6, #8b5cf6);
}

.news-card:hover .news-card-date::after {
    width: 60px;
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #ffffff;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.news-card:hover .news-card-title {
    color: #fbbf24;
}

.news-card-description {
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 300;
}

.news-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    color: #3b82f6;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 2px solid #3b82f6;
    text-align: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.97rem;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 400;
    transform: translateZ(0); /* Force GPU acceleration */
}

.news-card-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.news-card-link:hover::before {
    left: 100%;
}

html[dir="rtl"] .news-card-link {
    direction: rtl;
}

.news-card-link:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Optimized grid cards for "View All News" modal */
.all-news-card {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 100%);
    border-radius: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    cursor: pointer;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0); /* Force GPU acceleration */
}

.all-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.all-news-card:hover {
    transform: translateY(-4px) scale(1.01) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.all-news-card:hover::before {
    opacity: 1;
}

.all-news-card img,
.all-news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
    transform: translateZ(0); /* Force GPU acceleration */
}

.all-news-card:hover img,
.all-news-card:hover .all-news-card-image {
    transform: scale(1.03) translateZ(0);
}

.all-news-card .news-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.all-news-card .news-card-date {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    display: inline-block;
    color: #94a3b8;
    font-weight: 400;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.all-news-card .news-card-date::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
    transition: width 0.2s ease;
}

html[dir="rtl"] .all-news-card .news-card-date::after {
    left: auto;
    right: 0;
    background: linear-gradient(270deg, #3b82f6, #8b5cf6);
}

.all-news-card:hover .news-card-date::after {
    width: 60px;
}

.all-news-card .news-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #ffffff;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.all-news-card:hover .news-card-title {
    color: #fbbf24;
}

.all-news-card .news-card-description {
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 300;
}

.all-news-card .news-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    color: #3b82f6;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 2px solid #3b82f6;
    text-align: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.97rem;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 400;
    transform: translateZ(0); /* Force GPU acceleration */
}

.all-news-card .news-card-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.all-news-card .news-card-link:hover::before {
    left: 100%;
}

html[dir="rtl"] .all-news-card .news-card-link {
    flex-direction: row-reverse;
    direction: rtl;
}

html[dir="rtl"] .all-news-card .news-card-link .fa-arrow-left {
    margin-right: 0.5rem;
    margin-left: 0;
    transform: scaleX(-1);
}

html[dir="rtl"] .all-news-card .news-card-link .fa-arrow-right {
    display: none;
}

html[dir="rtl"] .all-news-card .news-card-link .fa-arrow-left {
    display: inline-block;
}

html[dir="rtl"] .all-news-card .news-card-link span.relative {
    margin-right: 0;
    margin-left: 0;
}

.all-news-card .news-card-link:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Loading animation for cards - Updated to use unified yellow spinner */
.news-card.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.news-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 191, 0, 0.2);
    border-top: 2px solid #FFBF00;
    border-radius: 50%;
    animation: sectionSpin 1s linear infinite;
}

/* Optimized modal styling */
.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2.5rem;
    border-radius: 1.25rem;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: translateZ(0); /* Force GPU acceleration */
}

.modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.modal-date {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
}

/* Optimized slider arrows */
.news-slider__arrow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    outline: none !important;
    color: #cbd5e1;
    transition: color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    width: 45px;
    height: 45px;
    /* Removed backdrop-filter for better performance */
    position: relative;
    z-index: 50;
    pointer-events: auto;
    transform: translateZ(0); /* Force GPU acceleration */
}

.news-slider__arrow:focus {
    outline: none !important;
}

.news-slider__arrow:hover {
    color: #ffffff;
    transform: scale(1.05) translateZ(0);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.news-slider__arrow--disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.news-slider__arrow--disabled:hover {
    transform: none;
    box-shadow: none;
}

.news-slider__arrow .fas {
    font-size: 18px;
}

/* Progress bar for slider */
.news-slider-progress-container {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    z-index: 10;
}

.news-slider-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.2s ease;
    border-radius: 2px;
    position: relative;
}

.news-slider-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Optimized pagination */
.news-slider__pagination {
    position: relative;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    min-width: 100px;
    flex-shrink: 0;
}

.news-slider__pagination .swiper-pagination-bullet {
    width: 16px;
    height: 10px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.15), rgba(255, 191, 0, 0.3));
    opacity: 1;
    margin: 0 4px;
    border-radius: 5px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 191, 0, 0.4);
    box-shadow: 0 1px 4px rgba(255, 191, 0, 0.10);
    /* Removed backdrop-filter for better performance */
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transform: translateZ(0); /* Force GPU acceleration */
}

.news-slider__pagination .swiper-pagination-bullet:hover {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.25), rgba(255, 191, 0, 0.45));
    border-color: rgba(255, 191, 0, 0.7);
    box-shadow: 0 2px 6px rgba(255, 191, 0, 0.15);
    transform: scale(1.08) translateZ(0);
}

.news-slider__pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: linear-gradient(135deg, #FFBF00 60%, #FFD700 100%);
    width: 24px;
    border-radius: 5px;
    border-color: #FFBF00;
    box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.15);
    transform: scale(1.12) translateZ(0);
}

/* Slider container enhancements */
.news-slider {
    position: relative;
    padding-bottom: 20px;
}

.news-slider .swiper-slide {
    transition: transform 0.15s ease;
    transform: translateZ(0); /* Force GPU acceleration */
}

.news-slider .swiper-slide-active {
    transform: scale(1.01) translateZ(0);
}

.news-slider .swiper-slide-prev,
.news-slider .swiper-slide-next {
    opacity: 0.7;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enhanced hover effects for cards when slider is paused */
.news-slider.slider-paused .news-card {
    cursor: pointer;
}

.news-slider.slider-paused .news-card:hover {
    transform: translateY(-4px) scale(1.01) translateZ(0);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 0 15px rgba(59, 130, 246, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-slider__arrow {
        width: 40px;
        height: 40px;
    }

    .news-slider__arrow .fas {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .news-slider__pagination {
        margin-top: 15px;
    }

    .news-slider__pagination .swiper-pagination-bullet {
        width: 14px;
        height: 8px;
        margin: 0 3px;
    }

    .news-slider__pagination .swiper-pagination-bullet-active {
        width: 20px;
    }
}

/* Optimized modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Removed backdrop-filter for better performance */
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.open .modal-content {
    transform: scale(1) translateZ(0);
    opacity: 1;
}

.modal-overlay.open .modal-content * {
    visibility: visible !important;
}

.modal-overlay.open .modal-title,
.modal-overlay.open .modal-date {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force visibility for modal content */
.modal-overlay.open .modal-content,
.modal-overlay.open .modal-body,
.modal-overlay.open .modal-header,
.modal-overlay.open .modal-header-overlay {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Specific rules for title and date */
.modal-overlay.open #modalTitle,
.modal-overlay.open #modalDate {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.modal-close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.5rem;
    cursor: pointer;
    color: #4a5568;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transform: translateZ(0); /* Force GPU acceleration */
}

.modal-close-button:hover {
    color: #1a202c;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: scale(1.1) translateZ(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


body.modal-open {
    overflow: hidden;
}

html[dir="rtl"] #v3-openTableManagerButton{
    margin-left:50px;
    margin-right: unset; 
}

/* News manage button improvements */
#v3-openTableManagerButton {
    z-index: 1000 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}


.tab-button.active {
    border-color: #3B82F6;
    color: #ffffff;
}

html[dir="rtl"] #v3-openAddModal,#v3-saveChangesButton,.add-news{
    margin-left:1rem;
}

html[dir="rtl"] .v3-delete-button{
    margin-right:1rem
}

/* Slider Navigation Container */
.news-slider-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.news-slider-navigation .flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* Enhanced Modal Styles */
.modal-header {
    position: relative;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}

.modal-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

/* Enhanced Progress Bar */
.news-slider-progress {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Enhanced Navigation Arrows */
.news-slider__arrow {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.news-slider__arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.news-slider__arrow:hover::before {
    left: 100%;
}

/* Enhanced Pagination Dots */
.news-slider__pagination .swiper-pagination-bullet {
    width: 16px;
    height: 10px;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.15), rgba(255, 191, 0, 0.3));
    border-radius: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 4px;
    border: 1px solid rgba(255, 191, 0, 0.4);
    box-shadow: 0 1px 4px rgba(255, 191, 0, 0.10);
}

.news-slider__pagination .swiper-pagination-bullet:hover {
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.25), rgba(255, 191, 0, 0.45));
    border-color: rgba(255, 191, 0, 0.7);
    box-shadow: 0 2px 6px rgba(255, 191, 0, 0.15);
    transform: scale(1.08) translateZ(0);
}

.news-slider__pagination .swiper-pagination-bullet-active {
    background: linear-gradient(135deg, #FFBF00 60%, #FFD700 100%);
    width: 24px;
    transform: scale(1.12) translateZ(0);
    box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.15);
    border-color: #FFBF00;
}

/* Enhanced Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    /* Removed backdrop-filter for better performance */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.open .modal-content {
    transform: scale(1) translateZ(0);
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 100%);
    border-radius: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transform: translateZ(0); /* Force GPU acceleration */
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.modal-date {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    /* Removed backdrop-filter for better performance */
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 0;
}

.modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    /* Removed backdrop-filter for better performance */
    z-index: 10;
    transform: translateZ(0); /* Force GPU acceleration */
}

.modal-close-button:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.05) translateZ(0);
}

/* Enhanced View All News Modal */
.view-all-modal-content {
    background: linear-gradient(135deg, #1a2431 0%, #2d3748 50%, #1a2431 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.view-all-modal-content.open {
    transform: scale(1) translateZ(0);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-card {
        height: 380px;
        min-height: 380px;
        max-height: 380px;
    }

    .news-card-image {
        height: 160px;
    }

    .news-card-content {
        padding: 1rem;
    }

    .news-card-title {
        font-size: 1.1rem;
    }

    .modal-content {
        max-width: 95vw;
        margin: 1rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }
    
    /* All News Card Mobile Responsive */
    .all-news-card {
        height: 380px;
        min-height: 380px;
        max-height: 380px;
    }
    
    .all-news-card img,
    .all-news-card-image {
        height: 160px;
    }
    
    .all-news-card .news-card-content {
        padding: 1rem;
    }
    
    .all-news-card .news-card-title {
        font-size: 1.1rem;
    }
    
    .all-news-card .news-card-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }
    
    .all-news-card .news-card-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .news-card {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }

    .news-card-image {
        height: 140px;
    }

    .news-card-title {
        font-size: 1rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }
    
    /* All News Card Small Screen Responsive */
    .all-news-card {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }
    
    .all-news-card img,
    .all-news-card-image {
        height: 140px;
    }
    
    .all-news-card .news-card-title {
        font-size: 1rem;
    }
    
    .all-news-card .news-card-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .all-news-card .news-card-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
}

/* Optimized animation classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}

.fade-in-up.active-animation {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* RTL optimizations */
html[dir="rtl"] .news-slider__pagination {
    direction: rtl;
}

html[dir="rtl"] .news-slider__arrow .fa-arrow-right,
html[dir="rtl"] .news-slider__arrow .fa-arrow-left {
    transform: scaleX(-1);
}

html[dir="rtl"] .news-card-link {
    flex-direction: row-reverse;
    direction: rtl;
}

html[dir="rtl"] .news-card-link .fa-arrow-left {
    margin-right: 0.5rem;
    margin-left: 0;
    transform: scaleX(-1);
}

html[dir="rtl"] .news-card-link .fa-arrow-right {
    display: none;
}

html[dir="rtl"] .news-card-link .fa-arrow-left {
    display: inline-block;
}

html[dir="rtl"] .news-card-link span.relative {
    margin-right: 0;
    margin-left: 0;
}

html[dir="rtl"] .news-slider__pagination .swiper-pagination-bullet {
    margin-left: 6px;
    margin-right: 6px;
}

/* Try Again Button - Amber version of news card button */
.try-again-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    border: 2px solid #f59e0b;
    text-align: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.97rem;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 400;
    transform: translateZ(0); /* Force GPU acceleration */
    cursor: pointer;
}

.try-again-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.try-again-button:hover::before {
    left: 100%;
}

.try-again-button:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #ffffff;
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.try-again-button:active {
    transform: translateY(0) translateZ(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* RTL Support for Try Again Button */
html[dir="rtl"] .try-again-button {
    flex-direction: row-reverse;
    direction: rtl;
}