/* 
   Fidelity News Slider - Flexible Responsive Design
   --------------------------------------------------
*/

.news-slider-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    margin-top: 100px; /* Space for header */
}

@media (max-width: 768px) {
    .news-slider-section {
        margin-top: 70px;
    }
}

.swiper-news {
    width: 100%;
    height: auto;
}

.news-slide-container {
    position: relative;
    width: 100%;
    line-height: 0;
}

.news-slide-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Adjust height for desktop to maintain cinematic feel if images are too tall */
@media (min-width: 1024px) {
    .news-slide-img {
        max-height: 700px;
        object-fit: cover;
    }
}

.news-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
    pointer-events: none;
}

.news-slide-content {
    position: absolute;
    bottom: 15%;
    left: 10%;
    right: 10%;
    z-index: 3;
    color: #fff;
    max-width: 800px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.3s;
    text-align: left;
}

[dir="rtl"] .news-slide-content {
    text-align: right;
}

.swiper-slide-active .news-slide-content {
    opacity: 1;
    transform: translateY(0);
}

.news-slide-content h2 {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.news-slide-content p {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    margin-bottom: 20px;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.news-slide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
    position: relative;
    z-index: 10;
}

.news-slide-link:hover {
    background: transparent;
    color: #fff;
}

/* Navigation */
.swiper-news .swiper-button-next,
.swiper-news .swiper-button-prev {
    color: #fff;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.swiper-news .swiper-button-next:after,
.swiper-news .swiper-button-prev:after {
    font-size: 18px;
}

@media (max-width: 768px) {
    .swiper-news .swiper-button-next,
    .swiper-news .swiper-button-prev {
        display: none;
    }
    .news-slide-content {
        bottom: 10%;
        text-align: center;
        left: 5%;
        right: 5%;
    }
    [dir="rtl"] .news-slide-content {
        text-align: center;
    }
}

.swiper-news .swiper-pagination-bullet-active {
    background: var(--primary);
    width: 25px;
    border-radius: 10px;
}


/* ---- Mobile hero readability and touch controls ---- */
@media (max-width: 600px) {
    .news-slide-img { min-height: 330px; object-fit: cover; }
    .news-slide-content { bottom: 12%; left: 7%; right: 7%; }
    .news-slide-content h2 { font-size: clamp(1.35rem, 7vw, 2rem); line-height: 1.18; margin-bottom: 8px; }
    .news-slide-content p { font-size: .82rem; line-height: 1.4; margin: 0 auto 12px; max-width: 95%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .news-slide-link { min-height: 42px; padding: 9px 18px; font-size: .82rem; }
    .swiper-news .swiper-pagination { bottom: 8px; }
}
