/* News Hero Section Styling */
.news-hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    height: 450px;
}

/* Left: Monthly News Grid */
.monthly-news-grid {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.monthly-news-cell {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
}

.monthly-news-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
    z-index: 1;
}

.monthly-news-item.active {
    z-index: 2;
}

.monthly-news-item.next {
    z-index: 1;
    visibility: hidden;
}

.monthly-news-cell:hover .monthly-news-item {
    transform: scale(1.05);
}

.monthly-news-item img,
.monthly-news-item .no-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.monthly-news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 10px;
    height: 60%;
}

.monthly-news-item h4 {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    color: white;
    font-size: 0.9rem;
    margin: 0;
    z-index: 2;
    line-height: 1.3;
}

/* Right: Main News Slider */
.main-news-slider {
    position: relative;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

/* Slider Animation Classes */
.news-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

.news-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transform: translateX(0);
}

/* RTL Animations (Arabic) */
.slide-in-right {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
    animation: slideInRight 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.slide-out-left {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
    animation: slideOutLeft 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

/* LTR Animations (English) */
.slide-in-left {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.slide-out-right {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
    animation: slideOutRight 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

.news-slide img,
.news-slide .no-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 50%);
}

.slider-content {
    position: absolute;
    bottom: 20px;
    left: 30px;
    right: 30px;
    color: white;
    z-index: 2;
}

.slider-title-link {
    text-decoration: none;
    color: white;
    display: block;
    transition: color 0.3s ease;
}

.slider-title-link:hover h2 {
    color: #4da3ff;
}

.slider-content h2 {
    font-size: 1.25rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.slider-content p {
    font-size: 1rem;
    margin: 0 0 20px 0;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slider-content .btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.slider-content .btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot.active,
.slider-dots .dot:hover {
    background: var(--secondary);
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-hero-section {
        grid-template-columns: 1fr;
        height: auto;
    }

    .monthly-news-grid {
        height: 300px;
        margin-bottom: 15px;
    }

    .main-news-slider {
        height: 400px;
    }

    .slider-content h2 {
        font-size: 1.4rem;
    }
}