/**
 * News & Events Slider Widget Styles - CPD Bangladesh
 */

.cpd-news-events-slider-widget {
    width: 100%;
    background-color: #fff;
    overflow: hidden;
}

/* Header Section */
.news-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    gap: 20px;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.news-events-header .section-title {
    margin: 0;
    font-weight: 600;
    font-size: 40px;
    line-height: 125%;
    letter-spacing: 0;
    color: #000000;
}

.explore-button {
    align-items: center;
    display: inline-flex;
    padding: 15px 20px;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%; /* 19.6px */
    gap: 10px;
    color: #0093CA;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid #0093CA;
    background-color: transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: auto;
}

.news-events-header .explore-button:hover {
    color: #ffffff;
    background-color: #0093CA;
    transform: translateX(2px);
}

.news-events-header .explore-button svg {
    transition: transform 0.3s ease;
}

.news-events-header .explore-button:hover svg {
    transform: translateX(2px);
}

/* Slider Container */
.news-events-slider-container {
    position: relative;
}

.cpd-news-events-slider {
    overflow: visible;
    padding-bottom: 20px;
}

/* News Event Cards */
.news-event-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #C6C6C6;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Card Image */
.card-image {
    position: relative;
    width: 100%;
    padding-top: calc(170 / 270 * 100%);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform 0.3s ease;
}

.news-event-card:hover .card-image img {
    transform: scale(1.05);
}

.card-category {
    color: #000;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%; /* 16.8px */
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Card Content */
.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-date {
    color: #5B6770;
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 150%; /* 21px */
}

.card-title {
    margin: 0 0 35px 0;
    color: #000;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%; /* 25.2px */
    transition: color 0.3s ease;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #0093CA;
}

.card-description {
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    position: absolute;
    right: 20px;
    bottom: 20px;
}

.read-more-link:hover {
    transform: translateX(2px);
}

.read-more-link svg {
    transition: transform 0.3s ease;
}

.read-more-link:hover svg {
    transform: translateX(2px);
}

/* Navigation */


.swiper-wrapper {

}


/* Swiper Pagination */
.swiper-pagination {
    position: static !important;
    margin-top: 30px;
    text-align: center;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #cccccc;
    opacity: 1;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #0093CA;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 1199px) {
    .news-events-header .section-title {
        font-size: 42px;
    }

    .slider-navigation {
        display: none;
    }
}

@media (max-width: 991px) {
    .cpd-news-events-slider-widget {
        padding: 40px 20px;
    }

    .news-events-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 40px;
    }

    .header-left {
        width: 100%;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .news-events-header .section-title {
        font-size: 36px;
    }

    .card-image {
        height: 180px;
    }

    .card-content {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .cpd-news-events-slider-widget {
        padding: 30px 20px;
    }

    .news-events-header .section-title {
        font-size: 28px;
    }

    .news-events-header {
        margin-bottom: 30px;
    }

    .card-image {
        height: 160px;
    }

    .card-content {
        padding: 18px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-description {
        font-size: 13px;
    }

    .news-events-slider-container {
        margin: 0 -15px;
        padding: 0 15px;
    }
}

@media (max-width: 479px) {
    .news-events-header .section-title {
        font-size: 24px;
    }

    .card-image {
        height: 140px;
    }

    .card-content {
        padding: 16px;
    }

    .news-events-header .explore-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Animation Enhancements */
.news-event-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.swiper-slide-active .news-event-card {
    animation-delay: 0.1s;
}

.swiper-slide-next .news-event-card {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus States for Accessibility */
.explore-button:focus,
.read-more-link:focus,
.card-title a:focus {
    outline: none;
    outline-offset: 0;
}

.slider-nav:focus {
    outline: none;
    outline-offset: 0;
}

/* Print Styles */
@media print {
    .cpd-news-events-slider-widget {
        background: none;
        padding: 20px 0;
    }

    .news-event-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #cccccc;
        margin-bottom: 20px;
    }

    .slider-navigation,
    .swiper-pagination {
        display: none;
    }

    .explore-button,
    .read-more-link {
        color: #000000;
    }

    .explore-button svg,
    .read-more-link svg {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .news-event-card {
        border: 2px solid #000000;
    }

    .card-title,
    .card-description {
        color: #000000;
    }

    .explore-button,
    .read-more-link {
        border-color: #000000;
        color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .news-event-card,
    .explore-button,
    .read-more-link,
    .slider-nav,
    .card-image img {
        transition: none;
        animation: none;
    }

    .news-event-card:hover {
        transform: none;
    }

    .explore-button:hover,
    .read-more-link:hover {
        transform: none;
    }

    .slider-nav:hover {
        transform: none;
    }
}

/* RTL Support */
[dir="rtl"] .news-events-header {
    direction: rtl;
}

[dir="rtl"] .explore-button,
[dir="rtl"] .read-more-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-category {
    left: auto;
    right: 15px;
}

[dir="rtl"] .slider-nav.slider-prev {
    margin-left: 0;
    margin-right: -25px;
}

[dir="rtl"] .slider-nav.slider-next {
    margin-right: 0;
    margin-left: -25px;
}

.news-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.news-navigation-nav-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    background: transparent;

}

.navigation-nav-btn:hover {
    border: none;
}

.news-navigation-nav-btn svg {
    width: 40px;
    height: 40px;
}